【问题标题】:How to edit shipping method option in Magento..?如何在 Magento 中编辑运输方式选项..?
【发布时间】:2016-01-07 12:26:29
【问题描述】:

请告诉我如何编辑运输方式选项 Magento

管理面板->系统->配置->销售->发货 方法->USPS->允许的方法

将“标准邮件”更改为“头等邮件”。

【问题讨论】:

    标签: magento shipping


    【解决方案1】:

    最后我想出了答案 转到->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;
    }
    

    【讨论】:

      猜你喜欢
      • 2013-02-21
      • 1970-01-01
      • 2012-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-23
      相关资源
      最近更新 更多