当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Sales_Model_Quote_Address::getShippingDescription方法代码示例

本文整理汇总了PHP中Mage_Sales_Model_Quote_Address::getShippingDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote_Address::getShippingDescription方法的具体用法?PHP Mage_Sales_Model_Quote_Address::getShippingDescription怎么用?PHP Mage_Sales_Model_Quote_Address::getShippingDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Sales_Model_Quote_Address的用法示例。


在下文中一共展示了Mage_Sales_Model_Quote_Address::getShippingDescription方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fetch

 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $amount = $address->getShippingAmount();
     $title = Mage::helper('sales')->__('Shipping & Handling');
     if ($address->getShippingDescription()) {
         $title .= ' (' . $address->getShippingDescription() . ')';
     }
     $address->addTotal(array('code' => $this->getCode(), 'title' => $title, 'value' => $address->getShippingAmount()));
     return $this;
 }
开发者ID:mayurmarwa,项目名称:excellence_magento_blog,代码行数:10,代码来源:Shipping.php

示例2: fetchTotals

 /**
  * Fetch totals
  *
  * @param Mage_Sales_Model_Quote_Address $address
  * @return Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Shipping
  */
 public function fetchTotals(Mage_Sales_Model_Quote_Address $address)
 {
     $amount = $address->getShippingAmount();
     if ($amount != 0) {
         $title = Mage::helper('sales')->__('Shipping & Handling');
         if ($address->getShippingDescription()) {
             $title .= sprintf(' (%s)', $address->getShippingDescription());
         }
         $address->addTotal(array('code' => 'shipping', 'title' => $title, 'value' => $address->getShippingAmount()));
     }
     return $this;
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:18,代码来源:Shipping.php

示例3: addressToOrder

 /**
  * Convert quote address model to order
  *
  * @param   Mage_Sales_Model_Quote $quote
  * @return  Mage_Sales_Model_Order
  */
 public function addressToOrder(Mage_Sales_Model_Quote_Address $address, $order = null)
 {
     if (!$order instanceof Mage_Sales_Model_Order) {
         $order = $this->toOrder($address->getQuote());
     }
     $order->setWeight($address->getWeight())->setShippingMethod($address->getShippingMethod())->setShippingDescription($address->getShippingDescription())->setShippingRate($address->getShippingRate())->setSubtotal($address->getSubtotal())->setTaxAmount($address->getTaxAmount())->setDiscountAmount($address->getDiscountAmount())->setShippingAmount($address->getShippingAmount())->setGiftcertAmount($address->getGiftcertAmount())->setCustbalanceAmount($address->getCustbalanceAmount())->setGrandTotal($address->getGrandTotal())->setBaseSubtotal($address->getBaseSubtotal())->setBaseTaxAmount($address->getBaseTaxAmount())->setBaseDiscountAmount($address->getBaseDiscountAmount())->setBaseShippingAmount($address->getBaseShippingAmount())->setBaseGiftcertAmount($address->getBaseGiftcertAmount())->setBaseCustbalanceAmount($address->getBaseCustbalanceAmount())->setBaseGrandTotal($address->getBaseGrandTotal());
     Mage::dispatchEvent('sales_convert_quote_address_to_order', array('address' => $address, 'order' => $order));
     return $order;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:15,代码来源:Quote.php

示例4: fetch

 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $this->_method = $address->getQuote()->getPayment()->getMethod();
     $label = Mage::helper('msp')->getFeeLabel($this->_method);
     $quote = $address->getQuote();
     $code = $quote->getPayment()->getMethod();
     $amount = $address->getShippingAmount();
     if ($amount != 0 || $address->getShippingDescription()) {
         if ($address->getServicecostAmount()) {
             $address->addTotal(array('code' => $this->getCode(), 'title' => $label, 'value' => $address->getServicecostPdf()));
         }
     }
     return $this;
 }
开发者ID:xiaoguizhidao,项目名称:storebaby.it,代码行数:14,代码来源:Servicecost.php

示例5: fetch

 /**
  * Add shipping totals information to address object
  *
  * @param   Mage_Sales_Model_Quote_Address $address
  * @return  Mage_Sales_Model_Quote_Address_Total_Shipping
  */
 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $amount = $address->getShippingAmount();
     if ($amount != 0 || $address->getShippingDescription()) {
         $title = Mage::helper('sales')->__('Shipping & Handling');
         $desc = $address->getShippingDescription();
         switch ($desc) {
             case "Versandkostenpauschale - Versandkostenpauschale":
                 $desc = "Versandkostenpauschale";
                 break;
             case "Versandkostenfrei - Versandkostenfrei":
                 $desc = "Versandkostenfrei";
                 break;
         }
         $title .= ' (' . $desc . ')';
         $value = $address->getShippingAmount();
         $address->addTotal(array('code' => $this->getCode(), 'title' => $title, 'value' => $value));
     }
     return $this;
 }
开发者ID:vberzsin,项目名称:shop,代码行数:26,代码来源:Shipping.php

示例6: fetch

 /**
  * Add shipping totals information to address object
  *
  * @param   Mage_Sales_Model_Quote_Address $address
  * @return  Mage_Sales_Model_Quote_Address_Total_Shipping
  */
 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $amount = $address->getShippingAmount();
     if ($amount != 0 || $address->getShippingDescription()) {
         $title = Mage::helper('sales')->__('Shipping & Handling');
         if ($address->getShippingDescription()) {
             $description = str_replace("Express courier - ", "", $address->getShippingDescription());
             $description = str_replace("Corriere espresso - ", "", $address->getShippingDescription());
             $title .= ' (' . $description . ')';
         }
         $address->addTotal(array('code' => $this->getCode(), 'title' => $title, 'value' => $address->getShippingAmount()));
     }
     return $this;
 }
开发者ID:technomagegithub,项目名称:colb2b,代码行数:20,代码来源:Shipping.php

示例7: fetch

 /**
  * Add shipping totals information to address object
  *
  * @param   Mage_Sales_Model_Quote_Address $address
  * @return  Mage_Sales_Model_Quote_Address_Total_Shipping
  */
 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $amount = $address->getShippingAmount();
     if ($amount != 0 || $address->getShippingDescription()) {
         $title = Mage::helper('sales')->__('Shipping Charges');
         if ($address->getShippingDescription()) {
             $desc = $address->getShippingDescription();
             $_pos = strpos($desc, "-");
             if ($_pos === false) {
                 $title .= ' (' . $address->getShippingDescription() . ')';
             } else {
                 $_temp = explode("-", $desc);
                 if (isset($_temp[1])) {
                     $title .= ' (' . trim($_temp[1]) . ')';
                 }
             }
             //   $title .= ' (' . $address->getShippingDescription() . ')';
         }
         $address->addTotal(array('code' => $this->getCode(), 'title' => $title, 'value' => $address->getShippingAmount()));
     }
     return $this;
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:28,代码来源:Shipping.php


注:本文中的Mage_Sales_Model_Quote_Address::getShippingDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。