Eabi_DpdEE - Version 0.1.7

Version Notes

- Added COD feature to DPD shipping methods
- Fixed last selected terminal display bug on country change
- Added isCodEnabled and _applyPriceFromCod functions to Postoffice abstract carrier
- Ability to auto-send-data to server is now checked by canSendData function in Postoffice abstract carrier

Download this release

Release Info

Developer Magento Core Team
Extension Eabi_DpdEE
Version 0.1.7
Comparing to
See all releases


Code changes from version 0.1.6 to 0.1.7

Files changed (62) hide show
  1. app/code/community/Eabi/DpdEE/Block/Adminhtml/Config/Form/Field/Country.php +6 -1
  2. app/code/community/Eabi/DpdEE/Block/Info/Payment.php +135 -0
  3. app/code/community/Eabi/DpdEE/Block/Invoice.php +54 -0
  4. app/code/community/Eabi/DpdEE/Block/Order/Courier.php +5 -1
  5. app/code/community/Eabi/DpdEE/CHANGELOG.txt +20 -0
  6. app/code/community/Eabi/DpdEE/Helper/Data.php +1 -1
  7. app/code/community/Eabi/DpdEE/Model/Action/Carrier/Order/Courier.php +1 -1
  8. app/code/community/Eabi/DpdEE/Model/Api.php +1 -1
  9. app/code/community/Eabi/DpdEE/Model/Button/Courier.php +1 -1
  10. app/code/community/Eabi/DpdEE/Model/Config.php +14 -1
  11. app/code/community/Eabi/DpdEE/Model/Flat.php +6 -1
  12. app/code/community/Eabi/DpdEE/Model/Observer.php +17 -1
  13. app/code/community/Eabi/DpdEE/Model/Payment/Processor.php +314 -0
  14. app/code/community/Eabi/DpdEE/Model/Post.php +76 -1
  15. app/code/community/Eabi/DpdEE/Model/Source/Label/Position.php +11 -1
  16. app/code/community/Eabi/DpdEE/Model/Source/Service.php +12 -1
  17. app/code/community/Eabi/DpdEE/etc/config.xml +23 -4
  18. app/code/community/Eabi/DpdEE/etc/system.xml +155 -1
  19. app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-install-0.1.0.php +1 -1
  20. app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.0-0.1.1.php +1 -1
  21. app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.1-0.1.2.php +1 -1
  22. app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.2-0.1.3.php +1 -1
  23. app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.3-0.1.4.php +1 -1
  24. app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.6-0.1.7.php +84 -0
  25. app/code/community/Eabi/Postoffice/Block/Adminhtml/Config/Form/Field/Remove.php +1 -1
  26. app/code/community/Eabi/Postoffice/Block/Config/Rebuildbutton.php +1 -1
  27. app/code/community/Eabi/Postoffice/Helper/Countrycode.php +1 -1
  28. app/code/community/Eabi/Postoffice/Helper/Data.php +65 -6
  29. app/code/community/Eabi/Postoffice/Model/Carrier/Abstract.php +33 -12
  30. app/code/community/Eabi/Postoffice/Model/Carrier/Result.php +1 -1
  31. app/code/community/Eabi/Postoffice/Model/Carriermodule.php +1 -1
  32. app/code/community/Eabi/Postoffice/Model/Mysql4/Carriermodule.php +1 -1
  33. app/code/community/Eabi/Postoffice/Model/Mysql4/Carriermodule/Collection.php +1 -1
  34. app/code/community/Eabi/Postoffice/Model/Mysql4/Office.php +1 -1
  35. app/code/community/Eabi/Postoffice/Model/Mysql4/Office/Collection.php +1 -1
  36. app/code/community/Eabi/Postoffice/Model/Office.php +1 -1
  37. app/code/community/Eabi/Postoffice/Model/Orderview.php +1 -1
  38. app/code/community/Eabi/Postoffice/Model/Source/Sendevent.php +1 -1
  39. app/code/community/Eabi/Postoffice/Model/Updater.php +1 -1
  40. app/code/community/Eabi/Postoffice/controllers/Adminhtml/PostofficeController.php +11 -3
  41. app/code/community/Eabi/Postoffice/controllers/IndexController.php +1 -1
  42. app/code/community/Eabi/Postoffice/etc/config.xml +2 -2
  43. app/code/community/Eabi/Postoffice/sql/eabi_postoffice_setup/mysql4-install-0.1.0.php +1 -1
  44. app/code/community/Eabi/Postoffice/sql/eabi_postoffice_setup/mysql4-upgrade-0.1.0-0.1.1.php +1 -1
  45. app/code/community/Eabi/Postoffice/sql/eabi_postoffice_setup/mysql4-upgrade-0.1.1-0.1.2.php +1 -1
  46. app/design/adminhtml/default/default/layout/eabi_postoffice.xml +1 -1
  47. app/design/adminhtml/default/default/template/eabi_dpdee/payment_info.phtml +10 -0
  48. app/design/adminhtml/default/default/template/eabi_postoffice/shipping_method_form.phtml +1 -1
  49. app/design/frontend/base/default/layout/eabi_postoffice.xml +1 -1
  50. app/design/frontend/base/default/template/eabi_dpdee/payment_info.phtml +10 -0
  51. app/design/frontend/base/default/template/eabi_postoffice/available.phtml +1 -1
  52. app/design/frontend/base/default/template/eabi_postoffice/multishipping.phtml +1 -1
  53. app/design/frontend/base/default/template/eabi_postoffice/shipping.phtml +1 -1
  54. app/design/frontend/base/default/template/eabi_postoffice/tracking/popup.phtml +1 -1
  55. app/etc/modules/Eabi_DpdEE.xml +2 -2
  56. app/etc/modules/Eabi_Postoffice.xml +2 -2
  57. app/locale/en_US/Eabi_DpdEE.csv +9 -0
  58. app/locale/et_EE/Eabi_DpdEE.csv +9 -0
  59. app/locale/ru_RU/Eabi_DpdEE.csv +9 -0
  60. js/eabi_js/eabi_dpdee.js +1 -1
  61. package.xml +10 -6
  62. skin/adminhtml/default/default/eabi_dpdee.css +1 -1
app/code/community/Eabi/DpdEE/Block/Adminhtml/Config/Form/Field/Country.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -39,6 +39,7 @@
39
  <li>Base shipping price</li>
40
  <li>Additional price for each Kilogram. (data is taken from products weight field)</li>
41
  <li>Free shipping starts from price (Without VAT). Free shipping is disabled when this field is left empty.</li>
 
42
  </ul>
43
  *
44
  * @author Matis
@@ -68,6 +69,10 @@ class Eabi_DpdEE_Block_Adminhtml_Config_Form_Field_Country extends Mage_Adminhtm
68
  'label' => $this->_getDpdHelper()->__('Free shipping from price'),
69
  'style' => 'width:120px',
70
  ));
 
 
 
 
71
  $this->_addAfter = false;
72
  $this->_addButtonLabel = $this->_getDpdHelper()->__('Add shipping country');
73
  parent::__construct();
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
39
  <li>Base shipping price</li>
40
  <li>Additional price for each Kilogram. (data is taken from products weight field)</li>
41
  <li>Free shipping starts from price (Without VAT). Free shipping is disabled when this field is left empty.</li>
42
+ <li>Cash on Delivery fee. Cash on delivery is disabled, when field is left empty.</li>
43
  </ul>
44
  *
45
  * @author Matis
69
  'label' => $this->_getDpdHelper()->__('Free shipping from price'),
70
  'style' => 'width:120px',
71
  ));
72
+ $this->addColumn('cod_fee', array(
73
+ 'label' => $this->_getDpdHelper()->__('Cash on delivery fee'),
74
+ 'style' => 'width:120px',
75
+ ));
76
  $this->_addAfter = false;
77
  $this->_addButtonLabel = $this->_getDpdHelper()->__('Add shipping country');
78
  parent::__construct();
app/code/community/Eabi/DpdEE/Block/Info/Payment.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * or OpenGPL v3 license (GNU Public License V3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * or
13
+ * http://www.gnu.org/licenses/gpl-3.0.txt
14
+ * If you did not receive a copy of the license and are unable to
15
+ * obtain it through the world-wide-web, please send an email
16
+ * to info@e-abi.ee so we can send you a copy immediately.
17
+ *
18
+ * DISCLAIMER
19
+ *
20
+ * Do not edit or add to this file if you wish to upgrade this module to newer
21
+ * versions in the future.
22
+ *
23
+ * @category Eabi
24
+ * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
+ * @author Matis Halmann
29
+ *
30
+
31
+ */
32
+
33
+ /**
34
+ * <p>Renders Cash on Delivery description text to order confirmation and e-mail templates</p>
35
+ * <p>Description is only displayed when merchant sets description for DPD cash on delivery method</p>
36
+ *
37
+ * @author Matis
38
+ */
39
+ class Eabi_DpdEE_Block_Info_Payment extends Mage_Payment_Block_Info_Cc {
40
+
41
+ const INFO_TEXT = 'info_text';
42
+
43
+
44
+ protected $_paymentInfoMap = array(
45
+ self::INFO_TEXT => 'info_text',
46
+ );
47
+ protected $_customerInfoMap = array(
48
+ self::INFO_TEXT => 'info_text',
49
+ );
50
+
51
+ public function getCcTypeName() {
52
+
53
+ }
54
+
55
+ /**
56
+ * <p>Returns <code>info_text</code> field, when merchant decides to display description in cash on delivery method</p>
57
+ * @param array $transport
58
+ * @return array
59
+ */
60
+ protected function _prepareSpecificInformation($transport = null) {
61
+ $transport = parent::_prepareSpecificInformation($transport);
62
+ /* @var $payment Mage_Payment_Model_Info */
63
+ $payment = $this->getInfo();
64
+ $info = array();
65
+ if ($this->getIsSecureMode()) {
66
+ foreach ($this->_customerInfoMap as $key) {
67
+ if (!isset($info[$key])) {
68
+ $info[$key] = array();
69
+ }
70
+ if (!$payment->hasAdditionalInformation($key)) {
71
+ // $info[$key]['label'] = false;
72
+ // $info[$key]['value'] = false;
73
+ } else {
74
+ $value = $payment->getAdditionalInformation($key);
75
+ if ($value) {
76
+ $info[$key]['label'] = $this->_getLabel($key);
77
+ $info[$key]['value'] = $value;
78
+ }
79
+ }
80
+ }
81
+ } else {
82
+ foreach ($this->_paymentInfoMap as $key) {
83
+ if (!isset($info[$key])) {
84
+ $info[$key] = array();
85
+ }
86
+ if (!$payment->hasAdditionalInformation($key)) {
87
+ $info[$key]['label'] = $this->_getLabel($key);
88
+ $info[$key]['value'] = false;
89
+ } else {
90
+ $value = $payment->getAdditionalInformation($key);
91
+ if ($value) {
92
+ $info[$key]['label'] = $this->_getLabel($key);
93
+ $info[$key]['value'] = $value;
94
+ }
95
+ }
96
+ }
97
+ }
98
+ $resultingInfo = array();
99
+ foreach ($info as $value) {
100
+ if (isset($value['value']) && trim($value['value']) && isset($value['label'])) {
101
+ $resultingInfo[$value['label']] = $value['value'];
102
+ }
103
+ }
104
+ if (count($resultingInfo)) {
105
+ return $transport->addData($resultingInfo);
106
+ }
107
+ return $transport;
108
+
109
+ }
110
+
111
+ /**
112
+ *
113
+ * @param string $key
114
+ * @return string
115
+ */
116
+ protected function _getLabel($key) {
117
+ switch ($key) {
118
+ case self::INFO_TEXT:
119
+ return $this->_getDpdHelper()->__('Instructions');
120
+ break;
121
+ }
122
+ return '';
123
+ }
124
+
125
+ /**
126
+ *
127
+ * @return Eabi_DpdEE_Helper_Data
128
+ */
129
+ protected function _getDpdHelper() {
130
+ return Mage::helper('eabi_dpdee');
131
+ }
132
+
133
+
134
+ }
135
+
app/code/community/Eabi/DpdEE/Block/Invoice.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * or OpenGPL v3 license (GNU Public License V3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * or
13
+ * http://www.gnu.org/licenses/gpl-3.0.txt
14
+ * If you did not receive a copy of the license and are unable to
15
+ * obtain it through the world-wide-web, please send an email
16
+ * to info@e-abi.ee so we can send you a copy immediately.
17
+ *
18
+ * DISCLAIMER
19
+ *
20
+ * Do not edit or add to this file if you wish to upgrade this module to newer
21
+ * versions in the future.
22
+ *
23
+ * @category Eabi
24
+ * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
+ * @author Matis Halmann
29
+ *
30
+
31
+ */
32
+
33
+ /**
34
+ * <p>Displays cash on delivery payment description under payment method selection when cash on delivery payment method is selected</p>
35
+ *
36
+ * @author matishalmann
37
+ */
38
+ class Eabi_DpdEE_Block_Invoice extends Mage_Payment_Block_Form {
39
+
40
+ protected function _construct() {
41
+ parent::_construct();
42
+ $this->setTemplate('eabi_dpdee/payment_info.phtml');
43
+ }
44
+
45
+ /**
46
+ * <p>Allows to use Netbeans auto-complete when editing template file</p>
47
+ * @return Eabi_DpdEE_Model_Payment_Processor
48
+ */
49
+ public function getMethod() {
50
+ return parent::getMethod();
51
+ }
52
+
53
+ }
54
+
app/code/community/Eabi/DpdEE/Block/Order/Courier.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -58,6 +58,10 @@ class Eabi_DpdEE_Block_Order_Courier extends Mage_Core_Block_Template {
58
  parent::_construct();
59
  }
60
 
 
 
 
 
61
  public function getHtmlId() {
62
  return 'eabi_carrier_order_courier_box';
63
  }
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
58
  parent::_construct();
59
  }
60
 
61
+ /**
62
+ * <p>Only one block is allowed per page</p>
63
+ * @return string
64
+ */
65
  public function getHtmlId() {
66
  return 'eabi_carrier_order_courier_box';
67
  }
app/code/community/Eabi/DpdEE/CHANGELOG.txt CHANGED
@@ -1,3 +1,23 @@
1
  0.1.1
2
  - Initial release
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  0.1.1
2
  - Initial release
3
 
4
+ 0.1.4
5
+ - Initial stable release
6
+ - Moved call courier to top right of order list view
7
+ - Renamed return address to pickup address
8
+
9
+
10
+ 0.1.5
11
+ - Packing slip displays Pakipood address at the packing slip instead of customers address
12
+ - Courier call in menu displays available times now properly.
13
+
14
+ 0.1.6
15
+ - Improved compatibility with Eabi_Cod module
16
+
17
+
18
+ 0.1.7
19
+ - Added COD feature to DPD shipping methods
20
+ - Fixed last selected terminal display bug on country change
21
+ - Added isCodEnabled and _applyPriceFromCod functions to Postoffice abstract carrier
22
+ - Ability to auto-send-data to server is now checked by canSendData function in Postoffice abstract carrier
23
+
app/code/community/Eabi/DpdEE/Helper/Data.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/Model/Action/Carrier/Order/Courier.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/Model/Api.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/Model/Button/Courier.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/Model/Config.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
@@ -37,8 +37,21 @@
37
  */
38
  class Eabi_DpdEE_Model_Config {
39
 
 
 
 
 
40
  const SHIPPING_METHOD_CODE_PARCEL_TERMINAL = 'eabidpdee';
 
 
 
 
41
  const SHIPPING_METHOD_CODE_FLAT = 'eabidpdeeflat';
42
 
 
 
 
 
 
43
  }
44
 
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
37
  */
38
  class Eabi_DpdEE_Model_Config {
39
 
40
+
41
+ /**
42
+ * <p>Shipping method code for DPD Parcelstore</p>
43
+ */
44
  const SHIPPING_METHOD_CODE_PARCEL_TERMINAL = 'eabidpdee';
45
+
46
+ /**
47
+ * <p>Shipping method code for DPD courier</p>
48
+ */
49
  const SHIPPING_METHOD_CODE_FLAT = 'eabidpdeeflat';
50
 
51
+ /**
52
+ * Shipping method code for DPD cash on delivery
53
+ */
54
+ const PAYMENT_METHOD_COD = 'dpdcodpayment';
55
+
56
  }
57
 
app/code/community/Eabi/DpdEE/Model/Flat.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -84,6 +84,11 @@ class Eabi_DpdEE_Model_Flat extends Eabi_DpdEE_Model_Post {
84
  if ($shippingAddress->getRegion()) {
85
  $requestData['Sh_city'] = $shippingAddress->getCity() . ', ' . $shippingAddress->getRegion();
86
  }
 
 
 
 
 
87
 
88
 
89
  $requestResult = $this->_getDpdHelper()->getApi($this->getStore(), $this->_parent_code)
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
84
  if ($shippingAddress->getRegion()) {
85
  $requestData['Sh_city'] = $shippingAddress->getCity() . ', ' . $shippingAddress->getRegion();
86
  }
87
+ //add cash on delivery
88
+ if ($order->getTotalDue() > 0) {
89
+ $requestData['Sh_cod_amount'] = number_format(round($order->getTotalDue(), 2), 2, '.', '');
90
+ $requestData['Sh_cod_currency'] = $order->getCurrency();
91
+ }
92
 
93
 
94
  $requestResult = $this->_getDpdHelper()->getApi($this->getStore(), $this->_parent_code)
app/code/community/Eabi/DpdEE/Model/Observer.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -88,6 +88,22 @@ class Eabi_DpdEE_Model_Observer {
88
  }
89
  }
90
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
  /**
93
  *
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
88
  }
89
  }
90
  }
91
+
92
+
93
+
94
+ /**
95
+ * <p>Applies payment method fee under adminhtml at order create</p>
96
+ * @param Varien_Event_Observer $observer
97
+ */
98
+ public function applyPaymentMethodFee($observer) {
99
+ /* @var $orderCreateModel Mage_Adminhtml_Model_Sales_Order_Create */
100
+ $orderCreateModel = $observer->getEvent()->getOrderCreateModel();
101
+
102
+ if ($orderCreateModel->getQuote()->getPayment()->getMethod() == Eabi_DpdEE_Model_Config::PAYMENT_METHOD_COD) {
103
+ $orderCreateModel->getShippingAddress()->setCollectShippingRates(true);
104
+ }
105
+ }
106
+
107
 
108
  /**
109
  *
app/code/community/Eabi/DpdEE/Model/Payment/Processor.php ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * or OpenGPL v3 license (GNU Public License V3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
+ * http://opensource.org/licenses/osl-3.0.php
13
+ * or
14
+ * http://www.gnu.org/licenses/gpl-3.0.txt
15
+ * If you did not receive a copy of the license and are unable to
16
+ * obtain it through the world-wide-web, please send an email
17
+ * to info@e-abi.ee so we can send you a copy immediately.
18
+ *
19
+ * DISCLAIMER
20
+ *
21
+ * Do not edit or add to this file if you wish to upgrade this module to newer
22
+ * versions in the future.
23
+ *
24
+ * @category Eabi
25
+ * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
+ * @author Matis Halmann
30
+ *
31
+
32
+ */
33
+
34
+ /**
35
+ * <p>DPD Cash on delivery payment method</p>
36
+ * <p>Displays optional description and additional cash on delivery fee when set.</p>
37
+ * <p>Cash on delivery fee would be added on top of shipping price</p>
38
+ *
39
+ * @author matishalmann
40
+ */
41
+ class Eabi_DpdEE_Model_Payment_Processor extends Mage_Payment_Model_Method_Abstract {
42
+
43
+ protected $_code = Eabi_DpdEE_Model_Config::PAYMENT_METHOD_COD;
44
+ protected $_canAuthorize = true;
45
+ protected $_canCapture = true;
46
+ protected $_canVoid = true;
47
+ protected $_canUseInternal = true;
48
+ protected $_canUseCheckout = true;
49
+ protected $_canUseForMultishipping = true;
50
+ protected $_formBlockType = 'eabi_dpdee/invoice';
51
+ protected $_infoBlockType = 'eabi_dpdee/info_payment';
52
+ protected $_checkout;
53
+ protected $_quote;
54
+
55
+ /**
56
+ *
57
+ * @var Eabi_DpdEE_Model_Post
58
+ */
59
+ private static $_methodInstance;
60
+ /**
61
+ *
62
+ * @var string
63
+ */
64
+ private $_currency;
65
+
66
+
67
+ /**
68
+ * <p>Assigns custom order status</p>
69
+ * @param string $action
70
+ * @param Mage_Sales_Model_Order $stateObject
71
+ * @return Eabi_DpdEE_Model_Payment_Processor
72
+ */
73
+ public function initialize($action, $stateObject) {
74
+ if(($status = $this->getConfigData('order_status'))) {
75
+ $stateObject->setStatus($status);
76
+ $state = $this->_getAssignedState($status);
77
+ $stateObject->setState($state);
78
+ $stateObject->setIsNotified(true);
79
+ }
80
+ return $this;
81
+ }
82
+
83
+
84
+
85
+
86
+ /**
87
+ * <p>This method is available when:</p>
88
+ * <ul>
89
+ <li>Payment method is active</li>
90
+ <li>Order shipping address is destined to country which has cash on delivery price defined and not left empty</li>
91
+ <li>Cart contains only products which are in stock if in stock setting is enabled</li>
92
+ </ul>
93
+ * @param Mage_Sales_Model_Quote $quote
94
+ * @return boolean
95
+ */
96
+ public function isAvailable($quote = null) {
97
+
98
+ $ret = parent::isAvailable($quote);
99
+ if (!$ret) {
100
+ self::$_methodInstance = null;
101
+ return false;
102
+ }
103
+ if ($quote === null || !$quote->getShippingAddress() || !$quote->getShippingAddress()->getShippingMethod()) {
104
+ self::$_methodInstance = null;
105
+ return false;
106
+ }
107
+ $method = $quote->getShippingAddress()->getShippingMethod();
108
+ //get the method instance....
109
+
110
+ $shippingMethodModel = Mage::getModel('shipping/shipping')->getCarrierByCode(substr($method, 0, strpos($method, '_')));
111
+ if ($shippingMethodModel && ($shippingMethodModel instanceof Eabi_DpdEE_Model_Post) && $shippingMethodModel->isCodEnabled($quote->getShippingAddress())) {
112
+
113
+ if ($this->getConfigData('checkstore')) {
114
+ if ($quote->getAllItems()) {
115
+ foreach ($quote->getAllItems() as $item) {
116
+ if (!$item->getProduct()->isVirtual()) {
117
+ if ($item->getProduct()->getStockItem()->getQty() < 1) {
118
+ self::$_methodInstance = null;
119
+ return false;
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ self::$_methodInstance = $shippingMethodModel;
126
+ } else {
127
+ self::$_methodInstance = null;
128
+ return false;
129
+ }
130
+ return true;
131
+ }
132
+
133
+ /**
134
+ * <p>Internal payment authorization method</p>
135
+ *
136
+ * @param Varien_Object $orderPayment
137
+ * @return Mage_Payment_Model_Abstract
138
+ */
139
+ public function authorize(Varien_Object $payment, $amount) {
140
+ // print_r($payment);
141
+ parent::authorize($payment, $amount);
142
+ return $this;
143
+ }
144
+
145
+ /**
146
+ * <p>Internal payment capture method</p>
147
+ *
148
+ * @param Varien_Object $orderPayment
149
+ * @return Mage_Payment_Model_Abstract
150
+ */
151
+ public function capture(Varien_Object $payment, $amount) {
152
+
153
+ return $this;
154
+ }
155
+
156
+ /**
157
+ * <p>Internal payment void method</p>
158
+ *
159
+ * @param Varien_Object $invoicePayment
160
+ * @return Mage_Payment_Model_Abstract
161
+ */
162
+ public function void(Varien_Object $payment) {
163
+ return $this;
164
+ }
165
+
166
+ /**
167
+ * <p>Fetches current currency to this object and then checks it validity</p>
168
+ * <p>Internal method only checks for validity for this currency</p>
169
+ * @param string $currencyCode
170
+ * @return bool
171
+ */
172
+ public function canUseForCurrency($currencyCode) {
173
+ $this->_currency = $currencyCode;
174
+ return parent::canUseForCurrency($currencyCode);
175
+ }
176
+
177
+ /**
178
+ * <p>Displays current payment method title with extra cash on delivery fee when extra fee has been set</p>
179
+ * @return string
180
+ */
181
+ public function getTitle() {
182
+
183
+ if (self::$_methodInstance && $this->getQuote()->getShippingAddress() && self::$_methodInstance->getCodFee($this->getQuote()->getShippingAddress()) > 0) {
184
+ $rawFee = (float) self::$_methodInstance->getCodFee($this->getQuote()->getShippingAddress());
185
+ if (!$this->_currency) {
186
+ $this->_currency = Mage::app()->getStore()->getCurrentCurrencyCode();
187
+ }
188
+ $baseCurrency = Mage::app()->getStore()->getBaseCurrencyCode();
189
+ //convert to currency
190
+ $price = $this->getShippingPrice(Mage::helper('directory')->currencyConvert($rawFee, $baseCurrency, $this->_currency), null);
191
+
192
+ $descriptionText = $this->_getDpdHelper()->__('Will be added to shipping fee');
193
+ if (self::$_methodInstance->getData('cod_fee_added')) {
194
+ $descriptionText = $this->_getDpdHelper()->__('Already added to shipping fee');
195
+ }
196
+ return parent::getTitle() . ' (' . Mage::helper('core')->currency($price, true, false) . ' ' . $descriptionText . ')';
197
+ } else {
198
+ return parent::getTitle();
199
+ }
200
+ }
201
+
202
+ /**
203
+ * <p>Returns final shipping price depending on shipping address and tax settings</p>
204
+ * @param double $price
205
+ * @param bool $flag
206
+ * @return double
207
+ */
208
+ public function getShippingPrice($price, $flag) {
209
+ //takes into account whether shipping price is //tax/calculation/shipping_includes_tax or not
210
+ return Mage::helper('tax')->getShippingPrice($price, $flag, $this->getQuote()->getShippingAddress());
211
+ }
212
+
213
+ /**
214
+ * <p>Assigns cash on delivery payment method description to payment method blocks so they would be displayed in e-mails and order confirmations</p>
215
+ *
216
+ * @param mixed $data
217
+ * @return Eabi_Cod_Model_Payment
218
+ */
219
+ public function assignData($data) {
220
+ $details = array();
221
+ if ($data instanceof Varien_Object) {
222
+ $data = $data->getData();
223
+ }
224
+ if ($this->getInfoText()) {
225
+ $details['info_text'] = $this->getInfoText();
226
+ }
227
+ if (count($details)) {
228
+ $this->getInfoInstance()->setAdditionalData(serialize($details));
229
+ foreach ($details as $k => $v) {
230
+ $this->getInfoInstance()->setAdditionalInformation($k, $v);
231
+ }
232
+ }
233
+
234
+ return $this;
235
+ }
236
+
237
+
238
+ /**
239
+ * <p>Fetches order status name by code</p>
240
+ * @param string $status
241
+ * @return string
242
+ */
243
+ protected function _getAssignedState($status) {
244
+ $item = Mage::getResourceModel('sales/order_status_collection')
245
+ ->joinStates()
246
+ ->addFieldToFilter('main_table.status', $status)
247
+ ->getFirstItem();
248
+
249
+ return $item->getState();
250
+ }
251
+
252
+
253
+ /**
254
+ *
255
+ * @return Mage_Sales_Model_Quote_Item
256
+ */
257
+ protected function _getQuoteItemModel() {
258
+ return Mage::getModel('sales/quote_item');
259
+ }
260
+
261
+
262
+ /**
263
+ *
264
+ * @return Mage_Catalog_Model_Product
265
+ */
266
+ protected function _getProductModel() {
267
+ return Mage::getModel('catalog/product');
268
+ }
269
+
270
+ /**
271
+ * <p>Returns current methods description</p>
272
+ * @return string
273
+ */
274
+ public function getInfoText() {
275
+ return $this->getConfigData('info_text');
276
+ }
277
+
278
+ /**
279
+ *
280
+ * @return Eabi_DpdEE_Helper_Data
281
+ */
282
+ protected function _getDpdHelper() {
283
+ return Mage::helper('eabi_dpdee');
284
+ }
285
+
286
+ /**
287
+ * <p>Retrieves current checkout session model</p>
288
+ *
289
+ * @return Mage_Checkout_Model_Session
290
+ */
291
+ public function getCheckout() {
292
+ if (empty($this->_checkout)) {
293
+ if (Mage::app()->getStore()->isAdmin()) {
294
+ $this->_checkout = Mage::getSingleton('adminhtml/session_quote');
295
+ } else {
296
+ $this->_checkout = Mage::getSingleton('checkout/session');
297
+ }
298
+ }
299
+ return $this->_checkout;
300
+ }
301
+
302
+ /**
303
+ * Retrieve sales quote model
304
+ *
305
+ * @return Mage_Sales_Model_Quote
306
+ */
307
+ public function getQuote() {
308
+ if (empty($this->_quote)) {
309
+ $this->_quote = $this->getCheckout()->getQuote();
310
+ }
311
+ return $this->_quote;
312
+ }
313
+
314
+ }
app/code/community/Eabi/DpdEE/Model/Post.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -208,6 +208,12 @@ class Eabi_DpdEE_Model_Post extends Eabi_Postoffice_Model_Carrier_Abstract {
208
  'Sh_cust_reference' => $order->getIncrementId(),
209
  );
210
 
 
 
 
 
 
 
211
  $phoneNumbers = $this->_getDialCodeHelper()->separatePhoneNumberFromCountryCode($shippingAddress->getTelephone(), $shippingAddress->getCountryId());
212
  $requestData['Sh_notify_phone_code'] = $phoneNumbers['dial_code'];
213
  $requestData['Sh_notify_contact_phone'] = $phoneNumbers['phone_number'];
@@ -521,6 +527,75 @@ class Eabi_DpdEE_Model_Post extends Eabi_Postoffice_Model_Carrier_Abstract {
521
  }
522
 
523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  /**
525
  *
526
  * @return Eabi_DpdEE_Helper_Data
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
208
  'Sh_cust_reference' => $order->getIncrementId(),
209
  );
210
 
211
+ //add cash on delivery
212
+ if ($order->getTotalDue() > 0) {
213
+ $requestData['Sh_cod_amount'] = number_format(round($order->getTotalDue(), 2), 2, '.', '');
214
+ $requestData['Sh_cod_currency'] = $order->getCurrency();
215
+ }
216
+
217
  $phoneNumbers = $this->_getDialCodeHelper()->separatePhoneNumberFromCountryCode($shippingAddress->getTelephone(), $shippingAddress->getCountryId());
218
  $requestData['Sh_notify_phone_code'] = $phoneNumbers['dial_code'];
219
  $requestData['Sh_notify_contact_phone'] = $phoneNumbers['phone_number'];
527
  }
528
 
529
 
530
+ /**
531
+ * <p>Takes Cash on delivery fee from <code>handling_fee_country</code> matrix, from field <code>cod_fee</code> and appends it to shipping price when set and is equal or greater than 0</p>
532
+ * @param Mage_Shipping_Model_Rate_Request $request
533
+ * @return double|int
534
+ */
535
+ protected function _applyPriceFromCod(Mage_Shipping_Model_Rate_Request $request) {
536
+
537
+ if ($this->_getQuote() && !$this->_getQuote()->isVirtual() && Mage::getStoreConfig('payment/dpdcodpayment/active') && $this->_getQuote()->getPayment() && $this->_getQuote()->getPayment()->getMethod() && $this->_getQuote()->getPayment()->getMethod() == Eabi_DpdEE_Model_Config::PAYMENT_METHOD_COD && strpos($this->_getQuote()->getShippingAddress()->getShippingMethod(), $this->getCarrierCode()) === 0) {
538
+
539
+ $shippingMatrix = $this->_decodeShippingMatrix($this->getConfigDataForThis('handling_fee_country'));
540
+ if ($request->getDestCountryId() && isset($shippingMatrix[$request->getDestCountryId()])) {
541
+ //free price?
542
+ if (isset($shippingMatrix[$request->getDestCountryId()]['cod_fee']) && $shippingMatrix[$request->getDestCountryId()]['cod_fee'] !== '') {
543
+ $codFee = (float) str_replace(',', '.', $shippingMatrix[$request->getDestCountryId()]['cod_fee']);
544
+ if ($codFee >= 0) {
545
+ return $codFee;
546
+ }
547
+ }
548
+ }
549
+ }
550
+ return 0;
551
+ }
552
+
553
+ /**
554
+ * <p>Returns cash on delivery fee based on address</p>
555
+ * <p>Does not check if Cash on delivery is available</p>
556
+ * <p>Returns false if country is unspecified.</p>
557
+ * @param Mage_Customer_Model_Address $address
558
+ * @return boolean|float
559
+ */
560
+ public function getCodFee(Mage_Customer_Model_Address $address) {
561
+ if ($address->getCountryId()) {
562
+
563
+
564
+ $shippingMatrix = $this->_decodeShippingMatrix($this->getConfigDataForThis('handling_fee_country'));
565
+ if ($address->getCountryId() && isset($shippingMatrix[$address->getCountryId()])) {
566
+ //free price?
567
+ if (isset($shippingMatrix[$address->getCountryId()]['cod_fee']) && $shippingMatrix[$address->getCountryId()]['cod_fee'] !== '') {
568
+ $codFee = (float) str_replace(',', '.', $shippingMatrix[$address->getCountryId()]['cod_fee']);
569
+ if ($codFee >= 0) {
570
+ return $codFee;
571
+ }
572
+ }
573
+ }
574
+
575
+ }
576
+
577
+ return false;
578
+ }
579
+
580
+
581
+ /**
582
+ * <p>Returns true if cash on delivery is allowed for specified address</p>
583
+ * <p>Checks if COD is allowed by configuration variable <code>payment/dpdcodpayment/active</code> and COD fee is determined in shipping price matrix</p>
584
+ * @param Mage_Customer_Model_Address $address
585
+ * @return boolean
586
+ */
587
+ public function isCodEnabled(Mage_Customer_Model_Address $address) {
588
+ $shippingMatrix = $this->_decodeShippingMatrix($this->getConfigDataForThis('handling_fee_country'));
589
+ if ($address->getCountryId() && isset($shippingMatrix[$address->getCountryId()]) && isset($shippingMatrix[$address->getCountryId()]['cod_fee'])
590
+ && $shippingMatrix[$address->getCountryId()]['cod_fee'] !== '') {
591
+ $codFee = (double) str_replace(',', '.', $shippingMatrix[$address->getCountryId()]['cod_fee']);
592
+ if ($codFee >= 0) {
593
+ return true;
594
+ }
595
+ }
596
+ return false;
597
+ }
598
+
599
  /**
600
  *
601
  * @return Eabi_DpdEE_Helper_Data
app/code/community/Eabi/DpdEE/Model/Source/Label/Position.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -38,6 +38,16 @@
38
  */
39
  class Eabi_DpdEE_Model_Source_Label_Position {
40
 
 
 
 
 
 
 
 
 
 
 
41
  public function toOptionArray() {
42
  $options = array();
43
 
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
38
  */
39
  class Eabi_DpdEE_Model_Source_Label_Position {
40
 
41
+ /**
42
+ * <p>Returns possible DPD packing slip layout positions in following format:</p>
43
+ * <pre>
44
+ array(
45
+ 'label' =&gt; HTML select label,
46
+ 'value' =&gt; HTML select option value,
47
+ );
48
+ * </pre>
49
+ * @return array
50
+ */
51
  public function toOptionArray() {
52
  $options = array();
53
 
app/code/community/Eabi/DpdEE/Model/Source/Service.php CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -38,6 +38,17 @@
38
  */
39
  class Eabi_DpdEE_Model_Source_Service {
40
 
 
 
 
 
 
 
 
 
 
 
 
41
  public function toOptionArray() {
42
  $options = array();
43
  $options[] = array(
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
38
  */
39
  class Eabi_DpdEE_Model_Source_Service {
40
 
41
+
42
+ /**
43
+ * <p>Returns allowed services in automatic datasending application in following format:</p>
44
+ * <pre>
45
+ array(
46
+ 'label' =&gt; HTML select label,
47
+ 'value' =&gt; HTML select option value,
48
+ );
49
+ * </pre>
50
+ * @return array
51
+ */
52
  public function toOptionArray() {
53
  $options = array();
54
  $options[] = array(
app/code/community/Eabi/DpdEE/etc/config.xml CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -36,7 +36,7 @@
36
  <config>
37
  <modules>
38
  <Eabi_DpdEE>
39
- <version>0.1.6</version>
40
  </Eabi_DpdEE>
41
  </modules>
42
 
@@ -87,6 +87,15 @@
87
  </eabi_dpdee_add_tracking_number>
88
  </observers>
89
  </sales_order_shipment_save_after>
 
 
 
 
 
 
 
 
 
90
  </events>
91
 
92
  </adminhtml>
@@ -176,7 +185,7 @@
176
  <courier_enable>1</courier_enable>
177
  <api_url>http://www.pakivedu.ee/rpc/gateway</api_url>
178
  <handling_fee>4.90</handling_fee>
179
- <handling_fee_country><![CDATA[a:3:{s:18:"_1388439524852_852";a:4:{s:10:"country_id";s:2:"EE";s:10:"base_price";s:4:"4.90";s:8:"kg_price";s:1:"0";s:18:"free_shipping_from";s:0:"";}s:17:"_1388442604053_53";a:4:{s:10:"country_id";s:2:"LV";s:10:"base_price";s:5:"12.90";s:8:"kg_price";s:1:"0";s:18:"free_shipping_from";s:0:"";}s:18:"_1388709088932_932";a:4:{s:10:"country_id";s:2:"LT";s:10:"base_price";s:5:"13.90";s:8:"kg_price";s:1:"0";s:18:"free_shipping_from";s:0:"";}}]]></handling_fee_country>
180
  <senddata_service>LO</senddata_service>
181
  <po_save_address>0</po_save_address>
182
  <label_position>1234</label_position>
@@ -200,12 +209,22 @@
200
  <specificcountry>EE,LV,LT</specificcountry>
201
  <handling_action>O</handling_action>
202
  <handling_fee>7.97</handling_fee>
203
- <handling_fee_country><![CDATA[a:3:{s:18:"_1388700940288_288";a:4:{s:10:"country_id";s:2:"EE";s:10:"base_price";s:3:"5.8";s:8:"kg_price";s:4:"1.28";s:18:"free_shipping_from";s:0:"";}s:18:"_1388700961178_178";a:4:{s:10:"country_id";s:2:"LV";s:10:"base_price";s:5:"10.38";s:8:"kg_price";s:4:"3.15";s:18:"free_shipping_from";s:0:"";}s:18:"_1388700962221_221";a:4:{s:10:"country_id";s:2:"LT";s:10:"base_price";s:5:"11.75";s:8:"kg_price";s:4:"3.85";s:18:"free_shipping_from";s:0:"";}}]]></handling_fee_country>
204
  <enable_cod>0</enable_cod>
205
  <use_per_item_weight>1</use_per_item_weight>
206
 
207
  </eabidpdeeflat>
208
  </carriers>
 
 
 
 
 
 
 
 
 
 
209
  </default>
210
 
211
  </config>
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
36
  <config>
37
  <modules>
38
  <Eabi_DpdEE>
39
+ <version>0.1.7</version>
40
  </Eabi_DpdEE>
41
  </modules>
42
 
87
  </eabi_dpdee_add_tracking_number>
88
  </observers>
89
  </sales_order_shipment_save_after>
90
+ <adminhtml_sales_order_create_process_data>
91
+ <observers>
92
+ <eabi_dpd_cod_add_to_shipping_fee>
93
+ <type>model</type>
94
+ <class>Eabi_DpdEE_Model_Observer</class>
95
+ <method>applyPaymentMethodFee</method>
96
+ </eabi_dpd_cod_add_to_shipping_fee>
97
+ </observers>
98
+ </adminhtml_sales_order_create_process_data>
99
  </events>
100
 
101
  </adminhtml>
185
  <courier_enable>1</courier_enable>
186
  <api_url>http://www.pakivedu.ee/rpc/gateway</api_url>
187
  <handling_fee>4.90</handling_fee>
188
+ <handling_fee_country><![CDATA[a:3:{s:18:"_1388439524852_852";a:5:{s:10:"country_id";s:2:"EE";s:10:"base_price";s:4:"4.90";s:8:"kg_price";s:1:"0";s:18:"free_shipping_from";s:0:"";s:7:"cod_fee";s:4:"2.50";}s:17:"_1388442604053_53";a:5:{s:10:"country_id";s:2:"LV";s:10:"base_price";s:5:"12.90";s:8:"kg_price";s:1:"0";s:18:"free_shipping_from";s:0:"";s:7:"cod_fee";s:4:"2.50";}s:18:"_1388709088932_932";a:5:{s:10:"country_id";s:2:"LT";s:10:"base_price";s:5:"13.90";s:8:"kg_price";s:1:"0";s:18:"free_shipping_from";s:0:"";s:7:"cod_fee";s:4:"2.50";}}]]></handling_fee_country>
189
  <senddata_service>LO</senddata_service>
190
  <po_save_address>0</po_save_address>
191
  <label_position>1234</label_position>
209
  <specificcountry>EE,LV,LT</specificcountry>
210
  <handling_action>O</handling_action>
211
  <handling_fee>7.97</handling_fee>
212
+ <handling_fee_country><![CDATA[a:3:{s:18:"_1388700940288_288";a:5:{s:10:"country_id";s:2:"EE";s:10:"base_price";s:3:"5.8";s:8:"kg_price";s:4:"1.28";s:18:"free_shipping_from";s:0:"";s:7:"cod_fee";s:4:"2.50";}s:18:"_1388700961178_178";a:5:{s:10:"country_id";s:2:"LV";s:10:"base_price";s:5:"10.38";s:8:"kg_price";s:4:"3.15";s:18:"free_shipping_from";s:0:"";s:7:"cod_fee";s:4:"2.50";}s:18:"_1388700962221_221";a:5:{s:10:"country_id";s:2:"LT";s:10:"base_price";s:5:"11.75";s:8:"kg_price";s:4:"3.85";s:18:"free_shipping_from";s:0:"";s:7:"cod_fee";s:4:"2.50";}}]]></handling_fee_country>
213
  <enable_cod>0</enable_cod>
214
  <use_per_item_weight>1</use_per_item_weight>
215
 
216
  </eabidpdeeflat>
217
  </carriers>
218
+ <payment>
219
+ <dpdcodpayment>
220
+ <title>Tasun lunaga paki kättesaamisel</title>
221
+ <order_status>pending</order_status>
222
+ <checkstore>0</checkstore>
223
+ <payment_action>authorize</payment_action>
224
+ <model>eabi_dpdee/payment_processor</model>
225
+ </dpdcodpayment>
226
+ </payment>
227
+
228
  </default>
229
 
230
  </config>
app/code/community/Eabi/DpdEE/etc/system.xml CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -455,6 +455,81 @@
455
  <show_in_store>1</show_in_store>
456
  <comment>It is not recommended to update the list of offices more often than once a day.</comment>
457
  </update_interval>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458
  <!--enable_cod translate="label comment">
459
  <label>Enable Cash on Delivery (requires extra plugin)</label>
460
  <frontend_type>select</frontend_type>
@@ -643,6 +718,11 @@
643
  <show_in_website>1</show_in_website>
644
  <show_in_store>1</show_in_store>
645
  </specificcountry>
 
 
 
 
 
646
  <!--enable_cod translate="label comment">
647
  <label>Enable Cash on Delivery (requires extra plugin)</label>
648
  <frontend_type>select</frontend_type>
@@ -685,6 +765,80 @@
685
 
686
  </groups>
687
  </carriers>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
688
  </sections>
689
 
690
  </config>
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
455
  <show_in_store>1</show_in_store>
456
  <comment>It is not recommended to update the list of offices more often than once a day.</comment>
457
  </update_interval>
458
+
459
+
460
+ <enable_dpdcod translate="label">
461
+ <label>Enable Cash on Delivery</label>
462
+ <frontend_type>select</frontend_type>
463
+ <source_model>adminhtml/system_config_source_yesno</source_model>
464
+ <config_path>payment/dpdcodpayment/active</config_path>
465
+ <sort_order>101200</sort_order>
466
+ <show_in_default>1</show_in_default>
467
+ <show_in_website>0</show_in_website>
468
+ <show_in_store>0</show_in_store>
469
+ </enable_dpdcod>
470
+ <cod_title translate="label">
471
+ <label>Cash on delivery method name displayed to client</label>
472
+ <frontend_type>text</frontend_type>
473
+ <sort_order>101210</sort_order>
474
+ <show_in_default>1</show_in_default>
475
+ <show_in_website>1</show_in_website>
476
+ <show_in_store>1</show_in_store>
477
+ <config_path>payment/dpdcodpayment/title</config_path>
478
+ <depends>
479
+ <enable_dpdcod>1</enable_dpdcod>
480
+ </depends>
481
+ </cod_title>
482
+ <cod_info_text translate="label comment">
483
+ <label>Cash on delivery method description displayed to client</label>
484
+ <frontend_type>textarea</frontend_type>
485
+ <sort_order>101220</sort_order>
486
+ <show_in_default>1</show_in_default>
487
+ <show_in_website>1</show_in_website>
488
+ <show_in_store>1</show_in_store>
489
+ <config_path>payment/dpdcodpayment/info_text</config_path>
490
+ <depends>
491
+ <enable_dpdcod>1</enable_dpdcod>
492
+ </depends>
493
+ </cod_info_text>
494
+ <cod_order_status translate="label">
495
+ <label>Default order status for cash on delivery payments</label>
496
+ <frontend_type>select</frontend_type>
497
+ <source_model>adminhtml/system_config_source_order_status</source_model>
498
+ <sort_order>101230</sort_order>
499
+ <show_in_default>1</show_in_default>
500
+ <show_in_website>1</show_in_website>
501
+ <show_in_store>1</show_in_store>
502
+ <config_path>payment/dpdcodpayment/order_status</config_path>
503
+ <depends>
504
+ <enable_dpdcod>1</enable_dpdcod>
505
+ </depends>
506
+ </cod_order_status>
507
+ <cod_checkstore translate="label">
508
+ <label>Allow cash on delivery only for products which are in-stock</label>
509
+ <frontend_type>select</frontend_type>
510
+ <source_model>adminhtml/system_config_source_yesno</source_model>
511
+ <sort_order>101240</sort_order>
512
+ <show_in_default>1</show_in_default>
513
+ <show_in_website>1</show_in_website>
514
+ <show_in_store>1</show_in_store>
515
+ <config_path>payment/dpdcodpayment/checkstore</config_path>
516
+ <depends>
517
+ <enable_dpdcod>1</enable_dpdcod>
518
+ </depends>
519
+ </cod_checkstore>
520
+ <cod_sort_order translate="label">
521
+ <label>Sort order for cash on delivery payment method</label>
522
+ <frontend_type>text</frontend_type>
523
+ <sort_order>101250</sort_order>
524
+ <show_in_default>1</show_in_default>
525
+ <show_in_website>1</show_in_website>
526
+ <show_in_store>1</show_in_store>
527
+ <config_path>payment/dpdcodpayment/sort_order</config_path>
528
+ <depends>
529
+ <enable_dpdcod>1</enable_dpdcod>
530
+ </depends>
531
+ </cod_sort_order>
532
+
533
  <!--enable_cod translate="label comment">
534
  <label>Enable Cash on Delivery (requires extra plugin)</label>
535
  <frontend_type>select</frontend_type>
718
  <show_in_website>1</show_in_website>
719
  <show_in_store>1</show_in_store>
720
  </specificcountry>
721
+
722
+
723
+
724
+
725
+
726
  <!--enable_cod translate="label comment">
727
  <label>Enable Cash on Delivery (requires extra plugin)</label>
728
  <frontend_type>select</frontend_type>
765
 
766
  </groups>
767
  </carriers>
768
+ <!--payment>
769
+ <groups>
770
+ <dpdcodpayment translate="label" module="eabi_dpdee">
771
+ <label>Cash on delivery for DPD</label>
772
+ <sort_order>340</sort_order>
773
+ <show_in_default>1</show_in_default>
774
+ <show_in_website>1</show_in_website>
775
+ <show_in_store>1</show_in_store>
776
+ <comment><![CDATA[
777
+ <a href="http://www.e-abi.ee" target="_blank"><IMG border="0" src="http://www.e-abi.ee/skin/frontend/default/electronics3/images/logo-web.png"></a>
778
+ <div style="margin-top:4px;margin-bottom:4px; color:gray;"></div>
779
+ <div style="margin-top:4px;"><b>Aktsiamaailm OÜ, <a href="mailto:info@e-abi.ee">info@e-abi.ee</a></b></div>
780
+ <hr /><br />
781
+
782
+ ]]>
783
+ </comment>
784
+ <fields>
785
+ <active translate="label">
786
+ <label>Enabled</label>
787
+ <frontend_type>select</frontend_type>
788
+ <source_model>adminhtml/system_config_source_yesno</source_model>
789
+ <sort_order>10</sort_order>
790
+ <show_in_default>1</show_in_default>
791
+ <show_in_website>0</show_in_website>
792
+ <show_in_store>0</show_in_store>
793
+ </active>
794
+ <title translate="label">
795
+ <label>Text displayed to client</label>
796
+ <frontend_type>text</frontend_type>
797
+ <sort_order>20</sort_order>
798
+ <show_in_default>1</show_in_default>
799
+ <show_in_website>1</show_in_website>
800
+ <show_in_store>1</show_in_store>
801
+ </title>
802
+ <info_text translate="label comment">
803
+ <label>Description displayed to the client</label>
804
+ <frontend_type>textarea</frontend_type>
805
+ <sort_order>21</sort_order>
806
+ <show_in_default>1</show_in_default>
807
+ <show_in_website>1</show_in_website>
808
+ <show_in_store>1</show_in_store>
809
+ </info_text>
810
+ <order_status translate="label">
811
+ <label>New order status</label>
812
+ <frontend_type>select</frontend_type>
813
+ <source_model>adminhtml/system_config_source_order_status</source_model>
814
+ <sort_order>22</sort_order>
815
+ <show_in_default>1</show_in_default>
816
+ <show_in_website>1</show_in_website>
817
+ <show_in_store>1</show_in_store>
818
+ </order_status>
819
+ <checkstore translate="label">
820
+ <label>Allow only for products which are in-stock</label>
821
+ <frontend_type>select</frontend_type>
822
+ <source_model>adminhtml/system_config_source_yesno</source_model>
823
+ <sort_order>23</sort_order>
824
+ <show_in_default>1</show_in_default>
825
+ <show_in_website>1</show_in_website>
826
+ <show_in_store>1</show_in_store>
827
+ </checkstore>
828
+ <sort_order translate="label">
829
+ <label>Sort order</label>
830
+ <frontend_type>text</frontend_type>
831
+ <sort_order>100</sort_order>
832
+ <show_in_default>1</show_in_default>
833
+ <show_in_website>1</show_in_website>
834
+ <show_in_store>1</show_in_store>
835
+ </sort_order>
836
+ </fields>
837
+
838
+ </dpdcodpayment>
839
+ </groups>
840
+ </payment-->
841
+
842
  </sections>
843
 
844
  </config>
app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-install-0.1.0.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.0-0.1.1.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.1-0.1.2.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.2-0.1.3.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.3-0.1.4.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/DpdEE/sql/eabi_dpdee_setup/mysql4-upgrade-0.1.6-0.1.7.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * or OpenGPL v3 license (GNU Public License V3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * or
13
+ * http://www.gnu.org/licenses/gpl-3.0.txt
14
+ * If you did not receive a copy of the license and are unable to
15
+ * obtain it through the world-wide-web, please send an email
16
+ * to info@e-abi.ee so we can send you a copy immediately.
17
+ *
18
+ * DISCLAIMER
19
+ *
20
+ * Do not edit or add to this file if you wish to upgrade this module to newer
21
+ * versions in the future.
22
+ *
23
+ * @category Eabi
24
+ * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
+ * @author Matis Halmann
29
+ *
30
+
31
+ */
32
+
33
+ $installer = $this;
34
+
35
+ $installer->startSetup();
36
+
37
+
38
+ /*
39
+ * Set default CASH on delivery fee to following countries:
40
+ * EE
41
+ * LV
42
+ * LT
43
+ *
44
+ * Set this fee to all defined config scopes
45
+ */
46
+ $configPaths = array(
47
+ 'carriers/eabidpdee/handling_fee_country',
48
+ 'carriers/eabidpdeeflat/handling_fee_country',
49
+ );
50
+ $countriesToApply = array(
51
+ 'EE', 'LV', 'LT',
52
+ );
53
+
54
+ //echo '<pre>'.(print_r(get_class_methods(Mage::getModel('core/config_data')), true)).'</pre>';
55
+
56
+ $configDatas = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('path', array('in' => $configPaths));
57
+
58
+ foreach ($configDatas as $configData) {
59
+ $oldShippingPriceSet = @unserialize($configData->getValue());
60
+ //update value
61
+ if (is_array($oldShippingPriceSet)) {
62
+ foreach ($oldShippingPriceSet as $randomKey => $countryPrices) {
63
+ if (in_array($countryPrices['country_id'], $countriesToApply)) {
64
+ if (!isset($countryPrices['cod_fee']) || !$countryPrices['cod_fee']) {
65
+ $oldShippingPriceSet[$randomKey]['cod_fee'] = '2.50';
66
+ }
67
+ }
68
+ }
69
+ //update done -re-serialize and save
70
+ $configData->setValue(serialize($oldShippingPriceSet));
71
+ $configData->save();
72
+
73
+ }
74
+
75
+ }
76
+
77
+ $installer->run("
78
+
79
+
80
+ ");
81
+
82
+
83
+ //end install
84
+ $installer->endSetup();
app/code/community/Eabi/Postoffice/Block/Adminhtml/Config/Form/Field/Remove.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Block/Config/Rebuildbutton.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Helper/Countrycode.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Helper/Data.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
@@ -270,10 +270,17 @@ class Eabi_Postoffice_Helper_Data extends Mage_Core_Helper_Abstract {
270
  $shippingMethodModel = Mage::getModel('shipping/shipping')->getCarrierByCode($shippingCarrierCode);
271
  }
272
 
 
 
 
 
 
 
273
  if ($shippingMethodModel && ($shippingMethodModel instanceof Eabi_Postoffice_Model_Carrier_Abstract)
274
  && $shippingMethodModel->getConfigData('senddata_enable')
275
- && !(round($order->getTotalDue(), 2) > 0 && (!$shippingMethodModel->getConfigData('enable_cod') ||
276
- ($shippingMethodModel->getConfigData('enable_cod') && $paymentMethod->getMethod() != 'eabicodpayment')))
 
277
  && !($order->isCanceled() || $order->getIsVirtual())) {
278
  $shippingMethodModel->setStore($order->getStore());
279
  return true;
@@ -286,7 +293,7 @@ class Eabi_Postoffice_Helper_Data extends Mage_Core_Helper_Abstract {
286
  * <p>Attempts to auto send data to remote server and insert the result to order comments.</p>
287
  * <p>Shipment data is sent to the server in the following conditions:
288
  * <ul>
289
- * <li>Order has been fully paid, or payment method is Cash on delivery (to be implemented in future) and cash on delivery is allowed</li>
290
  * <li>Carrier supports automatic shipment data sending to the Carrier server</li>
291
  * <li>Merchant has enabled automatic shipment data sending to the server</li>
292
  * <li>Shipment data has not been sent to the server earlier</li>
@@ -309,13 +316,19 @@ class Eabi_Postoffice_Helper_Data extends Mage_Core_Helper_Abstract {
309
  //get the shipping code from the order and call the module from it.
310
  $shippingCarrierCode = substr($shippingMethod, 0, strpos($shippingMethod, '_'));
311
  $shippingMethodModel = Mage::getModel('shipping/shipping')->getCarrierByCode($shippingCarrierCode);
 
 
 
 
312
 
313
 
314
  if ($shippingMethodModel && ($shippingMethodModel instanceof Eabi_Postoffice_Model_Carrier_Abstract)
315
  && $shippingMethodModel->getConfigData('senddata_enable')
316
  && $shippingMethodModel->getConfigData('senddata_event') == $eventName
317
- && !(round($order->getTotalDue(), 2) > 0 && (!$shippingMethodModel->getConfigData('enable_cod') ||
318
- ($shippingMethodModel->getConfigData('enable_cod') && $paymentMethod->getMethod() != 'eabicodpayment')))
 
 
319
  && !($order->isCanceled() || $order->getIsVirtual())
320
  && $shippingMethodModel->isDataSent($order) === false) {
321
  try {
@@ -482,8 +495,54 @@ class Eabi_Postoffice_Helper_Data extends Mage_Core_Helper_Abstract {
482
  return $numPackages;
483
  }
484
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
 
486
 
 
 
 
 
 
 
 
487
 
488
 
489
  }
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
270
  $shippingMethodModel = Mage::getModel('shipping/shipping')->getCarrierByCode($shippingCarrierCode);
271
  }
272
 
273
+
274
+ $codMethods = array(
275
+ 'eabicodpayment',
276
+ 'dpdcodpayment',
277
+ );
278
+
279
  if ($shippingMethodModel && ($shippingMethodModel instanceof Eabi_Postoffice_Model_Carrier_Abstract)
280
  && $shippingMethodModel->getConfigData('senddata_enable')
281
+ && (!(round($order->getTotalDue(), 2) > 0)
282
+
283
+ || ((round($order->getTotalDue(), 2) > 0 && in_array($paymentMethod->getMethod(), $codMethods))))
284
  && !($order->isCanceled() || $order->getIsVirtual())) {
285
  $shippingMethodModel->setStore($order->getStore());
286
  return true;
293
  * <p>Attempts to auto send data to remote server and insert the result to order comments.</p>
294
  * <p>Shipment data is sent to the server in the following conditions:
295
  * <ul>
296
+ * <li>Order has been fully paid, or payment method is Cash on delivery</li>
297
  * <li>Carrier supports automatic shipment data sending to the Carrier server</li>
298
  * <li>Merchant has enabled automatic shipment data sending to the server</li>
299
  * <li>Shipment data has not been sent to the server earlier</li>
316
  //get the shipping code from the order and call the module from it.
317
  $shippingCarrierCode = substr($shippingMethod, 0, strpos($shippingMethod, '_'));
318
  $shippingMethodModel = Mage::getModel('shipping/shipping')->getCarrierByCode($shippingCarrierCode);
319
+ $codMethods = array(
320
+ 'eabicodpayment',
321
+ 'dpdcodpayment',
322
+ );
323
 
324
 
325
  if ($shippingMethodModel && ($shippingMethodModel instanceof Eabi_Postoffice_Model_Carrier_Abstract)
326
  && $shippingMethodModel->getConfigData('senddata_enable')
327
  && $shippingMethodModel->getConfigData('senddata_event') == $eventName
328
+ /* order due is 0*/
329
+ && (!(round($order->getTotalDue(), 2) > 0)
330
+ /* order due is larger than 0 and payment method is in allowed list */
331
+ || ((round($order->getTotalDue(), 2) > 0 && in_array($paymentMethod->getMethod(), $codMethods))))
332
  && !($order->isCanceled() || $order->getIsVirtual())
333
  && $shippingMethodModel->isDataSent($order) === false) {
334
  try {
495
  return $numPackages;
496
  }
497
 
498
+ /**
499
+ *
500
+ * @param string $number
501
+ * @param Mage_Customer_Model_Address $address
502
+ * @return boolean
503
+ */
504
+ public function isMobilePhone(&$number, $address) {
505
+ $countryId = $address->getCountryId();
506
+ $number = (string)$number;
507
+
508
+ $customerNumbers = $this->_getCountryCodeHelper()->separatePhoneNumberFromCountryCode($number, $countryId);
509
+
510
+ $numberToTest = $customerNumbers['dial_code']. $customerNumbers['phone_number'];
511
+
512
+ switch ($countryId) {
513
+ case 'EE':
514
+ if (strlen($numberToTest) >= 10 && substr($numberToTest, 0, 5) === '+3725') {
515
+ return true;
516
+ }
517
+ break;
518
+ case 'LV':
519
+ if (strlen($numberToTest) >= 12 && substr($numberToTest, 0, 5) === '+3712') {
520
+ return true;
521
+ }
522
+ break;
523
+ case 'LT':
524
+ if (strlen($numberToTest) >= 11 && substr($numberToTest, 0, 5) === '+3706') {
525
+ return true;
526
+ }
527
+ if (strlen($numberToTest) >= 12 && substr($numberToTest, 0, 6) === '+37086') {
528
+ // $number = substr($number, 1);
529
+ return true;
530
+ }
531
+ break;
532
+ default:
533
+ break;
534
+ }
535
+ return false;
536
+ }
537
 
538
 
539
+ /**
540
+ *
541
+ * @return Eabi_Postoffice_Helper_Countrycode
542
+ */
543
+ protected function _getCountryCodeHelper() {
544
+ return Mage::helper('eabi_postoffice/countrycode');
545
+ }
546
 
547
 
548
  }
app/code/community/Eabi/Postoffice/Model/Carrier/Abstract.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
@@ -374,17 +374,7 @@ abstract class Eabi_Postoffice_Model_Carrier_Abstract extends Mage_Shipping_Mode
374
  $method->setMethod($this->_code);
375
 
376
  //if COD is enabled, then add COD fee on top of the shipping price
377
- if ($this->_getQuote()
378
- && !$this->_getQuote()->isVirtual()
379
- && $this->getConfigData('enable_cod')
380
- && $this->_getQuote()->getPayment()
381
- && $this->_getQuote()->getPayment()->getMethod()
382
- && $this->_getQuote()->getPayment()->getMethod() == 'eabicodpayment'
383
- && strpos($this->_getQuote()->getShippingAddress()->getShippingMethod(), $this->getCarrierCode()) === 0) {
384
-
385
- $price += $this->getConfigData('cod_fee');
386
-
387
- }
388
 
389
  $method->setPrice($price);
390
  $loadingText = Mage::helper('eabi_postoffice')->__('Loading offices...');
@@ -449,8 +439,16 @@ EOT;
449
  $addedMethods = array();
450
  //try to see, if we have any extra methods stored in a session
451
  $sessionData = $session->getData('eabi_carrier_' . $this->_code);
 
452
  if (is_array($sessionData) && isset($sessionData[$addressId])) {
453
  foreach ($sessionData[$addressId] as $subCarrier) {
 
 
 
 
 
 
 
454
  $method = Mage::getModel('shipping/rate_result_method');
455
  $method->setCarrier($subCarrier['carrier']);
456
  $method->setCarrierTitle($subCarrier['carrier_title']);
@@ -486,8 +484,29 @@ EOT;
486
 
487
  }
488
 
 
 
 
 
 
 
 
 
489
 
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  /**
492
  * <p>Registers current address id in session, so no outsiders could tamper with selected parcel terminal data.</p>
493
  * @param string $addressId
@@ -760,8 +779,10 @@ EOT;
760
  $newRate = Mage::getModel('sales/quote_address_rate');
761
  $newRate->setData('address_id', $addressId);
762
  $newRate->setData('carrier', $this->_code);
 
763
  $newRate->setData('code', $this->_code . '_' . $this->_code . '_' . $office->getRemotePlaceId());
764
  $newRate->setData('method', $this->_code . '_' . $office->getRemotePlaceId());
 
765
 
766
  $title = $this->getAdminTerminalTitle($office);
767
 
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
374
  $method->setMethod($this->_code);
375
 
376
  //if COD is enabled, then add COD fee on top of the shipping price
377
+ $price += $this->_applyPriceFromCod($request);
 
 
 
 
 
 
 
 
 
 
378
 
379
  $method->setPrice($price);
380
  $loadingText = Mage::helper('eabi_postoffice')->__('Loading offices...');
439
  $addedMethods = array();
440
  //try to see, if we have any extra methods stored in a session
441
  $sessionData = $session->getData('eabi_carrier_' . $this->_code);
442
+ $shippingAddress = $this->_getAddressModel()->load($addressId);
443
  if (is_array($sessionData) && isset($sessionData[$addressId])) {
444
  foreach ($sessionData[$addressId] as $subCarrier) {
445
+
446
+ if (isset($subCarrier['country_id']) && $subCarrier['country_id'] != $shippingAddress->getCountryId()) {
447
+ //on country mismatch do not append the method
448
+
449
+
450
+ continue;
451
+ }
452
  $method = Mage::getModel('shipping/rate_result_method');
453
  $method->setCarrier($subCarrier['carrier']);
454
  $method->setCarrierTitle($subCarrier['carrier_title']);
484
 
485
  }
486
 
487
+ /**
488
+ * <p>Returns true if cash on delivery is specified for target address</p>
489
+ * @param Mage_Customer_Model_Address $address
490
+ * @return bool
491
+ */
492
+ public function isCodEnabled(Mage_Customer_Model_Address $address) {
493
+ return $this->getConfigData('enable_cod');
494
+ }
495
 
496
 
497
+ /**
498
+ * <p>Applies extra price from Cash on Delivery, which is added on top of shipping price</p>
499
+ * @param Mage_Shipping_Model_Rate_Request $request
500
+ * @return double|int
501
+ */
502
+ protected function _applyPriceFromCod(Mage_Shipping_Model_Rate_Request $request) {
503
+ if ($this->_getQuote() && !$this->_getQuote()->isVirtual() && $this->getConfigData('enable_cod') && $this->_getQuote()->getPayment() && $this->_getQuote()->getPayment()->getMethod() && $this->_getQuote()->getPayment()->getMethod() == 'eabicodpayment' && strpos($this->_getQuote()->getShippingAddress()->getShippingMethod(), $this->getCarrierCode()) === 0) {
504
+
505
+ return $this->getConfigData('cod_fee');
506
+ }
507
+ return 0;
508
+ }
509
+
510
  /**
511
  * <p>Registers current address id in session, so no outsiders could tamper with selected parcel terminal data.</p>
512
  * @param string $addressId
779
  $newRate = Mage::getModel('sales/quote_address_rate');
780
  $newRate->setData('address_id', $addressId);
781
  $newRate->setData('carrier', $this->_code);
782
+ $newRate->setData('country_id', $office->getCountry());
783
  $newRate->setData('code', $this->_code . '_' . $this->_code . '_' . $office->getRemotePlaceId());
784
  $newRate->setData('method', $this->_code . '_' . $office->getRemotePlaceId());
785
+
786
 
787
  $title = $this->getAdminTerminalTitle($office);
788
 
app/code/community/Eabi/Postoffice/Model/Carrier/Result.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Carriermodule.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Mysql4/Carriermodule.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Mysql4/Carriermodule/Collection.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Mysql4/Office.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Mysql4/Office/Collection.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Office.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Orderview.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Source/Sendevent.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/Model/Updater.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/controllers/Adminhtml/PostofficeController.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
@@ -143,11 +143,11 @@ class Eabi_Postoffice_Adminhtml_PostofficeController extends Mage_Adminhtml_Cont
143
  return array('error' => Mage::helper('eabi_postoffice')->__('Automatic data sending is not available for the selected carrier'));
144
  }
145
 
146
- if (round($order->getTotalDue(), 2) > 0 && (!$shippingMethodModel->getConfigData('enable_cod') ||
147
- ($shippingMethodModel->getConfigData('enable_cod') && $paymentMethod->getMethod() != 'eabicodpayment'))) {
148
  return array('error' => Mage::helper('eabi_postoffice')->__('This order has not yet been fully paid'));
149
  }
150
 
 
151
  if (($order->isCanceled() || $order->getIsVirtual())) {
152
  return array('error' => Mage::helper('eabi_postoffice')->__('This order cannot be shipped'));
153
  }
@@ -337,6 +337,14 @@ class Eabi_Postoffice_Adminhtml_PostofficeController extends Mage_Adminhtml_Cont
337
  return Mage::helper('eabi');
338
  }
339
 
 
 
 
 
 
 
 
 
340
 
341
  }
342
 
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
143
  return array('error' => Mage::helper('eabi_postoffice')->__('Automatic data sending is not available for the selected carrier'));
144
  }
145
 
146
+ if (!$this->_getOfficeHelper()->canSendData($order)) {
 
147
  return array('error' => Mage::helper('eabi_postoffice')->__('This order has not yet been fully paid'));
148
  }
149
 
150
+
151
  if (($order->isCanceled() || $order->getIsVirtual())) {
152
  return array('error' => Mage::helper('eabi_postoffice')->__('This order cannot be shipped'));
153
  }
337
  return Mage::helper('eabi');
338
  }
339
 
340
+ /**
341
+ *
342
+ * @return Eabi_Postoffice_Helper_Data
343
+ */
344
+ protected function _getOfficeHelper() {
345
+ return Mage::helper('eabi_postoffice');
346
+ }
347
+
348
 
349
  }
350
 
app/code/community/Eabi/Postoffice/controllers/IndexController.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/etc/config.xml CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -36,7 +36,7 @@
36
  <config>
37
  <modules>
38
  <Eabi_Postoffice>
39
- <version>0.1.3</version>
40
  </Eabi_Postoffice>
41
  </modules>
42
 
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
36
  <config>
37
  <modules>
38
  <Eabi_Postoffice>
39
+ <version>0.1.4</version>
40
  </Eabi_Postoffice>
41
  </modules>
42
 
app/code/community/Eabi/Postoffice/sql/eabi_postoffice_setup/mysql4-install-0.1.0.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/sql/eabi_postoffice_setup/mysql4-upgrade-0.1.0-0.1.1.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/code/community/Eabi/Postoffice/sql/eabi_postoffice_setup/mysql4-upgrade-0.1.1-0.1.2.php CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/design/adminhtml/default/default/layout/eabi_postoffice.xml CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
app/design/adminhtml/default/default/template/eabi_dpdee/payment_info.phtml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php /* @var $this Eabi_DpdEE_Block_Invoice */ ?>
2
+ <?php if ($this->getMethod()->getConfigData('info_text') != '') :?>
3
+ <ul class="form-list eabi_dpdee_cod" id="payment_form_<?php echo $this->getMethodCode(); ?>" style="display:none;">
4
+ <li>
5
+ <div class="input-box">
6
+ <p><?php echo $this->getMethod()->getConfigData('info_text'); ?></p>
7
+ </div>
8
+ </li>
9
+ </ul>
10
+ <?php endif;
app/design/adminhtml/default/default/template/eabi_postoffice/shipping_method_form.phtml CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/design/frontend/base/default/layout/eabi_postoffice.xml CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
app/design/frontend/base/default/template/eabi_dpdee/payment_info.phtml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php /* @var $this Eabi_DpdEE_Block_Invoice */ ?>
2
+ <?php if ($this->getMethod()->getConfigData('info_text') != '') :?>
3
+ <ul class="form-list eabi_dpdee_cod" id="payment_form_<?php echo $this->getMethodCode(); ?>" style="display:none;">
4
+ <li>
5
+ <div class="input-box">
6
+ <p><?php echo $this->getMethod()->getConfigData('info_text'); ?></p>
7
+ </div>
8
+ </li>
9
+ </ul>
10
+ <?php endif;
app/design/frontend/base/default/template/eabi_postoffice/available.phtml CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/design/frontend/base/default/template/eabi_postoffice/multishipping.phtml CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/design/frontend/base/default/template/eabi_postoffice/shipping.phtml CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/design/frontend/base/default/template/eabi_postoffice/tracking/popup.phtml CHANGED
@@ -22,7 +22,7 @@
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
22
  *
23
  * @category Eabi
24
  * @package Eabi_Dpd
25
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28
  * @author Matis Halmann
app/etc/modules/Eabi_DpdEE.xml CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -39,7 +39,7 @@
39
  <depends>
40
  <Eabi_Postoffice />
41
  </depends>
42
- <version>0.1.6</version>
43
  </Eabi_DpdEE>
44
  </modules>
45
  </config>
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
39
  <depends>
40
  <Eabi_Postoffice />
41
  </depends>
42
+ <version>0.1.7</version>
43
  </Eabi_DpdEE>
44
  </modules>
45
  </config>
app/etc/modules/Eabi_Postoffice.xml CHANGED
@@ -23,7 +23,7 @@
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
@@ -42,7 +42,7 @@
42
  <Mage_Shipping />
43
  <Eabi_Livehandler />
44
  </depends>
45
- <version>0.1.3</version>
46
  </Eabi_Postoffice>
47
  </modules>
48
  </config>
23
  *
24
  * @category Eabi
25
  * @package Eabi_Dpd
26
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29
  * @author Matis Halmann
42
  <Mage_Shipping />
43
  <Eabi_Livehandler />
44
  </depends>
45
+ <version>0.1.4</version>
46
  </Eabi_Postoffice>
47
  </modules>
48
  </config>
app/locale/en_US/Eabi_DpdEE.csv CHANGED
@@ -44,4 +44,13 @@
44
  "Today","Today"
45
  "Http request timeout","Http request timeout"
46
  "If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February","If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February"
 
 
 
 
 
 
 
 
 
47
 
44
  "Today","Today"
45
  "Http request timeout","Http request timeout"
46
  "If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February","If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February"
47
+ "Cash on delivery for DPD","Cash on delivery for DPD"
48
+ "Cash on delivery fee","Cash on delivery fee"
49
+ "Enable Cash on Delivery","Enable Cash on Delivery"
50
+ "Cash on delivery method name displayed to client","Cash on delivery method name displayed to client"
51
+ "Cash on delivery method description displayed to client","Cash on delivery method description displayed to client"
52
+ "Default order status for cash on delivery payments","Default order status for cash on delivery payments"
53
+ "Allow cash on delivery only for products which are in-stock","Allow cash on delivery only for products which are in-stock"
54
+ "Sort order for cash on delivery payment method","Sort order for cash on delivery payment method"
55
+ "Instructions","Instructions"
56
 
app/locale/et_EE/Eabi_DpdEE.csv CHANGED
@@ -44,3 +44,12 @@
44
  "Today","Täna"
45
  "Http request timeout","Http päringu ajapiirang"
46
  "If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February","Kui üle 10 sekundi, siis saab kaupmees ainult käsitsi paki andmed saata. Käesolev väli koos piiranguga kaotatakse hiljemalt 17. veebruariks."
 
 
 
 
 
 
 
 
 
44
  "Today","Täna"
45
  "Http request timeout","Http päringu ajapiirang"
46
  "If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February","Kui üle 10 sekundi, siis saab kaupmees ainult käsitsi paki andmed saata. Käesolev väli koos piiranguga kaotatakse hiljemalt 17. veebruariks."
47
+ "Cash on delivery for DPD","Lunamakse DPD tarnele"
48
+ "Cash on delivery fee","Lunamakse tasu"
49
+ "Enable Cash on Delivery","Luba lunamaksega kohaletoimetamine"
50
+ "Cash on delivery method name displayed to client","Kliendile kuvatav lunamakse makseviisi nimetus"
51
+ "Cash on delivery method description displayed to client","Kliendile kuvatav lunamakse makseviisi kirjeldus"
52
+ "Default order status for cash on delivery payments","Tellimuse vaikeolek lunamaksega sooritatud tellimustele"
53
+ "Allow cash on delivery only for products which are in-stock","Luba lunamaksega tellida ainult laos olevaid tooteid"
54
+ "Sort order for cash on delivery payment method","Sorteerimisjärjekord lunamakse makseviisile"
55
+ "Instructions","Juhised"
app/locale/ru_RU/Eabi_DpdEE.csv CHANGED
@@ -44,3 +44,12 @@
44
  "Today","Today"
45
  "Http request timeout","Http request timeout"
46
  "If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February","If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February"
 
 
 
 
 
 
 
 
 
44
  "Today","Today"
45
  "Http request timeout","Http request timeout"
46
  "If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February","If timeout is greater than 10 seconds, then parcel data can only be sent manually. This field with the limitation will be removed latest 17th of February"
47
+ "Cash on delivery for DPD","Cash on delivery for DPD"
48
+ "Cash on delivery fee","Cash on delivery fee"
49
+ "Enable Cash on Delivery","Enable Cash on Delivery"
50
+ "Cash on delivery method name displayed to client","Cash on delivery method name displayed to client"
51
+ "Cash on delivery method description displayed to client","Cash on delivery method description displayed to client"
52
+ "Default order status for cash on delivery payments","Default order status for cash on delivery payments"
53
+ "Allow cash on delivery only for products which are in-stock","Allow cash on delivery only for products which are in-stock"
54
+ "Sort order for cash on delivery payment method","Sort order for cash on delivery payment method"
55
+ "Instructions","Instructions"
js/eabi_js/eabi_dpdee.js CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Eabi
23
  * @package Eabi_Dpd
24
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
27
  * @author Matis Halmann
21
  *
22
  * @category Eabi
23
  * @package Eabi_Dpd
24
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
27
  * @author Matis Halmann
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eabi_DpdEE</name>
4
- <version>0.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.txt">GNU Public License V3.0</license>
7
  <channel>community</channel>
@@ -15,12 +15,16 @@
15
  &lt;p&gt;Refreshes list of parcel terminal automatically&lt;/p&gt;&#xD;
16
  &lt;p&gt;Allows to create and print DPD packing slips&lt;/p&gt;&#xD;
17
  &lt;p&gt;Allows to call the courier from Magento admin&lt;/p&gt;&#xD;
 
18
  &lt;p&gt;Intended to use for Estonian merchant who sends parcels to all Baltic states&lt;/p&gt;</description>
19
- <notes>* Improved compatibility with Eabi_Cod module</notes>
 
 
 
20
  <authors><author><name>Matis Matis</name><user>auto-converted</user><email>info@e-abi.ee</email></author></authors>
21
- <date>2014-04-04</date>
22
- <time>21:14:39</time>
23
- <contents><target name="magecommunity"><dir name="Eabi"><dir name="DpdEE"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Country.php" hash="248931633c577c16670d8c055f83bc07"/></dir></dir></dir></dir><dir name="Order"><file name="Courier.php" hash="d719026b8baa83a61410d7c3d3a7b2b8"/></dir></dir><dir name="Helper"><file name="Data.php" hash="2b01e482067b51d29cd539b19ed91422"/></dir><dir name="Model"><dir name="Action"><dir name="Carrier"><dir name="Order"><file name="Courier.php" hash="4320003600c3711269ceb793c79f1a0e"/></dir></dir></dir><dir name="Button"><file name="Courier.php" hash="dcf458fc84b12e9656d9e5b9d607786e"/></dir><dir name="Source"><dir name="Label"><file name="Position.php" hash="7f95f8570328962b88a36d51b6f3e542"/></dir><file name="Service.php" hash="0d7ec71a6322c4b993d0335f76cc9ee4"/></dir><file name="Api.php" hash="769e780f959008fcf0e3e42eaefd9ded"/><file name="Config.php" hash="6d1767803078b10fff7fca5c9a8fce73"/><file name="Flat.php" hash="3411b2d21a3bcec64aef52c3bf55425c"/><file name="Observer.php" hash="0cd4bff03583da0ac8f2acc7408ab7fe"/><file name="Post.php" hash="22f5532294dc87849c7930fd80437c2a"/></dir><dir name="etc"><file name="config.xml" hash="d49d604f3f16212455a349f19e9014d2"/><file name="system.xml" hash="e9fbade4b810a0ade868685c146f28a0"/></dir><dir name="sql"><dir name="eabi_dpdee_setup"><file name="mysql4-install-0.1.0.php" hash="82be7ae5961aa797bf5944da67bf5155"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="9d6d7a5eaf6fe21b383bd1d010a70fb0"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="3ac820366b298aa7f124aac777ed20da"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="dcd90c42f16e8dca6ea567f196256796"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="1018891e649edaac75704ccc454c5d0f"/></dir></dir><file name="CHANGELOG.txt" hash="c1462eeb9d109135e8d451c7341c4e3b"/><file name="LICENCE.txt" hash="0191312e121c0b3e1165619b96efcf9f"/></dir><dir name="Postoffice"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Remove.php" hash="36582578ccfc5348053f6fd5876d95df"/></dir></dir></dir></dir><dir name="Config"><file name="Rebuildbutton.php" hash="5df4fd9f74bdd664d43b5e9debf95260"/></dir></dir><dir name="Helper"><file name="Countrycode.php" hash="b2f6e253d3351edff9b551eb6d86dce8"/><file name="Data.php" hash="52e2798a55bc60a2956251a5fe37bb06"/></dir><dir name="Model"><dir name="Carrier"><file name="Abstract.php" hash="8e5198059deb0b76e611f7abe7874f92"/><file name="Result.php" hash="fbb58545e0dea7ce6b277c2d27405e17"/></dir><dir name="Mysql4"><dir name="Carriermodule"><file name="Collection.php" hash="b125174c7a7532b27cb7736eecd984aa"/></dir><dir name="Office"><file name="Collection.php" hash="08b82e1b2067da8c6f62f026bd0f289c"/></dir><file name="Carriermodule.php" hash="4033f81a6ed9d15439e022525825c550"/><file name="Office.php" hash="11295e3d59cb440ece5a31c59793579a"/></dir><dir name="Source"><file name="Sendevent.php" hash="e2a1a255ebe31f4a737df76b83cc0612"/></dir><file name="Carriermodule.php" hash="97bcd9821511a55697247514c8dc280f"/><file name="Office.php" hash="e119cd9055075ddb68aa90e9413868e8"/><file name="Orderview.php" hash="a4a36ada9222c03863eb1b0415ecd681"/><file name="Updater.php" hash="a96e1e6fcba4302f0f108f22a2416767"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PostofficeController.php" hash="b2c5e190e3ab7224c0e7e3bb192f65ab"/></dir><file name="IndexController.php" hash="54ff0866fa0ab9368d2402b919ff7bc5"/></dir><dir name="etc"><file name="config.xml" hash="d806d19136831a898c9477b01bdc13c5"/></dir><dir name="sql"><dir name="eabi_postoffice_setup"><file name="mysql4-install-0.1.0.php" hash="8834196075d52491ab67e141dd89466d"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="21443cd02970fa62a90a83348623edf2"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="04dc9a59623a21354d31b67533f8c081"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_dpdee.xml" hash="85311cb850eb13eadaed47cdc9c44fb3"/><file name="eabi_postoffice.xml" hash="f549aec3cab6d7f4be38ad16c9878ad0"/></dir><dir name="template"><dir name="eabi_dpdee"><dir name="order"><file name="courier.phtml" hash="0310f24e96ca3873e78e0e2a0ab26743"/></dir></dir><dir name="eabi_postoffice"><file name="shipping_method_form.phtml" hash="e932b7215c23ec7457a7dbca1e757209"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="eabi_dpdee.xml" hash="27179eee219a0a8c85b87b8d670ae9e1"/><file name="eabi_postoffice.xml" hash="2324cf0537e7128907f1e82952d2428b"/></dir><dir name="template"><dir name="eabi_postoffice"><dir name="tracking"><file name="popup.phtml" hash="9141744241fc4add47ed20b91405fa8e"/></dir><file name="available.phtml" hash="c6e12f338e2c328fd39ef4d28f76c4cd"/><file name="multishipping.phtml" hash="1d3b1ec07fb7253204bc6d404e0c297a"/><file name="shipping.phtml" hash="0ffb21b42357907addc225021ff90b87"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eabi_Postoffice.xml" hash="f06b76976dd45fec7a9eaa946661b64e"/><file name="Eabi_DpdEE.xml" hash="2766f6e1b953937e902562caeffce2e8"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Eabi_DpdEE.csv" hash="73f89704ae83dcd6c30b8feadeaf77b1"/><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="et_EE"><file name="Eabi_DpdEE.csv" hash="8a4cedf5cf88f9b0a904293ff4900a6b"/><file name="Eabi_Postoffice.csv" hash="c70858d1325cb13428695e71582cd598"/></dir><dir name="ru_RU"><file name="Eabi_DpdEE.csv" hash="a4680d315a6b14009ffaac8f6756bb2a"/><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="hu_HU"><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="fi_FI"><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="lt_LT"><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="sv_SE"><file name="Eabi_Postoffice.csv" hash="fc105fd30ae95f5502e784aca5d8017d"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="eabi_dpdee.css" hash="9cfe785b8d341c290c1b6b084cc9e770"/></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="eabi_js"><file name="eabi_dpdee.js" hash="05db7b35460896b54fc4a6fe4791205e"/></dir></dir></target></contents>
24
  <compatible/>
25
- <dependencies><required><package><name>Eabi_Livehandler</name><channel>community</channel><min>0.1.5</min><max>1.0.0</max></package></required></dependencies>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eabi_DpdEE</name>
4
+ <version>0.1.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.txt">GNU Public License V3.0</license>
7
  <channel>community</channel>
15
  &lt;p&gt;Refreshes list of parcel terminal automatically&lt;/p&gt;&#xD;
16
  &lt;p&gt;Allows to create and print DPD packing slips&lt;/p&gt;&#xD;
17
  &lt;p&gt;Allows to call the courier from Magento admin&lt;/p&gt;&#xD;
18
+ &lt;p&gt;Allows cash on delivery payment and allows to set an extra fee per country which will be appended to shipping fee&lt;/p&gt;&#xD;
19
  &lt;p&gt;Intended to use for Estonian merchant who sends parcels to all Baltic states&lt;/p&gt;</description>
20
+ <notes>- Added COD feature to DPD shipping methods&#xD;
21
+ - Fixed last selected terminal display bug on country change&#xD;
22
+ - Added isCodEnabled and _applyPriceFromCod functions to Postoffice abstract carrier&#xD;
23
+ - Ability to auto-send-data to server is now checked by canSendData function in Postoffice abstract carrier</notes>
24
  <authors><author><name>Matis Matis</name><user>auto-converted</user><email>info@e-abi.ee</email></author></authors>
25
+ <date>2014-07-11</date>
26
+ <time>22:03:12</time>
27
+ <contents><target name="magecommunity"><dir name="Eabi"><dir name="DpdEE"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Country.php" hash="eea442b65d8f6a096e91c3087aa7a1d8"/></dir></dir></dir></dir><dir name="Info"><file name="Payment.php" hash="b2fee225c6e1d5df02cf39b46aa0f8b2"/></dir><dir name="Order"><file name="Courier.php" hash="dc7a838e0cbb5ea83fa706c4f627e397"/></dir><file name="Invoice.php" hash="4b66c452996bfe08f5ff3f0cac346ab1"/></dir><dir name="Helper"><file name="Data.php" hash="e309fa33bbd4eb0d0b607b9428313837"/></dir><dir name="Model"><dir name="Action"><dir name="Carrier"><dir name="Order"><file name="Courier.php" hash="a7188340758f43b53302cd0146467daf"/></dir></dir></dir><dir name="Button"><file name="Courier.php" hash="e18911389141943fb0aa02de7c14574b"/></dir><dir name="Payment"><file name="Processor.php" hash="0cd6e6138c88069b36eae2e37e8e73ff"/></dir><dir name="Source"><dir name="Label"><file name="Position.php" hash="92238059519dcdec87401ef8cafe3fe7"/></dir><file name="Service.php" hash="3f61777107806dd84e360c3d0867b2bb"/></dir><file name="Api.php" hash="083c3534789282ca18e377247fd35bd9"/><file name="Config.php" hash="9adeafdbd2cf7a15128f2ff9b5dacdee"/><file name="Flat.php" hash="0403e0af2ebd9ece72ffde74a6a1b47c"/><file name="Observer.php" hash="2c1b22592eb9d7361fe2f42545f75b63"/><file name="Post.php" hash="23458ea15c2ac915f58310fb646d8ca3"/></dir><dir name="etc"><file name="config.xml" hash="1b2481c26ff5eee15efc5315db119e49"/><file name="system.xml" hash="d5a433e6134082292a6c00509bc839b7"/></dir><dir name="sql"><dir name="eabi_dpdee_setup"><file name="mysql4-install-0.1.0.php" hash="9899be85206a5ab3a36cf9acf176f1ba"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="867f9921932996c3a0f77fa9bb2fdb04"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="182c47a3d5fab4a466a07ef996dfe4d1"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="6a7ef422fd05c87c0c7b29557cd064ae"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="3c20db4f5d9de485f51b4cb28ca9eb87"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="d54424c11c48db64ed514ced1df4d60c"/></dir></dir><file name="CHANGELOG.txt" hash="b8e4c86a3f4f9aac3bd52f05af52c65b"/><file name="LICENCE.txt" hash="0191312e121c0b3e1165619b96efcf9f"/></dir><dir name="Postoffice"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Remove.php" hash="11818c816c7e37c0f37e8732d02d7711"/></dir></dir></dir></dir><dir name="Config"><file name="Rebuildbutton.php" hash="b54ac12fa93514f5fd772e4512be945e"/></dir></dir><dir name="Helper"><file name="Countrycode.php" hash="11b598e6008f18baa7dafc3b579c6c96"/><file name="Data.php" hash="b8e474e177cf8c49a3b7b5b2627be91e"/></dir><dir name="Model"><dir name="Carrier"><file name="Abstract.php" hash="b71ab9fb87398b55eee8495080cbf802"/><file name="Result.php" hash="452b5250a1eeaa2647106d896f170f0e"/></dir><dir name="Mysql4"><dir name="Carriermodule"><file name="Collection.php" hash="8ccfde755a7ef4d3eecb09144919ae9a"/></dir><dir name="Office"><file name="Collection.php" hash="26894ab3a3079edf21a722b46d495d07"/></dir><file name="Carriermodule.php" hash="06fb7663d449a1a559e482807e8a8e9e"/><file name="Office.php" hash="f1ab374d9041692dabd1a1c569bc5065"/></dir><dir name="Source"><file name="Sendevent.php" hash="4d0a215ab10eb52c4de46a66155899b8"/></dir><file name="Carriermodule.php" hash="cc4ad05756dc8f8fbb66e5a3561d61ea"/><file name="Office.php" hash="6f3829a91a2d3c474f0127de8e8279da"/><file name="Orderview.php" hash="b319d0e8ae54630cc503c35630156081"/><file name="Updater.php" hash="1bd7d37a9a2e814e85a14b3c669ef4ba"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PostofficeController.php" hash="cd4fd08232d9723e9b2bd4e516f1f6b1"/></dir><file name="IndexController.php" hash="43f17e0e603d6e671db1e4cd49938dc8"/></dir><dir name="etc"><file name="config.xml" hash="b94a11fbc874b9676baf22fb74583407"/></dir><dir name="sql"><dir name="eabi_postoffice_setup"><file name="mysql4-install-0.1.0.php" hash="6c8c1a726bbebeaa707b007bdff592d9"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="641d3015c6f3b761759a882ed8fea5c2"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="c61dcac734cc0be364afe3262a710729"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_dpdee.xml" hash="85311cb850eb13eadaed47cdc9c44fb3"/><file name="eabi_postoffice.xml" hash="458f5c47dbdfc1ab1528e200d5d8f932"/></dir><dir name="template"><dir name="eabi_dpdee"><dir name="order"><file name="courier.phtml" hash="0310f24e96ca3873e78e0e2a0ab26743"/></dir><file name="payment_info.phtml" hash="3f8a01e4bcd2efab555d729bee8335da"/></dir><dir name="eabi_postoffice"><file name="shipping_method_form.phtml" hash="542898a02261b0bccf075424fd0b4903"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="eabi_dpdee.xml" hash="27179eee219a0a8c85b87b8d670ae9e1"/><file name="eabi_postoffice.xml" hash="1af217a15c9429cf194ea2cf111fac69"/></dir><dir name="template"><dir name="eabi_dpdee"><file name="payment_info.phtml" hash="3f8a01e4bcd2efab555d729bee8335da"/></dir><dir name="eabi_postoffice"><dir name="tracking"><file name="popup.phtml" hash="c6d8cc592aaa7bee1ec20dc1c202d841"/></dir><file name="available.phtml" hash="0afb1521ac8c2ab4c80364dd3cef051a"/><file name="multishipping.phtml" hash="f27c3d8ac939a97ab160feef8f5370d1"/><file name="shipping.phtml" hash="b041efafbcbbea2f2b4a6584cba83e2f"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eabi_Postoffice.xml" hash="f2aa53756e15f7c46b6c691e83b3d6b0"/><file name="Eabi_DpdEE.xml" hash="31b1ee11ea58e1ffa6875d7705986565"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Eabi_DpdEE.csv" hash="d98963cb668ca0c0174b1503c1eb0a34"/><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="et_EE"><file name="Eabi_DpdEE.csv" hash="fe3c32249528cfb77519cff7e90ffb33"/><file name="Eabi_Postoffice.csv" hash="c70858d1325cb13428695e71582cd598"/></dir><dir name="ru_RU"><file name="Eabi_DpdEE.csv" hash="bb76f70e2c91160b11f570651ee0b8ee"/><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="hu_HU"><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="fi_FI"><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="lt_LT"><file name="Eabi_Postoffice.csv" hash="efd07c7191b6787abe38bf13ee199714"/></dir><dir name="sv_SE"><file name="Eabi_Postoffice.csv" hash="fc105fd30ae95f5502e784aca5d8017d"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="eabi_dpdee.css" hash="fc08519f26a3b0819b4c925bd2f1ef1a"/></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="eabi_js"><file name="eabi_dpdee.js" hash="1339c149edea070f9908ceb2e7bf559d"/></dir></dir></target></contents>
28
  <compatible/>
29
+ <dependencies><required><package><name>Eabi_Livehandler</name><channel>community</channel><min>0.1.8</min><max>1.0.0</max></package></required></dependencies>
30
  </package>
skin/adminhtml/default/default/eabi_dpdee.css CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Eabi
23
  * @package Eabi_Dpd
24
- * @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
27
  * @author Matis Halmann
21
  *
22
  * @category Eabi
23
  * @package Eabi_Dpd
24
+ * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
27
  * @author Matis Halmann