如何在 Magento 中编辑送货方式选项..?
How to edit shipping method option in Magento..?
请告诉我如何编辑 Magento 的送货方式选项
Admin Panel->System->Configuration->Sales->Shipping
Methods->USPS->Allowed Methods
将 "Standard Post" 更改为 "First Class Mail"。
终于找到答案了
转到->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;
}
请告诉我如何编辑 Magento 的送货方式选项
Admin Panel->System->Configuration->Sales->Shipping Methods->USPS->Allowed Methods
将 "Standard Post" 更改为 "First Class Mail"。
终于找到答案了 转到->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;
}