forked from mage-websd/extensiongsd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Totals.php
43 lines (41 loc) · 1.5 KB
/
Totals.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* * You are allowed to use this API in your web application.
*
* Copyright (C) 2015 by customweb GmbH
*
* This program is licenced under the customweb software licence. With the
* purchase or the installation of the software in your application you
* accept the licence agreement. The allowed usage is outlined in the
* customweb software licence which can be found under
* http://www.sellxed.com/en/software-license-agreement
*
* Any modification or distribution is strictly forbidden. The license
* grants you the installation in one application. For multiuse you will need
* to purchase further licences at http://www.sellxed.com/shop.
*
* See the customweb software licence agreement for more details.
*
*
* @category Customweb
* @package Customweb_Subscription
* @version 2.0.61
*/
class Customweb_Subscription_Block_Adminhtml_Sales_Order_Totals extends Mage_Adminhtml_Block_Sales_Order_Totals {
protected function _initTotals(){
parent::_initTotals();
$initAmount = $this->getSource()->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;
}
}