2012-03-25 142 views
1

我需要使用VQmod的帮助,如果任何人有任何经验,我会很感激任何帮助。我翻阅了VQmod文档,但可能错过了一些东西。我想一个新的选项卡添加到Opencart的新产品形式(product_form.tpl),vqmod添加代码,但不把它放在正确的地方:Opencart和VQmod问题与修改文件

修改:

<file name="admin/view/template/catalog/product_form.tpl"> 
     <operation> 
      <search position="after"><![CDATA[ 
      <a href="#tab-design"><?php echo $tab_design; ?></a> 
      ]]></search> 
      <add><![CDATA[ 
      <a href="#tab-pins"><?php echo $tab_pins; ?></a> 
      ]]></add> 
     </operation> 
    </file> 

修改代码,修改前:

<div id="tabs" class="htabs"> 

     <a href="#tab-general"><?php echo $tab_general; ?></a> 
     <a href="#tab-data"><?php echo $tab_data; ?></a> 
     <a href="#tab-links"><?php echo $tab_links; ?></a> 
     <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> 
     <a href="#tab-option"><?php echo $tab_option; ?></a> 
     <a href="#tab-discount"><?php echo $tab_discount; ?></a> 
     <a href="#tab-special"><?php echo $tab_special; ?></a> 
     <a href="#tab-image"><?php echo $tab_image; ?></a> 
     <a href="#tab-reward"><?php echo $tab_reward; ?></a> 
     <a href="#tab-design"><?php echo $tab_design; ?></a> 

</div> 

修饰后:

<div id="tabs" class="htabs"> 
<a class="selected" href="#tab-general" style="display: inline;">General</a> 
<a href="#tab-data" style="display: inline;">Data</a> 
<a href="#tab-links" style="display: inline;">Links</a> 
<a href="#tab-attribute" style="display: inline;">Attribute</a> 
<a href="#tab-option" style="display: inline;">Option</a> 
<a href="#tab-discount" style="display: inline;">Discount</a> 
<a href="#tab-special" style="display: inline;">Special</a> 
<a href="#tab-image" style="display: inline;">Image</a> 
<a href="#tab-reward" style="display: inline;">Reward Points</a> 
<a href="#tab-design" style="display: inline;">Design</a> 
</div> 
<a href="#tab-pins">Pin Numbers</a> 

任何帮助将不胜感激。

感谢,LEA

回答

0

更改您的代码

<file name="admin/view/template/catalog/product_form.tpl"> 
     <operation> 
      <search position="replace"><![CDATA[ 
      <a href="#tab-design"><?php echo $tab_design; ?></a> 
      ]]></search> 
      <add><![CDATA[<a href="#tab-design"><?php echo $tab_design; ?></a><a href="#tab-pins"><?php echo $tab_pins; ?></a>]]></add> 
     </operation> 
</file> 

这应该解决这个问题。你应该总是使用replace超过after添加标签

+0

杰伊吉尔福德 - 谢谢你! – Lea 2012-03-25 13:30:05