Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
表1小计的费率百分比(Magento)_Magento_Magento 1.4 - Fatal编程技术网

表1小计的费率百分比(Magento)

表1小计的费率百分比(Magento),magento,magento-1.4,Magento,Magento 1.4,有没有办法在Magento中使用表格费率,将费率设置为小计的百分比 或者有没有一种方法可以设置一系列小计,这些小计的运费百分比不同?对于后者,您需要为此开发自己的运费模块,可能是从现有的运费模块中分离出来的。事实上,这是你在Magento可以进行的记录较多的项目之一。例如,看一看 希望有帮助 谢谢, Joe如果要尝试快速方法,请将Tablerate.php从app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php复制到本地目录,然后对文件进行

有没有办法在Magento中使用表格费率,将费率设置为小计的百分比


或者有没有一种方法可以设置一系列小计,这些小计的运费百分比不同?

对于后者,您需要为此开发自己的运费模块,可能是从现有的运费模块中分离出来的。事实上,这是你在Magento可以进行的记录较多的项目之一。例如,看一看

希望有帮助

谢谢,
Joe

如果要尝试快速方法,请将Tablerate.php从app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php复制到本地目录,然后对文件进行更改。126号线附近 您可以看到这样的代码

$shippingPrice = $this->getFinalPriceWithHandlingFee($rate['price']/100);
将代码更改为

$totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
$subtotal = $totals["subtotal"]->getValue();
$shippingPrice = $this->getFinalPriceWithHandlingFee($subtotal*$rate['price']/100);
然后在配置中上传不同费率的csv文件,用于表格费率传送,然后它将工作。您可以尝试以下示例csv

Country,Region/State,"Zip/Postal Code","Order Subtotal (and above)","Shipping Price"
*,*,*,1,25
*,*,*,100,20
*,*,*,150,15
*,*,*,200,10
*,*,*,250,5
上面的csv包含不同的费率,上面的更改代码将其更改为装运百分比计算