duanaiguang1960 2012-03-25 13:21
浏览 46
已采纳

Opencart和VQmod问题修改文件

I need help with using VQmod, if anyone has any experience with, I'd appreciate any help. I went over the VQmod docs, but might've missed something. I am trying to add a new tab to the Opencart new product form(product_form.tpl), vqmod adds the code, but doesn't put it in the right place:

Modification:

<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>

Modified code, before modification:

    <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>

After modification:

<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>

Any help will be appreciated.

Thanks, Lea

  • 写回答

1条回答 默认 最新

  • dongshan1396 2012-03-25 13:28
    关注

    Change your code to

    <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>
    

    That should resolve it. You should always use the replace over after for adding tabs

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题