本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}