Eabi_Livehandler - Version 0.1.12

Version Notes

- Added support for licenceable modules

Download this release

Release Info

Developer Magento Core Team
Extension Eabi_Livehandler
Version 0.1.12
Comparing to
See all releases


Code changes from version 0.1.11 to 0.1.12

Files changed (52) hide show
  1. app/code/community/Eabi/Livehandler/Block/Adminhtml/Config/Form/Field/Button.php +1 -1
  2. app/code/community/Eabi/Livehandler/Block/Adminhtml/Config/Form/Field/Licence.php +108 -0
  3. app/code/community/Eabi/Livehandler/Block/Adminhtml/Config/Form/Field/Remove.php +1 -1
  4. app/code/community/Eabi/Livehandler/Block/Email.php +1 -1
  5. app/code/community/Eabi/Livehandler/Block/Footer.php +1 -1
  6. app/code/community/Eabi/Livehandler/Block/Licence.php +540 -0
  7. app/code/community/Eabi/Livehandler/Helper/Data.php +127 -1
  8. app/code/community/Eabi/Livehandler/Helper/Keypair.php +1 -1
  9. app/code/community/Eabi/Livehandler/Helper/Resolver.php +99 -0
  10. app/code/community/Eabi/Livehandler/Model/Abstract.php +1 -1
  11. app/code/community/Eabi/Livehandler/Model/Action/Abstract.php +1 -1
  12. app/code/community/Eabi/Livehandler/Model/Action/Postoffice/Print.php +1 -1
  13. app/code/community/Eabi/Livehandler/Model/Action/Postoffice/Send.php +1 -1
  14. app/code/community/Eabi/Livehandler/Model/Adminhtml/Gridmanager.php +1 -1
  15. app/code/community/Eabi/Livehandler/Model/Backend/Licence.php +135 -0
  16. app/code/community/Eabi/Livehandler/Model/Config.php +41 -0
  17. app/code/community/Eabi/Livehandler/Model/Directory/Collection.php +1 -1
  18. app/code/community/Eabi/Livehandler/Model/Entry.php +1 -1
  19. app/code/community/Eabi/Livehandler/Model/File/Object.php +1 -1
  20. app/code/community/Eabi/Livehandler/Model/Impl/Licenceable.php +87 -0
  21. app/code/community/Eabi/Livehandler/Model/Licenceable.php +44 -0
  22. app/code/community/Eabi/Livehandler/Model/Licenceable/Method.php +76 -0
  23. app/code/community/Eabi/Livehandler/Model/Logger.php +1 -1
  24. app/code/community/Eabi/Livehandler/Model/Mysql4/Entry.php +1 -1
  25. app/code/community/Eabi/Livehandler/Model/Mysql4/Entry/Collection.php +1 -1
  26. app/code/community/Eabi/Livehandler/Model/Ordergrid.php +4 -2
  27. app/code/community/Eabi/Livehandler/Model/Source/Log.php +1 -1
  28. app/code/community/Eabi/Livehandler/Model/System/Config/Backend/Button.php +1 -1
  29. app/code/community/Eabi/Livehandler/Model/System/Config/Source/Country.php +59 -0
  30. app/code/community/Eabi/Livehandler/controllers/Adminhtml/LicenceController.php +98 -0
  31. app/code/community/Eabi/Livehandler/controllers/Adminhtml/LivehandlerController.php +1 -1
  32. app/code/community/Eabi/Livehandler/controllers/Adminhtml/RemoveController.php +1 -1
  33. app/code/community/Eabi/Livehandler/controllers/IndexController.php +25 -1
  34. app/code/community/Eabi/Livehandler/etc/config.xml +18 -2
  35. app/code/community/Eabi/Livehandler/etc/system.xml +1 -1
  36. app/code/community/Eabi/Livehandler/sql/eabi_livehandler_setup/mysql4-install-0.1.0.php +1 -1
  37. app/code/community/Eabi/Livehandler/sql/eabi_livehandler_setup/mysql4-upgrade-0.1.0-0.1.1.php +1 -1
  38. app/code/community/Eabi/Livehandler/sql/eabi_livehandler_setup/mysql4-upgrade-0.1.8-0.1.9.php +1 -1
  39. app/design/adminhtml/default/default/layout/eabi_livehandler.xml +8 -1
  40. app/design/adminhtml/default/default/template/eabi_livehandler/licence.phtml +123 -0
  41. app/design/frontend/base/default/layout/eabi_livehandler.xml +1 -1
  42. app/design/frontend/base/default/template/eabi_livehandler/email.phtml +1 -1
  43. app/design/frontend/default/default/layout/eabi_livehandler.xml +1 -1
  44. app/etc/modules/Eabi_Livehandler.xml +2 -2
  45. app/locale/en_US/Eabi_Livehandler.csv +23 -0
  46. app/locale/et_EE/Eabi_Livehandler.csv +23 -0
  47. app/locale/fi_FI/Eabi_Livehandler.csv +23 -0
  48. app/locale/lt_LT/Eabi_Livehandler.csv +23 -0
  49. app/locale/sv_SE/Eabi_Livehandler.csv +23 -0
  50. js/livepipe/livepipe.js +1 -1
  51. package.xml +5 -5
  52. skin/adminhtml/default/default/eabi_admintools.css +29 -0
app/code/community/Eabi/Livehandler/Block/Adminhtml/Config/Form/Field/Button.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Block/Adminhtml/Config/Form/Field/Licence.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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 yes/no select box with licensing information</p>
35
+ *
36
+ * @author Matis
37
+ */
38
+ class Eabi_Livehandler_Block_Adminhtml_Config_Form_Field_Licence extends Mage_Adminhtml_Block_System_Config_Form_Field {
39
+
40
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
41
+ $path = $this->_getEabi()->getResolverHelper()
42
+ ->getPathFromElement($element);
43
+
44
+ $storeCode = Mage::app()->getRequest()->getParam('store', 0);
45
+
46
+
47
+ $supportedSectionAttribute = 'eabi_supported_sections';
48
+ $block = $this->_getEabi()
49
+ ->getEabiLicenceBlock();
50
+ /* @var $block Eabi_Livehandler_Block_Licence */
51
+ if (!$storeCode && $this->_isAllowedToChange()) {
52
+ $block->setElement($element);
53
+ }
54
+ $block->setValue($element->getEscapedValue());
55
+ $block->setFormFieldId($element->getHtmlId());
56
+ $block->setMethod($path['section'] . '/' . $path['model']);
57
+ if ($additionalSupportedMethods = $this->_getAttribute($element->getOriginalData(), $supportedSectionAttribute)) {
58
+ $additionalMethodCodes = $this->_getEabi()->csvToArray($additionalSupportedMethods);
59
+ $resultingAdditionalMethodCodes = array();
60
+ foreach ($additionalMethodCodes as $additionalMethodCode) {
61
+ $resultingAdditionalMethodCodes[] = $additionalMethodCode . '/' . $path['model'];
62
+ }
63
+ $block->setMethods($resultingAdditionalMethodCodes);
64
+ }
65
+
66
+
67
+
68
+ //create licence block with your data and forward it to the block and on block call-tohtml
69
+ // $html = '';
70
+ return $block->toHtml();
71
+ }
72
+
73
+
74
+ protected function _getAttribute($input, $property) {
75
+ if (isset($input[$property])) {
76
+ return $input[$property];
77
+ }
78
+ return null;
79
+ }
80
+
81
+
82
+ /**
83
+ *
84
+ * @return Eabi_Livehandler_Helper_Keypair
85
+ */
86
+ protected function _getKeypairHelper() {
87
+ return Mage::helper('eabi/keypair');
88
+ }
89
+
90
+
91
+ /**
92
+ *
93
+ * @return Eabi_Livehandler_Helper_Data
94
+ */
95
+ protected function _getEabi() {
96
+ return Mage::helper('eabi');
97
+ }
98
+
99
+ protected function _isAllowedToChange() {
100
+ $key = 'eabi_livehandler/adminhtml_licence/request';
101
+ return $this->_getEabi()->getAdminSessionSingleton()
102
+ ->isAllowed($key);
103
+ }
104
+
105
+
106
+
107
+ }
108
+
app/code/community/Eabi/Livehandler/Block/Adminhtml/Config/Form/Field/Remove.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Block/Email.php CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Block/Footer.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Block/Licence.php ADDED
@@ -0,0 +1,540 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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
+ * Description of Licence
36
+ *
37
+ * @author Matis
38
+ * @method Eabi_Livehandler_Block_Licence setFormFieldId(string $formFieldId)
39
+ * @method string getFormFieldId()
40
+ * @method Eabi_Livehandler_Block_Licence setFormFieldName(string $formFieldName)
41
+ * @method string getFormFieldName()
42
+ * @method Varien_Data_Form_Element_Abstract getElement()
43
+ * @method Eabi_Livehandler_Block_Licence setElement(Varien_Data_Form_Element_Abstract $element)
44
+ */
45
+ class Eabi_Livehandler_Block_Licence extends Mage_Core_Block_Template {
46
+
47
+ public static $certificate = '-----BEGIN CERTIFICATE REQUEST-----
48
+ MIIB3TCCAUYCAQAwgZwxCzAJBgNVBAYTAkVFMREwDwYDVQQIEwhIYXJqdW1hYTEQ
49
+ MA4GA1UEBxMHVGFsbGlubjEbMBkGA1UECgwSQWt0c2lhbWFhaWxtIE/Dg8KcMRUw
50
+ EwYDVQQLEwx3d3cuZS1hYmkuZWUxFjAUBgNVBAMTDW1hdGlzIGhhbG1hbm4xHDAa
51
+ BgkqhkiG9w0BCQEWDWluZm9AZS1hYmkuZWUwgZ8wDQYJKoZIhvcNAQEBBQADgY0A
52
+ MIGJAoGBAOaMZSq2d0u1G2mZVoJrFNhVwY5+srRvIPfdjN/fb9r6akHah4sgO/Me
53
+ NavqsqSaIyaVHk+qsmoobME5xLCfqfpqLVZUWWl1Gl/y/iDw51sQoZVtPJUBcNaE
54
+ L1HR4MU+7b5/Ig+IpCdPpKZ0xxTIFa731B4jzscIZQZYuljrn3xDAgMBAAGgADAN
55
+ BgkqhkiG9w0BAQUFAAOBgQAf+bJJ+j+4kPE+Ih5BLXGeDvc4P8UxvEjCLrzFhysD
56
+ z613BUu93jwLSTuZwHcbUtDyGgUAhWAtDmVZZk1ZksR1LZ72qV6agj0brx+O4M22
57
+ p8HWZm6dNmAtVUJk4fuqlPdkwKOfb4Fju8NhfeiPqOk363Z2oSdUkityaHF0/OJa
58
+ RA==
59
+ -----END CERTIFICATE REQUEST-----';
60
+ private static $_publicKey;
61
+ protected $blockValue;
62
+
63
+ /**
64
+ *
65
+ * @var Eabi_Livehandler_Model_Licenceable
66
+ */
67
+ protected $_method = array();
68
+ protected $_methods = array();
69
+ protected $_columns = array();
70
+ private static $_callOuts = array();
71
+
72
+
73
+ public function _construct() {
74
+ $this->setTemplate('eabi_livehandler/licence.phtml');
75
+ if (!self::$_publicKey) {
76
+ self::$_publicKey = openssl_csr_get_public_key(self::$certificate);
77
+ }
78
+
79
+ parent::_construct();
80
+ }
81
+
82
+
83
+ public function getLogo() {
84
+ $html = '';
85
+ $title = htmlspecialchars(sprintf($this->_getEabi()->__('Support from e-mail %s'), 'info@e-abi.ee'));
86
+ if ($this->getMethod()) {
87
+ $html .= sprintf('<img alt="' . $title . '" title="' . $title . '" src="http://www.e-abi.ee/skin/frontend/default/electronics3/images/%s" style="height: 30px; width: 30px;"/>', $this->getMethod()->getConfigData('eabi_logo') ? $this->getMethod()->getConfigData('eabi_logo'): 'logo-web.png');
88
+ } else {
89
+ $html .= '<img alt="' . $title . '" title="' . $title . '" src="http://www.e-abi.ee/skin/frontend/default/electronics3/images/logo-web.png" style="height: 30px; width: 30px;"/>';
90
+ }
91
+ return $html;
92
+ }
93
+
94
+ public function setMethod($method) {
95
+ if (is_string($method)) {
96
+ $this->_methods = array($method);
97
+ $method = $this->getMethodByCode($method);
98
+ }
99
+ $this->_method = $method;
100
+ return $this;
101
+ }
102
+
103
+ public function setMethods(array $methods) {
104
+ $this->_methods = $methods;
105
+ return $this;
106
+ }
107
+
108
+ public function getMethods() {
109
+ if (!count($this->_methods)) {
110
+ return array($this->getMethod()->getCode());
111
+ }
112
+ return $this->_methods;
113
+ }
114
+
115
+ public function getMethodByCode($code) {
116
+ //Mage::getModel('shipping/shipping')->getCarrierByCode($shippingCarrierCode, $order->getStoreId())
117
+ $types = explode('/', $code);
118
+ $allShippingMethods = $this->_getEabi()->getAllSupportedMethodCodes();
119
+ $method = $allShippingMethods->getItemById($code);
120
+
121
+ if (!is_object($method)) {
122
+ return null;
123
+ }
124
+
125
+ return $method->getMethodInstance();
126
+ }
127
+ public function getRawMethodByCode($code) {
128
+ //Mage::getModel('shipping/shipping')->getCarrierByCode($shippingCarrierCode, $order->getStoreId())
129
+ $types = explode('/', $code);
130
+ $allShippingMethods = $this->_getEabi()->getAllSupportedMethodCodes();
131
+ return $allShippingMethods->getItemById($code);
132
+ }
133
+
134
+ /**
135
+ *
136
+ * @return Eabi_Livehandler_Model_Licenceable
137
+ */
138
+ public function getMethod() {
139
+ return $this->_method;
140
+ }
141
+
142
+ public function setValue($value) {
143
+ $this->blockValue = $value;
144
+ return $this;
145
+ }
146
+
147
+ public function getValue() {
148
+ return $this->blockValue;
149
+ }
150
+
151
+ protected function _removeExpiredEntries($licenceDatas) {
152
+ $finalDatas = array();
153
+ if (!is_array($licenceDatas)) {
154
+ return $finalDatas;
155
+ }
156
+ foreach ($licenceDatas as $service => $licenceData) {
157
+ $serviceDatas = $this->_removeExpiredEntriesOnService($licenceData);
158
+ if (count($serviceDatas)) {
159
+ $finalDatas[$service] = $serviceDatas;
160
+ }
161
+ }
162
+ return $finalDatas;
163
+ }
164
+ protected function _removeExpiredEntriesOnService($licenceDatas) {
165
+ $entries = array();
166
+ foreach ($licenceDatas as $licenceData) {
167
+
168
+ if ($licenceData[$this->_getS()] >= time()) {
169
+ $entries[] = $licenceData;
170
+ }
171
+ }
172
+ return $entries;
173
+ }
174
+
175
+ public function getLicenceStatus($serviceCode, $country) {
176
+ $text = sprintf('<span class="eabi-postoffice-red">%s</span>', $this->_getEabi()->__('Disabled'));
177
+ $textChanged = false;
178
+ $d = '';
179
+ $u = $this->_getU();
180
+ $v = $this->_getV();
181
+ $q = $this->_getQ();
182
+ $licenceData = array();
183
+
184
+
185
+ if ($this->getValue() || in_array($serviceCode, $this->getMethods())) {
186
+
187
+ if ($this->getValue()) {
188
+ $licenceData = json_decode(@gzuncompress($v($this->getValue())), true);
189
+ }
190
+
191
+ if (!count($licenceData) || !isset($licenceData[$serviceCode . '_' . $country])) {
192
+ if ($this->getMethod()->getCode() != $serviceCode) {
193
+ $shippingMethod = $this->getMethodByCode($serviceCode);
194
+ $licenceData = @json_decode(@gzuncompress($v($this->getRawMethodByCode($serviceCode)->getRawLicence())), true);
195
+
196
+ }
197
+ }
198
+ $licenceData = $this->_removeExpiredEntries($licenceData);
199
+
200
+
201
+ if (isset($licenceData[$serviceCode . '_' . $country])) {
202
+ foreach ($licenceData[$serviceCode . '_' . $country] as $licenceArray) {
203
+
204
+ $licenceString = $this->_getLicenceString($licenceArray, $serviceCode, $country);
205
+ if ($u($licenceString, $v($licenceArray[$this->_getT()]), self::$_publicKey, $this->_getM())) {
206
+ if ($licenceArray[$this->_getO()]) {
207
+ $ed = new $q($licenceArray[$this->_getS()], Zend_Date::TIMESTAMP);
208
+
209
+ $df = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
210
+ $text = sprintf('<span class="eabi-postoffice-yellow">%s</span>', $this->_getEabi()->__('Demo'));
211
+ $text .= ' ' . sprintf($this->_getEabi()->__('(expires: %s)'), $ed->get($df));
212
+ } else {
213
+ $text = sprintf('<span class="eabi-postoffice-green">%s</span>', $this->_getEabi()->__('Activated'));
214
+ }
215
+ $textChanged = true;
216
+ break;
217
+ }
218
+ }
219
+ if (!$textChanged) {
220
+ $this->setValue("");
221
+ $this->reset();
222
+ }
223
+
224
+ }
225
+ }
226
+ return $text . $d;
227
+ }
228
+
229
+
230
+
231
+ public function isServiceAvailable($serviceCode, $country) {
232
+ return $this->_isServiceAvailable($serviceCode, $country) || $this->_isServiceAvailable($serviceCode, '*');
233
+ }
234
+
235
+ protected function _getK() {
236
+ return str_rot13('fge_ebg13');
237
+ }
238
+
239
+ protected function _getL() {
240
+ $a = $this->_getK();
241
+ return $a('pbafgnag');
242
+ }
243
+
244
+ protected function _getM() {
245
+ $a = $this->_getL();
246
+ $b = $this->_getK();
247
+ return $a($b('BCRAFFY_NYTB_FUN1'));
248
+ }
249
+
250
+ protected function _getN() {
251
+ $a = $this->_getK();
252
+ return $a('unfu');
253
+ }
254
+
255
+ protected function _getO() {
256
+ $a = $this->_getK();
257
+ return $a('qrzbovg');
258
+ }
259
+
260
+ protected function _getP() {
261
+ $a = $this->_getK();
262
+ return $a('fnyg');
263
+ }
264
+
265
+ protected function _getQ() {
266
+ $a = $this->_getK();
267
+ return $a('Mraq_Qngr');
268
+ }
269
+
270
+ protected function _getS() {
271
+ $a = $this->_getK();
272
+ return $a('rkcvengvba_fgnzc');
273
+ }
274
+
275
+ protected function _getT() {
276
+ $a = $this->_getK();
277
+ return $a('fvtangher');
278
+ }
279
+
280
+ protected function _getU() {
281
+ $a = $this->_getK();
282
+ return $a('bcraffy_irevsl');
283
+ }
284
+
285
+ protected function _getV() {
286
+ $a = $this->_getK();
287
+ return $a('onfr64_qrpbqr');
288
+ }
289
+
290
+ protected function _getW() {
291
+ $a = $this->_getK();
292
+ return $a('qngr_sbezng');
293
+ }
294
+
295
+ protected function _getX() {
296
+ $a = $this->_getK();
297
+ return $a('yvprapr');
298
+ }
299
+
300
+ protected function _getY() {
301
+ $a = $this->_getK();
302
+ return $a('onfr64_rapbqr');
303
+ }
304
+
305
+ protected function _getZ() {
306
+ $a = $this->_getK();
307
+ return $a('fun256');
308
+ }
309
+
310
+ protected function _isServiceAvailable($serviceCode, $country) {
311
+ $s = $this->_getS();
312
+ $t = $this->_getT();
313
+ $u = $this->_getU();
314
+ $v = $this->_getV();
315
+ $x = $this->_getX();
316
+
317
+
318
+ $shippingMethod = $this->getMethodByCode($serviceCode);
319
+ if (is_null($shippingMethod)) {
320
+ return true;
321
+ }
322
+ $licenceData = @json_decode(@gzuncompress($v($this->getRawMethodByCode($serviceCode)->getRawLicence())), true);
323
+ $result = false;
324
+
325
+ if (isset($licenceData[$serviceCode . '_' . $country])) {
326
+
327
+ foreach ($licenceData[$serviceCode . '_' . $country] as $licenceArray) {
328
+ $licenceString = $this->_getLicenceString($licenceArray, $serviceCode, $country);
329
+ if ($u($licenceString, $v($licenceArray[$t]), $this->getPublicKey(true), $this->_getM())) {
330
+
331
+ if ($licenceArray[$s] >= time()) {
332
+ $result = true;
333
+ } else {
334
+ $result = false;
335
+ }
336
+ break;
337
+ }
338
+ }
339
+ }
340
+
341
+ $this->_handleCallout($serviceCode, $country, $result);
342
+ return $result;
343
+ }
344
+
345
+
346
+
347
+ public function getStatus($serviceCode, $country) {
348
+ if (isset(self::$_callOuts[$serviceCode]) && isset(self::$_callOuts[$serviceCode][$country])) {
349
+ return self::$_callOuts[$serviceCode][$country];
350
+ }
351
+ if (isset(self::$_callOuts[$serviceCode]) && isset(self::$_callOuts[$serviceCode]['*'])) {
352
+ return self::$_callOuts[$serviceCode]['*'];
353
+ }
354
+ return null;
355
+ }
356
+
357
+ public function getAllSiteHosts() {
358
+ $configPaths = array(
359
+ 'web/unsecure/base_url',
360
+ 'web/secure/base_url',
361
+ );
362
+
363
+ $configDatas = $this->_getEabi()
364
+ ->getCoreConfigDataModel()
365
+ ->getCollection()
366
+ ->addFieldToFilter('path', array('in' => $configPaths));
367
+ $hosts = array();
368
+ foreach ($configDatas as $configData) {
369
+ try {
370
+ $host = Zend_Uri_Http::fromString($configData->getValue());
371
+ if (!in_array($host->getHost(), $hosts)) {
372
+ $hosts[] = $host->getHost();
373
+ }
374
+ } catch (Zend_Uri_Exception $ex) {
375
+ //do nothing
376
+
377
+ }
378
+
379
+ }
380
+ return $hosts;
381
+ }
382
+
383
+ public function splitLicenceToServices($compressedLicenceData, &$isNew = false) {
384
+ $v = $this->_getV();
385
+ $y = $this->_getY();
386
+ $licenceData = @json_decode(@gzuncompress($v($compressedLicenceData)), true);
387
+ $isFinal = isset($licenceData['is_final']) && $licenceData['is_final'] === true;
388
+
389
+ if ($isFinal) {
390
+ $isNew = true;
391
+ unset($licenceData['is_final']);
392
+ }
393
+ $allMethodCodes = $this->_getEabi()->getAllSupportedMethodCodes();
394
+ $result = array();
395
+ if (!$licenceData) {
396
+ return $result;
397
+ }
398
+ foreach ($licenceData as $serviceCombination => $serviceDatas) {
399
+ $serviceKey = substr($serviceCombination, 0, -3);
400
+ $serviceCountry = substr($serviceCombination, -2);
401
+ if ($serviceCountry == '_*') {
402
+ $serviceKey = substr($serviceCombination, 0, -2);
403
+ $serviceCountry = substr($serviceCombination, -1);
404
+ }
405
+ //
406
+ $serviceKeyCombinations = explode('/', $serviceKey);
407
+
408
+ if (!isset($result[$serviceKeyCombinations[1]])) {
409
+ $result[$serviceKeyCombinations[1]] = array();
410
+ }
411
+ // $result[$serviceKey][$serviceCombination] = $serviceDatas;
412
+ $result[$serviceKeyCombinations[1]][$serviceCombination] = $this->_validateAndClearLicenceData($serviceDatas);
413
+ }
414
+ //TODO: some sort of validation?
415
+ foreach ($result as $serviceKey => $data) {
416
+ $result[$serviceKey] = $y(gzcompress(json_encode($data)));
417
+ }
418
+ if ($isFinal) {
419
+ foreach ($allMethodCodes as $methodCode) {
420
+ // echo '<pre>'.htmlspecialchars(print_r($methodCode->debug(), true), ENT_COMPAT | ENT_HTML401 | ENT_IGNORE).'</pre>';
421
+
422
+ if (!isset($result[$methodCode->getCode()])) {
423
+ $result[$methodCode->getCode()] = '';
424
+ }
425
+ }
426
+ }
427
+ return $result;
428
+ }
429
+
430
+ public function reset() {
431
+ $shippingMethodCodes = $this->_getEabi()->getAllSupportedMethodCodes();
432
+ foreach ($shippingMethodCodes as $shippingMethodCode) {
433
+ try {
434
+ $shippingMethod = $shippingMethodCode->setRawLicence('');
435
+ } catch (Exception $ex) {
436
+ $this->_getEabi()
437
+ ->getEabiLogger()
438
+ ->setIsLogEnabled(true)
439
+ ->setLogLevel(Zend_Log::DEBUG)
440
+ ->debug($ex->__toString());
441
+ }
442
+ }
443
+ return $this;
444
+ }
445
+
446
+
447
+ protected function _validateAndClearLicenceData($datas) {
448
+ $fields = array(
449
+ $this->_getP() => array('length' => 64),
450
+ $this->_getO() => array('length' => 1),
451
+ $this->_getS() => array('length' => 19),
452
+ $this->_getT() => array('length' => 256),
453
+ );
454
+ $result = array();
455
+ foreach ($datas as $i => $data) {
456
+ $result[$i] = array();
457
+ foreach ($fields as $field => $descriptor) {
458
+ if (!isset($data[$field]) || strlen($data[$field]) > $descriptor['length']) {
459
+ Mage::throwException(sprintf($this->_getEabi()->__('Field %s was probably manipulated'), $field));
460
+ }
461
+ $result[$i][$field] = $data[$field];
462
+ }
463
+ }
464
+ return $result;
465
+ }
466
+
467
+ protected function _getLicenceString(array $licenceData, $serviceCode, $country) {
468
+ $d = '';
469
+ $n = $this->_getN();
470
+ $d .= str_pad(parse_url(Mage::getUrl(), PHP_URL_HOST), 500, ' ', STR_PAD_RIGHT);
471
+ $d .= str_pad($licenceData[$this->_getP()], 64, ' ', STR_PAD_RIGHT);
472
+ $d .= str_pad($serviceCode, 255, ' ', STR_PAD_RIGHT);
473
+ $d .= str_pad($country, 2, ' ', STR_PAD_RIGHT);
474
+ $d .= str_pad($licenceData[$this->_getO()], 1, ' ', STR_PAD_RIGHT);
475
+
476
+ //timeout
477
+ $time = ltrim($licenceData[$this->_getS()], 0);
478
+
479
+
480
+ if (time() > $time) {
481
+ $d .= str_pad('0', 19, '0', STR_PAD_LEFT);
482
+ } else {
483
+ $d .= str_pad($licenceData[$this->_getS()], 19, '0', STR_PAD_LEFT);
484
+ }
485
+
486
+
487
+ return $n($this->_getZ(), $d);
488
+ }
489
+
490
+ public function getPublicKey($asResource = false) {
491
+ if ($asResource) {
492
+ return self::$_publicKey;
493
+ } else {
494
+ return self::$certificate;
495
+ }
496
+ }
497
+
498
+ public function getCountryName($input) {
499
+ $countries = $this->_getEabi()->toAssoc($this->_getEabi()->getEabiSupportedCountries()->toOptionArray());
500
+ return $countries[$input];
501
+ }
502
+
503
+ public function getRegistrationUrl() {
504
+ return Eabi_Livehandler_Model_Config::REGISTRATION_URL;
505
+ }
506
+
507
+ public function getRegisterButtonLabel() {
508
+ return $this->_getEabi()->__('Register Licence');
509
+ }
510
+
511
+ public function getDeleteButtonLabel() {
512
+ return $this->_getEabi()->__('Delete');
513
+ }
514
+
515
+ protected function _handleCallout($serviceCode, $country, $result = false) {
516
+ if (!isset(self::$_callOuts[$serviceCode])) {
517
+ self::$_callOuts[$serviceCode] = array();
518
+ }
519
+ $oldCallout = $serviceCode . '_' . $country;
520
+ if (isset(self::$_callOuts[$serviceCode][$country])) {
521
+ $oldCallout = self::$_callOuts[$serviceCode][$country];
522
+ }
523
+ if (!$result) {
524
+ $oldCallout = false;
525
+ unset(self::$_callOuts[$serviceCode][$country]);
526
+ return;
527
+ }
528
+
529
+ self::$_callOuts[$serviceCode][$country] = md5($oldCallout);
530
+ }
531
+
532
+ /**
533
+ *
534
+ * @return Eabi_Livehandler_Helper_Data
535
+ */
536
+ protected function _getEabi() {
537
+ return Mage::helper('eabi');
538
+ }
539
+
540
+ }
app/code/community/Eabi/Livehandler/Helper/Data.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
@@ -38,6 +38,8 @@
38
  */
39
  class Eabi_Livehandler_Helper_Data extends Mage_Core_Helper_Abstract {
40
 
 
 
41
 
42
  /**
43
  * <p>Behaves similar to Mage::getStoreConfig() method, but returns PHP objects instead of strings</p>
@@ -197,6 +199,50 @@ class Eabi_Livehandler_Helper_Data extends Mage_Core_Helper_Abstract {
197
  return $urls;
198
  }
199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  /**
201
  *
202
  * @return Eabi_Livehandler_Model_Logger
@@ -213,7 +259,87 @@ class Eabi_Livehandler_Helper_Data extends Mage_Core_Helper_Abstract {
213
  return Mage::getModel('core/config_data');
214
  }
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  }
218
 
219
 
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
38
  */
39
  class Eabi_Livehandler_Helper_Data extends Mage_Core_Helper_Abstract {
40
 
41
+ protected $_licenceBlock;
42
+ protected $_licences;
43
 
44
  /**
45
  * <p>Behaves similar to Mage::getStoreConfig() method, but returns PHP objects instead of strings</p>
199
  return $urls;
200
  }
201
 
202
+ public function csvToArray($inputText) {
203
+ $values = explode(",", $inputText);
204
+ return array_filter(array_map('trim', $values));
205
+ }
206
+
207
+ /**
208
+ * <p>Converts array of system.xml source format to plain key=value format</p>
209
+ * @param array $inputs
210
+ * @return array
211
+ */
212
+ public function toAssoc(array $inputs) {
213
+ $result = array();
214
+ foreach ($inputs as $input) {
215
+ $result[$input['value']] = $input['label'];
216
+ }
217
+ return $result;
218
+ }
219
+
220
+ public function getAllLicences() {
221
+ $allLicenceableItems = $this
222
+ ->getAllSupportedMethodCodes();
223
+
224
+ $allLicences = array();
225
+ foreach ($allLicenceableItems as $licenceableItem) {
226
+ /* @var $licenceableItem Eabi_Livehandler_Model_Licenceable_Method */
227
+ $licence = $licenceableItem->getRawLicence();
228
+ if ($licence) {
229
+ $allLicences[] = $licence;
230
+ }
231
+ }
232
+ return $allLicences;
233
+ }
234
+
235
+
236
+ /**
237
+ *
238
+ * @return Eabi_Livehandler_Model_System_Config_Source_Country
239
+ */
240
+ public function getEabiSupportedCountries() {
241
+ return Mage::getSingleton('eabi_livehandler/system_config_source_country');
242
+ }
243
+
244
+
245
+
246
  /**
247
  *
248
  * @return Eabi_Livehandler_Model_Logger
259
  return Mage::getModel('core/config_data');
260
  }
261
 
262
+ /**
263
+ *
264
+ * @return Eabi_Livehandler_Helper_Resolver
265
+ */
266
+ public function getResolverHelper() {
267
+ return Mage::helper('eabi/resolver');
268
+ }
269
+
270
+
271
+ /**
272
+ *
273
+ * @return Mage_Shipping_Model_Shipping
274
+ */
275
+ public function getShippingModel() {
276
+ return Mage::getModel('shipping/shipping');
277
+ }
278
+
279
+ /**
280
+ *
281
+ * @return Eabi_Livehandler_Model_Impl_Licenceable
282
+ */
283
+ public function getLicenceableDummyModel() {
284
+ return Mage::getModel('eabi_livehandler/impl_licenceable');
285
+ }
286
+
287
+
288
+ /**
289
+ *
290
+ * @return Mage_Core_Model_Config_Data
291
+ */
292
+ public function getCoreConfigDataModel() {
293
+ return Mage::getModel('core/config_data');
294
+ }
295
+
296
+ /**
297
+ *
298
+ * @return Mage_Admin_Model_Session
299
+ */
300
+ public function getAdminSessionSingleton() {
301
+ return Mage::getSingleton('admin/session');
302
+ }
303
+ /**
304
+ *
305
+ * @return Mage_Core_Model_Session
306
+ */
307
+ public function getCoreSessionSingleton() {
308
+ return Mage::getSingleton('core/session');
309
+ }
310
 
311
+ /**
312
+ *
313
+ * @return Eabi_Livehandler_Block_Licence
314
+ */
315
+ public function getEabiLicenceBlock() {
316
+ return Mage::app()->getLayout()->createBlock('eabi_livehandler/licence');
317
+ }
318
+ /**
319
+ *
320
+ * @return Eabi_Livehandler_Block_Licence
321
+ */
322
+ public function getEabiLicenceBlockSingleton() {
323
+ if (!$this->_licenceBlock) {
324
+ $this->_licenceBlock = $this->getEabiLicenceBlock();
325
+ }
326
+ return $this->_licenceBlock;
327
+ }
328
+
329
+ /**
330
+ *
331
+ * @return \Varien_Data_Collection
332
+ */
333
+ public function getAllSupportedMethodCodes($filter = null) {
334
+ if (!$this->_licences) {
335
+ $methodCodes = new Varien_Data_Collection();
336
+
337
+ Mage::dispatchEvent('eabi_licence_get_supported_method_codes', array('method_codes' => $methodCodes));
338
+ $this->_licences = $methodCodes;
339
+ }
340
+ return $this->_licences;
341
+ }
342
+
343
  }
344
 
345
 
app/code/community/Eabi/Livehandler/Helper/Keypair.php CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Helper/Resolver.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Käesoleva loomingu autoriõigused kuuluvad Matis Halmannile ja Aktsiamaailm OU-le
5
+ * Litsentsitingimused on saadaval http://www.e-abi.ee/litsents
6
+ */
7
+
8
+ /**
9
+ * Description of Resolver
10
+ *
11
+ * @author matishalmann
12
+ */
13
+ class Eabi_Livehandler_Helper_Resolver extends Mage_Core_Helper_Abstract {
14
+ protected $_allowedAttributeSetIds;
15
+
16
+
17
+ public function getPathFromElement(Varien_Data_Form_Element_Abstract $element) {
18
+ $formPathElements = explode('][', str_replace(array('groups[', '[fields]', '][value]'), '', $element->getName()));
19
+ $idPath = $element->getId();
20
+ foreach ($formPathElements as $pathElement) {
21
+ $idPath = str_replace($pathElement, '', $idPath);
22
+ }
23
+ $idPath = trim($idPath, '_');
24
+ $originalData = $element->getOriginalData();
25
+
26
+ $sectionAttribute = 'eabi_section';
27
+ $sectionAttributeValue = isset($originalData[$sectionAttribute]) && $this->_isAllowedSectionAttribute($originalData[$sectionAttribute])?$originalData[$sectionAttribute]:null;
28
+
29
+ if ($sectionAttributeValue) {
30
+ $idPath = $sectionAttributeValue;
31
+ }
32
+
33
+
34
+ return array(
35
+ 'section' => $idPath,
36
+ 'model' => $formPathElements[0],
37
+ 'config' => $formPathElements[1],
38
+ );
39
+ }
40
+
41
+
42
+ protected function _isAllowedSectionAttribute($value) {
43
+ if (is_string($value)) {
44
+ return true;
45
+ }
46
+ return false;
47
+ }
48
+
49
+ public function openPath($path) {
50
+ $paths = explode('/', $path);
51
+ return array(
52
+ 'section' => $paths[0],
53
+ 'model' => $paths[1],
54
+ 'config' => $paths[2],
55
+ );
56
+ }
57
+
58
+ /**
59
+ *
60
+ * @param Varien_Data_Form_Element_Abstract $element
61
+ * @return boolean|\Eabi_Synchronizer_Model_Importer_Abstract
62
+ */
63
+ public function getModelFromElement(Varien_Data_Form_Element_Abstract $element) {
64
+
65
+ $path = $this->getPathFromElement($element);
66
+ return false;
67
+ }
68
+
69
+ public function getByClassCode($classCode) {
70
+ return false;
71
+ }
72
+
73
+ /**
74
+ *
75
+ * @param string $path
76
+ * @return boolean|\Eabi_Synchronizer_Model_Importer_Abstract
77
+ */
78
+ public function getModelFromPath($path) {
79
+ $openPath = $this->openPath($path);
80
+ return false;
81
+ }
82
+
83
+ public function getActiveModels() {
84
+ }
85
+
86
+
87
+ /**
88
+ *
89
+ * @return Eabi_Livehandler_Helper_Data
90
+ */
91
+ protected function _getEabiHelper() {
92
+ return Mage::helper('eabi');
93
+ }
94
+
95
+
96
+
97
+ }
98
+
99
+
app/code/community/Eabi/Livehandler/Model/Abstract.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Action/Abstract.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Action/Postoffice/Print.php CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Action/Postoffice/Send.php CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Adminhtml/Gridmanager.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Backend/Licence.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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
+ * Description of Licence
36
+ *
37
+ * @author Matis
38
+ */
39
+ class Eabi_Livehandler_Model_Backend_Licence extends Mage_Core_Model_Config_Data {
40
+ protected static $_hasLicenceBeenSplit = false;
41
+ protected $_wasLicenceSplit = false;
42
+ protected function _beforeSave() {
43
+ $this->setScopeId(0);
44
+ $this->setScope('default');
45
+ $this->setStoreCode(null);
46
+ $this->setWebsiteCode(null);
47
+ if ($this->isValueChanged()) {
48
+ $value = $this->getValue();
49
+ $isFinal = false;
50
+ $splitResult = $this->alterLicenceDataToConfigs($value, $isFinal);
51
+ if ($isFinal) {
52
+ $this->_wasLicenceSplit = true;
53
+ }
54
+ $this->setValue($splitResult);
55
+
56
+ }
57
+
58
+ return parent::_beforeSave();
59
+ }
60
+
61
+ public function save() {
62
+ if (!$this->_isAllowed()) {
63
+ $this->_getEabi()
64
+ ->getCoreSessionSingleton()
65
+ ->addError($this->_getEabi()->__('You have no permission to modify licences'));
66
+
67
+ }
68
+ if (self::$_hasLicenceBeenSplit || !$this->_isAllowed()) {
69
+ return true;
70
+ }
71
+ $res = parent::save();
72
+ if ($this->_wasLicenceSplit) {
73
+ self::$_hasLicenceBeenSplit = true;
74
+ }
75
+ return $res;
76
+ }
77
+
78
+
79
+ protected function alterLicenceDataToConfigs($rawLicenceValue, &$isNew = false) {
80
+ $paths = explode('/', $this->getPath());
81
+ $currentItem = $paths[1];
82
+ $allMethodCodes = $this->_getEabi()->getAllSupportedMethodCodes();
83
+
84
+
85
+ $okLicences = array();
86
+ $splitLicences = $this->_getEabi()->getEabiLicenceBlock()->splitLicenceToServices($rawLicenceValue, $isNew);
87
+
88
+
89
+ foreach ($splitLicences as $methodId => $splitLicence) {
90
+
91
+ if ($methodId === $currentItem) {
92
+ $rawLicenceValue = $splitLicence;
93
+ if ($splitLicence) {
94
+ $okLicences[$currentItem] = $allMethodCodes->getItemByColumnValue('code', $currentItem)->getMethodInstance()->getTitle();
95
+ }
96
+ } else {
97
+ try {
98
+ $allMethodCodes->getItemByColumnValue('code', $methodId)->setRawLicence($splitLicence);
99
+ if ($splitLicence) {
100
+ $okLicences[$methodId] = $allMethodCodes->getItemByColumnValue('code', $methodId)->getMethodInstance()->getTitle();
101
+ }
102
+ } catch (Exception $ex) {
103
+ $this->_getEabi()->getEabiLogger()
104
+ ->setIsLogEnabled(true)
105
+ ->setLogLevel(Zend_Log::DEBUG)
106
+ ->error(sprintf('Licence registration failed for method %s', $methodId))
107
+ ->error($ex);
108
+ }
109
+ }
110
+ }
111
+ if (count($okLicences) && $isNew) {
112
+ $this->_getEabi()
113
+ ->getCoreSessionSingleton()
114
+ ->addSuccess($this->_getEabi()->__('Licence OK for following plugins: %s', implode(', ', $okLicences)));
115
+ }
116
+ return $rawLicenceValue;
117
+ }
118
+
119
+ protected function _isAllowed() {
120
+ $key = 'eabi_livehandler/adminhtml_licence/request';
121
+ return $this->_getEabi()->getAdminSessionSingleton()
122
+ ->isAllowed($key);
123
+ }
124
+
125
+
126
+ /**
127
+ *
128
+ * @return Eabi_Livehandler_Helper_Data
129
+ */
130
+ protected function _getEabi() {
131
+ return Mage::helper('eabi');
132
+ }
133
+
134
+
135
+ }
app/code/community/Eabi/Livehandler/Model/Config.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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
+ * Description of Config
36
+ *
37
+ * @author Matis
38
+ */
39
+ class Eabi_Livehandler_Model_Config {
40
+ const REGISTRATION_URL = 'http://mhalmann.dyndns.org/eabi.ee/eabi_licence/register/';
41
+ }
app/code/community/Eabi/Livehandler/Model/Directory/Collection.php CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Entry.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/File/Object.php CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Impl/Licenceable.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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
+ *
36
+ * @author Matis
37
+ */
38
+ class Eabi_Livehandler_Model_Impl_Licenceable implements Eabi_Livehandler_Model_Licenceable {
39
+ protected $supportedCountries = array();
40
+ protected $code;
41
+ protected $title;
42
+ protected $configPrefix;
43
+
44
+
45
+ public function getSupportedCountries() {
46
+ return $this->supportedCountries;
47
+ }
48
+
49
+ public function getCode() {
50
+ return $this->code;
51
+ }
52
+
53
+ public function getTitle() {
54
+ return $this->title;
55
+ }
56
+
57
+ public function setSupportedCountries($supportedCountries) {
58
+ $this->supportedCountries = $supportedCountries;
59
+ return $this;
60
+ }
61
+
62
+ public function setCode($code) {
63
+ $this->code = $code;
64
+ return $this;
65
+ }
66
+
67
+ public function setTitle($title) {
68
+ $this->title = $title;
69
+ return $this;
70
+ }
71
+
72
+ public function getConfigPrefix() {
73
+ return $this->configPrefix;
74
+ }
75
+
76
+ public function setConfigPrefix($configPrefix) {
77
+ $this->configPrefix = $configPrefix;
78
+ return $this;
79
+ }
80
+
81
+ public function getConfigData($path) {
82
+ return Mage::getStoreConfig($this->configPrefix . $path, Mage_Core_Model_App::ADMIN_STORE_ID);
83
+ }
84
+
85
+
86
+
87
+ }
app/code/community/Eabi/Livehandler/Model/Licenceable.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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
+ *
36
+ * @author Matis
37
+ */
38
+ interface Eabi_Livehandler_Model_Licenceable {
39
+ public function getSupportedCountries();
40
+
41
+ public function getCode();
42
+
43
+ public function getTitle();
44
+ }
app/code/community/Eabi/Livehandler/Model/Licenceable/Method.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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
+ * Description of Method
36
+ *
37
+ * @author Matis
38
+ * @method string getType()
39
+ * @method Eabi_Livehandler_Model_Licenceable_Method setType(string $type)
40
+ * @method string getCode()
41
+ * @method Eabi_Livehandler_Model_Licenceable_Method setStoreId(string $storeId)
42
+ * @method string getStoreId()
43
+ * @method Eabi_Livehandler_Model_Licenceable_Method setCode(string $code)
44
+ *
45
+ */
46
+ abstract class Eabi_Livehandler_Model_Licenceable_Method extends Varien_Object {
47
+ protected $_isSupported = false;
48
+
49
+ /**
50
+ * Internal constructor not depended on params. Can be used for object initialization
51
+ */
52
+ protected function _construct() {
53
+ }
54
+
55
+
56
+ abstract public function getMethodInstance();
57
+ abstract public function getRawLicence();
58
+ abstract public function setRawLicence($rawLicence);
59
+
60
+
61
+
62
+ public function isSupported() {
63
+ return $this->_isSupported;
64
+ }
65
+
66
+ /**
67
+ *
68
+ * @return Eabi_Livehandler_Helper_Data
69
+ */
70
+ protected function _getEabi() {
71
+ return Mage::helper('eabi');
72
+ }
73
+
74
+
75
+
76
+ }
app/code/community/Eabi/Livehandler/Model/Logger.php CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Mysql4/Entry.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Mysql4/Entry/Collection.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/Ordergrid.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
@@ -189,7 +189,9 @@ class Eabi_Livehandler_Model_Ordergrid extends Eabi_Livehandler_Model_Adminhtml_
189
  if (isset($actionResult['errors'])) {
190
  $errors = array_merge($messages, $actionResult['errors']);
191
  }
192
- $messages = array_merge($messages, $actionResult['messages']);
 
 
193
  $isActionError = $actionResult['is_action_error'];
194
  $result['needs_reload'] = $actionResult['needs_reload'];
195
  if (isset($actionResult['set_location'])) {
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
189
  if (isset($actionResult['errors'])) {
190
  $errors = array_merge($messages, $actionResult['errors']);
191
  }
192
+ if (isset($actionResult['messages'])) {
193
+ $messages = array_merge($messages, $actionResult['messages']);
194
+ }
195
  $isActionError = $actionResult['is_action_error'];
196
  $result['needs_reload'] = $actionResult['needs_reload'];
197
  if (isset($actionResult['set_location'])) {
app/code/community/Eabi/Livehandler/Model/Source/Log.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/System/Config/Backend/Button.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/Model/System/Config/Source/Country.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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
+ * Description of Country
36
+ *
37
+ * @author Matis
38
+ */
39
+ class Eabi_Livehandler_Model_System_Config_Source_Country extends Mage_Adminhtml_Model_System_Config_Source_Country {
40
+
41
+ public function toOptionArray($isMultiselect = false) {
42
+ $result = parent::toOptionArray($isMultiselect);
43
+ $result[] = array(
44
+ 'value' => '*',
45
+ 'label' => $this->_getEabiHelper()->__('All remaining countries'),
46
+ );
47
+
48
+ return $result;
49
+ }
50
+
51
+ /**
52
+ *
53
+ * @return Eabi_Livehandler_Helper_Data
54
+ */
55
+ protected function _getEabiHelper() {
56
+ return Mage::helper('eabi');
57
+ }
58
+
59
+ }
app/code/community/Eabi/Livehandler/controllers/Adminhtml/LicenceController.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2015 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>Handles the AJAX request defined for the backend (from database table eabi_livehandler)</p>
35
+ * <p>Security model: If Page itself can be displayed, then it is allowed to run actions, which are bound to current Livehandler model. If user switches page, then current model actions cannot be run any more.</p>
36
+ * <p>If user does not show any activity for Eabi_Livehandler_IndexController::ALLOWED time seconds, then actions cannot be run after timeout.</p>
37
+ *
38
+ * @author matishalmann
39
+ */
40
+ class Eabi_Livehandler_Adminhtml_LicenceController extends Mage_Adminhtml_Controller_Action {
41
+ protected function _initAction() {
42
+ return $this;
43
+ }
44
+
45
+
46
+
47
+ public function requestAction() {
48
+ //todo: handle licence call request, return json encoded result
49
+ $hosts = $this->_getEabi()
50
+ ->getAllStoreUrls();
51
+ $allLicences = $this->_getLicenceStatus();
52
+
53
+ $sealedData = false;
54
+ $keys = array();
55
+
56
+ $licenceBlock = $this->_getEabi()->getEabiLicenceBlock();
57
+
58
+ $requestData = array(
59
+ 'hosts' => $hosts,
60
+ 'licences' => $allLicences,
61
+ 'return' => Mage::getUrl(),
62
+ );
63
+ openssl_seal(json_encode($requestData), $sealedData, $keys, array($licenceBlock->getPublicKey(true)));
64
+
65
+ $data = array(
66
+ 'data' => base64_encode($sealedData),
67
+ 'key' => base64_encode($keys[0])
68
+ );
69
+
70
+
71
+ $this->getResponse()
72
+ ->setHeader('Content-type', 'application/json')
73
+ ->setBody(Zend_Json::encode($data));
74
+ }
75
+
76
+ protected function _getLicenceStatus() {
77
+ return $this->_getEabi()
78
+ ->getAllLicences();
79
+ }
80
+
81
+ protected function _isAllowed() {
82
+ $key = 'eabi_livehandler/' . $this->getRequest()->getControllerName() . '/' . $this->getRequest()->getActionName();
83
+ return $this->_getEabi()->getAdminSessionSingleton()
84
+ ->isAllowed($key);
85
+ }
86
+
87
+ /**
88
+ *
89
+ * @return Eabi_Livehandler_Helper_Data
90
+ */
91
+ protected function _getEabi() {
92
+ return Mage::helper('eabi');
93
+ }
94
+
95
+
96
+ }
97
+
98
+
app/code/community/Eabi/Livehandler/controllers/Adminhtml/LivehandlerController.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/controllers/Adminhtml/RemoveController.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/controllers/IndexController.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
@@ -95,6 +95,30 @@ class Eabi_Livehandler_IndexController extends Mage_Core_Controller_Front_Action
95
  die();
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  /**
99
  *
100
  * @return Eabi_Livehandler_Helper_Data
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
95
  die();
96
  }
97
 
98
+ public function getLicenceStatusAction() {
99
+ $allLicences = $this->_getLicenceStatus();
100
+ $licenceBlock = $this->_getEabi()->getEabiLicenceBlock();
101
+ $sealedData = false;
102
+ $keys = array();
103
+
104
+ openssl_seal(json_encode($allLicences), $sealedData, $keys, array($licenceBlock->getPublicKey(true)));
105
+
106
+ $data = array(
107
+ 'data' => base64_encode($sealedData),
108
+ 'key' => base64_encode($keys[0])
109
+ );
110
+ $this->getResponse()
111
+ ->setHeader('Content-type', 'application/json')
112
+ ->setBody(Zend_Json::encode($data));
113
+ }
114
+
115
+ protected function _getLicenceStatus() {
116
+ return $this->_getEabi()
117
+ ->getAllLicences();
118
+ }
119
+
120
+
121
+
122
  /**
123
  *
124
  * @return Eabi_Livehandler_Helper_Data
app/code/community/Eabi/Livehandler/etc/config.xml CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
@@ -36,7 +36,7 @@
36
  <config>
37
  <modules>
38
  <Eabi_Livehandler>
39
- <version>0.1.11</version>
40
  </Eabi_Livehandler>
41
  </modules>
42
 
@@ -99,6 +99,22 @@
99
  </config>
100
  </children>
101
  </system>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  </children>
103
  </admin>
104
  </resources>
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
36
  <config>
37
  <modules>
38
  <Eabi_Livehandler>
39
+ <version>0.1.12</version>
40
  </Eabi_Livehandler>
41
  </modules>
42
 
99
  </config>
100
  </children>
101
  </system>
102
+ <eabi_livehandler translate="title" module="eabi_livehandler">
103
+ <title>Live Handler from Eabi.ee</title>
104
+ <sort_order>6</sort_order>
105
+ <children>
106
+ <adminhtml_licence translate="title" module="eabi_livehandler">
107
+ <title>E-Abi products licencing</title>
108
+ <sort_order>1</sort_order>
109
+ <children>
110
+ <request translate="title" module="eabi_livehandler">
111
+ <title>Initiate licencing requests</title>
112
+ <sort_order>1</sort_order>
113
+ </request>
114
+ </children>
115
+ </adminhtml_licence>
116
+ </children>
117
+ </eabi_livehandler>
118
  </children>
119
  </admin>
120
  </resources>
app/code/community/Eabi/Livehandler/etc/system.xml CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/sql/eabi_livehandler_setup/mysql4-install-0.1.0.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/sql/eabi_livehandler_setup/mysql4-upgrade-0.1.0-0.1.1.php CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/code/community/Eabi/Livehandler/sql/eabi_livehandler_setup/mysql4-upgrade-0.1.8-0.1.9.php CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/design/adminhtml/default/default/layout/eabi_livehandler.xml CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
@@ -55,6 +55,13 @@
55
  </action>
56
  </reference>
57
  </adminhtml_sales_order_index>
 
 
 
 
 
 
 
58
 
59
 
60
  </layout>
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
55
  </action>
56
  </reference>
57
  </adminhtml_sales_order_index>
58
+ <adminhtml_system_config_edit>
59
+ <reference name="head">
60
+ <action method="addCss">
61
+ <name>eabi_admintools.css</name>
62
+ </action>
63
+ </reference>
64
+ </adminhtml_system_config_edit>
65
 
66
 
67
  </layout>
app/design/adminhtml/default/default/template/eabi_livehandler/licence.phtml ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /*
2
+ * @licence@
3
+ */
4
+ /* @var $this Eabi_Livehandler_Block_Licence */
5
+ ?><span id="span_<?php echo $this->getFormFieldId(); ?>"><a href="#"><?php echo $this->getLogo(); ?><?php echo htmlspecialchars($this->__('Show')); ?> &raquo;</a></span><div class="grid" id="grid_<?php echo $this->getFormFieldId(); ?>">
6
+ <table cellpadding="0" cellspacing="0" class="border widefat eabi-postoffice eabi-form-licence-status" id="table_<?php echo $this->getFormFieldId(); ?>" style="display: none;">
7
+ <tbody>
8
+
9
+ <tr class="headings" id="headings_<?php echo $this->getFormFieldId(); ?>">
10
+ <th><?php echo htmlspecialchars($this->__('Service')); ?><?php echo $this->getLogo(); ?></th>
11
+ <th><?php echo htmlspecialchars($this->__('Country')); ?></th>
12
+ <th><?php echo htmlspecialchars($this->__('Status')); ?></th>
13
+ </tr>
14
+ <?php foreach ($this->getMethods() as $supportedMethodCode) : ?>
15
+ <?php /* @var $supportedMethod Eabi_Livehandler_Model_Licenceable */ ?>
16
+ <?php $supportedMethod = $this->getMethodByCode($supportedMethodCode); ?>
17
+ <?php if ($supportedMethod) : ?>
18
+ <?php foreach ($supportedMethod->getSupportedCountries() as $supportedCountry) : ?>
19
+ <tr>
20
+ <td><?php echo htmlspecialchars($supportedMethod->getTitle()) ?></td>
21
+ <td><?php echo htmlspecialchars($this->getCountryName($supportedCountry)); ?></td>
22
+ <td><?php echo $this->getLicenceStatus($supportedMethodCode, $supportedCountry); ?></td>
23
+ </tr>
24
+ <?php endforeach; ?>
25
+ <?php endif; ?>
26
+ <?php endforeach; ?>
27
+
28
+ <tr id="addRow_<?php echo $this->getFormFieldId(); ?>">
29
+ <td colspan="3">
30
+ <button style="" onclick="return false;" class="button scalable add" type="button" id="addToEndBtn_<?php echo $this->getFormFieldId(); ?>">
31
+ <span><?php echo $this->getRegisterButtonLabel(); ?></span>
32
+ </button>
33
+ <div class="eabi-register-licence" id="register-licence_<?php echo $this->getFormFieldId(); ?>" style="display: none;">
34
+ <p><?php echo $this->__('Copy your licence key into the field below and save settings'); ?>
35
+ </p>
36
+ <?php if ($element = $this->getElement()):?>
37
+ <?php /* @var $element Varien_Data_Form_Element_Abstract */?>
38
+ <?php echo $element->getElementHtml(); ?>
39
+ <button id="save-licence_<?php echo $this->getFormFieldId(); ?>" class="scalable save" type="button" onclick="configForm.submit()" style="display: none;" ><span><?php echo $this->__( 'Save Config') ?></span></button>
40
+ <p class="description" id="register-licence-description_<?php echo $this->getFormFieldId(); ?>"><?php echo sprintf($this->__('Get your licence key by clicking <a href="%s">here</a>'), Mage::getUrl('*/*/*')); ?>
41
+ <br/>
42
+ <?php echo $this->__('Look up your order confirmation e-mail for smoother registration process!'); ?>
43
+ </p>
44
+ <?php endif; ?>
45
+ </div>
46
+
47
+ </td>
48
+ </tr>
49
+
50
+ </tbody>
51
+ </table>
52
+ </div>
53
+ <script type="text/javascript">
54
+ /* <![CDATA[ */
55
+ document.observe("dom:loaded", function() {
56
+ $('span_<?php echo $this->getFormFieldId(); ?>').observe("click", function(event) {
57
+ $('span_<?php echo $this->getFormFieldId(); ?>').hide();
58
+ $('table_<?php echo $this->getFormFieldId(); ?>').show();
59
+ event.preventDefault();
60
+ });
61
+ if (!$$('#grid_<?php echo $this->getFormFieldId(); ?> .eabi-postoffice-green').size()) {
62
+ $('span_<?php echo $this->getFormFieldId(); ?>').click();
63
+ }
64
+
65
+ $('addToEndBtn_<?php echo $this->getFormFieldId(); ?>').observe("click", function(event) {
66
+ $($$("#grid_<?php echo $this->getFormFieldId(); ?> #register-licence_<?php echo $this->getFormFieldId(); ?>").first()).show();
67
+ });
68
+ $('<?php echo $this->getFormFieldId(); ?>').observe("paste", function(event) {
69
+ $('save-licence_<?php echo $this->getFormFieldId(); ?>').show();
70
+ });
71
+ $($$('#register-licence-description_<?php echo $this->getFormFieldId(); ?> a').first()).observe("click", function(event) {
72
+ new Ajax.Request(<?php echo json_encode(Mage::helper('adminhtml')->getUrl('eabi_livehandler/adminhtml_licence/request'))?>, {
73
+ onSuccess: function(response) {
74
+ var json = response.responseJSON,
75
+ formId = 'eabi-licence-request-form',
76
+ formDummy = $(formId);
77
+ if (!formDummy) {
78
+ formDummy = new Element('form');
79
+ formDummy.writeAttribute('target', '_blank');
80
+ formDummy.writeAttribute('method', 'POST');
81
+ formDummy.writeAttribute('style', 'display:none;');
82
+ formDummy.writeAttribute('id', formId);
83
+ formDummy.writeAttribute('action', <?php echo json_encode($this->getRegistrationUrl())?>);
84
+ }
85
+
86
+ /* make form empty */
87
+ formDummy.update(' ');
88
+
89
+ /* append values */
90
+ formDummy.insert({
91
+ bottom: (new Element('input')).writeAttribute({
92
+ 'type' : 'hidden',
93
+ 'name' : 'data',
94
+ 'value' : json['data']
95
+ })
96
+ });
97
+ formDummy.insert({
98
+ bottom: (new Element('input')).writeAttribute({
99
+ 'type' : 'hidden',
100
+ 'name' : 'key',
101
+ 'value' : json['key']
102
+ })
103
+ });
104
+ $(document.body).insert(formDummy);
105
+ formDummy.submit();
106
+ formDummy.remove();
107
+
108
+
109
+ },
110
+ onFailure: function(response) {
111
+ alert(<?php echo json_encode($this->__('Licence registration request failed, please check your ajax request log for details'));?>);
112
+ },
113
+ asynchronous: false,
114
+ method: 'post',
115
+ parameters : {},
116
+ evalJSON: 'force'
117
+ });
118
+ event.preventDefault();
119
+ });
120
+
121
+ });
122
+ /* ]]> */
123
+ </script>
app/design/frontend/base/default/layout/eabi_livehandler.xml CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/design/frontend/base/default/template/eabi_livehandler/email.phtml CHANGED
@@ -21,7 +21,7 @@
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
- * @package Eabi_Livehandler
25
  * @copyright Copyright (c) 2015 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
21
  * versions in the future.
22
  *
23
  * @category Eabi
24
+ * @package Eabi_Dpd
25
  * @copyright Copyright (c) 2015 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
app/design/frontend/default/default/layout/eabi_livehandler.xml CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
app/etc/modules/Eabi_Livehandler.xml CHANGED
@@ -22,7 +22,7 @@
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
- * @package Eabi_Livehandler
26
  * @copyright Copyright (c) 2015 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
@@ -38,7 +38,7 @@
38
  <Eabi_Livehandler>
39
  <active>true</active>
40
  <codePool>community</codePool>
41
- <version>0.1.11</version>
42
  </Eabi_Livehandler>
43
  </modules>
44
  </config>
22
  * versions in the future.
23
  *
24
  * @category Eabi
25
+ * @package Eabi_Dpd
26
  * @copyright Copyright (c) 2015 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
38
  <Eabi_Livehandler>
39
  <active>true</active>
40
  <codePool>community</codePool>
41
+ <version>0.1.12</version>
42
  </Eabi_Livehandler>
43
  </modules>
44
  </config>
app/locale/en_US/Eabi_Livehandler.csv CHANGED
@@ -22,3 +22,26 @@
22
  "Public key","Public key"
23
  "Certificate signing request","Certificate signing request"
24
  "Used to activate E-Abi licenses","Used to activate E-Abi licenses"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "Public key","Public key"
23
  "Certificate signing request","Certificate signing request"
24
  "Used to activate E-Abi licenses","Used to activate E-Abi licenses"
25
+ "All remaining countries","All remaining countries"
26
+ "Register Licence","Register Licence"
27
+ "Delete","Delete"
28
+ "Show","Show"
29
+ "Service","Service"
30
+ "Country","Country"
31
+ "Status","Status"
32
+ "Copy your licence key into the field below and save settings","Copy your licence key into the field below and save settings"
33
+ "Look up your order confirmation e-mail for smoother registration process!","Look up your order confirmation e-mail for smoother registration process!"
34
+ "Get your licence key by clicking <a href=""%s"">here</a>","Get your licence key by clicking <a href=""%s"">here</a>"
35
+ "Licence registration request failed, please check your ajax request log for details","Licence registration request failed, please check your ajax request log for details"
36
+ "E-Abi products licencing","E-Abi products licencing"
37
+ "Initiate licencing requests","Initiate licencing requests"
38
+ "Save Config","Save Config"
39
+ "Licence","Licence"
40
+ "Licence OK for following plugins: %s","Licence OK for following plugins: %s"
41
+ "Activated","Activated"
42
+ "You have no permission to modify licences","You have no permission to modify licences"
43
+ "(expires: %s)","(expires: %s)"
44
+ "Demo","Demo"
45
+ "Disabled","Disabled"
46
+ "Support from e-mail %s","Support from e-mail %s"
47
+ "Field %s was probably manipulated","Field %s was probably manipulated"
app/locale/et_EE/Eabi_Livehandler.csv CHANGED
@@ -22,3 +22,26 @@
22
  "Public key","Avalik võti"
23
  "Certificate signing request","Sertifikaadipäring"
24
  "Used to activate E-Abi licenses","Kasutatakse E-Abi litsentside aktiveerimisel"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "Public key","Avalik võti"
23
  "Certificate signing request","Sertifikaadipäring"
24
  "Used to activate E-Abi licenses","Kasutatakse E-Abi litsentside aktiveerimisel"
25
+ "All remaining countries","Kõik ülejäänud riigid"
26
+ "Register Licence","Registreeri litsents"
27
+ "Delete","Kustuta"
28
+ "Show","Kuva"
29
+ "Service","Teenus"
30
+ "Country","Riik"
31
+ "Status","Olek"
32
+ "Copy your licence key into the field below and save settings","Kopeeri oma litsentsivõti allolevasse lahtrisse ja salvesta seaded"
33
+ "Look up your order confirmation e-mail for smoother registration process!","Sujuvamaks registreerimiseks otsige üles oma tellimuse kinnituse meil!"
34
+ "Get your licence key by clicking <a href=""%s"">here</a>","Litsentsivõtme saad klikates <a href=""%s"">siia</a>"
35
+ "Licence registration request failed, please check your ajax request log for details","Litsentsi registreerimine ebaõnnestus. Kontrollige oma ajax päringute logi"
36
+ "E-Abi products licencing","E-Abi toodete litsentseerimine"
37
+ "Initiate licencing requests","Algata litsentsi registreerimise päring"
38
+ "Save Config","Salvesta seaded"
39
+ "Licence","Litsents"
40
+ "Licence OK for following plugins: %s","Litsents OK pluginatele: %s"
41
+ "Activated","Aktiveeritud"
42
+ "You have no permission to modify licences","Teil puudub õigus litsentside muutmiseks"
43
+ "(expires: %s)","(aegub: %s)"
44
+ "Demo","Demo"
45
+ "Disabled","Keelatud"
46
+ "Support from e-mail %s","Tehnilise toe e-posti aadress %s"
47
+ "Field %s was probably manipulated","Välja '%s' tõenäoliselt manipuleeriti"
app/locale/fi_FI/Eabi_Livehandler.csv CHANGED
@@ -22,3 +22,26 @@
22
  "Public key","Public key"
23
  "Certificate signing request","Certificate signing request"
24
  "Used to activate E-Abi licenses","Used to activate E-Abi licenses"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "Public key","Public key"
23
  "Certificate signing request","Certificate signing request"
24
  "Used to activate E-Abi licenses","Used to activate E-Abi licenses"
25
+ "All remaining countries","All remaining countries"
26
+ "Register Licence","Register Licence"
27
+ "Delete","Delete"
28
+ "Show","Show"
29
+ "Service","Service"
30
+ "Country","Country"
31
+ "Status","Status"
32
+ "Copy your licence key into the field below and save settings","Copy your licence key into the field below and save settings"
33
+ "Look up your order confirmation e-mail for smoother registration process!","Look up your order confirmation e-mail for smoother registration process!"
34
+ "Get your licence key by clicking <a href=""%s"">here</a>","Get your licence key by clicking <a href=""%s"">here</a>"
35
+ "Licence registration request failed, please check your ajax request log for details","Licence registration request failed, please check your ajax request log for details"
36
+ "E-Abi products licencing","E-Abi products licencing"
37
+ "Initiate licencing requests","Initiate licencing requests"
38
+ "Save Config","Save Config"
39
+ "Licence","Licence"
40
+ "Licence OK for following plugins: %s","Licence OK for following plugins: %s"
41
+ "Activated","Activated"
42
+ "You have no permission to modify licences","You have no permission to modify licences"
43
+ "(expires: %s)","(expires: %s)"
44
+ "Demo","Demo"
45
+ "Disabled","Disabled"
46
+ "Support from e-mail %s","Support from e-mail %s"
47
+ "Field %s was probably manipulated","Field %s was probably manipulated"
app/locale/lt_LT/Eabi_Livehandler.csv CHANGED
@@ -22,3 +22,26 @@
22
  "Public key","Public key"
23
  "Certificate signing request","Certificate signing request"
24
  "Used to activate E-Abi licenses","Used to activate E-Abi licenses"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "Public key","Public key"
23
  "Certificate signing request","Certificate signing request"
24
  "Used to activate E-Abi licenses","Used to activate E-Abi licenses"
25
+ "All remaining countries","All remaining countries"
26
+ "Register Licence","Register Licence"
27
+ "Delete","Delete"
28
+ "Show","Show"
29
+ "Service","Service"
30
+ "Country","Country"
31
+ "Status","Status"
32
+ "Copy your licence key into the field below and save settings","Copy your licence key into the field below and save settings"
33
+ "Look up your order confirmation e-mail for smoother registration process!","Look up your order confirmation e-mail for smoother registration process!"
34
+ "Get your licence key by clicking <a href=""%s"">here</a>","Get your licence key by clicking <a href=""%s"">here</a>"
35
+ "Licence registration request failed, please check your ajax request log for details","Licence registration request failed, please check your ajax request log for details"
36
+ "E-Abi products licencing","E-Abi products licencing"
37
+ "Initiate licencing requests","Initiate licencing requests"
38
+ "Save Config","Save Config"
39
+ "Licence","Licence"
40
+ "Licence OK for following plugins: %s","Licence OK for following plugins: %s"
41
+ "Activated","Activated"
42
+ "You have no permission to modify licences","You have no permission to modify licences"
43
+ "(expires: %s)","(expires: %s)"
44
+ "Demo","Demo"
45
+ "Disabled","Disabled"
46
+ "Support from e-mail %s","Support from e-mail %s"
47
+ "Field %s was probably manipulated","Field %s was probably manipulated"
app/locale/sv_SE/Eabi_Livehandler.csv CHANGED
@@ -22,3 +22,26 @@
22
  "Public key","Public key"
23
  "Certificate signing request","Certificate signing request"
24
  "Used to activate E-Abi licenses","Used to activate E-Abi licenses"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "Public key","Public key"
23
  "Certificate signing request","Certificate signing request"
24
  "Used to activate E-Abi licenses","Used to activate E-Abi licenses"
25
+ "All remaining countries","All remaining countries"
26
+ "Register Licence","Register Licence"
27
+ "Delete","Delete"
28
+ "Show","Show"
29
+ "Service","Service"
30
+ "Country","Country"
31
+ "Status","Status"
32
+ "Copy your licence key into the field below and save settings","Copy your licence key into the field below and save settings"
33
+ "Look up your order confirmation e-mail for smoother registration process!","Look up your order confirmation e-mail for smoother registration process!"
34
+ "Get your licence key by clicking <a href=""%s"">here</a>","Get your licence key by clicking <a href=""%s"">here</a>"
35
+ "Licence registration request failed, please check your ajax request log for details","Licence registration request failed, please check your ajax request log for details"
36
+ "E-Abi products licencing","E-Abi products licencing"
37
+ "Initiate licencing requests","Initiate licencing requests"
38
+ "Save Config","Save Config"
39
+ "Licence","Licence"
40
+ "Licence OK for following plugins: %s","Licence OK for following plugins: %s"
41
+ "Activated","Activated"
42
+ "You have no permission to modify licences","You have no permission to modify licences"
43
+ "(expires: %s)","(expires: %s)"
44
+ "Demo","Demo"
45
+ "Disabled","Disabled"
46
+ "Support from e-mail %s","Support from e-mail %s"
47
+ "Field %s was probably manipulated","Field %s was probably manipulated"
js/livepipe/livepipe.js CHANGED
@@ -141,7 +141,7 @@ var IframeShim = Class.create({
141
  initialize: function() {
142
  this.element = new Element('iframe',{
143
  style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);display:none',
144
- src: 'javascript:false;',
145
  frameborder: 0
146
  });
147
  $(document.body).insert(this.element);
141
  initialize: function() {
142
  this.element = new Element('iframe',{
143
  style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);display:none',
144
+ src: 'about:blank;',
145
  frameborder: 0
146
  });
147
  $(document.body).insert(this.element);
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eabi_Livehandler</name>
4
- <version>0.1.11</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
@@ -12,11 +12,11 @@
12
  &lt;p&gt;You can navigate between orders by pressing directional keys or by pressing left/right icons on the order view&lt;/p&gt;&#xD;
13
  &lt;p&gt;Possibility to create your own action buttons, which allows to save lots of time when managing orders&lt;/p&gt;&#xD;
14
  &lt;p&gt;Possibility to purchase action buttons like &lt;strong&gt;Add order comment&lt;/strong&gt;, &lt;strong&gt;Create invoice&lt;/strong&gt;, &lt;strong&gt;Ship order&lt;/strong&gt; and more&lt;/p&gt;</description>
15
- <notes>- Implemented logger class</notes>
16
  <authors><author><name>Matis Matis</name><user>auto-converted</user><email>info@e-abi.ee</email></author></authors>
17
- <date>2015-08-17</date>
18
- <time>21:32:36</time>
19
- <contents><target name="magecommunity"><dir name="Eabi"><dir name="Livehandler"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Button.php" hash="75fc6a0c10ae280d62b264ced660d796"/><file name="Remove.php" hash="d138e0de98410cb3d54c8c68136e561d"/></dir></dir></dir></dir><file name="Email.php" hash="d25a714c7f3b4bee734d4b19e8fa540d"/><file name="Footer.php" hash="506d24c22827396349ec654c87f6ae54"/></dir><dir name="Helper"><file name="Data.php" hash="d2f7b9bc464b090fc415a152e7bc807c"/><file name="Keypair.php" hash="748c8717daa5a04f20df7a2648601d41"/></dir><dir name="Model"><dir name="Action"><dir name="Postoffice"><file name="Print.php" hash="9b4248f2363f76a2f7ac78b7eb609fdd"/><file name="Send.php" hash="d17d95c37c42b10ac8610e943fa2b5a9"/></dir><file name="Abstract.php" hash="00ba6501472f46ec4d7929c620f44f2c"/></dir><dir name="Adminhtml"><file name="Gridmanager.php" hash="683ed1d2241648a38cde95d879f2ed6d"/></dir><dir name="Directory"><file name="Collection.php" hash="c4ca9c3045331c6a627c51d5523e4f2b"/></dir><dir name="File"><file name="Object.php" hash="e850a3b3fbcdbf5986bef5500656ad4d"/></dir><dir name="Mysql4"><dir name="Entry"><file name="Collection.php" hash="4d9ce810f841a274f17dde18465558eb"/></dir><file name="Entry.php" hash="1dd513c3e2b20365b3cf3bd6f3add6e9"/></dir><dir name="Source"><file name="Log.php" hash="5b1b4aede20fa1b113bd4ab81715e003"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Button.php" hash="935136dd90dc90b5260f8ec2af7854b5"/></dir></dir></dir><file name="Abstract.php" hash="63bfcaf06b44797a8069af8ddcf65472"/><file name="Entry.php" hash="4acdd3bdaf0471a8b9e210e5446d6606"/><file name="Logger.php" hash="d41dc6151091acdf604b7173ec61dc76"/><file name="Ordergrid.php" hash="fc3afce87c0346cb31a00971ff8d220d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LivehandlerController.php" hash="afdf936ad05280fc5b81cbcb895185f7"/><file name="RemoveController.php" hash="9292d416e19b2617b12b5f1a24981e3b"/></dir><file name="IndexController.php" hash="a34af2c5844dad5cbbddb39f3d2e4809"/></dir><dir name="etc"><file name="config.xml" hash="215252844dea8c6da60ea00ba064e8de"/><file name="system.xml" hash="c33880a24477e17108d8201d1c0e4f03"/></dir><dir name="sql"><dir name="eabi_livehandler_setup"><file name="mysql4-install-0.1.0.php" hash="2865107d3ec800271d48ebd975f86501"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="7d23da10efbdf1ec418c22b3697252bb"/><file name="mysql4-upgrade-0.1.8-0.1.9.php" hash="6ddad3c14863eb5067aa579075f6fa47"/></dir></dir><file name="CHANGELOG.txt" hash="997dbc49adb7bbe459d345d425977910"/><file name="LICENCE.txt" hash="7a9e279147a63af4f63a16ca67fae07b"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="c4d0fec04f17e2377013a677ea642162"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="d97b5fe416da0ca5d81013ec9106960a"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="d97b5fe416da0ca5d81013ec9106960a"/></dir><dir name="template"><dir name="eabi_livehandler"><file name="email.phtml" hash="f09585ec2c2283a71e8ae74f1012a519"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eabi_Livehandler.xml" hash="569b17c1e09e789dd0d6a3ddd1eee7dd"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Eabi_Livehandler.csv" hash="ad0836f450de2d09c67be6d469059f00"/></dir><dir name="et_EE"><file name="Eabi_Livehandler.csv" hash="b4eda88fc7029e1cb1966e857c993732"/></dir><dir name="fi_FI"><file name="Eabi_Livehandler.csv" hash="ad0836f450de2d09c67be6d469059f00"/></dir><dir name="lt_LT"><file name="Eabi_Livehandler.csv" hash="ad0836f450de2d09c67be6d469059f00"/></dir><dir name="sv_SE"><file name="Eabi_Livehandler.csv" hash="f4c1547b19391dbc20036e7a400ea8d4"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="eabi_admintools.css" hash="0868ed1bfcc8afff6643d5a3b8aab5b9"/></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="eabi_js"><file name="crossBrowser_initKeyboardEvent.js" hash="8600c5536225fd70c56ef313ee430e08"/></dir><dir name="livepipe"><file name="contextmenu.js" hash="a5dbab9663d94d9d848e84b524c1f925"/><file name="cookie.js" hash="eab2042ac637aec7777c7c64e3e2bb1a"/><file name="event_behavior.js" hash="a59a00ad652efb1596b5bd2e6f5cfe48"/><file name="hotkey.js" hash="c6193fc03e4cd4c94ee4fb37e3d5ed6b"/><file name="livepipe.js" hash="6e569402b2686976e7390f0b7a25b1eb"/><file name="progressbar.js" hash="69719eccbecbc0378d9919c53a3ef7dd"/><file name="rating.js" hash="adb5ce773c37b40fb590a877d949be7a"/><file name="resizable.js" hash="38fd18daa37e5612495cc7b42fd32b3d"/><file name="scrollbar.js" hash="7a2603c2107944b8a70e41e7a84133ba"/><file name="selection.js" hash="3f48981cccffdb5fcc5f5ff27d0b0b68"/><file name="selectmultiple.js" hash="d8f044eb344061bdcce405f671b15654"/><file name="tabs.js" hash="22abb9a3ec3933d54ff9ede0338ca7f3"/><file name="textarea.js" hash="9825782bf78d38efa53200a206d8cd77"/><file name="window.js" hash="f6eba488d6a80e05f59d97a0cef59730"/></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eabi_Livehandler</name>
4
+ <version>0.1.12</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
12
  &lt;p&gt;You can navigate between orders by pressing directional keys or by pressing left/right icons on the order view&lt;/p&gt;&#xD;
13
  &lt;p&gt;Possibility to create your own action buttons, which allows to save lots of time when managing orders&lt;/p&gt;&#xD;
14
  &lt;p&gt;Possibility to purchase action buttons like &lt;strong&gt;Add order comment&lt;/strong&gt;, &lt;strong&gt;Create invoice&lt;/strong&gt;, &lt;strong&gt;Ship order&lt;/strong&gt; and more&lt;/p&gt;</description>
15
+ <notes>- Added support for licenceable modules</notes>
16
  <authors><author><name>Matis Matis</name><user>auto-converted</user><email>info@e-abi.ee</email></author></authors>
17
+ <date>2015-09-30</date>
18
+ <time>00:02:38</time>
19
+ <contents><target name="magecommunity"><dir name="Eabi"><dir name="Livehandler"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Button.php" hash="06c2d1c6ca78e43d6fe173f5232936e6"/><file name="Licence.php" hash="f0b64bc2efbc96d766135af9ee76959d"/><file name="Remove.php" hash="e6ff1db6d9292644dcac44e424d7386d"/></dir></dir></dir></dir><file name="Email.php" hash="855a6cc20f468785ec8a758d6f0b8cbf"/><file name="Footer.php" hash="d64a4173217bc4f44e7cc608109ff890"/><file name="Licence.php" hash="11d12e1581656b02169df37d53987974"/></dir><dir name="Helper"><file name="Data.php" hash="c685ee19574835e6dc31329351d99f88"/><file name="Keypair.php" hash="f5c5a96ef3585212ccb7f525d32d66e8"/><file name="Resolver.php" hash="e095daf98824515c0e2575af6bd91cac"/></dir><dir name="Model"><dir name="Action"><dir name="Postoffice"><file name="Print.php" hash="eb5a67b5e0b3ccf2901928ecf0a031d9"/><file name="Send.php" hash="b5142bce7bc3d89c79ffa9a0f61852ca"/></dir><file name="Abstract.php" hash="946133c1680e70773cba033392855530"/></dir><dir name="Adminhtml"><file name="Gridmanager.php" hash="c17049cdd1478dc52fdfa1de29da1538"/></dir><dir name="Backend"><file name="Licence.php" hash="fae8be4b04fe3d3ff502c79a2d8cbeef"/></dir><dir name="Directory"><file name="Collection.php" hash="1ac186ed91d07deb25f77c742b70e9e8"/></dir><dir name="File"><file name="Object.php" hash="8d37cd041b88cd641406175c1d32f2f2"/></dir><dir name="Impl"><file name="Licenceable.php" hash="b598b3eda8b8bcd63bf7c201c921d4c3"/></dir><dir name="Licenceable"><file name="Method.php" hash="d3be7ce106d87b6fb66bd0fbfde6a6a8"/></dir><dir name="Mysql4"><dir name="Entry"><file name="Collection.php" hash="677f6b9daca5a4370419f4f6d7addf0d"/></dir><file name="Entry.php" hash="d3edb0feaed780cfa3b4c9feebcff486"/></dir><dir name="Source"><file name="Log.php" hash="56f0930506bf2c54b16e4ea2b9624001"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Button.php" hash="363f92836b733e60a5a826af69b1dd9b"/></dir><dir name="Source"><file name="Country.php" hash="807199adef0eb559693cd1663cf3172b"/></dir></dir></dir><file name="Abstract.php" hash="60b02d5a89daf767cdfbc0ff42fde0a6"/><file name="Config.php" hash="72c6002a68c5d19a7f146c875e82bbe9"/><file name="Entry.php" hash="03598da22c677fa6720e493b06ebb8cb"/><file name="Licenceable.php" hash="3c3575c4ee9a52e7caaabc44fcecc25f"/><file name="Logger.php" hash="3481ec4c6d7af21bbb6415cd446ff6ae"/><file name="Ordergrid.php" hash="9fc61de3baf49dcab62e82d5709fbabc"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LicenceController.php" hash="342e684961d613e36bc23cfecf75f19f"/><file name="LivehandlerController.php" hash="f39ad26dc19f117a3d22836e86daba31"/><file name="RemoveController.php" hash="fcaa04cc7fa33e24abdd925411b12a79"/></dir><file name="IndexController.php" hash="8b62487aa362eec499d454fb6cd992bf"/></dir><dir name="etc"><file name="config.xml" hash="defd2b0857e20ab8947ca1d55b602d2b"/><file name="system.xml" hash="c5286b7331e2c5931660b2fff6fb8b68"/></dir><dir name="sql"><dir name="eabi_livehandler_setup"><file name="mysql4-install-0.1.0.php" hash="dce16c30b96d2e00deaa70331226bee9"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="a2bdb84b93f5a22f6b153cd3a613a8a7"/><file name="mysql4-upgrade-0.1.8-0.1.9.php" hash="149e51907e0df6a52ff35706ff69bca2"/></dir></dir><file name="CHANGELOG.txt" hash="997dbc49adb7bbe459d345d425977910"/><file name="LICENCE.txt" hash="7a9e279147a63af4f63a16ca67fae07b"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="a874bbbce32cbab8053c5c3ba71f447f"/></dir><dir name="template"><dir name="eabi_livehandler"><file name="licence.phtml" hash="edfdf8da70cbbf8553a4940e66a2916d"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="1ccc2a5ca7a0bfa6133c2ebe23908972"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><file name="eabi_livehandler.xml" hash="1ccc2a5ca7a0bfa6133c2ebe23908972"/></dir><dir name="template"><dir name="eabi_livehandler"><file name="email.phtml" hash="ae79fb9b2491aa33e55792e5dfd8268c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eabi_Livehandler.xml" hash="cea704fc14d049a785edaa6b3215a671"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Eabi_Livehandler.csv" hash="6f5ee0485eb526cddd63cfb072868e5f"/></dir><dir name="et_EE"><file name="Eabi_Livehandler.csv" hash="2bab23debce29e66f09910e0a0fcf7c7"/></dir><dir name="fi_FI"><file name="Eabi_Livehandler.csv" hash="6f5ee0485eb526cddd63cfb072868e5f"/></dir><dir name="lt_LT"><file name="Eabi_Livehandler.csv" hash="6f5ee0485eb526cddd63cfb072868e5f"/></dir><dir name="sv_SE"><file name="Eabi_Livehandler.csv" hash="24b827d2abf3149e46db4dc255559da6"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="eabi_admintools.css" hash="759ad91a1f9e4e653ae0358867bd9a31"/></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="eabi_js"><file name="crossBrowser_initKeyboardEvent.js" hash="8600c5536225fd70c56ef313ee430e08"/></dir><dir name="livepipe"><file name="contextmenu.js" hash="a5dbab9663d94d9d848e84b524c1f925"/><file name="cookie.js" hash="eab2042ac637aec7777c7c64e3e2bb1a"/><file name="event_behavior.js" hash="a59a00ad652efb1596b5bd2e6f5cfe48"/><file name="hotkey.js" hash="c6193fc03e4cd4c94ee4fb37e3d5ed6b"/><file name="livepipe.js" hash="a75a5d5612c97ea2e20ecf85de5fd3ab"/><file name="progressbar.js" hash="69719eccbecbc0378d9919c53a3ef7dd"/><file name="rating.js" hash="adb5ce773c37b40fb590a877d949be7a"/><file name="resizable.js" hash="38fd18daa37e5612495cc7b42fd32b3d"/><file name="scrollbar.js" hash="7a2603c2107944b8a70e41e7a84133ba"/><file name="selection.js" hash="3f48981cccffdb5fcc5f5ff27d0b0b68"/><file name="selectmultiple.js" hash="d8f044eb344061bdcce405f671b15654"/><file name="tabs.js" hash="22abb9a3ec3933d54ff9ede0338ca7f3"/><file name="textarea.js" hash="9825782bf78d38efa53200a206d8cd77"/><file name="window.js" hash="f6eba488d6a80e05f59d97a0cef59730"/></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>
skin/adminhtml/default/default/eabi_admintools.css CHANGED
@@ -175,3 +175,32 @@
175
  .eabi_window .order-totals table td.label {
176
  padding-right: 10px !important;
177
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  .eabi_window .order-totals table td.label {
176
  padding-right: 10px !important;
177
  }
178
+
179
+ /* start licence specific css */
180
+ .eabi-form-licence-status .eabi-postoffice-green {
181
+ color: #2db573 !important;
182
+ color: rgba(45, 181, 115, 0.58) !important;
183
+
184
+ }
185
+
186
+ .eabi-form-licence-status .eabi-postoffice-yellow {
187
+ color: #f0c514 !important;
188
+ color: rgba(240, 197, 20, 0.58) !important;
189
+ }
190
+
191
+ .eabi-form-licence-status .eabi-postoffice-red {
192
+ color: #e84c3d !important;
193
+ color: rgba(232, 76, 61, 0.58) !important;
194
+ }
195
+
196
+ .eabi-form-licence-status .eabi-register-licence {
197
+ background: #f1f1f1 none repeat scroll 0 0;
198
+ padding: 0 20px;
199
+ }
200
+
201
+ .eabi-form-licence-status {
202
+ width: auto !important;
203
+ min-width: 500px !important;
204
+ }
205
+
206
+ /* end licence specific css */