Exemple #1
0
 /**
  * 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;
 }
 protected function _initTotals()
 {
     parent::_initTotals();
     $initAmount = $this->getOrder()->getSubscriptionInitAmount();
     if ($initAmount != 0) {
         $this->addTotal(new Varien_Object(array('code' => 'subscription_init_amount', 'value' => $initAmount, 'base_value' => $initAmount, 'label' => $initAmount > 0 ? Mage::helper('customweb_subscription')->__('Initial Subscription Fee') : Mage::helper('customweb_subscription')->__('Initial Subscription Discount'))), $initAmount > 0 ? 'fee' : 'discount');
     }
     return $this;
 }
 protected function _initTotals()
 {
     parent::_initTotals();
     $current_order_id = $this->getRequest()->getParam('order_id');
     $discount = Mage::getModel('storecredit/storecredit')->getOrderDiscount($current_order_id);
     if ($discount > 0) {
         $this->addTotal(new Varien_Object(array('code' => 'StoreCredit', 'value' => -$discount, 'label' => 'Store Credit Discount')), 'discount');
     }
     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;
 }
Exemple #5
0
 protected function _initTotals()
 {
     parent::_initTotals();
     if (Mage::getStoreConfig('vc_giftwrap/general/enable')) {
         $this->getRequest()->setParam('invoice_id', $this->getInvoice()->getId());
         $price = Mage::helper('vc_giftwrap')->getAmountInvoiceByOrderId($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;
 }
Exemple #6
0
 protected function _initTotals()
 {
     parent::_initTotals();
     $cur_order_id = $this->getRequest()->getParam('order_id');
     $order_id = Mage::helper("emipro_codpayment")->get_selected_method($cur_order_id);
     $amt = $this->getSource()->getFeeAmount();
     $baseAmt = $this->getSource()->getBaseFeeAmount();
     if ($amt != 0 && $order_id == 1) {
         $this->addTotal(new Varien_Object(array('code' => 'codpayment', 'value' => $amt, 'base_value' => $baseAmt, 'label' => 'Cash On Delivery Charges')), 'fee_amount');
     }
     return $this;
 }
Exemple #7
0
 /**
  * Initialize order totals array
  *
  * @return Mage_Sales_Block_Order_Invoice_Totals
  */
 public function _initTotals()
 {
     parent::_initTotals();
     $payment = $this->getOrder()->getPayment();
     if (substr($payment->getMethod(), 0, 5) != "sisow") {
         return $this;
     }
     $info = $payment->getMethodInstance()->getInfoInstance();
     if (!$info->getAdditionalInformation("invoice_fee")) {
         return $this;
     }
     return Mage::helper('sisow/paymentfee')->addToBlock($this);
 }
Exemple #8
0
 public function _initTotals()
 {
     parent::_initTotals();
     $payment = $this->getOrder()->getPayment();
     if ($payment->getMethod() != "billmateinvoice") {
         return $this;
     }
     $info = $payment->getMethodInstance()->getInfoInstance();
     if (!$info->getAdditionalInformation("invoice_fee")) {
         return $this;
     }
     return Mage::helper('billmateinvoice/total')->addToBlock($this);
 }
Exemple #9
0
 /**
  * Initialize order totals array
  *
  * @return Mage_Sales_Block_Order_Totals
  */
 protected function _initTotals()
 {
     parent::_initTotals();
     $order = $this->getOrder();
     $payment = $order->getPayment();
     $paymentMethodCode = $payment->getMethodInstance()->getCode();
     if (Mage::helper('base')->isIdeasaPaymentMethod($paymentMethodCode)) {
         $amount = Mage::getModel($paymentMethodCode . '/discount')->getIdeasaDiscount($order);
         if (abs($amount) > 0) {
             $baseAmount = Mage::getModel($paymentMethodCode . '/discount')->getIdeasaBaseDiscount($order);
             $code = Mage::getModel($paymentMethodCode . '/discount')->getIdeasaDiscountCode();
             $this->addTotal(new Varien_Object(array('code' => $code, 'value' => $amount, 'base_value' => $baseAmount, 'label' => Mage::helper($paymentMethodCode)->__('Payment Discount'))));
         }
     }
     return $this;
 }
Exemple #10
0
 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) {
         $gift_wrap_totals = 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')));
         $this->addTotalBefore($gift_wrap_totals, 'grand_total');
     }
     return $this;
 }
Exemple #11
0
 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(
         $total = new Varien_Object(array('code' => 'affiliate_discount', 'value' => -$affiliate, 'base_value' => -$affiliate, 'label' => 'Affiliate Discount'));
         $this->addTotal($total);
     }
     if ($credit > 0) {
         //$this->_totals['credit_discount'] = new Varien_Object(array(
         $total = new Varien_Object(array('code' => 'credit_discount', 'value' => -$credit, 'base_value' => -$credit, 'label' => 'Credit Discount'));
         $this->addTotal($total);
     }
     return $this;
 }
 protected function _prepareLayout()
 {
     parent::__construct();
     $taxBlock = $this->getLayout()->createBlock('pdfinvoiceplus/totals_tax')->setTemplate('pdfinvoiceplus/tax/order/tax.phtml');
     $this->setChild('tax', $taxBlock);
 }