Example #1
0
 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;
 }
Example #2
0
 /**
  * Initialize order totals array
  *
  * @return Mage_Sales_Block_Order_Totals
  */
 protected function _initTotals()
 {
     parent::_initTotals();
     $source = $this->getSource();
     if ($this->getSource()->getInterest() > 0) {
         $this->addTotalBefore(new Varien_Object(array('code' => 'interest', 'strong' => true, 'value' => $this->getSource()->getInterest(), 'base_value' => $this->getSource()->getBaseInterest(), 'label' => $this->__('Interest'), 'area' => 'footer')), 'grand_total');
     }
     return $this;
 }
Example #3
0
 protected function _initTotals()
 {
     parent::_initTotals();
     $initAmount = $this->getSource()->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;
 }
Example #4
0
 protected function _initTotals()
 {
     parent::_initTotals();
     if (Mage::getStoreConfig('vc_giftwrap/general/enable')) {
         $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;
 }
Example #5
0
 /**
  * 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;
 }
Example #6
0
 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;
 }
Example #7
0
 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;
 }
Example #8
0
 protected function _initTotals()
 {
     parent::_initTotals();
     $source = $this->getSource();
     $amount = $source->getOrder()->getServicecostPdf();
     $method = $source->getOrder()->getPayment()->getMethodInstance();
     $code = $source->getOrder()->getPayment()->getMethod();
     if ($amount) {
         $this->addTotalBefore(new Varien_Object(array('code' => 'servicecost', 'value' => $amount, 'base_value' => $amount, 'label' => Mage::helper('msp')->getFeeLabel($code)), array('tax')));
     }
     return $this;
 }
Example #9
0
 /**
  * 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;
 }
Example #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) {
         $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;
 }
Example #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('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;
 }
Example #12
0
 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;
 }
Example #13
0
 /**
  * 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;
 }
 public function __construct()
 {
     $this->_beforeToHtml();
     parent::_construct();
 }