Magento的免費送貨,我已經啓用的免費送貨從系統 - > Configration->配送方式,我設定的最小起訂量50,但它不工作不工作
而且我不知道爲什麼這個條件if($request->getFreeShipping())
總是返回false
Magento的免費送貨,我已經啓用的免費送貨從系統 - > Configration->配送方式,我設定的最小起訂量50,但它不工作不工作
而且我不知道爲什麼這個條件if($request->getFreeShipping())
總是返回false
我自己實際上有這個問題,並偶然發現這個問題。對我而言,這是因爲購物車小計未被正確加載到位於下面路徑中的Freeshipping.php文件中。
文件路徑:
/app/code/core/Mage/Shipping/Model/Carrier/Freeshipping.php
現在,把這個文件複製:
/app/code/core/Mage/Shipping/Model/Carrier/Freeshipping.php
這個文件的位置
/app/code/local/Mage/Shipping/Model/Carrier/Freeshipping.php
找到一個具有這種
if (($request->getFreeShipping())
|| ($request->getBaseSubtotalInclTax() >= $this->getConfigData('free_shipping_subtotal'))
行
而與此
$totals = Mage::getSingleton('checkout/cart')->getQuote()->getTotals();
$subtotal = $totals["subtotal"]->getValue();
if (($request->getFreeShipping())
|| ($subtotal >= $this->getConfigData('free_shipping_subtotal'))
免費送貨應該在所有這些完成後工作。
我已經在Magento的1.7.0.2實現上述卡爾文K公司的答案,它會立即解決我們的問題代替它。
然而而非更新文件,首先一定要複製的文件,並上傳到:
/應用/代碼/ 當地 /Mage/Shipping/Model/Carriers/Freeshipping.php
這種方式你不修改核心Magento代碼。
我刷新了緩存,但它仍然不起作用:S –