2012-07-25 22 views
-1

在Opencart的(1.5.x版)可變<?php echo $content_bottom; ?>吐出了太多的內容,包括此消息:Opencart的content_bottom功能

Welcome to My Site 
Welcome to MySite.com, a company dedicated in giving you the best service while offering you the finest products – from genuine laptop batteries, laptop ac adapters/chargers, to LCD monitors – that are 100% genuine and proven to be of high quality that ensure you nothing but the best performance needed in order to give you the greatest satisfaction possible. 

我想要的變量只,只除去該消息,繼續吐的其餘信息出(無需拆卸整個內容)

+0

這是一個簡單的辦法,但好像很多人都不會幫助你,如果你不會標記任何你的答案是正確的。 – Cleverbot 2012-07-27 16:16:12

回答

0

只需打開你的search.tpl(我認爲是它正在因爲我發現你的真實的網站在線)

/catalog/view/theme/default/template/product/search.tpl

查找<?php echo $content_bottom; ?>並替換爲:

<? 
$my_message="<p>Welcome to My Site, Welcome to MySite.com, a company dedicated in giving you the best service while offering you the finest products – from genuine laptop batteries, laptop ac adapters/chargers, to LCD monitors – that are 100% genuine and proven to be of high quality that ensure you nothing but the best performance needed in order to give you the greatest satisfaction possible.</p>" 
$spitFooter=str_replace($my_message, "", $content_bottom); 
echo $spitFooter; 
?> 
+0

str_replace可能看起來很詭異,但在使用Opencart Admin WebSphere Commerce控制檯管理系統不足的情況下,它運行良好 – TheBlackBenzKid 2012-07-25 21:42:23

+0

我做到了,但它顯示此錯誤,我只需刪除歡迎內容或整個功能產品和主頁。 ..Parse error:syntax error,unexpected T_VARIABLE in /home/genuineb/public_html/catalog/view/theme/MarketInSG_Fashion_Orange/template/product/search.tpl on line 241 – kishmish 2012-07-26 09:57:04

+0

請你可以發佈你的完整search.tpl,並告訴我確切的你想要刪除什麼文字。在http://pastebin.com/ – TheBlackBenzKid 2012-07-26 10:51:24