本文最後更新日期:2012年3月12日
無叉用點算?
要令購物車不要累計同一商品,就要修改[system\library\cart.php]的程式碼。
因為有其他網誌教授了這程式修改碼的方法,所以我不多詳述。今次我直接提供vQmod XML Script,適用於Opencart v1.5.1.3。
本文最後更新日期:2012年3月12日
要令購物車不要累計同一商品,就要修改[system\library\cart.php]的程式碼。
因為有其他網誌教授了這程式修改碼的方法,所以我不多詳述。今次我直接提供vQmod XML Script,適用於Opencart v1.5.1.3。
<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" encoding="utf-8"?> <modification> <id>Prevent accumulation of number of add to cart product</id> <version>1.1.0</version> <author>Flexidigi Solution Ltd.</author> <file name="system/library/cart.php"> <operation error="skip"> <search position="replace" index="1"><![CDATA[if ((int)$qty && ((int)$qty > 0)) {]]></search>   <add><![CDATA[ $this->session->data['cart'][$key] = (int)$qty; if (false) {]]></add> </operation> </file> </modification> </pre>
$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>