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


PHP Mage_Sales_Model_Quote_Address_Total_Abstract::fetch方法代码示例

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


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

示例1: fetch

 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $_result = parent::fetch($address);
     $giftCards = Mage::helper('aw_giftcard/totals')->getQuoteGiftCards($address->getQuote()->getId());
     $address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('aw_giftcard')->__('Gift Cards'), 'value' => -$address->getAwGiftCardsAmount(), 'gift_cards' => $giftCards));
     return $_result;
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:7,代码来源:Quote.php

示例2: fetch

 /**
  * Add discount 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)
 {
     parent::fetch($address);
     $amount = $address->getTotalAmount($this->getCode());
     if ($amount != 0) {
         $address->addTotal(array('code' => $this->getCode(), 'title' => $this->getLabel(), 'value' => $amount));
     }
     return $this;
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:15,代码来源:Discount.php

示例3: fetch

 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $_helper = Mage::helper('msp_cashondelivery');
     if (!$_helper->getSession()->getQuoteId()) {
         return $this;
     }
     parent::fetch($address);
     $_model = Mage::getModel('msp_cashondelivery/cashondelivery');
     $amount = $_model->getExtraFeeForTotal();
     if ($amount > 0 && $_helper->getQuote()->getPayment()->getMethod() == $_model->getCode() && $address->getAddressType() == Mage_Sales_Model_Quote_Address::TYPE_SHIPPING) {
         $address->addTotal(array('code' => $_model->getCode(), 'title' => $_helper->__('Cash On Delivery'), 'value' => $amount));
     }
     return $this;
 }
开发者ID:xiaoguizhidao,项目名称:bilderrahmen,代码行数:14,代码来源:Total.php

示例4: fetch

 /**
  * Don't fetch anything
  *
  * @param Mage_Sales_Model_Quote_Address $address
  * @return array
  */
 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     return Mage_Sales_Model_Quote_Address_Total_Abstract::fetch($address);
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:10,代码来源:Tax.php

示例5: fetch

 /**
  * Fetch (Retrieve data as array)
  *
  * @param Mage_Sales_Model_Quote_Address $address
  *
  * @return $this
  */
 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $store = $address->getQuote()->getStore();
     if (!$this->getHelper()->isActive($store)) {
         return parent::fetch($address);
     }
     Mage_Sales_Model_Quote_Address_Total_Abstract::fetch($address);
     $quote = $address->getQuote();
     $store = $quote->getStore();
     $amount = floatval($address->getTaxAmount());
     if ($amount != 0.0 || $this->_config->displayCartZeroTax($store)) {
         $fullInfo = array();
         $address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('tax')->__('Tax'), 'full_info' => $fullInfo, 'value' => $amount));
     }
     $displaySubtotal = $this->_config->displayCartSubtotalInclTax($store) ? $address->getSubtotalInclTax() : $address->getSubtotal();
     $address->addTotal(array('code' => 'subtotal', 'title' => Mage::helper('sales')->__('Subtotal'), 'value' => $displaySubtotal, 'value_incl_tax' => $address->getSubtotalInclTax(), 'value_excl_tax' => $address->getSubtotal()));
     $displayShipping = $this->_config->displayCartShippingInclTax($store) ? $address->getShippingInclTax() : $address->getShippingAmount();
     $address->addTotal(array('code' => 'shipping', 'title' => Mage::helper('sales')->__('Shipping'), 'value' => $displayShipping, 'value_incl_tax' => $address->getShippingInclTax(), 'value_excl_tax' => $address->getShippingAmount()));
     return $this;
 }
开发者ID:aoepeople,项目名称:aoe_avatax,代码行数:27,代码来源:Tax.php


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