0

您好,我需要显示不带小数的统一运费如何做到这一点,请咨询。

4

1 回答 1

0

在此之前的 Mage_Shipping_Model_Carrier_Flatrate 类的公共函数 collectRates 中

$method->setPrice($shippingPrice);
$method->setCost($shippingPrice);

把这两行

$value=  explode(',', '$shippingPrice'); 
$shippingPrice=$value[0];

所以修改后的代码将是

$value=  explode(',', '$shippingPrice'); 
$shippingPrice=$value[0];
$method->setPrice($shippingPrice);
$method->setCost($shippingPrice);
于 2013-03-11T17:17:11.487 回答