$this->data['products'][] = array(
if ($image)
<p>
<!--<br />
Make sure that you have properly installed Opencart vQmod.<br />
Copy this page of script.<br />
Save as a .xml file of utf-8 encoding without BOM into the directory [vqmod/xml].<br />
Name the file as you like.<br />
--></p>
<pre contenteditable="true">
<?xml version="1.0"?>
<modification>
<id>Hide products without photos</id>
<version>1.0.0</version>
<author>Flexidigi Solution Ltd</author>
<file name="catalog/controller/module/latest.php">
<operation error="skip">
   <search position="before"><![CDATA[
   $this->data['products'][] = array(
   ]]></search>
   <add><![CDATA[if ($image) ]]></add>
</operation>
</file>
<file name="catalog/controller/module/featured.php">
<operation error="skip">
   <search position="before"><![CDATA[
   $this->data['products'][] = array(
   ]]></search>
   <add><![CDATA[if ($image) ]]></add>
</operation>
</file>
<file name="catalog/controller/module/special.php">
<operation error="skip">
   <search position="before"><![CDATA[
   $this->data['products'][] = array(
   ]]></search>
   <add><![CDATA[if ($image) ]]></add>
</operation>
</file>
</modification>
</pre>
有些商品我沒有加入圖片。怎樣不顯示它們在Special、Featured和Latest這三個模版內?
- 開啟[catalog/view/theme/default/template/module]。
- 編輯三個檔案:[special.tpl]、[featured.tpl]、[special.tpl]。
- 搜尋以下程式碼:
$this->data['products'][] = array(
- 在前一行加入以下程式碼:
if ($image)
0 comments:
Post a Comment