twhite3000 / vqmod

Automatically exported from code.google.com/p/vqmod
0 stars 0 forks source link

VQmod not adding new markup in place #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi all,

I went over the docs, but might've missed something. I am typing 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

vQmod Version: 2.1.5
Server Operating System: LAMP

Please provide any additional information below.

Original issue reported on code.google.com by paanten...@gmail.com on 25 Mar 2012 at 4:03

GoogleCodeExporter commented 9 years ago
Solved it. Use 'position="replace"', instead of 'after or before'

Original comment by paanten...@gmail.com on 26 Mar 2012 at 12:39

GoogleCodeExporter commented 9 years ago

Original comment by DJG6...@gmail.com on 26 Mar 2012 at 2:34

GoogleCodeExporter commented 9 years ago
This is invalid as you're expecting the content to be as you've formatted it 
above, where as in fact it's all one long line from the opening div tag to the 
closing one. Make sure you view source when figuring out how to match content. 
vQmod actually worked perfectly

Original comment by DJG6...@gmail.com on 26 Mar 2012 at 2:37

GoogleCodeExporter commented 9 years ago
Hi, that was a statement of subjectivity, not a statement of fact. VQmod works 
fine, but not in my instance - admittedly as I stated, and gave the impression, 
it may have been something I missed, and I did. Thanks for your reply.

Original comment by paanten...@gmail.com on 26 Mar 2012 at 6:14

GoogleCodeExporter commented 9 years ago
Well vQmod did work fine, however you need to understand that you need to view 
the source of the code exactly as it is, not where it's been nicely formatted 
by something like firebug. If the code had been formatted as you put above to 
begin with, then vQmod would have added the code as you expected it to

Original comment by DJG6...@gmail.com on 26 Mar 2012 at 10:36