2014-03-03 68 views
0

我的代碼位於單個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> 

現在好友第二個文件標籤總是替換我的搜索數據。即使我不給位置=「替換」。 我錯了,請給我建議。

+2

我會嘗試將所有位置更改爲*小寫*,即'replace'和'after'並且始終只使用小寫。那麼對於'搜索'也不要將搜索數據分成多行。並且第一個替換是完全沒用的,因爲您可以在管理中更改OpenCart的徽標... – shadyyx

+0

謝謝@shadyyx sir, 但是,第二次搜索甚至是單次搜索也不起作用。 我已經嘗試了所有可能的條件,如小寫「後」和單行搜索,但都是徒勞。 我很無奈。 請給我一些建議。 我哪裏錯了? –

+1

是否標識了搜索字符串?你可以檢查vQmod日誌是否包含關於這個XML的一些錯誤?如果您訪問'vqcache'文件夾並搜索文件'vq_catalog_controller_module_slideshow.php'(如果存在),您能看到應用於源代碼的更改嗎? – shadyyx

回答

2

您的第一個文件標記碼存在錯誤。最有可能的:

  1. 錯誤的文件位置(catalog/view/theme/shopitout/template/common/header.tpl)。
  2. 或提及的搜索代碼不catalog/view/theme/shopitout/template/common/header.tpl

證明存在上述聲明:

  1. 首先移動第二個文件標籤 - 工作。
  2. 或刪除error="abort"參數形式的第一個文件的標籤 - 2文件中的代碼工作

,如果你仍然無法找到的錯誤,然後參考一節的標題下 - Opencart Vqmod xml file not working??https://sankartypo3.wordpress.com/2013/11/25/opencart-vqmod-tutorial/

有一個美好的一天!

+0

謝謝非常@sankarV最有可能這個答案是有用的,但我 文件的位置是正確的我已經檢查了兩次,發現正確 和搜索代碼也存在於文件中,但先生,我會檢查移除錯誤=「中止」可能它會工作。 祝您有愉快的一天。 –