Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top