protected function _initTotals() { parent::_initTotals(); $this->addTotal(new Varien_Object(array('code' => 'payment_fee', 'strong' => false, 'value' => $this->getSource()->getPaymentFeeAmount(), 'base_value' => $this->getSource()->getBasePaymentFeeAmount(), 'label' => $this->helper('adyen')->__('Payment Fee'), 'area' => '')), 'subtotal'); $this->addTotal(new Varien_Object(array('code' => 'payment_installment_fee', 'strong' => false, 'value' => $this->getSource()->getPaymentInstallmentFeeAmount(), 'base_value' => $this->getSource()->getBasePaymentInstallmentFeeAmount(), 'label' => $this->helper('adyen')->__('Payment Fee Installments'), 'area' => '')), 'subtotal'); return $this; }
/** * Initialize order totals array * * @return Mage_Sales_Block_Order_Totals */ protected function _initTotals() { parent::_initTotals(); $source = $this->getSource(); if ($this->getSource()->getMundipaggInterest() > 0) { $this->addTotalBefore(new Varien_Object(array('code' => 'mundipagg_interest', 'field' => 'interest', 'value' => $this->getSource()->getMundipaggInterest(), 'label' => $this->__('Interest'))), 'grand_total'); } return $this; }
/** * Initialize order totals array * * @return Mage_Sales_Block_Order_Totals */ protected function _initTotals() { parent::_initTotals(); $amt = $this->getSource()->getFeeAmount(); $baseAmt = $this->getSource()->getBaseFeeAmount(); if ($amt) { $this->addTotalBefore(new Varien_Object(array('code' => 'codpayment', 'value' => $amt, 'base_value' => $baseAmt, 'label' => 'Cash On Delivery Charges')), 'fee_amount'); } return $this; }
protected function _initTotals() { parent::_initTotals(); if (Mage::getStoreConfig('vc_giftwrap/general/enable')) { $price = Mage::helper('vc_giftwrap')->getAmountCreditmemoByOrderId($this->getOrder()->getId()); $giftwrap = new Varien_Object(array('code' => 'giftcard', 'value' => $price, 'base_value' => $price, 'label' => $this->helper('vc_giftwrap')->__('Gift Wrap'))); $this->addTotalBefore($giftwrap, 'grand_total'); } return $this; }
protected function _initTotals() { parent::_initTotals(); if (Mage::helper('customfee')->canApply()) { $subtotal = $this->getSource()->getSubtotal(); $amount = $this->getFeeAmount($subtotal); $this->addTotalBefore(new Varien_Object(array('code' => 'customfee', 'value' => $amount, 'base_value' => $amount, 'label' => $this->getLabel()), array('shipping', 'tax'))); } return $this; }
protected function _initTotals() { parent::_initTotals(); //Retrieve Creditpoint Amount from sales_flat_order table order wise $creditPointAmount = $this->getSource()->getCreditpointAmount(); $creditPoints = number_format(Mage::getModel('creditpoint/creditpoint')->load($this->getSource()->getOrderId(), 'order_id')->getAppliedCreditPoint()); if ($creditPointAmount > 0) { $this->addTotalBefore(new Varien_Object(array('code' => Mage::helper('creditpoint')->getCode(), 'value' => '-' . $creditPointAmount, 'base_value' => '-' . $creditPointAmount, 'strong' => false, 'label' => Mage::helper('creditpoint')->getCreditPointLabel($creditPoints)), array('shipping', 'tax'))); } return $this; }
/** * Initialize order totals array * * @return Mage_Sales_Block_Order_Totals */ protected function _initTotals() { parent::_initTotals(); $source = $this->getSource(); if ($this->getSource()->getJuros() > 0) { $this->addTotalBefore(new Varien_Object(array('code' => 'juros', 'strong' => true, 'value' => $this->getSource()->getJuros(), 'base_value' => $this->getSource()->getBaseJuros(), 'label' => Mage::getStoreConfig('payment/apelidocielo/texto_juros'), 'area' => 'footer')), 'grand_total'); } if ($this->getSource()->getDesconto() < 0) { $this->addTotalBefore(new Varien_Object(array('code' => 'desconto', 'strong' => true, 'value' => $this->getSource()->getDesconto(), 'base_value' => $this->getSource()->getBaseDesconto(), 'label' => Mage::getStoreConfig('payment/apelidocielo/texto_desconto_a_vista'), 'area' => 'footer')), 'grand_total'); } return $this; }
protected function _initTotals() { parent::_initTotals(); $add_giftwrap = false; $items = $this->getSource()->getAllItems(); foreach ($items as $item) { if ($item->getData('gomage_gift_wrap')) { $add_giftwrap = true; break; } } if ($add_giftwrap) { $this->_totals['gomage_gift_wrap'] = new Varien_Object(array('code' => 'gomage_gift_wrap', 'value' => $this->getSource()->getGomageGiftWrapAmount(), 'base_value' => $this->getSource()->getBaseGomageGiftWrapAmount(), 'label' => Mage::helper('gomage_checkout')->getConfigData('gift_wrapping/title'))); } return $this; }
protected function _initTotals() { parent::_initTotals(); $affiliate_credit = Mage::getModel('credit/creditorder')->load($this->getOrder()->getIncrementId()); //$affiliate = $affiliate_credit->getAffiliate(); $affiliate = 0; //$credit = $affiliate_credit ->getCredit(); $credit = 0; if ($affiliate > 0) { $this->_totals['affiliate_discount'] = new Varien_Object(array('code' => 'affiliate_discount', 'value' => -$affiliate, 'base_value' => -$affiliate, 'label' => 'Affiliate Discount')); } if ($credit > 0) { $this->_totals['credit_discount'] = new Varien_Object(array('code' => 'credit_discount', 'value' => -$credit, 'base_value' => -$credit, 'label' => 'Credit Discount')); } return $this; }
protected function _initTotals() { parent::_initTotals(); $rewardpoints = Mage::getModel('rewardpoints/rewardpointsorder')->load($this->getOrder()->getId()); $store_id = Mage::getModel('sales/order')->load($this->getOrder()->getId())->getStoreId(); $total_rewardpoint_use = $rewardpoints->getRewardPoint() + $rewardpoints->getRewardpointSellProduct(); $earn_rewardpoint = (int) $rewardpoints->getEarnRewardpoint(); if ($earn_rewardpoint > 0) { $total = new Varien_Object(array('code' => 'earn_rewardpoints', 'value' => Mage::helper('rewardpoints')->formatPoints($earn_rewardpoint, $store_id), 'base_value' => Mage::helper('rewardpoints')->formatPoints($earn_rewardpoint, $store_id), 'label' => Mage::helper('rewardpoints')->__('You Earn'), 'strong' => false, 'is_formated' => true)); $this->addTotal($total, 'first'); } if ($total_rewardpoint_use) { $total = new Varien_Object(array('code' => 'rewardpoints_discount', 'value' => Mage::helper('rewardpoints')->formatPoints($total_rewardpoint_use, $store_id), 'base_value' => Mage::helper('rewardpoints')->formatPoints($total_rewardpoint_use, $store_id), 'label' => Mage::helper('rewardpoints')->__('Total Points'), 'strong' => true, 'is_formated' => true)); $this->addTotal($total, 'last'); } return $this; }
/** * Initialize order totals array * * @return Mage_Sales_Block_Order_Totals */ protected function _initTotals() { parent::_initTotals(); $store = $this->getOrder()->getStore()->getId(); $taxConfig = Mage::getModel('adyen_fee/tax_config'); if ($taxConfig->displaySalesPaymentFeeBoth($store)) { $this->addPaymentFeeWithTax(true); $this->addPaymentFeeWithoutTax(true); } elseif ($taxConfig->displaySalesPaymentFeeInclTax($store)) { $this->addPaymentFeeWithTax(); } else { $this->addPaymentFeeWithoutTax(); } $this->addTotal(new Varien_Object(array('code' => 'payment_percentage_fee', 'strong' => false, 'value' => $this->getSource()->getPaymentPercentageFee(), 'base_value' => $this->getSource()->getBasePaymentPercentageFee(), 'label' => $this->helper('adyen')->__('Payment Percentage Fee'), 'area' => '')), 'subtotal'); $this->addTotal(new Varien_Object(array('code' => 'payment_installment_fee', 'strong' => false, 'value' => $this->getSource()->getPaymentInstallmentFeeAmount(), 'base_value' => $this->getSource()->getBasePaymentInstallmentFeeAmount(), 'label' => $this->helper('adyen')->__('Payment Fee Installments'), 'area' => '')), 'subtotal'); return $this; }
protected function _initTotals() { parent::_initTotals(); $order = $this->getSource()->getOrder(); $amount = $order->getServicecostPdf(); $tax = $order->getServicecostTax(); $code = $order->getPayment()->getMethod(); $method = $order->getPayment()->getMethodInstance(); if ($amount) { $this->addTotalBefore(new Varien_Object(array('code' => 'servicecost', 'value' => $amount, 'base_value' => $amount, 'label' => Mage::helper('msp')->getFeeLabel($code)), array('tax'))); $creditmemo = $this->getCreditMemo(); $creditmemo->setBaseTaxAmount($creditmemo->getBaseTaxAmount() + $tax); $creditmemo->setTaxAmount($creditmemo->getTaxAmount() + $tax); $creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $amount + $tax); $creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $amount + $tax); } return $this; }
public function __construct() { $this->_beforeToHtml(); parent::_construct(); }
protected function _initTotals() { parent::_initTotals(); $this->addTotal(new Varien_Object(array('code' => 'subscription_fee', 'strong' => false, 'value' => $this->getSource()->getSubscriptionFeeAmount(), 'base_value' => $this->getSource()->getBaseSubscriptionFeeAmount(), 'label' => $this->helper('adyen_subscription')->__('Subscription Fee'), 'area' => '')), 'subtotal'); return $this; }