【发布时间】:2016-01-07 12:26:29
【问题描述】:
请告诉我如何编辑运输方式选项 Magento
管理面板->系统->配置->销售->发货 方法->USPS->允许的方法
将“标准邮件”更改为“头等邮件”。
【问题讨论】:
请告诉我如何编辑运输方式选项 Magento
管理面板->系统->配置->销售->发货 方法->USPS->允许的方法
将“标准邮件”更改为“头等邮件”。
【问题讨论】:
最后我想出了答案 转到->app\code\local\Mage\Sales\Model\Quote\Address\Rate.php
public function importShippingRate(Mage_Shipping_Model_Rate_Result_Abstract $rate)
{
if($rate->getMethodTitle() == 'Standard Post'){
**/* Change here */**
$shipping_method='First Class Mail';
}
else
{
$shipping_method=$rate->getMethodTitle();
}
if ($rate instanceof Mage_Shipping_Model_Rate_Result_Error) {
$this
->setCode($rate->getCarrier().'_error')
->setCarrier($rate->getCarrier())
->setCarrierTitle($rate->getCarrierTitle())
->setErrorMessage($rate->getErrorMessage())
;
} elseif ($rate instanceof Mage_Shipping_Model_Rate_Result_Method) {
$this
->setCode($rate->getCarrier().'_'.$rate->getMethod())
->setCarrier($rate->getCarrier())
->setCarrierTitle($rate->getCarrierTitle())
->setMethod($rate->getMethod())
//->setMethodTitle($rate->getMethodTitle())
**/* Change here */**
->setMethodTitle($shipping_method)
->setMethodDescription($rate->getMethodDescription())
->setPrice($rate->getPrice())
;
}
return $this;
}
【讨论】: