0

My Code is in a single xml file.

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created using vQModerator's XML Generator by The Wizard of Osch for http://www.crystalcopy.nl //-->
<!-- (Based on vQmod XML Generator by UKSB - http://www.opencart-extensions.co.uk) //-->
<modification>
    <id><![CDATA[vQModerator Installation]]></id>
    <version><![CDATA[1.1.6]]></version>
    <vqmver><![CDATA[2.4.1]]></vqmver>
    <author><![CDATA[Nidhishanker Modi]]></author>

    <file name="catalog/view/theme/shopitout/template/common/header.tpl" error="abort">
        <operation info="">
            <search position="Replace" offset="" ><![CDATA[<img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" />]]></search>
            <add><![CDATA[<img src="image/data/my_logo.png" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" />]]></add>
        </operation>
    </file>

    <file name="catalog/controller/module/slideshow.php" error="">
        <operation info="">
            <search position="After" ><![CDATA[
            $results = $this->model_design_banner->getBanner($setting['banner_id']);
            ]]></search>
            <add><![CDATA[echo "Testing Data to hold screen"; exit; ]]></add>
        </operation>
    </file> 
</modification>

Now Friends the second file tag is replacing my search data always. Even i am not giving postion="replace". where i am wrong please give me suggestions.

  • 2
    I would try to change all the positions to *lowercase*, that is `replace` and `after` and use lowercase always only. Then also for `search` do not split the search data into multiple lines. And the first replacement is completely useless as You can change the OpenCart's logo within administration... – shadyyx Mar 03 '14 at 13:27
  • Thank you @shadyyx sir, But what about second search even single second search is also not working. i have tried all possible conditions like lowercase "after" and single line search but all in vain. i am helpless. Please suggest me something. Where m i wrong ? – Nidhishanker Modi Mar 03 '14 at 13:36
  • 1
    Is the search string identified? Can You check the vQmod log whether it contains some error(s) regarding this XML? If You go to `vqcache` folder and search for the file `vq_catalog_controller_module_slideshow.php` (if present), can You see the changes being applied to the source code? – shadyyx Mar 03 '14 at 15:07
  • How is this question different from your previous one? http://stackoverflow.com/q/22143613/367456 – hakre Mar 03 '14 at 15:10
  • @shadyyx I have checked it is also replacing in that file even the main thing is that the vqmod is creating a cache file but it is not doing appropriate changes, – Nidhishanker Modi Mar 04 '14 at 04:50

1 Answers1

2

There is an error in your first file tag code. Most probably:

  1. Wrong file location (catalog/view/theme/shopitout/template/common/header.tpl) .
  2. Or mentioned search code doesn't exist in catalog/view/theme/shopitout/template/common/header.tpl

Proof for the above statements:

  1. Move the second file tag to first - Working.
  2. Or remove the error="abort" parameter form first file tag - 2nd file code Working

if you still can't find the error, then refer the section under the heading - Opencart Vqmod xml file not working?? in https://sankartypo3.wordpress.com/2013/11/25/opencart-vqmod-tutorial/

Have a nice day!!

Sankar V
  • 4,110
  • 5
  • 28
  • 52
  • Thank you very much @sankarV most probably this answer is useful but my file location is correct i have checked it two times and found correct and the search code is also exist in file but sir i will check to remove error="abort" may be it will work. Have a nice day. – Nidhishanker Modi Mar 04 '14 at 04:48