我的代碼位於單個xml文件中。使用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>
現在好友第二個文件標籤總是替換我的搜索數據。即使我不給位置=「替換」。 我錯了,請給我建議。
我會嘗試將所有位置更改爲*小寫*,即'replace'和'after'並且始終只使用小寫。那麼對於'搜索'也不要將搜索數據分成多行。並且第一個替換是完全沒用的,因爲您可以在管理中更改OpenCart的徽標... – shadyyx
謝謝@shadyyx sir, 但是,第二次搜索甚至是單次搜索也不起作用。 我已經嘗試了所有可能的條件,如小寫「後」和單行搜索,但都是徒勞。 我很無奈。 請給我一些建議。 我哪裏錯了? –
是否標識了搜索字符串?你可以檢查vQmod日誌是否包含關於這個XML的一些錯誤?如果您訪問'vqcache'文件夾並搜索文件'vq_catalog_controller_module_slideshow.php'(如果存在),您能看到應用於源代碼的更改嗎? – shadyyx