繁体   English   中英

在Open cart中使用XML文件编辑控制器

[英]Edit a controller using XML file in Open cart

我的代码在一个xml文件中。

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

现在朋友第二个文件标签总是替换我的搜索数据。 即使我不给postion =“替换”。 在哪里我错了请给我建议。

您的第一个文件标记代码中存在错误。 最可能:

  1. 错误的文件位置( catalog/view/theme/shopitout/template/common/header.tpl )。
  2. 或者在catalog/view/theme/shopitout/template/common/header.tpl中不存在提到的搜索代码

以上陈述的证明:

  1. 将第二个文件标记移到第一个 - 工作。
  2. 或者从第一个文件标签中删除error="abort"参数 - 第二个文件代码工作

如果你仍然找不到错误,那么请参考标题下的部分 - Opencart Vqmod xml file not working?? https://sankartypo3.wordpress.com/2013/11/25/opencart-vqmod-tutorial/

祝你今天愉快!!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM