本文整理汇总了PHP中Mage_Sales_Model_Quote_Address::addTotal方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote_Address::addTotal方法的具体用法?PHP Mage_Sales_Model_Quote_Address::addTotal怎么用?PHP Mage_Sales_Model_Quote_Address::addTotal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Quote_Address
的用法示例。
在下文中一共展示了Mage_Sales_Model_Quote_Address::addTotal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if ($address->getBasePaymentCharge() != 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('sales')->__('Payment Charge'), 'full_info' => array(), 'value' => $address->getPaymentCharge(), 'base_value' => $address->getBasePaymentCharge()));
}
return $address->getBasePaymentCharge();
}
示例2: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if ($amount = $address->getAffiliateCredit()) {
$address->addTotal(array('code' => $this->getCode(), 'title' => $this->_getConfigHelper()->__('Paid by Affiliate Credit'), 'value' => $amount));
}
return $this;
}
示例3: fetch
/**
* Add convenienceservice information to address
*
* @param Mage_Sales_Model_Quote_Address $address
* @return Magentix_Convenienceservice_Model_Sales_Quote_Address_Total_Convenienceservice
*/
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getConvenienceserviceAmount();
$convenienceservicechargepercentage = Mage::getStoreConfig('convenience/convenience_group/convenienceservicechargepercentage');
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('convenienceservice')->__("Service Tax ({$convenienceservicechargepercentage}% of Conv. Fee)"), 'value' => $amount));
return $this;
}
示例4: fetch
/**
* Add fee information to address
*
* @param Mage_Sales_Model_Quote_Address $address
* @return Brander_PaymentFee_Model_Sales_Quote_Address_Total_Fee
*/
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getFeeAmount();
$title = Mage::getModel('payment_fee/fee')->getTotalTitle(null, $address->getQuote());
$address->addTotal(array('code' => $this->getCode(), 'title' => $title, 'value' => $amount));
return $this;
}
示例5: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if ($giftVoucherDiscount = $address->getGiftVoucherDiscount()) {
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('giftvoucher')->__('Gift Voucher'), 'value' => -$giftVoucherDiscount, 'gift_codes' => $address->getGiftCodes(), 'codes_base_discount' => $address->getCodesBaseDiscount(), 'codes_discount' => $address->getCodesDiscount()));
}
return $this;
}
示例6: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if ($address->getDamageWaiverAmount() > 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => $this->getLabel(), 'value' => $address->getDamageWaiverAmount()));
}
return $this;
}
示例7: fetch
/**
* Update the address with totals data used for display in a total line,
* e.g. a total line in the cart.
*
* @param Mage_Sales_Model_Quote_Address
* @return self
*/
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$total = $address->getTotalAmount($this->getCode());
if ($total) {
$address->addTotal(['code' => $this->getCode(), 'title' => $this->_helper->__(self::TAX_TOTAL_TITLE), 'value' => $total]);
}
return $this;
}
示例8: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
if ($address->getAddressType() == Mage_Sales_Model_Quote_Address::TYPE_SHIPPING) {
return $this;
}
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('sales')->__('Points Earned')));
return $this;
}
示例9: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getPaymentCharge();
if ($amount != 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::getStoreConfig('pay_payment/general/text_payment_charge', Mage::app()->getStore()), 'full_info' => array(), 'value' => $amount, 'base_value' => $amount));
}
return $amount;
}
示例10: fetch
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amt = $address->getPaymentInstallmentFeeAmount();
if ($amt != 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => Mage::helper('adyen')->__('Installment Fee'), 'value' => $amt));
}
return $this;
}
示例11: fetchTotals
public function fetchTotals(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getShippingAmount();
if ($amount != 0) {
$address->addTotal(array('code' => 'shipping', 'title' => Mage::helper('sales')->__('Shipping & Handling') . ' (' . $address->getShippingDescription() . ')', 'value' => $address->getShippingAmount()));
}
return $this;
}
示例12: fetch
/**
* @param Mage_Sales_Model_Quote_Address $address
*
* @return $this
*/
public function fetch(Mage_Sales_Model_Quote_Address $address)
{
$amt = $address->getShopgatePaymentFee();
if ($amt != 0) {
$address->addTotal(array('code' => $this->getCode(), 'title' => $this->getLabel(), 'value' => $amt));
}
return $this;
}
示例13: fetchTotals
public function fetchTotals(Mage_Sales_Model_Quote_Address $address)
{
$custbalance = $address->getCustbalanceAmount();
if ($custbalance != 0) {
$address->addTotal(array('code' => 'custbalance', 'title' => Mage::helper('sales')->__('Store Credit'), 'value' => -$custbalance));
}
return $this;
}
示例14: fetchTotals
public function fetchTotals(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getGiftcertAmount();
if ($amount) {
$address->addTotal(array('code' => 'giftcert', 'title' => AO::helper('giftcert')->__('Gift Certificate') . ' (' . $address->getGiftcertCode() . ')', 'value' => -$amount, 'output' => true));
}
return $this;
}
示例15: fetchTotals
public function fetchTotals(Mage_Sales_Model_Quote_Address $address)
{
$amount = $address->getTaxAmount();
if ($amount != 0) {
$address->addTotal(array('code' => 'tax', 'title' => Mage::helper('sales')->__('Tax'), 'value' => $amount));
}
return $this;
}