Version Notes
Version 1.1.0
* Unsubscriber synchronization method change
* Performance improvements
* Several bug fixes
Build Date: 2016-01-25
Download this release
Release Info
Developer | Numerno |
Extension | Numerno_Euromsg |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.1.0
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Customer/Grid.php +18 -14
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/Attribute.php +16 -14
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/Attributes.php +15 -13
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/CustomerAttribute.php +23 -22
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/CustomerAttributes.php +15 -49
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/SyncNow.php +17 -13
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Grid/ExportJs.php +14 -9
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Mail/Logs.php +13 -9
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Mail/Logs/Grid.php +20 -17
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Newsletter/Subscriber/Grid.php +16 -11
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Sales/Order/Comments/View.php +18 -30
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Sales/Order/View/History.php +18 -28
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Logs.php +13 -9
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Logs/Grid.php +30 -25
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Renderer/Customer.php +12 -9
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Subscribers.php +13 -9
- app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Subscribers/Grid.php +29 -26
- app/code/local/Numerno/Euromsg/Helper/Data.php +248 -117
- app/code/local/Numerno/Euromsg/Helper/Sms.php +0 -96
- app/code/local/Numerno/Euromsg/Model/Core/Email.php +20 -19
- app/code/local/Numerno/Euromsg/Model/Core/Email/Queue.php +21 -16
- app/code/local/Numerno/Euromsg/Model/Core/Email/Template.php +16 -14
- app/code/local/Numerno/Euromsg/Model/Cron.php +199 -114
- app/code/local/Numerno/Euromsg/Model/Export/Adapter/Csv.php +20 -15
- app/code/local/Numerno/Euromsg/Model/Export/Entity/Member.php +60 -109
- app/code/local/Numerno/Euromsg/Model/Export/Entity/Product.php +76 -124
- app/code/local/Numerno/Euromsg/Model/Io/Sftp.php +0 -50
- app/code/local/Numerno/Euromsg/Model/Mail.php +12 -9
- app/code/local/Numerno/Euromsg/Model/Mail/Log.php +12 -9
- app/code/local/Numerno/Euromsg/Model/Mail/Transport/EuroMessage.php +31 -27
- app/code/local/Numerno/Euromsg/Model/Newsletter/Subscriber/Collection.php +14 -10
- app/code/local/Numerno/Euromsg/Model/Observer.php +40 -37
- app/code/local/Numerno/Euromsg/Model/Platform.php +397 -82
- app/code/local/Numerno/Euromsg/Model/Platform/Abstract.php +0 -103
- app/code/local/Numerno/Euromsg/Model/Platform/Member.php +0 -146
- app/code/local/Numerno/Euromsg/Model/Platform/Post.php +0 -98
- app/code/local/Numerno/Euromsg/Model/Platform/PostSms.php +0 -156
- app/code/local/Numerno/Euromsg/Model/Platform/Report.php +0 -62
- app/code/local/Numerno/Euromsg/Model/Process.php +36 -25
- app/code/local/Numerno/Euromsg/Model/Resource/Mail/Log.php +12 -9
- app/code/local/Numerno/Euromsg/Model/Resource/Mail/Log/Collection.php +12 -9
- app/code/local/Numerno/Euromsg/Model/Resource/Process.php +14 -9
- app/code/local/Numerno/Euromsg/Model/Resource/Process/Collection.php +12 -9
- app/code/local/Numerno/Euromsg/Model/Resource/Sms.php +12 -9
- app/code/local/Numerno/Euromsg/Model/Resource/Sms/Collection.php +12 -9
- app/code/local/Numerno/Euromsg/Model/Sms.php +21 -22
- app/code/local/Numerno/Euromsg/Model/System/Config/Backend/Attributes.php +16 -13
- app/code/local/Numerno/Euromsg/Model/System/Config/Backend/Cron.php +19 -15
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Cron/Frequency.php +12 -9
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Cron/Hours.php +16 -12
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Customer/Attributes.php +18 -10
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Customer/DataSource.php +12 -9
- app/code/local/Numerno/Euromsg/{Helper/Post.php → Model/System/Config/Source/Customer/DeliveryStatus.php} +21 -35
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Dwh/LangId.php +12 -9
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Dwh/Policy.php +12 -9
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Dwh/Report.php +12 -9
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Platform.php +12 -9
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Sms/Method.php +13 -10
- app/code/local/Numerno/Euromsg/Model/System/Config/Source/Sms/Permit.php +12 -9
- app/code/local/Numerno/Euromsg/controllers/Adminhtml/EuromsgController.php +165 -89
- app/code/local/Numerno/Euromsg/controllers/Adminhtml/NewsletterController.php +0 -49
- app/code/local/Numerno/Euromsg/controllers/Adminhtml/SmsController.php +0 -104
- app/code/local/Numerno/Euromsg/etc/adminhtml.xml +15 -14
- app/code/local/Numerno/Euromsg/etc/config.xml +34 -31
- app/code/local/Numerno/Euromsg/etc/system.xml +119 -138
- app/code/local/Numerno/Euromsg/sql/euromsg_setup/install-1.0.0.php +12 -9
- app/design/adminhtml/default/default/layout/euromsg.xml +30 -27
- app/design/adminhtml/default/default/template/euromsg/form/field/sync_now.phtml +12 -9
- app/design/adminhtml/default/default/template/euromsg/grid/export_js.phtml +12 -9
- app/design/adminhtml/default/default/template/euromsg/sales/order/comments/view.phtml +12 -9
- app/design/adminhtml/default/default/template/euromsg/sales/order/view/history.phtml +12 -9
- app/etc/modules/Numerno_Euromsg.xml +12 -9
- package.xml +9 -7
app/code/local/Numerno/Euromsg/Block/Adminhtml/Customer/Grid.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -45,7 +48,7 @@ class Numerno_Euromsg_Block_Adminhtml_Customer_Grid extends Mage_Adminhtml_Block
|
|
45 |
protected function _prepareColumns()
|
46 |
{
|
47 |
|
48 |
-
$this->addExportType('*/adminhtml_euromsg/export',
|
49 |
return parent::_prepareColumns();
|
50 |
}
|
51 |
|
@@ -61,10 +64,11 @@ class Numerno_Euromsg_Block_Adminhtml_Customer_Grid extends Mage_Adminhtml_Block
|
|
61 |
$this->setChild('export_button',
|
62 |
$this->getLayout()->createBlock('adminhtml/widget_button')
|
63 |
->setData(array(
|
64 |
-
'label'
|
65 |
-
'onclick'
|
66 |
-
'class'
|
67 |
-
'after_html' => $this->getLayout()
|
|
|
68 |
->setData(array('object_name' => $this->getJsObjectName()))
|
69 |
->toHtml()
|
70 |
))
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
48 |
protected function _prepareColumns()
|
49 |
{
|
50 |
|
51 |
+
$this->addExportType('*/adminhtml_euromsg/export', 'euro.message');
|
52 |
return parent::_prepareColumns();
|
53 |
}
|
54 |
|
64 |
$this->setChild('export_button',
|
65 |
$this->getLayout()->createBlock('adminhtml/widget_button')
|
66 |
->setData(array(
|
67 |
+
'label' => Mage::helper('adminhtml')->__('Export'),
|
68 |
+
'onclick' => 'doExport()',
|
69 |
+
'class' => 'task',
|
70 |
+
'after_html' => $this->getLayout()
|
71 |
+
->createBlock('euromsg/adminhtml_grid_exportJs')
|
72 |
->setData(array('object_name' => $this->getJsObjectName()))
|
73 |
->toHtml()
|
74 |
))
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/Attribute.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -51,22 +54,21 @@ class Numerno_Euromsg_Block_Adminhtml_Form_Field_Attribute extends Mage_Core_Blo
|
|
51 |
* @return array
|
52 |
*
|
53 |
*/
|
54 |
-
protected function _getAttributes(
|
55 |
{
|
56 |
if (is_null($this->_attributes)) {
|
57 |
|
58 |
$this->_attributes = Mage::helper('euromsg')->getPresetProductAttributes();
|
|
|
59 |
$collection = Mage::getModel('eav/entity_attribute')->getCollection();
|
60 |
$collection->setEntityTypeFilter(Mage::getSingleton('eav/config')->getEntityType('catalog_product'));
|
|
|
61 |
foreach ($collection as $item) {
|
62 |
-
/* @var $item Mage_Core_Model_Store */
|
63 |
$this->_attributes[$item->getAttributeCode()] = $item->getFrontendLabel() . ' ('
|
64 |
. $item->getAttributeCode() . ')';
|
65 |
}
|
66 |
}
|
67 |
-
|
68 |
-
return isset($this->_attributes[$storeId]) ? $this->_attributes[$storeId] : null;
|
69 |
-
}
|
70 |
return $this->_attributes;
|
71 |
}
|
72 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
54 |
* @return array
|
55 |
*
|
56 |
*/
|
57 |
+
protected function _getAttributes()
|
58 |
{
|
59 |
if (is_null($this->_attributes)) {
|
60 |
|
61 |
$this->_attributes = Mage::helper('euromsg')->getPresetProductAttributes();
|
62 |
+
|
63 |
$collection = Mage::getModel('eav/entity_attribute')->getCollection();
|
64 |
$collection->setEntityTypeFilter(Mage::getSingleton('eav/config')->getEntityType('catalog_product'));
|
65 |
+
|
66 |
foreach ($collection as $item) {
|
|
|
67 |
$this->_attributes[$item->getAttributeCode()] = $item->getFrontendLabel() . ' ('
|
68 |
. $item->getAttributeCode() . ')';
|
69 |
}
|
70 |
}
|
71 |
+
|
|
|
|
|
72 |
return $this->_attributes;
|
73 |
}
|
74 |
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/Attributes.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -38,7 +41,6 @@
|
|
38 |
class Numerno_Euromsg_Block_Adminhtml_Form_Field_Attributes
|
39 |
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
40 |
{
|
41 |
-
|
42 |
/**
|
43 |
* Attribute renderer cache
|
44 |
*/
|
@@ -110,8 +112,8 @@ class Numerno_Euromsg_Block_Adminhtml_Form_Field_Attributes
|
|
110 |
}
|
111 |
|
112 |
return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
}
|
117 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
41 |
class Numerno_Euromsg_Block_Adminhtml_Form_Field_Attributes
|
42 |
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
43 |
{
|
|
|
44 |
/**
|
45 |
* Attribute renderer cache
|
46 |
*/
|
112 |
}
|
113 |
|
114 |
return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
|
115 |
+
($column['size'] ? 'size="' . $column['size'] . '"' : '') . ' class="' .
|
116 |
+
(isset($column['class']) ? $column['class'] : 'input-text') . '"'.
|
117 |
+
(isset($column['style']) ? ' style="'.$column['style'] . '"' : '') . '/>';
|
118 |
}
|
119 |
}
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/CustomerAttribute.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -51,28 +54,26 @@ class Numerno_Euromsg_Block_Adminhtml_Form_Field_CustomerAttribute extends Mage_
|
|
51 |
* @return array
|
52 |
*
|
53 |
*/
|
54 |
-
protected function _getAttributes(
|
55 |
{
|
56 |
-
$_helper = Mage::helper('euromsg');
|
57 |
-
|
58 |
if (is_null($this->_attributes)) {
|
59 |
|
60 |
-
$this->_attributes
|
61 |
-
$
|
62 |
|
63 |
-
$collection = Mage::getModel('eav/entity_attribute')->getCollection();
|
64 |
$collection->setEntityTypeFilter(Mage::getSingleton('eav/config')->getEntityType('customer'));
|
65 |
-
$collection->addFieldToFilter(
|
|
|
|
|
|
|
66 |
|
67 |
foreach ($collection as $item) {
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
}
|
72 |
}
|
73 |
-
|
74 |
-
return isset($this->_attributes[$storeId]) ? $this->_attributes[$storeId] : null;
|
75 |
-
}
|
76 |
return $this->_attributes;
|
77 |
}
|
78 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
54 |
* @return array
|
55 |
*
|
56 |
*/
|
57 |
+
protected function _getAttributes()
|
58 |
{
|
|
|
|
|
59 |
if (is_null($this->_attributes)) {
|
60 |
|
61 |
+
$this->_attributes = Mage::helper('euromsg')->getPresetCustomerAttributes();
|
62 |
+
$collection = Mage::getModel('eav/entity_attribute')->getCollection();
|
63 |
|
|
|
64 |
$collection->setEntityTypeFilter(Mage::getSingleton('eav/config')->getEntityType('customer'));
|
65 |
+
$collection->addFieldToFilter(
|
66 |
+
'attribute_code',
|
67 |
+
array('nin' => Mage::helper('euromsg')->getDisabledCustomerAttributes())
|
68 |
+
);
|
69 |
|
70 |
foreach ($collection as $item) {
|
71 |
+
$this->_attributes[Mage::helper('euromsg')->getCustomerAttributePrefix() . $item->getAttributeCode()] =
|
72 |
+
Mage::helper('euromsg')->__('Customer ') . $item->getFrontendLabel() . ' (' .
|
73 |
+
$item->getAttributeCode() . ')';
|
74 |
}
|
75 |
}
|
76 |
+
|
|
|
|
|
77 |
return $this->_attributes;
|
78 |
}
|
79 |
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/CustomerAttributes.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -109,9 +112,9 @@ class Numerno_Euromsg_Block_Adminhtml_Form_Field_CustomerAttributes extends Mage
|
|
109 |
}
|
110 |
|
111 |
return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
}
|
116 |
|
117 |
/**
|
@@ -123,41 +126,4 @@ class Numerno_Euromsg_Block_Adminhtml_Form_Field_CustomerAttributes extends Mage
|
|
123 |
{
|
124 |
return '_emCustomerAttributes';
|
125 |
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Render Block Template
|
129 |
-
*
|
130 |
-
* @return string
|
131 |
-
*/
|
132 |
-
public function _toHtml()
|
133 |
-
{
|
134 |
-
$reservedColumns = Mage::helper('euromsg')->getReservedColumns();
|
135 |
-
$html = parent::_toHtml();
|
136 |
-
$html = $html . '
|
137 |
-
<script type="text/javascript">
|
138 |
-
/*var emLockedAttributes = ["'.implode('","', array_keys($reservedColumns)).'"];
|
139 |
-
var emLockedValues = '.json_encode($reservedColumns).';
|
140 |
-
|
141 |
-
$$(".attribute_select").invoke(\'observe\', \'change\', function() {
|
142 |
-
em_input = $(this).up(\'td\').next(\'td\').down(\'input[type=text]\');
|
143 |
-
if(emLockedAttributes.indexOf(this.value) >= 0){
|
144 |
-
em_input.value = emLockedValues[this.value];
|
145 |
-
em_input.disable();
|
146 |
-
} else {
|
147 |
-
em_input.enable();
|
148 |
-
}
|
149 |
-
});
|
150 |
-
|
151 |
-
document.observe(\'dom:loaded\', function() {
|
152 |
-
$$(".attribute_select").each(function(select) {
|
153 |
-
em_input = $(select).up(\'td\').next(\'td\').down(\'input[type=text]\');
|
154 |
-
if(emLockedAttributes.indexOf(select.value) >= 0){
|
155 |
-
em_input.value = emLockedValues[select.value];
|
156 |
-
em_input.disable();
|
157 |
-
}
|
158 |
-
});
|
159 |
-
});*/
|
160 |
-
</script>';
|
161 |
-
return $html;
|
162 |
-
}
|
163 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
112 |
}
|
113 |
|
114 |
return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
|
115 |
+
($column['size'] ? 'size="' . $column['size'] . '"' : '') . ' class="' .
|
116 |
+
(isset($column['class']) ? $column['class'] : 'input-text') . '"'.
|
117 |
+
(isset($column['style']) ? ' style="'.$column['style'] . '"' : '') . '/>';
|
118 |
}
|
119 |
|
120 |
/**
|
126 |
{
|
127 |
return '_emCustomerAttributes';
|
128 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
}
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Form/Field/SyncNow.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -43,6 +46,7 @@ class Numerno_Euromsg_Block_Adminhtml_Form_Field_SyncNow extends Mage_Adminhtml_
|
|
43 |
protected function _construct()
|
44 |
{
|
45 |
parent::_construct();
|
|
|
46 |
$this->setTemplate('euromsg/form/field/sync_now.phtml');
|
47 |
}
|
48 |
|
@@ -55,9 +59,8 @@ class Numerno_Euromsg_Block_Adminhtml_Form_Field_SyncNow extends Mage_Adminhtml_
|
|
55 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
56 |
{
|
57 |
$originalData = $element->getOriginalData();
|
58 |
-
$this->addData(array(
|
59 |
-
|
60 |
-
));
|
61 |
return $this->_toHtml();
|
62 |
}
|
63 |
|
@@ -78,7 +81,8 @@ class Numerno_Euromsg_Block_Adminhtml_Form_Field_SyncNow extends Mage_Adminhtml_
|
|
78 |
*/
|
79 |
public function getButtonHtml()
|
80 |
{
|
81 |
-
$button = $this->getLayout()
|
|
|
82 |
->addData(array(
|
83 |
'id' => 'syncNow_button',
|
84 |
'label' => $this->helper('euromsg')->__('Synchronize Now'),
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
46 |
protected function _construct()
|
47 |
{
|
48 |
parent::_construct();
|
49 |
+
|
50 |
$this->setTemplate('euromsg/form/field/sync_now.phtml');
|
51 |
}
|
52 |
|
59 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
60 |
{
|
61 |
$originalData = $element->getOriginalData();
|
62 |
+
$this->addData(array('synchronize' => $originalData['synchronize']));
|
63 |
+
|
|
|
64 |
return $this->_toHtml();
|
65 |
}
|
66 |
|
81 |
*/
|
82 |
public function getButtonHtml()
|
83 |
{
|
84 |
+
$button = $this->getLayout()
|
85 |
+
->createBlock('adminhtml/widget_button')
|
86 |
->addData(array(
|
87 |
'id' => 'syncNow_button',
|
88 |
'label' => $this->helper('euromsg')->__('Synchronize Now'),
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Grid/ExportJs.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -45,9 +48,11 @@ class Numerno_Euromsg_Block_Adminhtml_Grid_ExportJs extends Mage_Adminhtml_Block
|
|
45 |
protected function _prepareLayout()
|
46 |
{
|
47 |
parent::_prepareLayout();
|
|
|
48 |
if (!$this->getTemplate()) {
|
49 |
$this->setTemplate('euromsg/grid/export_js.phtml');
|
50 |
}
|
|
|
51 |
return $this;
|
52 |
}
|
53 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
48 |
protected function _prepareLayout()
|
49 |
{
|
50 |
parent::_prepareLayout();
|
51 |
+
|
52 |
if (!$this->getTemplate()) {
|
53 |
$this->setTemplate('euromsg/grid/export_js.phtml');
|
54 |
}
|
55 |
+
|
56 |
return $this;
|
57 |
}
|
58 |
}
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Mail/Logs.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -44,6 +47,7 @@ class Numerno_Euromsg_Block_Adminhtml_Mail_Logs extends Mage_Adminhtml_Block_Wid
|
|
44 |
$this->_headerText = Mage::helper('euromsg')->__('euro.message Mail Logs');
|
45 |
|
46 |
parent::__construct();
|
|
|
47 |
$this->_removeButton('add');
|
48 |
}
|
49 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
47 |
$this->_headerText = Mage::helper('euromsg')->__('euro.message Mail Logs');
|
48 |
|
49 |
parent::__construct();
|
50 |
+
|
51 |
$this->_removeButton('add');
|
52 |
}
|
53 |
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Mail/Logs/Grid.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -40,6 +43,7 @@ class Numerno_Euromsg_Block_Adminhtml_Mail_Logs_Grid extends Mage_Adminhtml_Bloc
|
|
40 |
public function __construct()
|
41 |
{
|
42 |
parent::__construct();
|
|
|
43 |
$this->setId('maillogsGrid');
|
44 |
$this->setDefaultSort('log_id');
|
45 |
$this->setDefaultDir('DESC');
|
@@ -49,7 +53,7 @@ class Numerno_Euromsg_Block_Adminhtml_Mail_Logs_Grid extends Mage_Adminhtml_Bloc
|
|
49 |
|
50 |
protected function _prepareCollection()
|
51 |
{
|
52 |
-
$collection = Mage::
|
53 |
|
54 |
$this->setCollection($collection);
|
55 |
|
@@ -86,15 +90,14 @@ class Numerno_Euromsg_Block_Adminhtml_Mail_Logs_Grid extends Mage_Adminhtml_Bloc
|
|
86 |
'options' => Mage::getModel('adminhtml/system_config_source_yesno')->toArray()
|
87 |
));
|
88 |
|
89 |
-
$delivery = Mage::helper('euromsg
|
90 |
-
if($delivery) {
|
91 |
$this->addColumn('delivery_status', array(
|
92 |
-
'header'
|
93 |
-
'index'
|
94 |
-
'type'
|
95 |
-
'options' => Mage::
|
96 |
));
|
97 |
-
|
98 |
}
|
99 |
|
100 |
return parent::_prepareColumns();
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
43 |
public function __construct()
|
44 |
{
|
45 |
parent::__construct();
|
46 |
+
|
47 |
$this->setId('maillogsGrid');
|
48 |
$this->setDefaultSort('log_id');
|
49 |
$this->setDefaultDir('DESC');
|
53 |
|
54 |
protected function _prepareCollection()
|
55 |
{
|
56 |
+
$collection = Mage::getResourceModel('euromsg/mail_log_collection');
|
57 |
|
58 |
$this->setCollection($collection);
|
59 |
|
90 |
'options' => Mage::getModel('adminhtml/system_config_source_yesno')->toArray()
|
91 |
));
|
92 |
|
93 |
+
$delivery = Mage::helper('euromsg')->getConfigData('log/track_delivery', 'trx');
|
94 |
+
if ($delivery) {
|
95 |
$this->addColumn('delivery_status', array(
|
96 |
+
'header' => Mage::helper('euromsg')->__('Delivery Status'),
|
97 |
+
'index' => 'delivery_status',
|
98 |
+
'type' => 'options',
|
99 |
+
'options' => Mage::getModel('euromsg/system_config_source_customer_deliveryStatus')->toArray()
|
100 |
));
|
|
|
101 |
}
|
102 |
|
103 |
return parent::_prepareColumns();
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Newsletter/Subscriber/Grid.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -44,8 +47,8 @@ class Numerno_Euromsg_Block_Adminhtml_Newsletter_Subscriber_Grid extends Mage_Ad
|
|
44 |
*/
|
45 |
protected function _prepareColumns()
|
46 |
{
|
|
|
47 |
|
48 |
-
$this->addExportType('*/adminhtml_euromsg/export', Mage::helper('euromsg')->__('euro.message'));
|
49 |
return parent::_prepareColumns();
|
50 |
}
|
51 |
|
@@ -59,7 +62,8 @@ class Numerno_Euromsg_Block_Adminhtml_Newsletter_Subscriber_Grid extends Mage_Ad
|
|
59 |
parent::_prepareLayout();
|
60 |
|
61 |
$this->setChild('export_button',
|
62 |
-
$this->getLayout()
|
|
|
63 |
->setData(array(
|
64 |
'label' => Mage::helper('adminhtml')->__('Export'),
|
65 |
'onclick' => 'doExport()',
|
@@ -69,6 +73,7 @@ class Numerno_Euromsg_Block_Adminhtml_Newsletter_Subscriber_Grid extends Mage_Ad
|
|
69 |
->toHtml()
|
70 |
))
|
71 |
);
|
|
|
72 |
return $this;
|
73 |
}
|
74 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
47 |
*/
|
48 |
protected function _prepareColumns()
|
49 |
{
|
50 |
+
$this->addExportType('*/adminhtml_euromsg/export', 'euro.message');
|
51 |
|
|
|
52 |
return parent::_prepareColumns();
|
53 |
}
|
54 |
|
62 |
parent::_prepareLayout();
|
63 |
|
64 |
$this->setChild('export_button',
|
65 |
+
$this->getLayout()
|
66 |
+
->createBlock('adminhtml/widget_button')
|
67 |
->setData(array(
|
68 |
'label' => Mage::helper('adminhtml')->__('Export'),
|
69 |
'onclick' => 'doExport()',
|
73 |
->toHtml()
|
74 |
))
|
75 |
);
|
76 |
+
|
77 |
return $this;
|
78 |
}
|
79 |
}
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Sales/Order/Comments/View.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -44,30 +47,15 @@ class Numerno_Euromsg_Block_Adminhtml_Sales_Order_Comments_View extends Mage_Adm
|
|
44 |
*/
|
45 |
public function canSendCommentSms()
|
46 |
{
|
47 |
-
$
|
48 |
-
|
49 |
-
$
|
50 |
|
51 |
-
if($
|
52 |
-
|
53 |
-
|
54 |
-
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
55 |
-
$smsPermit = $customer->getData(Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE);
|
56 |
-
if($smsPermit) {
|
57 |
-
$smsAttribute = $helper->getGsmAttribute();
|
58 |
-
if($smsAttribute) {
|
59 |
-
$gsmNumber = $customer->getData($smsAttribute);
|
60 |
-
if($helper->validateGsmNumber($gsmNumber))
|
61 |
-
{
|
62 |
-
return true;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
67 |
}
|
68 |
-
|
69 |
}
|
70 |
-
catch(Exception $e) { Mage::logException($e); }
|
71 |
|
72 |
return false;
|
73 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
47 |
*/
|
48 |
public function canSendCommentSms()
|
49 |
{
|
50 |
+
$notify = Mage::helper('euromsg')->getConfigData('template/sms_order_update', 'sms');
|
51 |
+
if ($notify) {
|
52 |
+
$order = $this->getEntity()->getOrder();
|
53 |
|
54 |
+
if (!$order->getCustomerIsGuest() || $order->getCustomerId()) {
|
55 |
+
|
56 |
+
return Mage::helper('euromsg')->getSMSPermit($order->getCustomerId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
|
|
58 |
}
|
|
|
59 |
|
60 |
return false;
|
61 |
}
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Sales/Order/View/History.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -44,28 +47,15 @@ class Numerno_Euromsg_Block_Adminhtml_Sales_Order_View_History extends Mage_Admi
|
|
44 |
*/
|
45 |
public function canSendCommentSms()
|
46 |
{
|
47 |
-
$
|
|
|
|
|
48 |
|
49 |
-
|
50 |
-
$notify = $helper->getStoreConfig('template/sms_order_update');
|
51 |
-
if($notify) {
|
52 |
-
$order = $this->getOrder();
|
53 |
-
if (!$order->getCustomerIsGuest() || $order->getCustomerId()) {
|
54 |
-
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
55 |
-
$smsPermit = $customer->getData(Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE);
|
56 |
-
if($smsPermit) {
|
57 |
-
$smsAttribute = $helper->getGsmAttribute();
|
58 |
-
if($smsAttribute) {
|
59 |
-
$gsmNumber = $customer->getData($smsAttribute);
|
60 |
-
if($helper->validateGsmNumber($gsmNumber))
|
61 |
-
return true;
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
|
|
|
|
|
67 |
}
|
68 |
-
catch(Exception $e) { }
|
69 |
|
70 |
return false;
|
71 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
47 |
*/
|
48 |
public function canSendCommentSms()
|
49 |
{
|
50 |
+
$notify = Mage::helper('euromsg')->getConfigData('template/sms_order_update', 'sms');
|
51 |
+
if ($notify) {
|
52 |
+
$order = $this->getOrder();
|
53 |
|
54 |
+
if (!$order->getCustomerIsGuest() || $order->getCustomerId()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
+
return Mage::helper('euromsg')->getSMSPermit($order->getCustomerId());
|
57 |
+
}
|
58 |
}
|
|
|
59 |
|
60 |
return false;
|
61 |
}
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Logs.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -44,6 +47,7 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Logs extends Mage_Adminhtml_Block_Widg
|
|
44 |
$this->_headerText = Mage::helper('euromsg')->__('euro.message SMS Logs');
|
45 |
|
46 |
parent::__construct();
|
|
|
47 |
$this->_removeButton('add');
|
48 |
}
|
49 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
47 |
$this->_headerText = Mage::helper('euromsg')->__('euro.message SMS Logs');
|
48 |
|
49 |
parent::__construct();
|
50 |
+
|
51 |
$this->_removeButton('add');
|
52 |
}
|
53 |
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Logs/Grid.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -40,6 +43,7 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Logs_Grid extends Mage_Adminhtml_Block
|
|
40 |
public function __construct()
|
41 |
{
|
42 |
parent::__construct();
|
|
|
43 |
$this->setId('smslogsGrid');
|
44 |
$this->setDefaultSort('sms_id');
|
45 |
$this->setDefaultDir('DESC');
|
@@ -52,25 +56,26 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Logs_Grid extends Mage_Adminhtml_Block
|
|
52 |
$_config = Mage::getSingleton('eav/config');
|
53 |
$collection = Mage::getModel('euromsg/sms')->getCollection();
|
54 |
$firstname = $_config->getAttribute('customer', 'firstname');
|
55 |
-
$lastname
|
|
|
56 |
$collection->getSelect()
|
57 |
->joinLeft(
|
58 |
array('customer_' . $firstname->getAttributeCode() . '_table' => $firstname->getBackendTable()),
|
59 |
-
'customer_' . $firstname->getAttributeCode() . '_table.entity_id = main_table.customer_id'
|
60 |
-
|
61 |
-
|
62 |
array('firstname' => 'value')
|
63 |
)
|
64 |
->joinLeft(
|
65 |
array('customer_' . $lastname->getAttributeCode() . '_table' => $lastname->getBackendTable()),
|
66 |
-
'customer_' . $lastname->getAttributeCode() . '_table.entity_id = main_table.customer_id'
|
67 |
-
|
68 |
-
|
69 |
array('lastname' => 'value')
|
70 |
)
|
71 |
-
->columns(new Zend_Db_Expr(
|
72 |
-
|
73 |
-
|
74 |
|
75 |
$this->setCollection($collection);
|
76 |
|
@@ -106,13 +111,13 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Logs_Grid extends Mage_Adminhtml_Block
|
|
106 |
'index' => 'message'
|
107 |
));
|
108 |
|
109 |
-
$delivery = Mage::helper('euromsg
|
110 |
-
if($delivery) {
|
111 |
$this->addColumn('delivery_status', array(
|
112 |
-
'header'
|
113 |
-
'index'
|
114 |
-
'type'
|
115 |
-
'options' => Mage::
|
116 |
));
|
117 |
}
|
118 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
43 |
public function __construct()
|
44 |
{
|
45 |
parent::__construct();
|
46 |
+
|
47 |
$this->setId('smslogsGrid');
|
48 |
$this->setDefaultSort('sms_id');
|
49 |
$this->setDefaultDir('DESC');
|
56 |
$_config = Mage::getSingleton('eav/config');
|
57 |
$collection = Mage::getModel('euromsg/sms')->getCollection();
|
58 |
$firstname = $_config->getAttribute('customer', 'firstname');
|
59 |
+
$lastname = $_config->getAttribute('customer', 'lastname');
|
60 |
+
|
61 |
$collection->getSelect()
|
62 |
->joinLeft(
|
63 |
array('customer_' . $firstname->getAttributeCode() . '_table' => $firstname->getBackendTable()),
|
64 |
+
'customer_' . $firstname->getAttributeCode() . '_table.entity_id = main_table.customer_id' .
|
65 |
+
' AND customer_' . $firstname->getAttributeCode() . '_table.attribute_id = ' .
|
66 |
+
((int) $firstname->getAttributeId()),
|
67 |
array('firstname' => 'value')
|
68 |
)
|
69 |
->joinLeft(
|
70 |
array('customer_' . $lastname->getAttributeCode() . '_table' => $lastname->getBackendTable()),
|
71 |
+
'customer_' . $lastname->getAttributeCode() . '_table.entity_id = main_table.customer_id' .
|
72 |
+
' AND customer_' . $lastname->getAttributeCode() . '_table.attribute_id = ' .
|
73 |
+
((int) $lastname->getAttributeId()),
|
74 |
array('lastname' => 'value')
|
75 |
)
|
76 |
+
->columns(new Zend_Db_Expr('CONCAT(`customer_' . $firstname->getAttributeCode() .
|
77 |
+
'_table`.`value`, \' \', `customer_' . $lastname->getAttributeCode() .
|
78 |
+
'_table`.`value`) AS customer_name'));
|
79 |
|
80 |
$this->setCollection($collection);
|
81 |
|
111 |
'index' => 'message'
|
112 |
));
|
113 |
|
114 |
+
$delivery = Mage::helper('euromsg')->getConfigData('log/track_delivery', 'sms');
|
115 |
+
if ($delivery) {
|
116 |
$this->addColumn('delivery_status', array(
|
117 |
+
'header' => Mage::helper('euromsg')->__('Delivery Status'),
|
118 |
+
'index' => 'delivery_status',
|
119 |
+
'type' => 'options',
|
120 |
+
'options' => Mage::getModel('euromsg/system_config_source_customer_deliveryStatus')->toArray()
|
121 |
));
|
122 |
}
|
123 |
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Renderer/Customer.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Subscribers.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -44,6 +47,7 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Subscribers extends Mage_Adminhtml_Blo
|
|
44 |
$this->_headerText = Mage::helper('euromsg')->__('euro.message SMS Subscribers');
|
45 |
|
46 |
parent::__construct();
|
|
|
47 |
$this->_removeButton('add');
|
48 |
}
|
49 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
47 |
$this->_headerText = Mage::helper('euromsg')->__('euro.message SMS Subscribers');
|
48 |
|
49 |
parent::__construct();
|
50 |
+
|
51 |
$this->_removeButton('add');
|
52 |
}
|
53 |
|
app/code/local/Numerno/Euromsg/Block/Adminhtml/Sms/Subscribers/Grid.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -40,6 +43,7 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Subscribers_Grid extends Mage_Adminhtm
|
|
40 |
public function __construct()
|
41 |
{
|
42 |
parent::__construct();
|
|
|
43 |
$this->setId('smssubscribersGrid');
|
44 |
$this->setDefaultSort('customer_id');
|
45 |
$this->setDefaultDir('DESC');
|
@@ -48,14 +52,11 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Subscribers_Grid extends Mage_Adminhtm
|
|
48 |
|
49 |
protected function _prepareCollection()
|
50 |
{
|
51 |
-
$helper = Mage::helper('euromsg/sms');
|
52 |
$collection = Mage::getResourceModel('customer/customer_collection')
|
53 |
->addNameToSelect()
|
54 |
->addAttributeToSelect('email')
|
55 |
-
->addAttributeToSelect((string) Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE)
|
56 |
-
|
57 |
-
if($helper->getGsmAttribute())
|
58 |
-
$collection->addAttributeToSelect((string) $helper->getGsmAttribute());
|
59 |
|
60 |
$this->setCollection($collection);
|
61 |
|
@@ -64,19 +65,21 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Subscribers_Grid extends Mage_Adminhtm
|
|
64 |
|
65 |
protected function _prepareColumns()
|
66 |
{
|
67 |
-
$helper = Mage::helper('euromsg/sms');
|
68 |
-
|
69 |
$this->addColumn('entity_id', array(
|
70 |
'header' => Mage::helper('customer')->__('ID'),
|
71 |
'width' => '50px',
|
72 |
'index' => 'entity_id',
|
73 |
'type' => 'number',
|
74 |
));
|
75 |
-
|
76 |
-
|
|
|
|
|
77 |
'header' => Mage::helper('euromsg')->__('GSM Number'),
|
78 |
-
'index' =>
|
79 |
));
|
|
|
|
|
80 |
$this->addColumn('name', array(
|
81 |
'header' => Mage::helper('customer')->__('Name'),
|
82 |
'index' => 'name'
|
@@ -86,9 +89,11 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Subscribers_Grid extends Mage_Adminhtm
|
|
86 |
'width' => '150',
|
87 |
'index' => 'email'
|
88 |
));
|
89 |
-
|
|
|
|
|
90 |
'header' => Mage::helper('euromsg')->__('Is Subscribed?'),
|
91 |
-
'index' =>
|
92 |
'type' => 'options',
|
93 |
'options' => Mage::getModel('euromsg/system_config_source_sms_permit')->toArray()
|
94 |
));
|
@@ -98,22 +103,20 @@ class Numerno_Euromsg_Block_Adminhtml_Sms_Subscribers_Grid extends Mage_Adminhtm
|
|
98 |
|
99 |
public function getRowUrl($row)
|
100 |
{
|
101 |
-
return Mage::helper('adminhtml')->getUrl('adminhtml/customer/edit/', array('id'
|
102 |
}
|
103 |
|
104 |
protected function _prepareMassaction()
|
105 |
{
|
106 |
$this->setMassactionIdField('entity_id');
|
107 |
$this->getMassactionBlock()->setFormFieldName('customer');
|
108 |
-
|
109 |
$this->getMassactionBlock()->addItem('sms_subscribe', array(
|
110 |
'label' => Mage::helper('customer')->__('Subscribe'),
|
111 |
-
'url' => $this->getUrl('*/*/
|
112 |
));
|
113 |
-
|
114 |
$this->getMassactionBlock()->addItem('sms_unsubscribe', array(
|
115 |
'label' => Mage::helper('customer')->__('Unsubscribe'),
|
116 |
-
'url' => $this->getUrl('*/*/
|
117 |
));
|
118 |
|
119 |
return $this;
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
43 |
public function __construct()
|
44 |
{
|
45 |
parent::__construct();
|
46 |
+
|
47 |
$this->setId('smssubscribersGrid');
|
48 |
$this->setDefaultSort('customer_id');
|
49 |
$this->setDefaultDir('DESC');
|
52 |
|
53 |
protected function _prepareCollection()
|
54 |
{
|
|
|
55 |
$collection = Mage::getResourceModel('customer/customer_collection')
|
56 |
->addNameToSelect()
|
57 |
->addAttributeToSelect('email')
|
58 |
+
->addAttributeToSelect((string) Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE)
|
59 |
+
->addAttributeToSelect(Mage::helper('euromsg')->getConfigData('general/attribute', 'sms'));
|
|
|
|
|
60 |
|
61 |
$this->setCollection($collection);
|
62 |
|
65 |
|
66 |
protected function _prepareColumns()
|
67 |
{
|
|
|
|
|
68 |
$this->addColumn('entity_id', array(
|
69 |
'header' => Mage::helper('customer')->__('ID'),
|
70 |
'width' => '50px',
|
71 |
'index' => 'entity_id',
|
72 |
'type' => 'number',
|
73 |
));
|
74 |
+
|
75 |
+
$gsmNumberAttribute = Mage::helper('euromsg')->getConfigData('general/attribute', 'sms');
|
76 |
+
if ($gsmNumberAttribute) {
|
77 |
+
$this->addColumn($gsmNumberAttribute, array(
|
78 |
'header' => Mage::helper('euromsg')->__('GSM Number'),
|
79 |
+
'index' => $gsmNumberAttribute
|
80 |
));
|
81 |
+
}
|
82 |
+
|
83 |
$this->addColumn('name', array(
|
84 |
'header' => Mage::helper('customer')->__('Name'),
|
85 |
'index' => 'name'
|
89 |
'width' => '150',
|
90 |
'index' => 'email'
|
91 |
));
|
92 |
+
|
93 |
+
$smsPermitAttribute = Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE;
|
94 |
+
$this->addColumn($smsPermitAttribute, array(
|
95 |
'header' => Mage::helper('euromsg')->__('Is Subscribed?'),
|
96 |
+
'index' => $smsPermitAttribute,
|
97 |
'type' => 'options',
|
98 |
'options' => Mage::getModel('euromsg/system_config_source_sms_permit')->toArray()
|
99 |
));
|
103 |
|
104 |
public function getRowUrl($row)
|
105 |
{
|
106 |
+
return Mage::helper('adminhtml')->getUrl('adminhtml/customer/edit/', array('id' => $row->getId()));
|
107 |
}
|
108 |
|
109 |
protected function _prepareMassaction()
|
110 |
{
|
111 |
$this->setMassactionIdField('entity_id');
|
112 |
$this->getMassactionBlock()->setFormFieldName('customer');
|
|
|
113 |
$this->getMassactionBlock()->addItem('sms_subscribe', array(
|
114 |
'label' => Mage::helper('customer')->__('Subscribe'),
|
115 |
+
'url' => $this->getUrl('*/*/massSmsSubscribe')
|
116 |
));
|
|
|
117 |
$this->getMassactionBlock()->addItem('sms_unsubscribe', array(
|
118 |
'label' => Mage::helper('customer')->__('Unsubscribe'),
|
119 |
+
'url' => $this->getUrl('*/*/massSmsUnsubscribe')
|
120 |
));
|
121 |
|
122 |
return $this;
|
app/code/local/Numerno/Euromsg/Helper/Data.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -46,128 +49,117 @@ class Numerno_Euromsg_Helper_Data extends Mage_Core_Helper_Abstract
|
|
46 |
/**
|
47 |
* Retrieve store config
|
48 |
*
|
49 |
-
* @param string
|
|
|
|
|
50 |
*
|
51 |
* @return string
|
52 |
*/
|
53 |
-
public function
|
54 |
{
|
55 |
-
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
-
*
|
60 |
*
|
61 |
-
* @param string
|
62 |
*
|
63 |
-
* @return
|
64 |
*/
|
65 |
-
public function
|
66 |
{
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
/**
|
71 |
-
*
|
72 |
*
|
73 |
-
* @
|
|
|
|
|
74 |
*/
|
75 |
-
public function
|
76 |
{
|
77 |
-
|
78 |
-
'Username' => $this->getStoreConfig('/general/ws_user'),
|
79 |
-
'Password' => $this->getStoreConfig('/general/ws_pass')
|
80 |
-
);
|
81 |
-
|
82 |
-
return $credentials;
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
-
*
|
87 |
*
|
88 |
-
* @
|
|
|
|
|
89 |
*/
|
90 |
-
public function
|
91 |
{
|
92 |
-
$
|
93 |
-
|
94 |
-
|
95 |
-
'password' => $this->getStoreConfig("/$target/sftp_pass")
|
96 |
-
);
|
97 |
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
|
101 |
/**
|
102 |
-
*
|
103 |
*
|
104 |
-
* @
|
|
|
|
|
105 |
*/
|
106 |
-
public function
|
107 |
-
{
|
108 |
-
$connection = Mage::getModel('euromsg/io_sftp');
|
109 |
-
$connection->open($this->getSftpCredentials($target));
|
110 |
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
|
|
|
|
114 |
|
115 |
-
|
116 |
-
* Process Feedback ZIP File
|
117 |
-
*
|
118 |
-
* @param string $file
|
119 |
-
* @return void
|
120 |
-
*/
|
121 |
-
public function processFeedbackZip($file)
|
122 |
-
{
|
123 |
-
$zip = new ZipArchive();
|
124 |
-
$zip->open($file);
|
125 |
-
for( $i = 0; $i < $zip->numFiles; $i++ ){
|
126 |
-
$stat = $zip->statIndex( $i );
|
127 |
-
if($stat['size']!=0){
|
128 |
-
if(strpos($stat['name'], '.csv')) {
|
129 |
-
$tmpDir = sys_get_temp_dir();
|
130 |
-
$file = $tmpDir . DS . $stat['name'];
|
131 |
-
$zip->extractTo($tmpDir, $stat['name']);
|
132 |
-
|
133 |
-
if (($handle = fopen($file, "r")) !== FALSE) {
|
134 |
-
$header = fgets($handle);
|
135 |
-
if(strpos($header, 'UNSUBCRIBE') || strpos($header, 'UNSUBSCRIBE')) {
|
136 |
-
$headers = explode(';', $header);
|
137 |
-
while (($row = fgetcsv($handle, false, ";")) !== FALSE) {
|
138 |
-
$data = array_combine($headers, $row);
|
139 |
-
if(isset($data['EMAIL_ADDRESS'])) {
|
140 |
-
$subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($data['EMAIL_ADDRESS']);
|
141 |
-
if($subscriber->getId())
|
142 |
-
$subscriber->unsubscribe();
|
143 |
-
}
|
144 |
-
}
|
145 |
-
}
|
146 |
-
fclose($handle);
|
147 |
-
}
|
148 |
}
|
149 |
}
|
150 |
}
|
151 |
-
$zip->close();
|
152 |
-
}
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
$columns = array(
|
157 |
-
'subscriber_email' => Numerno_Euromsg_Model_Export_Entity_Member::COL_EMAIL,
|
158 |
-
'subscriber_id' => Numerno_Euromsg_Model_Export_Entity_Member::COL_KEY_ID,
|
159 |
-
);
|
160 |
-
|
161 |
-
$sms = Mage::helper('euromsg/sms');
|
162 |
-
if($sms->isEnabled() && $sms->getGsmAttribute()){
|
163 |
-
$columns[self::CUSTOMER_ATTR_PREFIX . $sms->getGsmAttribute()] = Numerno_Euromsg_Model_Sms::COL_GSM_NO;
|
164 |
-
}
|
165 |
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
-
return $
|
171 |
}
|
172 |
|
173 |
/**
|
@@ -187,21 +179,19 @@ class Numerno_Euromsg_Helper_Data extends Mage_Core_Helper_Abstract
|
|
187 |
*/
|
188 |
public function getPresetCustomerAttributes()
|
189 |
{
|
190 |
-
$
|
191 |
|
192 |
-
|
193 |
'__empty' => Mage::helper('euromsg')->__('Select an attribute...'),
|
194 |
'subscriber_id' => Mage::helper('euromsg')->__('Subscriber ID'),
|
195 |
'subscriber_email' => Mage::helper('euromsg')->__('Subscriber Email'),
|
196 |
-
$
|
197 |
-
$
|
198 |
-
$
|
199 |
-
$
|
200 |
-
$
|
201 |
-
$
|
202 |
);
|
203 |
-
|
204 |
-
return $attributes;
|
205 |
}
|
206 |
|
207 |
/**
|
@@ -211,10 +201,9 @@ class Numerno_Euromsg_Helper_Data extends Mage_Core_Helper_Abstract
|
|
211 |
*/
|
212 |
public function getDisabledCustomerAttributes()
|
213 |
{
|
214 |
-
return array('confirmation', 'default_billing', 'default_shipping', 'disable_auto_group_change',
|
215 |
'password_hash', 'reward_update_notification', 'reward_warning_notification', 'rp_token',
|
216 |
'rp_token_created_at', 'store_id', 'website_id');
|
217 |
-
|
218 |
}
|
219 |
|
220 |
/**
|
@@ -225,15 +214,153 @@ class Numerno_Euromsg_Helper_Data extends Mage_Core_Helper_Abstract
|
|
225 |
public function getPresetProductAttributes()
|
226 |
{
|
227 |
return array(
|
228 |
-
'entity_id'
|
229 |
-
'_url'
|
230 |
-
'_attribute_set'=> Mage::helper('euromsg')->__('Attribute Set'),
|
231 |
-
'_type'
|
232 |
-
'qty'
|
233 |
-
'is_in_stock'
|
234 |
-
'_root_category'=> Mage::helper('euromsg')->__('Root Category'),
|
235 |
-
'_category'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
}
|
238 |
|
239 |
/**
|
@@ -245,29 +372,33 @@ class Numerno_Euromsg_Helper_Data extends Mage_Core_Helper_Abstract
|
|
245 |
*/
|
246 |
public function wrapFiles($filename, $files)
|
247 |
{
|
248 |
-
if(!is_array($files))
|
249 |
return false;
|
|
|
250 |
|
251 |
$destination = tempnam(sys_get_temp_dir(), $filename . '.zip');
|
252 |
|
253 |
$zip = new ZipArchive();
|
254 |
$zip->open($destination, ZipArchive::CREATE);
|
|
|
255 |
foreach ($files as $name => $file) {
|
256 |
$zip->addFile($file, $name);
|
257 |
}
|
|
|
258 |
$zip->close();
|
|
|
259 |
foreach ($files as $file) {
|
260 |
//unlink($file);
|
261 |
}
|
262 |
-
|
|
|
263 |
$connection = $this->getSftpConnection();
|
264 |
$connection->write($filename . '.zip', file_get_contents($destination));
|
265 |
$connection->close();
|
|
|
266 |
//unlink($destination);
|
267 |
}
|
268 |
|
269 |
return true;
|
270 |
}
|
271 |
-
|
272 |
-
|
273 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
49 |
/**
|
50 |
* Retrieve store config
|
51 |
*
|
52 |
+
* @param string $path
|
53 |
+
* @param string $section
|
54 |
+
* $param int $store Store ID
|
55 |
*
|
56 |
* @return string
|
57 |
*/
|
58 |
+
public function getConfigData($path, $section = null, $store = null)
|
59 |
{
|
60 |
+
if (!is_null($section)) {
|
61 |
+
$section = '_' . $section;
|
62 |
+
}
|
63 |
+
|
64 |
+
return Mage::getStoreConfig("euromsg$section/$path");
|
65 |
}
|
66 |
|
67 |
/**
|
68 |
+
* Validate Customer GSM Number string
|
69 |
*
|
70 |
+
* @param string $string
|
71 |
*
|
72 |
+
* @return bool
|
73 |
*/
|
74 |
+
public function validateGsmNumber($string)
|
75 |
{
|
76 |
+
$validPrefixes = array('530', '531', '532', '533', '534', '535', '536', '537', '538', '539', '540', '541',
|
77 |
+
'542', '543', '544', '545', '546', '547', '548', '549', '500', '501', '502', '503', '504', '505', '506',
|
78 |
+
'507', '508', '509', '550', '551', '552', '553', '554', '555', '556', '557', '558', '559');
|
79 |
+
|
80 |
+
$numeric = preg_replace("[^0-9]", "", $string) / 1;
|
81 |
+
|
82 |
+
return preg_match('~(?=.*[0-9])^(90|0|)((' . implode('|', $validPrefixes) . ')(.*))[0-9]{7}$~', $numeric);
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
+
* Validate Data Warehouse Table Name
|
87 |
*
|
88 |
+
* @param string $tableName
|
89 |
+
*
|
90 |
+
* @return bool
|
91 |
*/
|
92 |
+
public function validateTableName($tableName)
|
93 |
{
|
94 |
+
return preg_match('~^[A-Za-z][\w]{1,254}$~', $tableName);
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
|
97 |
/**
|
98 |
+
* Filter Customer GSM Number string
|
99 |
*
|
100 |
+
* @param string $string
|
101 |
+
*
|
102 |
+
* @return bool
|
103 |
*/
|
104 |
+
public function filterGsmNumber($string)
|
105 |
{
|
106 |
+
if (!$this->validateGsmNumber($string)) {
|
107 |
+
return false;
|
108 |
+
}
|
|
|
|
|
109 |
|
110 |
+
$numeric = preg_replace("[^0-9]", "", $string) / 1;
|
111 |
+
if (strlen($numeric) == 10) {
|
112 |
+
$numeric = '90' . $numeric;
|
113 |
+
}
|
114 |
+
|
115 |
+
return $numeric;
|
116 |
}
|
117 |
|
118 |
/**
|
119 |
+
* Retrieve SMS Permission of Customer by ID
|
120 |
*
|
121 |
+
* @param int $customerId
|
122 |
+
*
|
123 |
+
* @return bool
|
124 |
*/
|
125 |
+
public function getSMSPermit($customerId) {
|
|
|
|
|
|
|
126 |
|
127 |
+
$enabled = $this->getConfigData('general/enabled', 'sms');
|
128 |
+
if ($enabled) {
|
129 |
+
$gsmNumberAttribute = $this->getConfigData('general/attribute', 'sms');
|
130 |
+
if ($gsmNumberAttribute) {
|
131 |
+
$smsPermitAttribute = Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE;
|
132 |
+
$customerCollection = Mage::getResourceModel('customer/customer_collection')
|
133 |
+
->addAttributeToFilter('entity_id', $customerId)
|
134 |
+
->addAttributeToSelect($smsPermitAttribute)
|
135 |
+
->addAttributeToSelect($gsmNumberAttribute);
|
136 |
|
137 |
+
$customer = $customerCollection->getFirstItem();
|
138 |
+
if ($customer->getData($smsPermitAttribute)){
|
139 |
|
140 |
+
return $this->validateGsmNumber($customer->getData($gsmNumberAttribute));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
}
|
143 |
}
|
|
|
|
|
144 |
|
145 |
+
return false;
|
146 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
+
/**
|
149 |
+
* Prepare sFTP Connection
|
150 |
+
*
|
151 |
+
* @return Numerno_Euromsg_Model_Io_Sftp
|
152 |
+
*/
|
153 |
+
public function getSftpConnection()
|
154 |
+
{
|
155 |
+
$connection = new Varien_Io_Sftp();
|
156 |
+
$connection->open(array(
|
157 |
+
'host' => $this->getConfigData("dwh/sftp_host"),
|
158 |
+
'username' => $this->getConfigData("dwh/sftp_user"),
|
159 |
+
'password' => $this->getConfigData("dwh/sftp_pass")
|
160 |
+
));
|
161 |
|
162 |
+
return $connection;
|
163 |
}
|
164 |
|
165 |
/**
|
179 |
*/
|
180 |
public function getPresetCustomerAttributes()
|
181 |
{
|
182 |
+
$prefix = self::CUSTOMER_ATTR_PREFIX;
|
183 |
|
184 |
+
return array(
|
185 |
'__empty' => Mage::helper('euromsg')->__('Select an attribute...'),
|
186 |
'subscriber_id' => Mage::helper('euromsg')->__('Subscriber ID'),
|
187 |
'subscriber_email' => Mage::helper('euromsg')->__('Subscriber Email'),
|
188 |
+
$prefix . 'entity_id' => Mage::helper('euromsg')->__('Customer ID'),
|
189 |
+
$prefix . 'last_login' => Mage::helper('euromsg')->__('Customer Last Web Login At'),
|
190 |
+
$prefix . 'last_order' => Mage::helper('euromsg')->__('Customer Last Order Created At'),
|
191 |
+
$prefix . 'orders_total' => Mage::helper('euromsg')->__('Customer Total Amount of Orders'),
|
192 |
+
$prefix . 'fav_category' => Mage::helper('euromsg')->__('Customer Most Ordered Category'),
|
193 |
+
$prefix . 'group' => Mage::helper('euromsg')->__('Customer Group (group name)')
|
194 |
);
|
|
|
|
|
195 |
}
|
196 |
|
197 |
/**
|
201 |
*/
|
202 |
public function getDisabledCustomerAttributes()
|
203 |
{
|
204 |
+
return array('email', 'confirmation', 'default_billing', 'default_shipping', 'disable_auto_group_change',
|
205 |
'password_hash', 'reward_update_notification', 'reward_warning_notification', 'rp_token',
|
206 |
'rp_token_created_at', 'store_id', 'website_id');
|
|
|
207 |
}
|
208 |
|
209 |
/**
|
214 |
public function getPresetProductAttributes()
|
215 |
{
|
216 |
return array(
|
217 |
+
'entity_id' => Mage::helper('euromsg')->__('Product ID (entity_id)'),
|
218 |
+
'_url' => Mage::helper('euromsg')->__('Product URL'),
|
219 |
+
'_attribute_set' => Mage::helper('euromsg')->__('Attribute Set'),
|
220 |
+
'_type' => Mage::helper('euromsg')->__('Product Type'),
|
221 |
+
'qty' => Mage::helper('euromsg')->__('Qty'),
|
222 |
+
'is_in_stock' => Mage::helper('euromsg')->__('Stock Status'),
|
223 |
+
'_root_category' => Mage::helper('euromsg')->__('Root Category'),
|
224 |
+
'_category' => Mage::helper('euromsg')->__('Category (first, with tree)')
|
225 |
+
);
|
226 |
+
}
|
227 |
+
|
228 |
+
protected function _getDataTypeByColumn($column)
|
229 |
+
{
|
230 |
+
if (preg_match("/(char|text)/", $column['DATA_TYPE'])) {
|
231 |
+
|
232 |
+
$length = $column['LENGTH'];
|
233 |
+
if (is_null($length) || $length > 255) {
|
234 |
+
|
235 |
+
return 'string(1024)';
|
236 |
+
} else {
|
237 |
+
|
238 |
+
return "string($length)";
|
239 |
+
}
|
240 |
+
}
|
241 |
+
elseif (preg_match("/(int|bit|blob|binary)/", $column['DATA_TYPE'])) {
|
242 |
+
|
243 |
+
return 'int';
|
244 |
+
}
|
245 |
+
elseif (preg_match("/(float|double|decimal)/", $column['DATA_TYPE'])) {
|
246 |
+
|
247 |
+
return 'float';
|
248 |
+
}
|
249 |
+
elseif (preg_match("/(date|time|year)/", $column['DATA_TYPE'])) {
|
250 |
+
|
251 |
+
return 'datetime';
|
252 |
+
}
|
253 |
+
|
254 |
+
return 'string(1024)';
|
255 |
+
}
|
256 |
+
|
257 |
+
protected function _getDataTypeByAttribute($attribute)
|
258 |
+
{
|
259 |
+
if(in_array($attribute->getFrontendInput(), array('select', 'multiselect'))) {
|
260 |
+
|
261 |
+
return 'int';
|
262 |
+
}
|
263 |
+
|
264 |
+
$backendType = $attribute->getBackendType();
|
265 |
+
$types = array(
|
266 |
+
'varchar' => 'string(255)',
|
267 |
+
'text' => 'string(1024)',
|
268 |
+
'decimal' => 'float',
|
269 |
+
'int' => 'int',
|
270 |
+
'datetime' => 'datetime'
|
271 |
+
);
|
272 |
+
if (isset($types[$backendType])) {
|
273 |
+
|
274 |
+
return $types[$backendType];
|
275 |
+
}
|
276 |
+
|
277 |
+
return 'string(1024)';
|
278 |
+
}
|
279 |
+
|
280 |
+
public function getProductEntityDataTypes($attributeCodes = array())
|
281 |
+
{
|
282 |
+
//preset attributes data types
|
283 |
+
$dataTypes = array(
|
284 |
+
'entity_id' => 'int',
|
285 |
+
'_url' => 'string(1024)',
|
286 |
+
'_attribute_set' => 'string(255)',
|
287 |
+
'_type' => 'string(255)',
|
288 |
+
'qty' => 'float',
|
289 |
+
'is_in_stock' => 'int',
|
290 |
+
'_root_category' => 'string(255)',
|
291 |
+
'_category' => 'string(1024)'
|
292 |
+
);
|
293 |
+
|
294 |
+
$columns = Mage::getSingleton('core/resource')
|
295 |
+
->getConnection('read')
|
296 |
+
->describeTable(Mage::getSingleton('core/resource')->getTableName('catalog/product'));
|
297 |
+
|
298 |
+
foreach($columns as $columnName => $column) {
|
299 |
+
$dataTypes[self::CUSTOMER_ATTR_PREFIX . $columnName] = $this->_getDataTypeByColumn($column);
|
300 |
+
}
|
301 |
+
|
302 |
+
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
|
303 |
+
->setEntityTypeFilter(Mage::getSingleton('eav/config')->getEntityType('catalog_product'))
|
304 |
+
->setCodeFilter($attributeCodes);
|
305 |
+
|
306 |
+
foreach ($attributes as $attribute) {
|
307 |
+
$dataTypes[$attribute->getAttributeCode()] = $this->_getDataTypeByAttribute($attribute);
|
308 |
+
}
|
309 |
+
|
310 |
+
$overwriteTypes = array(
|
311 |
+
'image' => 'string(1024)',
|
312 |
+
'smallimage' => 'string(1024)',
|
313 |
+
'thumbnail' => 'string(1024)'
|
314 |
);
|
315 |
+
|
316 |
+
return array_merge($dataTypes, $overwriteTypes);
|
317 |
+
}
|
318 |
+
|
319 |
+
public function getCustomerEntityDataTypes($attributeCodes = array())
|
320 |
+
{
|
321 |
+
$prefix = self::CUSTOMER_ATTR_PREFIX;
|
322 |
+
|
323 |
+
//preset attributes data types
|
324 |
+
$dataTypes = array(
|
325 |
+
'entity_id' => 'int',
|
326 |
+
'subscriber_id' => 'int',
|
327 |
+
'subscriber_email' => null,
|
328 |
+
$prefix . 'last_login' => 'datetime',
|
329 |
+
$prefix . 'last_order' => 'datetime',
|
330 |
+
$prefix . 'orders_total' => 'float',
|
331 |
+
$prefix . 'fav_category' => 'string(255)',
|
332 |
+
$prefix . 'group' => 'string(32)'
|
333 |
+
);
|
334 |
+
|
335 |
+
$columns = Mage::getSingleton('core/resource')
|
336 |
+
->getConnection('read')
|
337 |
+
->describeTable(Mage::getSingleton('core/resource')->getTableName('customer/entity'));
|
338 |
+
|
339 |
+
foreach($columns as $columnName => $column) {
|
340 |
+
$dataTypes[self::CUSTOMER_ATTR_PREFIX . $columnName] = $this->_getDataTypeByColumn($column);
|
341 |
+
}
|
342 |
+
|
343 |
+
$attributes = Mage::getModel('customer/entity_attribute_collection')
|
344 |
+
->setCodeFilter($attributeCodes);
|
345 |
+
|
346 |
+
foreach ($attributes as $attribute) {
|
347 |
+
$dataTypes[$attribute->getAttributeCode()] = $this->_getDataTypeByAttribute($attribute);
|
348 |
+
}
|
349 |
+
|
350 |
+
return $dataTypes;
|
351 |
+
}
|
352 |
+
|
353 |
+
public function removeCustomerPrefix($data)
|
354 |
+
{
|
355 |
+
if (is_array($data)) {
|
356 |
+
foreach($data as $key => $row) {
|
357 |
+
$data[$key] = preg_replace('/^' . self::CUSTOMER_ATTR_PREFIX . '/', '', $row);
|
358 |
+
}
|
359 |
+
|
360 |
+
return $data;
|
361 |
+
}
|
362 |
+
|
363 |
+
return preg_replace('/^' . self::CUSTOMER_ATTR_PREFIX . '/', '', $data);
|
364 |
}
|
365 |
|
366 |
/**
|
372 |
*/
|
373 |
public function wrapFiles($filename, $files)
|
374 |
{
|
375 |
+
if (!is_array($files)) {
|
376 |
return false;
|
377 |
+
}
|
378 |
|
379 |
$destination = tempnam(sys_get_temp_dir(), $filename . '.zip');
|
380 |
|
381 |
$zip = new ZipArchive();
|
382 |
$zip->open($destination, ZipArchive::CREATE);
|
383 |
+
|
384 |
foreach ($files as $name => $file) {
|
385 |
$zip->addFile($file, $name);
|
386 |
}
|
387 |
+
|
388 |
$zip->close();
|
389 |
+
|
390 |
foreach ($files as $file) {
|
391 |
//unlink($file);
|
392 |
}
|
393 |
+
|
394 |
+
if (file_exists($destination)) {
|
395 |
$connection = $this->getSftpConnection();
|
396 |
$connection->write($filename . '.zip', file_get_contents($destination));
|
397 |
$connection->close();
|
398 |
+
|
399 |
//unlink($destination);
|
400 |
}
|
401 |
|
402 |
return true;
|
403 |
}
|
|
|
|
|
404 |
}
|
app/code/local/Numerno/Euromsg/Helper/Sms.php
DELETED
@@ -1,96 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* PostSms Service Helper
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Helper_Sms extends Mage_Core_Helper_Abstract
|
39 |
-
{
|
40 |
-
|
41 |
-
public function getStoreConfig($path)
|
42 |
-
{
|
43 |
-
|
44 |
-
return Mage::getStoreConfig('euromsg_sms/' . $path);
|
45 |
-
}
|
46 |
-
|
47 |
-
public function getOriginator()
|
48 |
-
{
|
49 |
-
|
50 |
-
return $this->getStoreConfig('general/originator');
|
51 |
-
}
|
52 |
-
|
53 |
-
public function isEnabled()
|
54 |
-
{
|
55 |
-
|
56 |
-
return $this->getStoreConfig('general/enabled');
|
57 |
-
}
|
58 |
-
|
59 |
-
public function getGsmAttribute()
|
60 |
-
{
|
61 |
-
$attributeCode = $this->getStoreConfig('general/attribute');
|
62 |
-
|
63 |
-
if(strlen($attributeCode)) {
|
64 |
-
$attribute = Mage::getSingleton('eav/config')->getAttribute('customer', $attributeCode);
|
65 |
-
|
66 |
-
if($attribute->getAttributeId())
|
67 |
-
return $attributeCode;
|
68 |
-
}
|
69 |
-
|
70 |
-
return false;
|
71 |
-
}
|
72 |
-
|
73 |
-
public function validateGsmNumber($string)
|
74 |
-
{
|
75 |
-
$numbersOnly = preg_replace("[^0-9]", "", $string) / 1;
|
76 |
-
$numberOfDigits = strlen($numbersOnly);
|
77 |
-
if( ($numberOfDigits == 10 && substr($numbersOnly, 0, 1) == '5') ||
|
78 |
-
($numberOfDigits == 12 && in_array(substr($numbersOnly, 0, 4), array('9050', '9053', '9054', '9055'))) ){
|
79 |
-
|
80 |
-
return true;
|
81 |
-
}
|
82 |
-
return false;
|
83 |
-
}
|
84 |
-
|
85 |
-
public function filterGsmNumber($string)
|
86 |
-
{
|
87 |
-
$numbersOnly = preg_replace("[^0-9]", "", $string) / 1;
|
88 |
-
if(strlen($numbersOnly) == 10 && substr($numbersOnly, 0, 1) == '5')
|
89 |
-
$numbersOnly = '90' . $numbersOnly;
|
90 |
-
|
91 |
-
if(strlen($numbersOnly) == 12 && in_array(substr($numbersOnly, 0, 4), array('9050', '9053', '9054', '9055')))
|
92 |
-
return (string) $numbersOnly;
|
93 |
-
|
94 |
-
return false;
|
95 |
-
}
|
96 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/Model/Core/Email.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -37,23 +40,21 @@
|
|
37 |
*/
|
38 |
class Numerno_Euromsg_Model_Core_Email extends Mage_Core_Model_Email
|
39 |
{
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
$_helper = Mage::helper('euromsg/post');
|
44 |
-
|
45 |
// If it's not enabled, just return the parent result.
|
46 |
-
if (
|
|
|
47 |
return parent::send();
|
48 |
}
|
49 |
|
50 |
if (Mage::getStoreConfigFlag('system/smtp/disable')) {
|
|
|
51 |
return $this;
|
52 |
}
|
53 |
|
54 |
-
$mail = Mage::getModel('euromsg/mail')
|
55 |
-
|
56 |
-
$mail->setBody($this->getBody())
|
57 |
->addTo($this->getToEmail(), $this->getToName())
|
58 |
->setSubject($this->getSubject());
|
59 |
|
@@ -62,7 +63,6 @@ class Numerno_Euromsg_Model_Core_Email extends Mage_Core_Model_Email
|
|
62 |
'email' => $this
|
63 |
));
|
64 |
|
65 |
-
//try catch return parent or queue
|
66 |
$mail->send();
|
67 |
|
68 |
Mage::dispatchEvent('numerno_euromsg_send_after', array(
|
@@ -70,6 +70,7 @@ class Numerno_Euromsg_Model_Core_Email extends Mage_Core_Model_Email
|
|
70 |
'subject' => $this->getSubject(),
|
71 |
'template' => "n/a",
|
72 |
'body' => $this->getBody()));
|
|
|
73 |
return $this;
|
74 |
}
|
75 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
40 |
*/
|
41 |
class Numerno_Euromsg_Model_Core_Email extends Mage_Core_Model_Email
|
42 |
{
|
43 |
+
public function send()
|
44 |
+
{
|
|
|
|
|
|
|
45 |
// If it's not enabled, just return the parent result.
|
46 |
+
if (!Mage::helper('euromsg')->getConfigData('general/enabled', 'trx')) {
|
47 |
+
|
48 |
return parent::send();
|
49 |
}
|
50 |
|
51 |
if (Mage::getStoreConfigFlag('system/smtp/disable')) {
|
52 |
+
|
53 |
return $this;
|
54 |
}
|
55 |
|
56 |
+
$mail = Mage::getModel('euromsg/mail')
|
57 |
+
->setBody($this->getBody())
|
|
|
58 |
->addTo($this->getToEmail(), $this->getToName())
|
59 |
->setSubject($this->getSubject());
|
60 |
|
63 |
'email' => $this
|
64 |
));
|
65 |
|
|
|
66 |
$mail->send();
|
67 |
|
68 |
Mage::dispatchEvent('numerno_euromsg_send_after', array(
|
70 |
'subject' => $this->getSubject(),
|
71 |
'template' => "n/a",
|
72 |
'body' => $this->getBody()));
|
73 |
+
|
74 |
return $this;
|
75 |
}
|
76 |
}
|
app/code/local/Numerno/Euromsg/Model/Core/Email/Queue.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -39,10 +42,9 @@ class Numerno_Euromsg_Model_Core_Email_Queue extends Mage_Core_Model_Email_Queue
|
|
39 |
|
40 |
public function send()
|
41 |
{
|
42 |
-
$_helper = Mage::helper('euromsg/post');
|
43 |
-
|
44 |
// If it's not enabled, just return the parent result.
|
45 |
-
if (
|
|
|
46 |
return parent::send();
|
47 |
}
|
48 |
|
@@ -59,15 +61,19 @@ class Numerno_Euromsg_Model_Core_Email_Queue extends Mage_Core_Model_Email_Queue
|
|
59 |
$parameters = new Varien_Object($message->getMessageParameters());
|
60 |
|
61 |
$mailer = Mage::getModel('euromsg/mail');
|
62 |
-
if($message->getEventType())
|
63 |
$mailer->template = $message->getEventType();
|
|
|
64 |
|
65 |
foreach ($message->getRecipients() as $recipient) {
|
|
|
66 |
list($email, $name, $type) = $recipient;
|
|
|
67 |
switch ($type) {
|
68 |
case self::EMAIL_TYPE_BCC:
|
69 |
$mailer->addBcc($email, '=?utf-8?B?' . base64_encode($name) . '?=');
|
70 |
break;
|
|
|
71 |
case self::EMAIL_TYPE_TO:
|
72 |
case self::EMAIL_TYPE_CC:
|
73 |
default:
|
@@ -92,12 +98,11 @@ class Numerno_Euromsg_Model_Core_Email_Queue extends Mage_Core_Model_Email_Queue
|
|
92 |
}
|
93 |
catch (Exception $e) {
|
94 |
|
95 |
-
//TODO add system notification if this goes for over x minutes
|
96 |
unset($mailer);
|
97 |
-
$
|
98 |
Mage::setIsDeveloperMode(true);
|
99 |
Mage::logException($e);
|
100 |
-
Mage::setIsDeveloperMode($
|
101 |
|
102 |
return false;
|
103 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
42 |
|
43 |
public function send()
|
44 |
{
|
|
|
|
|
45 |
// If it's not enabled, just return the parent result.
|
46 |
+
if (!Mage::helper('euromsg')->getConfigData('general/enabled', 'trx')) {
|
47 |
+
|
48 |
return parent::send();
|
49 |
}
|
50 |
|
61 |
$parameters = new Varien_Object($message->getMessageParameters());
|
62 |
|
63 |
$mailer = Mage::getModel('euromsg/mail');
|
64 |
+
if ($message->getEventType()) {
|
65 |
$mailer->template = $message->getEventType();
|
66 |
+
}
|
67 |
|
68 |
foreach ($message->getRecipients() as $recipient) {
|
69 |
+
|
70 |
list($email, $name, $type) = $recipient;
|
71 |
+
|
72 |
switch ($type) {
|
73 |
case self::EMAIL_TYPE_BCC:
|
74 |
$mailer->addBcc($email, '=?utf-8?B?' . base64_encode($name) . '?=');
|
75 |
break;
|
76 |
+
|
77 |
case self::EMAIL_TYPE_TO:
|
78 |
case self::EMAIL_TYPE_CC:
|
79 |
default:
|
98 |
}
|
99 |
catch (Exception $e) {
|
100 |
|
|
|
101 |
unset($mailer);
|
102 |
+
$tmpDevMode = Mage::getIsDeveloperMode();
|
103 |
Mage::setIsDeveloperMode(true);
|
104 |
Mage::logException($e);
|
105 |
+
Mage::setIsDeveloperMode($tmpDevMode);
|
106 |
|
107 |
return false;
|
108 |
}
|
app/code/local/Numerno/Euromsg/Model/Core/Email/Template.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -40,18 +43,17 @@ class Numerno_Euromsg_Model_Core_Email_Template extends Mage_Core_Model_Email_Te
|
|
40 |
|
41 |
public function getMail()
|
42 |
{
|
43 |
-
|
44 |
-
$_helper = Mage::helper('euromsg/post');
|
45 |
-
|
46 |
// If it's not enabled, just return the parent result.
|
47 |
-
if (
|
|
|
48 |
return parent::getMail();
|
49 |
}
|
50 |
|
51 |
$_mail = Mage::getModel('euromsg/mail');
|
52 |
|
53 |
-
if($this->getTemplateId())
|
54 |
$_mail->template = $this->getTemplateId();
|
|
|
55 |
|
56 |
return $_mail;
|
57 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
43 |
|
44 |
public function getMail()
|
45 |
{
|
|
|
|
|
|
|
46 |
// If it's not enabled, just return the parent result.
|
47 |
+
if (!Mage::helper('euromsg')->getConfigData('general/enabled', 'trx')) {
|
48 |
+
|
49 |
return parent::getMail();
|
50 |
}
|
51 |
|
52 |
$_mail = Mage::getModel('euromsg/mail');
|
53 |
|
54 |
+
if ($this->getTemplateId()) {
|
55 |
$_mail->template = $this->getTemplateId();
|
56 |
+
}
|
57 |
|
58 |
return $_mail;
|
59 |
}
|
app/code/local/Numerno/Euromsg/Model/Cron.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -44,28 +47,32 @@ class Numerno_Euromsg_Model_Cron
|
|
44 |
*/
|
45 |
public function syncCustomerData()
|
46 |
{
|
47 |
-
|
|
|
|
|
|
|
|
|
48 |
$tableName = Mage::getStoreConfig('euromsg_customer/general/filename');
|
49 |
|
50 |
-
|
51 |
-
if (!$validatorTableName->isValid($tableName)) {
|
52 |
$session->addError(
|
53 |
-
Mage::helper('euromsg')->__('Default data warehouse table name is invalid. Please use only '
|
54 |
-
. 'letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a'
|
55 |
-
. ' letter.')
|
56 |
);
|
57 |
}
|
|
|
58 |
$process = Mage::getModel('euromsg/process')
|
59 |
->setTableName($tableName)
|
60 |
->setType('member');
|
|
|
61 |
try {
|
62 |
-
//
|
63 |
$process->export(true);
|
64 |
|
65 |
$session->addSuccess(
|
66 |
Mage::helper('euromsg')->__('All member data successfully exported to euro.message platform.')
|
67 |
);
|
68 |
-
}
|
|
|
69 |
$session->addError(
|
70 |
$e->getMessage()
|
71 |
);
|
@@ -81,101 +88,119 @@ class Numerno_Euromsg_Model_Cron
|
|
81 |
*/
|
82 |
public function syncCatalogData()
|
83 |
{
|
84 |
-
|
85 |
-
|
|
|
86 |
|
87 |
-
|
|
|
|
|
|
|
88 |
|
89 |
Mage::app()->setCurrentStore($store->getId());
|
90 |
|
91 |
-
$tableName = Mage::
|
92 |
-
|
93 |
-
if (!$validatorTableName->isValid($tableName)) {
|
94 |
$session->addError(
|
95 |
-
Mage::helper('euromsg')->__('Default data warehouse table name is invalid. Please use only '
|
96 |
-
. 'letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a'
|
97 |
-
. ' letter.')
|
98 |
);
|
99 |
}
|
|
|
100 |
$process = Mage::getModel('euromsg/process')
|
101 |
->setTableName($tableName)
|
|
|
102 |
->setType('product');
|
|
|
103 |
try {
|
104 |
-
//
|
105 |
$process->export(true);
|
106 |
|
107 |
$session->addSuccess(
|
108 |
Mage::helper('euromsg')->__('All product data successfully exported to euro.message platform.')
|
109 |
);
|
110 |
-
}
|
|
|
111 |
$session->addError(
|
112 |
$e->getMessage()
|
113 |
);
|
114 |
}
|
115 |
|
116 |
}
|
117 |
-
Mage::app()->setCurrentStore($
|
118 |
|
119 |
return true;
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
-
*
|
124 |
*
|
125 |
* @return bool
|
126 |
*/
|
127 |
-
public function
|
128 |
{
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
132 |
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
-
}
|
137 |
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
|
141 |
/**
|
142 |
-
*
|
143 |
*
|
144 |
* @return bool
|
145 |
*/
|
146 |
-
public function
|
147 |
{
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
if($helper->getStoreConfig('/feedback/delete_after'))
|
163 |
-
$con->rm($file['id']);
|
164 |
-
}
|
165 |
-
}
|
166 |
-
} elseif($helper->getStoreConfig('/feedback/destination') == 'local') {
|
167 |
-
$dir = Mage::getBaseDir() . Mage::helper('euromsg')->getStoreConfig('/feedback/local_dir');
|
168 |
-
$dircontents = scandir($dir);
|
169 |
-
foreach ($dircontents as $file) {
|
170 |
-
$extension = pathinfo($file, PATHINFO_EXTENSION);
|
171 |
-
if ($extension == 'zip') {
|
172 |
-
$helper->processFeedbackZip($dir . DS . $file);
|
173 |
-
if($helper->getStoreConfig('/feedback/delete_after'))
|
174 |
-
unlink($dir . DS . $file);
|
175 |
-
}
|
176 |
-
}
|
177 |
-
}
|
178 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
180 |
|
181 |
/**
|
@@ -185,25 +210,25 @@ class Numerno_Euromsg_Model_Cron
|
|
185 |
*/
|
186 |
public function cleanMailLogs()
|
187 |
{
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
if($clean) {
|
192 |
-
$logs = Mage::getModel('euromsg/mail_log')->getCollection();
|
193 |
-
|
194 |
-
$keep = $helper->getStoreConfig('log/keeplogs');
|
195 |
-
if($keep) {
|
196 |
-
$date = date('Y-m-d H:i:s', strtotime("-$keep days"));
|
197 |
-
} else {
|
198 |
-
$date = date('Y-m-d H:i:s');
|
199 |
-
}
|
200 |
|
201 |
-
|
|
|
202 |
|
203 |
-
|
204 |
-
|
|
|
205 |
|
|
|
|
|
|
|
|
|
|
|
206 |
}
|
|
|
|
|
207 |
}
|
208 |
|
209 |
/**
|
@@ -213,36 +238,36 @@ class Numerno_Euromsg_Model_Cron
|
|
213 |
*/
|
214 |
public function trackMailDelivery()
|
215 |
{
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
if(
|
220 |
-
|
221 |
-
|
222 |
-
$client->_login();
|
223 |
-
|
224 |
-
$service = $client->getPostService();
|
225 |
-
$logs = Mage::getModel('euromsg/mail_log')->getCollection()
|
226 |
-
->addFieldToFilter('post_id', array('notnull' => true))
|
227 |
-
->addFieldToFilter('delivery_relay_status', array(array('neq' => 'D'), array('null' => true)));
|
228 |
|
229 |
-
|
|
|
|
|
|
|
230 |
|
231 |
-
|
232 |
-
if($post->getDeliveryRelayStatus() != $status->RelayStatus) {
|
233 |
|
234 |
-
|
235 |
|
236 |
-
|
237 |
-
|
238 |
-
->setUndeliveryReason($status->UndeliveryReason);
|
239 |
-
}
|
240 |
|
241 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
}
|
|
|
243 |
}
|
244 |
-
|
245 |
-
$client->_logout();
|
246 |
}
|
247 |
}
|
248 |
|
@@ -251,15 +276,75 @@ class Numerno_Euromsg_Model_Cron
|
|
251 |
*
|
252 |
* @return bool
|
253 |
*/
|
254 |
-
public function
|
255 |
{
|
256 |
-
if(Mage::helper('euromsg
|
257 |
-
|
258 |
-
|
259 |
|
260 |
-
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
}
|
263 |
}
|
264 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
47 |
*/
|
48 |
public function syncCustomerData()
|
49 |
{
|
50 |
+
if (!Mage::helper('euromsg')->getConfigData('general/autosync', 'customer')) {
|
51 |
+
return true;
|
52 |
+
}
|
53 |
+
|
54 |
+
$session = Mage::getSingleton('adminhtml/session');
|
55 |
$tableName = Mage::getStoreConfig('euromsg_customer/general/filename');
|
56 |
|
57 |
+
if (!Mage::helper('euromsg')->validateTableName($tableName)) {
|
|
|
58 |
$session->addError(
|
59 |
+
Mage::helper('euromsg')->__('Default data warehouse table name is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')
|
|
|
|
|
60 |
);
|
61 |
}
|
62 |
+
|
63 |
$process = Mage::getModel('euromsg/process')
|
64 |
->setTableName($tableName)
|
65 |
->setType('member');
|
66 |
+
|
67 |
try {
|
68 |
+
//TODO: use constant
|
69 |
$process->export(true);
|
70 |
|
71 |
$session->addSuccess(
|
72 |
Mage::helper('euromsg')->__('All member data successfully exported to euro.message platform.')
|
73 |
);
|
74 |
+
}
|
75 |
+
catch(Exception $e) {
|
76 |
$session->addError(
|
77 |
$e->getMessage()
|
78 |
);
|
88 |
*/
|
89 |
public function syncCatalogData()
|
90 |
{
|
91 |
+
if (!Mage::helper('euromsg')->getConfigData('general/autosync', 'catalog')) {
|
92 |
+
return true;
|
93 |
+
}
|
94 |
|
95 |
+
$session = Mage::getSingleton('adminhtml/session');
|
96 |
+
$currentStoreId = Mage::app()->getStore()->getId();
|
97 |
+
|
98 |
+
foreach (Mage::app()->getStores() as $store) {
|
99 |
|
100 |
Mage::app()->setCurrentStore($store->getId());
|
101 |
|
102 |
+
$tableName = Mage::helper('euromsg')->getConfigData('general/filename', 'catalog', $store->getId());
|
103 |
+
if (!Mage::helper('euromsg')->validateTableName($tableName)) {
|
|
|
104 |
$session->addError(
|
105 |
+
Mage::helper('euromsg')->__('Default data warehouse table name is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')
|
|
|
|
|
106 |
);
|
107 |
}
|
108 |
+
|
109 |
$process = Mage::getModel('euromsg/process')
|
110 |
->setTableName($tableName)
|
111 |
+
->setStoreId($store->getId())
|
112 |
->setType('product');
|
113 |
+
|
114 |
try {
|
115 |
+
//TODO: use constant
|
116 |
$process->export(true);
|
117 |
|
118 |
$session->addSuccess(
|
119 |
Mage::helper('euromsg')->__('All product data successfully exported to euro.message platform.')
|
120 |
);
|
121 |
+
}
|
122 |
+
catch(Exception $e) {
|
123 |
$session->addError(
|
124 |
$e->getMessage()
|
125 |
);
|
126 |
}
|
127 |
|
128 |
}
|
129 |
+
Mage::app()->setCurrentStore($currentStoreId);
|
130 |
|
131 |
return true;
|
132 |
}
|
133 |
|
134 |
/**
|
135 |
+
* Sync SMS and Email Unsubscribers
|
136 |
*
|
137 |
* @return bool
|
138 |
*/
|
139 |
+
public function syncUnsubscribers()
|
140 |
{
|
141 |
+
$client = Mage::getSingleton('euromsg/platform');
|
142 |
+
$date = Mage::getModel('core/date');
|
143 |
+
$offset = $date->calculateOffset('Europe/Istanbul');
|
144 |
+
$current = $date->gmtTimestamp() + $offset;
|
145 |
|
146 |
+
$unsubscribers = $client->getUnsubscribers(date('Y-m-d H:i:s', $current - 600), date('Y-m-d H:i:s', $current));
|
147 |
+
foreach($unsubscribers->EmUnsubscriberDetails as $unsubscriber){
|
148 |
+
|
149 |
+
$subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($unsubscriber->Email);
|
150 |
+
if (!$subscriber->getId()){
|
151 |
+
continue;
|
152 |
}
|
|
|
153 |
|
154 |
+
$changedAt = $date->date('Y-m-d H:i:s', strtotime($unsubscriber->UnsubscribeTime) - $offset);
|
155 |
+
switch ($unsubscriber->EmailPermit) {
|
156 |
+
case 'Y':
|
157 |
+
case 'L':
|
158 |
+
$subscriber->setSubscriberStatus($subscriber::STATUS_SUBSCRIBED)
|
159 |
+
->setChangeStatusAt($changedAt)
|
160 |
+
->save();
|
161 |
+
break;
|
162 |
+
case 'N':
|
163 |
+
$subscriber->setSubscriberStatus($subscriber::STATUS_NOT_ACTIVE)
|
164 |
+
->setChangeStatusAt($changedAt)
|
165 |
+
->save();
|
166 |
+
break;
|
167 |
+
case 'X':
|
168 |
+
$subscriber->setSubscriberStatus($subscriber::STATUS_UNSUBSCRIBED)
|
169 |
+
->setChangeStatusAt($changedAt)
|
170 |
+
->save();
|
171 |
+
break;
|
172 |
+
|
173 |
+
}
|
174 |
+
}
|
175 |
}
|
176 |
|
177 |
/**
|
178 |
+
* Run Pending Export Jobs
|
179 |
*
|
180 |
* @return bool
|
181 |
*/
|
182 |
+
public function runAllProcesses()
|
183 |
{
|
184 |
+
if (!Mage::helper('euromsg')->getConfigData('dwh/policy') == Numerno_Euromsg_Model_Process::POLICY_ASYNC) {
|
185 |
+
return true;
|
186 |
+
}
|
187 |
+
|
188 |
+
$collection = Mage::getResourceModel('euromsg/process_collection')
|
189 |
+
->addFieldToFilter('status', 'pending');
|
190 |
+
|
191 |
+
if (!Mage::helper('euromsg')->getConfigData('general/enabled', 'catalog')) {
|
192 |
+
$collection->addFieldToFilter('type', array('neq' => 'product'));
|
193 |
+
}
|
194 |
+
|
195 |
+
if (!Mage::helper('euromsg')->getConfigData('general/enabled', 'customer')) {
|
196 |
+
$collection->addFieldToFilter('type', array('neq' => 'member'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
+
|
199 |
+
foreach ($collection as $process) {
|
200 |
+
$process->export(true);
|
201 |
+
}
|
202 |
+
|
203 |
+
return true;
|
204 |
}
|
205 |
|
206 |
/**
|
210 |
*/
|
211 |
public function cleanMailLogs()
|
212 |
{
|
213 |
+
if (!Mage::helper('euromsg')->getConfigData('log/autosync', 'trx')) {
|
214 |
+
return true;
|
215 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
+
$keepLogs = (int) Mage::helper('euromsg')->getConfigData('log/keeplogs', 'trx');
|
218 |
+
$deleteBefore = date('Y-m-d H:i:s', strtotime("-$keepLogs days"));
|
219 |
|
220 |
+
$logs = Mage::getResourceModel('euromsg/mail_log_collection');
|
221 |
+
$logs->addFieldToSelect($logs->getResource()->getIdFieldName())
|
222 |
+
->addFieldToFilter('send_at', array('lt' => $deleteBefore));
|
223 |
|
224 |
+
if ($logs->count()) {
|
225 |
+
$logs->getConnection()->delete(
|
226 |
+
$logs->getMainTable(),
|
227 |
+
array($logs->getResource()->getIdFieldName() . ' IN (?)' => $logs->getAllIds())
|
228 |
+
);
|
229 |
}
|
230 |
+
|
231 |
+
return true;
|
232 |
}
|
233 |
|
234 |
/**
|
238 |
*/
|
239 |
public function trackMailDelivery()
|
240 |
{
|
241 |
+
if (!Mage::helper('euromsg')->getConfigData('general/enabled', 'trx')) {
|
242 |
+
return true;
|
243 |
+
}
|
244 |
+
if (!Mage::helper('euromsg')->getConfigData('track_delivery/autosync', 'trx')) {
|
245 |
+
return true;
|
246 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
+
$client = Mage::getSingleton('euromsg/platform');
|
249 |
+
$logs = Mage::getResourceModel('euromsg/mail_log_collection')
|
250 |
+
->addFieldToFilter('post_id', array('notnull' => true))
|
251 |
+
->addFieldToFilter('delivery_relay_status', array(array('neq' => 'D'), array('null' => true)));
|
252 |
|
253 |
+
$tracks = $client->trackEmails($logs->getColumnValues('post_id'));
|
|
|
254 |
|
255 |
+
foreach ($tracks->EmPostResult as $trackData) {
|
256 |
|
257 |
+
$post = $logs->getItemByColumnValue('post_id', $trackData->PostID);
|
258 |
+
if ($post) {
|
|
|
|
|
259 |
|
260 |
+
if ($post->getDeliveryRelayStatus() != $trackData->RelayStatus) {
|
261 |
+
$post->setDeliveryRelayStatus($trackData->RelayStatus);
|
262 |
+
} else {
|
263 |
+
continue;
|
264 |
+
}
|
265 |
+
if ($trackData->RelayStatus == 'D') {
|
266 |
+
$post->setDeliveryStatus($trackData->DeliveryStatus)
|
267 |
+
->setUndeliveryReason($trackData->UndeliveryReason);
|
268 |
}
|
269 |
+
$post->save();
|
270 |
}
|
|
|
|
|
271 |
}
|
272 |
}
|
273 |
|
276 |
*
|
277 |
* @return bool
|
278 |
*/
|
279 |
+
public function sendSmsQueue()
|
280 |
{
|
281 |
+
if (!Mage::helper('euromsg')->getConfigData('general/enabled', 'sms')) {
|
282 |
+
return true;
|
283 |
+
}
|
284 |
|
285 |
+
$collection = Mage::getResourceModel('euromsg/sms_collection')
|
286 |
+
->addFieldToFilter('delivery_status', 'P');
|
287 |
+
|
288 |
+
foreach ($collection as $sms) {
|
289 |
+
$sms->_send();
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Track SMS Delivery Status
|
295 |
+
*
|
296 |
+
* @return bool
|
297 |
+
*/
|
298 |
+
public function trackSmsDelivery()
|
299 |
+
{
|
300 |
+
if (!Mage::helper('euromsg')->getConfigData('general/enabled', 'sms')) {
|
301 |
+
return true;
|
302 |
+
}
|
303 |
+
if (!Mage::helper('euromsg')->getConfigData('track_delivery/autosync', 'sms')) {
|
304 |
+
return true;
|
305 |
+
}
|
306 |
+
|
307 |
+
$client = Mage::getSingleton('euromsg/platform');
|
308 |
+
$logs = Mage::getResourceModel('euromsg/sms_collection')
|
309 |
+
->addFieldToFilter('packet_id', array('notnull' => true))
|
310 |
+
->addFieldToFilter('delivery_status', array(array('in' => array('P', 'W')), array('null' => true)));
|
311 |
+
|
312 |
+
foreach ($logs as $sms) {
|
313 |
+
$trackData = $client->trackSMS($sms->getPacketId(), $sms->getType());
|
314 |
+
|
315 |
+
if ($sms->getDeliveryStatus() != $trackData->DeliveryResult) {
|
316 |
+
$sms->setDeliveryStatus($trackData->DeliveryResult)
|
317 |
+
->setDeliveryMessage($trackData->DeliveryDetail)
|
318 |
+
->save();
|
319 |
}
|
320 |
}
|
321 |
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Clean SMS Logs
|
325 |
+
*
|
326 |
+
* @return bool
|
327 |
+
*/
|
328 |
+
public function cleanSmsLogs()
|
329 |
+
{
|
330 |
+
if (!Mage::helper('euromsg')->getConfigData('log/autosync', 'sms')) {
|
331 |
+
return true;
|
332 |
+
}
|
333 |
+
|
334 |
+
$keepLogs = (int) Mage::helper('euromsg')->getConfigData('log/keeplogs', 'sms');
|
335 |
+
$deleteBefore = date('Y-m-d H:i:s', strtotime("-$keepLogs days"));
|
336 |
+
|
337 |
+
$logs = Mage::getResourceModel('euromsg/sms_collection');
|
338 |
+
$logs->addFieldToSelect($logs->getResource()->getIdFieldName())
|
339 |
+
->addFieldToFilter('begin_time', array('lt' => $deleteBefore));
|
340 |
+
|
341 |
+
if ($logs->count()) {
|
342 |
+
$logs->getConnection()->delete(
|
343 |
+
$logs->getMainTable(),
|
344 |
+
array($logs->getResource()->getIdFieldName() . ' IN (?)' => $logs->getAllIds())
|
345 |
+
);
|
346 |
+
}
|
347 |
+
|
348 |
+
return true;
|
349 |
+
}
|
350 |
}
|
app/code/local/Numerno/Euromsg/Model/Export/Adapter/Csv.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -49,8 +52,8 @@ class Numerno_Euromsg_Model_Export_Adapter_Csv extends Mage_ImportExport_Model_E
|
|
49 |
*
|
50 |
* @var string
|
51 |
*/
|
52 |
-
public function getDelimiter()
|
53 |
-
|
54 |
return $this->_delimiter;
|
55 |
}
|
56 |
|
@@ -61,19 +64,21 @@ class Numerno_Euromsg_Model_Export_Adapter_Csv extends Mage_ImportExport_Model_E
|
|
61 |
*
|
62 |
* @return Numerno_Euromsg_Model_Export_Adapter_Csv
|
63 |
*/
|
64 |
-
public function setDestination($destination)
|
65 |
-
|
66 |
if (!is_string($destination)) {
|
67 |
Mage::throwException(Mage::helper('euromsg')->__('Destination file path must be a string'));
|
68 |
}
|
69 |
-
$pathinfo = pathinfo($destination);
|
70 |
|
|
|
71 |
if (empty($pathinfo['dirname']) || !is_writable($pathinfo['dirname'])) {
|
72 |
Mage::throwException(Mage::helper('euromsg')->__('Destination directory is not writable'));
|
73 |
}
|
|
|
74 |
if (is_file($destination) && !is_writable($destination)) {
|
75 |
Mage::throwException(Mage::helper('euromsg')->__('Destination file is not writable'));
|
76 |
}
|
|
|
77 |
$this->_destination = $destination;
|
78 |
|
79 |
$this->_init();
|
@@ -115,7 +120,7 @@ class Numerno_Euromsg_Model_Export_Adapter_Csv extends Mage_ImportExport_Model_E
|
|
115 |
}
|
116 |
}
|
117 |
|
118 |
-
fputs($this->_fileHandler, implode($data, $this->_delimiter)."\r\n");
|
119 |
|
120 |
return $this;
|
121 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
52 |
*
|
53 |
* @var string
|
54 |
*/
|
55 |
+
public function getDelimiter()
|
56 |
+
{
|
57 |
return $this->_delimiter;
|
58 |
}
|
59 |
|
64 |
*
|
65 |
* @return Numerno_Euromsg_Model_Export_Adapter_Csv
|
66 |
*/
|
67 |
+
public function setDestination($destination)
|
68 |
+
{
|
69 |
if (!is_string($destination)) {
|
70 |
Mage::throwException(Mage::helper('euromsg')->__('Destination file path must be a string'));
|
71 |
}
|
|
|
72 |
|
73 |
+
$pathinfo = pathinfo($destination);
|
74 |
if (empty($pathinfo['dirname']) || !is_writable($pathinfo['dirname'])) {
|
75 |
Mage::throwException(Mage::helper('euromsg')->__('Destination directory is not writable'));
|
76 |
}
|
77 |
+
|
78 |
if (is_file($destination) && !is_writable($destination)) {
|
79 |
Mage::throwException(Mage::helper('euromsg')->__('Destination file is not writable'));
|
80 |
}
|
81 |
+
|
82 |
$this->_destination = $destination;
|
83 |
|
84 |
$this->_init();
|
120 |
}
|
121 |
}
|
122 |
|
123 |
+
fputs($this->_fileHandler, implode($data, $this->_delimiter) . "\r\n");
|
124 |
|
125 |
return $this;
|
126 |
}
|
app/code/local/Numerno/Euromsg/Model/Export/Entity/Member.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -40,10 +43,11 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
40 |
/**
|
41 |
* Permanent column names.
|
42 |
*/
|
43 |
-
const
|
44 |
-
const COL_GSM_PERMIT = 'GSM_PERMIT_STATUS';
|
45 |
const COL_EMAIL = 'EMAIL';
|
46 |
-
const
|
|
|
|
|
47 |
|
48 |
/**
|
49 |
* Customer ID or Subscriber ID filter cache
|
@@ -60,7 +64,7 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
60 |
protected $_attrCodes = array();
|
61 |
|
62 |
/**
|
63 |
-
* Attribute code to its column
|
64 |
*
|
65 |
* @var array
|
66 |
*/
|
@@ -152,7 +156,7 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
152 |
. (isset($attribute['datatype']) ? '[' . $attribute['datatype'] . ']' : '');
|
153 |
$this->_attrCodes[] = $attribute['attribute'];
|
154 |
|
155 |
-
if(!in_array($attribute['attribute'], $this->getPresetAttributes()) ) {
|
156 |
if (substr($attribute['attribute'], 0, strlen($_prefix)) == $_prefix) {
|
157 |
$this->_customerAttrCodes[] = substr($attribute['attribute'], strlen($_prefix));
|
158 |
}
|
@@ -169,7 +173,7 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
169 |
*/
|
170 |
protected function getAttributeCollection()
|
171 |
{
|
172 |
-
$exportAttributes =
|
173 |
if (!is_array($exportAttributes)) {
|
174 |
$exportAttributes = empty($exportAttributes) ? array() : unserialize($exportAttributes);
|
175 |
}
|
@@ -181,80 +185,25 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
181 |
);
|
182 |
|
183 |
$codes = array();
|
184 |
-
foreach($exportAttributes as $exportAttribute) {
|
185 |
-
if(isset($exportAttribute['attribute']))
|
186 |
if (substr($exportAttribute['attribute'], 0, strlen($_prefix)) == $_prefix) {
|
187 |
$codes[] = substr($exportAttribute['attribute'], strlen($_prefix));
|
188 |
}
|
189 |
$codes[] = $exportAttribute['attribute'];
|
190 |
-
}
|
191 |
-
|
192 |
-
$dataTypes = array(
|
193 |
-
'entity_id' => 'int',
|
194 |
-
'subscriber_id' => 'int',
|
195 |
-
'subscriber_email' => null,
|
196 |
-
$_prefix . 'last_login' => 'datetime',
|
197 |
-
$_prefix . 'last_order' => 'datetime',
|
198 |
-
$_prefix . 'orders_total' => 'float',
|
199 |
-
$_prefix . 'fav_category' => 'string(255)',
|
200 |
-
$_prefix . 'group' => 'string(32)'
|
201 |
-
);
|
202 |
-
|
203 |
-
$staticColumns = $this->_connection->describeTable($this->_resource->getTableName('customer/entity'));
|
204 |
-
foreach($staticColumns as $columnName => $column) {
|
205 |
-
$dataType = $column['DATA_TYPE'];
|
206 |
-
if(in_array($dataType, array('char', 'text')) || strpos($dataType, 'char')
|
207 |
-
|| strpos($dataType, 'text')){
|
208 |
-
$length = $column['LENGTH'];
|
209 |
-
if(is_null($length) || $length > 255) {
|
210 |
-
$dataTypes[$_prefix . $columnName] = 'string(1024)';
|
211 |
-
}else{
|
212 |
-
$dataTypes[$_prefix . $columnName] = "string($length)";
|
213 |
-
}
|
214 |
-
}elseif(in_array($dataType, array('int', 'bit', 'blob', 'binary')) || strpos($dataType, 'int')
|
215 |
-
|| strpos($dataType, 'binary') || strpos($dataType, 'blob'))
|
216 |
-
$dataTypes[$_prefix . $columnName] = 'int';
|
217 |
-
elseif(in_array($dataType, array('float', 'double', 'decimal')) )
|
218 |
-
$dataTypes[$_prefix . $columnName] = 'float';
|
219 |
-
elseif(in_array($dataType, array('date', 'time', 'year', 'datetime', 'timestamp')) )
|
220 |
-
$dataTypes[$_prefix . $columnName] = 'datetime';
|
221 |
-
}
|
222 |
-
|
223 |
-
$attributes = Mage::getModel('customer/entity_attribute_collection')
|
224 |
-
->setCodeFilter($codes);
|
225 |
-
foreach($attributes as $attribute) {
|
226 |
-
$backendType = $attribute->getBackendType();
|
227 |
-
|
228 |
-
switch($backendType) {
|
229 |
-
case 'varchar':
|
230 |
-
$dataTypes[$_prefix . $attribute->getAttributeCode()] = 'string(255)';
|
231 |
-
break;
|
232 |
-
case 'text':
|
233 |
-
$dataTypes[$_prefix . $attribute->getAttributeCode()] = 'string(1024)';
|
234 |
-
break;
|
235 |
-
case 'int':
|
236 |
-
if($attribute->getFrontendInput() == 'select' || $attribute->getFrontendInput() == 'multiselect')
|
237 |
-
$dataTypes[$_prefix . $attribute->getAttributeCode()] = 'string(255)';
|
238 |
-
else
|
239 |
-
$dataTypes[$_prefix . $attribute->getAttributeCode()] = 'int';
|
240 |
-
break;
|
241 |
-
case 'decimal':
|
242 |
-
$dataTypes[$_prefix . $attribute->getAttributeCode()] = 'float';
|
243 |
-
break;
|
244 |
-
case 'datetime':
|
245 |
-
$dataTypes[$_prefix . $attribute->getAttributeCode()] = 'datetime';
|
246 |
-
break;
|
247 |
}
|
248 |
}
|
249 |
|
250 |
-
|
251 |
-
|
|
|
|
|
252 |
$exportAttributes[$key]['datatype'] = $dataTypes[$exportAttribute['attribute']];
|
253 |
}
|
254 |
}
|
255 |
|
256 |
-
|
257 |
-
|
258 |
$gsmPermitAttributeCode = $_prefix . Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE;
|
259 |
$exportAttributes[$gsmPermitAttributeCode] = array(
|
260 |
'attribute' => $gsmPermitAttributeCode,
|
@@ -273,23 +222,25 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
273 |
protected function getPresetAttributes()
|
274 |
{
|
275 |
$presetAttributes = $this->_helper->getPresetCustomerAttributes();
|
276 |
-
unset($presetAttributes['
|
277 |
|
278 |
return array_keys($presetAttributes);
|
279 |
}
|
280 |
|
281 |
-
protected function _prepareCollection()
|
282 |
-
|
283 |
$_subscriberCollection = Mage::getResourceModel('newsletter/subscriber_collection')
|
284 |
->showCustomerInfo($this->_customerAttrCodes);
|
285 |
|
286 |
-
if(!$this->useUnsubscribed())
|
287 |
$_subscriberCollection->useOnlySubscribed();
|
|
|
288 |
|
289 |
-
if(
|
290 |
$_subscriberCollection->useOnlyCustomers();
|
|
|
291 |
|
292 |
-
foreach($this->_filter as $column => $ids) {
|
293 |
$_subscriberCollection->addFieldToFilter('main_table.' . $column, array('in' => $ids));
|
294 |
}
|
295 |
|
@@ -305,6 +256,7 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
305 |
protected function _prepareLastLogins($customerIds)
|
306 |
{
|
307 |
if (empty($customerIds) || !in_array('customer_last_login', $this->_attrCodes)) {
|
|
|
308 |
return array();
|
309 |
}
|
310 |
|
@@ -325,6 +277,7 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
325 |
protected function _prepareLastOrders($customerIds)
|
326 |
{
|
327 |
if (empty($customerIds) || !in_array('customer_last_order', $this->_attrCodes)) {
|
|
|
328 |
return array();
|
329 |
}
|
330 |
|
@@ -345,6 +298,7 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
345 |
protected function _prepareOrdersTotal($customerIds)
|
346 |
{
|
347 |
if (empty($customerIds) || !in_array('customer_orders_total', $this->_attrCodes)) {
|
|
|
348 |
return array();
|
349 |
}
|
350 |
|
@@ -366,6 +320,7 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
366 |
protected function _prepareMostOrderedCategories($customerIds)
|
367 |
{
|
368 |
if (empty($customerIds) || !in_array('customer_fav_category', $this->_attrCodes)) {
|
|
|
369 |
return array();
|
370 |
}
|
371 |
|
@@ -385,7 +340,6 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
385 |
->group('customer_id');
|
386 |
|
387 |
$mostOrderedCategories = $this->_connection->fetchPairs($query);
|
388 |
-
|
389 |
$this->_categoryIdToName = Mage::getSingleton('catalog/category')->getCollection()
|
390 |
->addNameToResult()
|
391 |
->addIdFilter($mostOrderedCategories)
|
@@ -403,11 +357,11 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
403 |
protected function _preparePresetAttributesData($_customerIds)
|
404 |
{
|
405 |
if (empty($_customerIds)) {
|
|
|
406 |
return array();
|
407 |
}
|
408 |
|
409 |
$presetData = array();
|
410 |
-
|
411 |
try {
|
412 |
$presetData['customer_last_login'] = $this->_prepareLastLogins($_customerIds);
|
413 |
} catch (Exception $e) {
|
@@ -460,7 +414,6 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
460 |
*/
|
461 |
public function setFilename($filename)
|
462 |
{
|
463 |
-
|
464 |
$destination = tempnam(sys_get_temp_dir(), $filename . '.' . $this->_writer->getFileExtension());
|
465 |
|
466 |
$this->_wrap[$filename . '.' . $this->_writer->getFileExtension()] = $destination;
|
@@ -485,9 +438,9 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
485 |
*
|
486 |
* @return bool
|
487 |
*/
|
488 |
-
public function useUnsubscribed()
|
489 |
-
|
490 |
-
return
|
491 |
}
|
492 |
|
493 |
/**
|
@@ -497,10 +450,10 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
497 |
*/
|
498 |
public function export()
|
499 |
{
|
500 |
-
$colNames
|
501 |
-
$collection
|
502 |
|
503 |
-
if($collection->count()) {
|
504 |
$customerIds = $collection->getColumnValues('customer_id');
|
505 |
$presetAttributeData = $this->_preparePresetAttributesData($customerIds);
|
506 |
$categoryNames = $this->_categoryIdToName;
|
@@ -515,17 +468,18 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
515 |
array('email_permit' => $row->isSubscribed() ? 'Y' : 'N')
|
516 |
);
|
517 |
|
518 |
-
if(in_array($this->_helper->getCustomerAttributePrefix() . 'entity_id', $this->_attrCodes) )
|
519 |
$row->addData(
|
520 |
array($this->_helper->getCustomerAttributePrefix() . 'entity_id' => $row->getCustomerId())
|
521 |
);
|
522 |
|
523 |
-
if($row->getCustomerId()) {
|
|
|
524 |
$presetAttributes = array_intersect_key(array_flip($this->_attrCodes), $presetAttributeData);
|
525 |
-
foreach($presetAttributes as $presetAttribute => $null) {
|
526 |
|
527 |
$value = $presetAttributeData[$presetAttribute][$row->getCustomerId()];
|
528 |
-
if($presetAttribute == 'customer_fav_category') {
|
529 |
$row->addData(
|
530 |
array($presetAttribute => $categoryNames[$value]['name'])
|
531 |
);
|
@@ -538,18 +492,18 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
538 |
}
|
539 |
|
540 |
$rowData = array_intersect_key($row->getData(), array_flip($this->_attrCodes));
|
541 |
-
foreach($rowData as $attrCode => $value) {
|
542 |
$value = str_ireplace($this->_writer->getDelimiter(), '', $value);
|
543 |
|
544 |
-
if(is_numeric($value)) {
|
545 |
$value = round($value, 2);
|
546 |
}
|
547 |
|
548 |
-
if(Zend_Date::isDate($value, Zend_Date::ISO_8601)) {
|
549 |
$value = date("Y-m-d", strtotime($value));
|
550 |
}
|
551 |
|
552 |
-
if($attrCode == $this->_helper->getCustomerAttributePrefix() .
|
553 |
Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE) {
|
554 |
$value = $value ? 'Y' : 'N';
|
555 |
}
|
@@ -558,21 +512,20 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
558 |
unset($rowData[$attrCode]);
|
559 |
}
|
560 |
|
561 |
-
try{
|
562 |
$this->_writer->writeRow($rowData);
|
563 |
-
}
|
564 |
-
catch(Exception $e) {
|
565 |
Mage::logException($e);
|
566 |
}
|
567 |
|
568 |
}
|
569 |
|
570 |
-
$notification =
|
571 |
-
|
572 |
-
if($notification) {
|
573 |
$destination = tempnam(sys_get_temp_dir(),$this->getFilename() . '.xml');
|
574 |
$this->_wrap[$this->getFilename() . '.xml'] = $destination;
|
575 |
$xml = Mage::helper('core')->assocToXml(array('NOTIFICATION_EMAIL' => $notification), 'euro.message');
|
|
|
576 |
file_put_contents($destination, explode("\n", $xml->asXML(), 2)[1]);
|
577 |
}
|
578 |
|
@@ -581,7 +534,5 @@ class Numerno_Euromsg_Model_Export_Entity_Member extends Mage_Core_Model_Abstrac
|
|
581 |
} else {
|
582 |
Mage::throwException($this->_helper->__('There is no member data to export.'));
|
583 |
}
|
584 |
-
|
585 |
-
|
586 |
}
|
587 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
43 |
/**
|
44 |
* Permanent column names.
|
45 |
*/
|
46 |
+
const COL_STATUS = 'STATUS';
|
|
|
47 |
const COL_EMAIL = 'EMAIL';
|
48 |
+
const COL_EMAIL_PERMIT = 'EMAIL_PERMIT_DATA';
|
49 |
+
const COL_GSM_NO = 'GSM_NO';
|
50 |
+
const COL_GSM_PERMIT = 'GSM_PERMIT_DATA';
|
51 |
|
52 |
/**
|
53 |
* Customer ID or Subscriber ID filter cache
|
64 |
protected $_attrCodes = array();
|
65 |
|
66 |
/**
|
67 |
+
* Attribute code to its column name.
|
68 |
*
|
69 |
* @var array
|
70 |
*/
|
156 |
. (isset($attribute['datatype']) ? '[' . $attribute['datatype'] . ']' : '');
|
157 |
$this->_attrCodes[] = $attribute['attribute'];
|
158 |
|
159 |
+
if (!in_array($attribute['attribute'], $this->getPresetAttributes()) ) {
|
160 |
if (substr($attribute['attribute'], 0, strlen($_prefix)) == $_prefix) {
|
161 |
$this->_customerAttrCodes[] = substr($attribute['attribute'], strlen($_prefix));
|
162 |
}
|
173 |
*/
|
174 |
protected function getAttributeCollection()
|
175 |
{
|
176 |
+
$exportAttributes = $this->_helper->getConfigData('general/attributes', 'customer');
|
177 |
if (!is_array($exportAttributes)) {
|
178 |
$exportAttributes = empty($exportAttributes) ? array() : unserialize($exportAttributes);
|
179 |
}
|
185 |
);
|
186 |
|
187 |
$codes = array();
|
188 |
+
foreach ($exportAttributes as $exportAttribute) {
|
189 |
+
if (isset($exportAttribute['attribute'])) {
|
190 |
if (substr($exportAttribute['attribute'], 0, strlen($_prefix)) == $_prefix) {
|
191 |
$codes[] = substr($exportAttribute['attribute'], strlen($_prefix));
|
192 |
}
|
193 |
$codes[] = $exportAttribute['attribute'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
}
|
195 |
}
|
196 |
|
197 |
+
$dataTypes = Mage::helper('euromsg')->getCustomerEntityDataTypes($codes);
|
198 |
+
|
199 |
+
foreach ($exportAttributes as $key => $exportAttribute) {
|
200 |
+
if (isset($dataTypes[$exportAttribute['attribute']])) {
|
201 |
$exportAttributes[$key]['datatype'] = $dataTypes[$exportAttribute['attribute']];
|
202 |
}
|
203 |
}
|
204 |
|
205 |
+
if ($this->_helper->getConfigData('general/enabled', 'sms')
|
206 |
+
&& in_array($this->_helper->getConfigData('general/attribute', 'sms'), $codes) ) {
|
207 |
$gsmPermitAttributeCode = $_prefix . Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE;
|
208 |
$exportAttributes[$gsmPermitAttributeCode] = array(
|
209 |
'attribute' => $gsmPermitAttributeCode,
|
222 |
protected function getPresetAttributes()
|
223 |
{
|
224 |
$presetAttributes = $this->_helper->getPresetCustomerAttributes();
|
225 |
+
unset($presetAttributes['__empty']);
|
226 |
|
227 |
return array_keys($presetAttributes);
|
228 |
}
|
229 |
|
230 |
+
protected function _prepareCollection()
|
231 |
+
{
|
232 |
$_subscriberCollection = Mage::getResourceModel('newsletter/subscriber_collection')
|
233 |
->showCustomerInfo($this->_customerAttrCodes);
|
234 |
|
235 |
+
if (!$this->useUnsubscribed()) {
|
236 |
$_subscriberCollection->useOnlySubscribed();
|
237 |
+
}
|
238 |
|
239 |
+
if ($this->_helper->getConfigData('general/source', 'customer') == 'newsletter_subscribers_customers') {
|
240 |
$_subscriberCollection->useOnlyCustomers();
|
241 |
+
}
|
242 |
|
243 |
+
foreach ($this->_filter as $column => $ids) {
|
244 |
$_subscriberCollection->addFieldToFilter('main_table.' . $column, array('in' => $ids));
|
245 |
}
|
246 |
|
256 |
protected function _prepareLastLogins($customerIds)
|
257 |
{
|
258 |
if (empty($customerIds) || !in_array('customer_last_login', $this->_attrCodes)) {
|
259 |
+
|
260 |
return array();
|
261 |
}
|
262 |
|
277 |
protected function _prepareLastOrders($customerIds)
|
278 |
{
|
279 |
if (empty($customerIds) || !in_array('customer_last_order', $this->_attrCodes)) {
|
280 |
+
|
281 |
return array();
|
282 |
}
|
283 |
|
298 |
protected function _prepareOrdersTotal($customerIds)
|
299 |
{
|
300 |
if (empty($customerIds) || !in_array('customer_orders_total', $this->_attrCodes)) {
|
301 |
+
|
302 |
return array();
|
303 |
}
|
304 |
|
320 |
protected function _prepareMostOrderedCategories($customerIds)
|
321 |
{
|
322 |
if (empty($customerIds) || !in_array('customer_fav_category', $this->_attrCodes)) {
|
323 |
+
|
324 |
return array();
|
325 |
}
|
326 |
|
340 |
->group('customer_id');
|
341 |
|
342 |
$mostOrderedCategories = $this->_connection->fetchPairs($query);
|
|
|
343 |
$this->_categoryIdToName = Mage::getSingleton('catalog/category')->getCollection()
|
344 |
->addNameToResult()
|
345 |
->addIdFilter($mostOrderedCategories)
|
357 |
protected function _preparePresetAttributesData($_customerIds)
|
358 |
{
|
359 |
if (empty($_customerIds)) {
|
360 |
+
|
361 |
return array();
|
362 |
}
|
363 |
|
364 |
$presetData = array();
|
|
|
365 |
try {
|
366 |
$presetData['customer_last_login'] = $this->_prepareLastLogins($_customerIds);
|
367 |
} catch (Exception $e) {
|
414 |
*/
|
415 |
public function setFilename($filename)
|
416 |
{
|
|
|
417 |
$destination = tempnam(sys_get_temp_dir(), $filename . '.' . $this->_writer->getFileExtension());
|
418 |
|
419 |
$this->_wrap[$filename . '.' . $this->_writer->getFileExtension()] = $destination;
|
438 |
*
|
439 |
* @return bool
|
440 |
*/
|
441 |
+
public function useUnsubscribed()
|
442 |
+
{
|
443 |
+
return $this->_helper->getConfigData('general/use_unsubscribed', 'customer');
|
444 |
}
|
445 |
|
446 |
/**
|
450 |
*/
|
451 |
public function export()
|
452 |
{
|
453 |
+
$colNames = $this->_attributeColumnNames;
|
454 |
+
$collection = $this->_prepareCollection();
|
455 |
|
456 |
+
if ($collection->count()) {
|
457 |
$customerIds = $collection->getColumnValues('customer_id');
|
458 |
$presetAttributeData = $this->_preparePresetAttributesData($customerIds);
|
459 |
$categoryNames = $this->_categoryIdToName;
|
468 |
array('email_permit' => $row->isSubscribed() ? 'Y' : 'N')
|
469 |
);
|
470 |
|
471 |
+
if (in_array($this->_helper->getCustomerAttributePrefix() . 'entity_id', $this->_attrCodes) )
|
472 |
$row->addData(
|
473 |
array($this->_helper->getCustomerAttributePrefix() . 'entity_id' => $row->getCustomerId())
|
474 |
);
|
475 |
|
476 |
+
if ($row->getCustomerId()) {
|
477 |
+
|
478 |
$presetAttributes = array_intersect_key(array_flip($this->_attrCodes), $presetAttributeData);
|
479 |
+
foreach ($presetAttributes as $presetAttribute => $null) {
|
480 |
|
481 |
$value = $presetAttributeData[$presetAttribute][$row->getCustomerId()];
|
482 |
+
if ($presetAttribute == 'customer_fav_category') {
|
483 |
$row->addData(
|
484 |
array($presetAttribute => $categoryNames[$value]['name'])
|
485 |
);
|
492 |
}
|
493 |
|
494 |
$rowData = array_intersect_key($row->getData(), array_flip($this->_attrCodes));
|
495 |
+
foreach ($rowData as $attrCode => $value) {
|
496 |
$value = str_ireplace($this->_writer->getDelimiter(), '', $value);
|
497 |
|
498 |
+
if (is_numeric($value)) {
|
499 |
$value = round($value, 2);
|
500 |
}
|
501 |
|
502 |
+
if (Zend_Date::isDate($value, Zend_Date::ISO_8601)) {
|
503 |
$value = date("Y-m-d", strtotime($value));
|
504 |
}
|
505 |
|
506 |
+
if ($attrCode == $this->_helper->getCustomerAttributePrefix() .
|
507 |
Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE) {
|
508 |
$value = $value ? 'Y' : 'N';
|
509 |
}
|
512 |
unset($rowData[$attrCode]);
|
513 |
}
|
514 |
|
515 |
+
try {
|
516 |
$this->_writer->writeRow($rowData);
|
517 |
+
} catch(Exception $e) {
|
|
|
518 |
Mage::logException($e);
|
519 |
}
|
520 |
|
521 |
}
|
522 |
|
523 |
+
$notification = $this->_helper->getConfigData('general/notify', 'customer');
|
524 |
+
if ($notification) {
|
|
|
525 |
$destination = tempnam(sys_get_temp_dir(),$this->getFilename() . '.xml');
|
526 |
$this->_wrap[$this->getFilename() . '.xml'] = $destination;
|
527 |
$xml = Mage::helper('core')->assocToXml(array('NOTIFICATION_EMAIL' => $notification), 'euro.message');
|
528 |
+
|
529 |
file_put_contents($destination, explode("\n", $xml->asXML(), 2)[1]);
|
530 |
}
|
531 |
|
534 |
} else {
|
535 |
Mage::throwException($this->_helper->__('There is no member data to export.'));
|
536 |
}
|
|
|
|
|
537 |
}
|
538 |
}
|
app/code/local/Numerno/Euromsg/Model/Export/Entity/Product.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -75,82 +78,17 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
75 |
*/
|
76 |
protected function _getExportAttributes()
|
77 |
{
|
78 |
-
|
79 |
-
$exportAttributes = Mage::getStoreConfig('euromsg_catalog/general/attributes');
|
80 |
if (!is_array($exportAttributes)) {
|
81 |
$exportAttributes = empty($exportAttributes) ? array() : unserialize($exportAttributes);
|
82 |
}
|
83 |
|
84 |
-
|
85 |
-
$dataTypes = array(
|
86 |
-
'entity_id' => 'int',
|
87 |
-
'_url' => 'string(1024)',
|
88 |
-
'_attribute_set'=> 'string(255)',
|
89 |
-
'_type' => 'string(255)',
|
90 |
-
'qty' => 'float',
|
91 |
-
'is_in_stock' => 'int',
|
92 |
-
'_root_category'=> 'string(255)',
|
93 |
-
'_category' => 'string(1024)'
|
94 |
-
);
|
95 |
-
|
96 |
-
$staticColumns = $this->_connection->describeTable(
|
97 |
-
Mage::getSingleton('core/resource')->getTableName('catalog/product')
|
98 |
-
);
|
99 |
-
foreach($staticColumns as $columnName => $column) {
|
100 |
-
$dataType = $column['DATA_TYPE'];
|
101 |
-
if(in_array($dataType, array('char', 'text')) || strpos($dataType, 'char')
|
102 |
-
|| strpos($dataType, 'text')){
|
103 |
-
$length = $column['LENGTH'];
|
104 |
-
if(is_null($length) || $length > 255) {
|
105 |
-
$dataTypes[$columnName] = 'string(1024)';
|
106 |
-
}else{
|
107 |
-
$dataTypes[$columnName] = "string($length)";
|
108 |
-
}
|
109 |
-
}elseif(in_array($dataType, array('int', 'bit', 'blob', 'binary')) || strpos($dataType, 'int')
|
110 |
-
|| strpos($dataType, 'binary') || strpos($dataType, 'blob'))
|
111 |
-
$dataTypes[$columnName] = 'int';
|
112 |
-
elseif(in_array($dataType, array('float', 'double', 'decimal')) )
|
113 |
-
$dataTypes[$columnName] = 'float';
|
114 |
-
elseif(in_array($dataType, array('date', 'time', 'year', 'datetime', 'timestamp')) )
|
115 |
-
$dataTypes[$columnName] = 'datetime';
|
116 |
-
}
|
117 |
-
|
118 |
$codes = array();
|
119 |
foreach($exportAttributes as $exportAttribute) {
|
120 |
$codes[] = $exportAttribute['attribute'];
|
121 |
}
|
122 |
|
123 |
-
$
|
124 |
-
$attributes
|
125 |
-
->setEntityTypeFilter(Mage::getSingleton('eav/config')->getEntityType('catalog_product'))
|
126 |
-
->setCodeFilter($codes);
|
127 |
-
foreach($attributes as $attribute) {
|
128 |
-
$backendType = $attribute->getBackendType();
|
129 |
-
|
130 |
-
switch($backendType) {
|
131 |
-
case 'varchar':
|
132 |
-
$dataTypes[$attribute->getAttributeCode()] = 'string(255)';
|
133 |
-
break;
|
134 |
-
case 'text':
|
135 |
-
$dataTypes[$attribute->getAttributeCode()] = 'string(1024)';
|
136 |
-
break;
|
137 |
-
case 'int':
|
138 |
-
if($attribute->getFrontendInput() == 'select' || $attribute->getFrontendInput() == 'multiselect')
|
139 |
-
$dataTypes[$attribute->getAttributeCode()] = 'string(255)';
|
140 |
-
else
|
141 |
-
$dataTypes[$attribute->getAttributeCode()] = 'int';
|
142 |
-
break;
|
143 |
-
case 'decimal':
|
144 |
-
$dataTypes[$attribute->getAttributeCode()] = 'float';
|
145 |
-
break;
|
146 |
-
case 'datetime':
|
147 |
-
$dataTypes[$attribute->getAttributeCode()] = 'datetime';
|
148 |
-
break;
|
149 |
-
}
|
150 |
-
}
|
151 |
-
$dataTypes['image'] = 'string(1024)';
|
152 |
-
$dataTypes['smallimage'] = 'string(1024)';
|
153 |
-
$dataTypes['thumbnail'] = 'string(1024)';
|
154 |
|
155 |
foreach($exportAttributes as $key => $exportAttribute) {
|
156 |
if(isset($dataTypes[$exportAttribute['attribute']])) {
|
@@ -192,10 +130,10 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
192 |
$attributes = $this->_getExportAttributes();
|
193 |
|
194 |
$selectColumns = array('product_id');
|
195 |
-
if(isset($attributes['qty'])){
|
196 |
$selectColumns[] = 'qty AS ' . $attributes['qty']['col_name'];
|
197 |
}
|
198 |
-
if(isset($attributes['is_in_stock'])){
|
199 |
$selectColumns[] = 'is_in_stock AS ' . $attributes['is_in_stock']['col_name'];
|
200 |
}
|
201 |
|
@@ -209,15 +147,15 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
209 |
$productId = $stockItemRow['product_id'];
|
210 |
unset($stockItemRow['product_id']);
|
211 |
|
212 |
-
if(isset($attributes['qty'])) {
|
213 |
-
if ($stockItemRow[$attributes['qty']['col_name']] < 0)
|
214 |
$stockItemRow[$attributes['qty']['col_name']] = 0;
|
215 |
-
|
216 |
$stockItemRow[$attributes['qty']['col_name']] *= 1;
|
217 |
}
|
218 |
-
|
219 |
$stockItemRows[$productId] = $stockItemRow;
|
220 |
}
|
|
|
221 |
return $stockItemRows;
|
222 |
}
|
223 |
|
@@ -237,21 +175,21 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
237 |
}
|
238 |
|
239 |
$attributes = $this->_getExportAttributes();
|
240 |
-
|
241 |
$categoryId = array_shift($rowCategories[$productId]);
|
242 |
|
243 |
if (isset($attributes[self::COL_ROOT_CATEGORY])) {
|
244 |
if (isset($this->_rootCategories[$categoryId])) {
|
245 |
$dataRow[$attributes[self::COL_ROOT_CATEGORY]['col_name']] = $this->_rootCategories[$categoryId];
|
246 |
-
}else{
|
247 |
$dataRow[$attributes[self::COL_ROOT_CATEGORY]['col_name']] = '';
|
248 |
}
|
249 |
}
|
|
|
250 |
if (isset($attributes[self::COL_CATEGORY])) {
|
251 |
if (isset($this->_categories[$categoryId])) {
|
252 |
|
253 |
$dataRow[$attributes[self::COL_CATEGORY]['col_name']] = $this->_categories[$categoryId];
|
254 |
-
}else{
|
255 |
$dataRow[$attributes[self::COL_CATEGORY]['col_name']] = '';
|
256 |
}
|
257 |
}
|
@@ -264,15 +202,17 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
264 |
*
|
265 |
* @return int
|
266 |
*/
|
267 |
-
public function _getLimitProducts()
|
268 |
-
|
269 |
-
$
|
270 |
-
|
|
|
271 |
$defaultMemoryLimit = 250000000;
|
|
|
272 |
|
273 |
$memoryLimit = trim(ini_get('memory_limit'));
|
274 |
$lastMemoryLimitLetter = strtolower($memoryLimit[strlen($memoryLimit)-1]);
|
275 |
-
switch($lastMemoryLimitLetter) {
|
276 |
case 'g':
|
277 |
$memoryLimit *= 1024;
|
278 |
case 'm':
|
@@ -286,22 +226,26 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
286 |
}
|
287 |
|
288 |
// Tested one product to have up to such size
|
289 |
-
$memoryPerProduct =
|
290 |
-
if(!$memoryPerProduct)
|
291 |
$memoryPerProduct = 100000;
|
|
|
292 |
|
293 |
// Decrease memory limit to have supply
|
294 |
-
$memoryUsagePercent =
|
295 |
-
if(!$memoryUsagePercent || $memoryUsagePercent > 0.
|
296 |
$memoryUsagePercent = 0.8;
|
|
|
297 |
|
298 |
// Minimum Products limit
|
299 |
-
$minProductsLimit =
|
300 |
-
if(!$minProductsLimit)
|
301 |
$minProductsLimit = 500;
|
|
|
302 |
$limitProducts = intval(($memoryLimit * $memoryUsagePercent - memory_get_usage(true)) / $memoryPerProduct);
|
303 |
-
if ($limitProducts < $minProductsLimit)
|
304 |
$limitProducts = $minProductsLimit;
|
|
|
305 |
|
306 |
return $limitProducts;
|
307 |
}
|
@@ -314,13 +258,11 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
314 |
*/
|
315 |
protected function _prepareEntityCollection(Mage_Eav_Model_Entity_Collection_Abstract $collection)
|
316 |
{
|
317 |
-
|
318 |
-
$exportOnlyVisible = Mage::getStoreConfig('euromsg_catalog/general/export');
|
319 |
-
|
320 |
$collection = parent::_prepareEntityCollection($collection);
|
321 |
$collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');
|
322 |
|
323 |
-
if($exportOnlyVisible) {
|
324 |
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
325 |
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
|
326 |
}
|
@@ -369,10 +311,9 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
369 |
//Execution time may be very long
|
370 |
set_time_limit(0);
|
371 |
|
372 |
-
$attributes
|
373 |
$validAttrCodes = $this->_getExportAttrCodes();
|
374 |
$writer = $this->getWriter();
|
375 |
-
|
376 |
$limitProducts = $this->_getLimitProducts();
|
377 |
$offsetProducts = 0;
|
378 |
|
@@ -390,22 +331,24 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
390 |
$collection
|
391 |
->setPage($offsetProducts, $limitProducts);
|
392 |
|
393 |
-
if ($collection->getCurPage() < $offsetProducts)
|
394 |
break;
|
|
|
395 |
|
396 |
$collection->load();
|
397 |
-
|
398 |
-
if ($collection->count() == 0)
|
399 |
break;
|
|
|
400 |
|
401 |
foreach ($collection as $itemId => $item) { // go through all products
|
402 |
|
403 |
foreach ($validAttrCodes as &$attrCode) { // go through all valid attribute codes
|
404 |
$attrValue = $item->getData($attrCode);
|
405 |
|
406 |
-
if(Zend_Date::isDate($attrValue, Zend_Date::ISO_8601)) {
|
407 |
$attrValue = date("Y-m-d", strtotime($attrValue));
|
408 |
}
|
|
|
409 |
if (!empty($this->_attributeValues[$attrCode])) {
|
410 |
if ($this->_attributeTypes[$attrCode] == 'multiselect') {
|
411 |
$attrValue = explode(',', $attrValue);
|
@@ -420,42 +363,49 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
420 |
$attrValue = null;
|
421 |
}
|
422 |
}
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
|
|
|
|
|
|
427 |
}
|
|
|
428 |
if (is_scalar($attrValue) && isset($attributes[$attrCode])) {
|
429 |
$dataRows[$itemId][$attributes[$attrCode]['col_name']] = $attrValue;
|
430 |
}
|
431 |
}
|
432 |
|
433 |
$attrSetId = $item->getAttributeSetId();
|
434 |
-
if(isset($attributes[self::COL_ATTR_SET]))
|
435 |
$dataRows[$itemId][$attributes[self::COL_ATTR_SET]['col_name']]
|
436 |
= $this->_attrSetIdToName[$attrSetId];
|
|
|
437 |
|
438 |
-
if(isset($attributes[self::COL_TYPE]))
|
439 |
$dataRows[$itemId][$attributes[self::COL_TYPE]['col_name']] = $item->getTypeId();
|
|
|
440 |
|
441 |
if(isset($attributes['_url'])) {
|
442 |
-
if($item->isVisibleInCatalog() && $item->isVisibleInSiteVisibility()) {
|
443 |
$url = Zend_Uri::factory($item->getProductUrl());
|
444 |
$url->removeQueryParameters();
|
445 |
$dataRows[$itemId][$attributes['_url']['col_name']] = $url->getUri();
|
446 |
-
}else{
|
447 |
$dataRows[$itemId][$attributes['_url']['col_name']] = '';
|
448 |
}
|
449 |
}
|
450 |
|
451 |
-
if(isset($attributes['_category']) || isset($attributes['_root_category']))
|
452 |
$rowCategories[$itemId] = $item->getCategoryIds();
|
453 |
-
|
454 |
$item = null;
|
455 |
}
|
456 |
$collection->clear();
|
457 |
|
458 |
if ($collection->getCurPage() < $offsetProducts) {
|
|
|
459 |
break;
|
460 |
}
|
461 |
|
@@ -466,33 +416,35 @@ class Numerno_Euromsg_Model_Export_Entity_Product extends Mage_ImportExport_Mode
|
|
466 |
}
|
467 |
|
468 |
// prepare catalog inventory information
|
469 |
-
if(isset($attributes['qty']) || isset($attributes['is_in_stock'])) {
|
470 |
$productIds = array_keys($dataRows);
|
471 |
$stockItemRows = $this->_prepareCatalogInventory($productIds);
|
472 |
}
|
473 |
|
474 |
foreach ($dataRows as $productId => &$dataRow) {
|
475 |
|
476 |
-
if(isset($stockItemRows[$productId]))
|
477 |
$dataRow += $stockItemRows[$productId];
|
|
|
478 |
|
479 |
-
if(isset($rowCategories[$productId]))
|
480 |
$this->_updateDataWithCategoryColumns($dataRow, $rowCategories, $productId);
|
|
|
481 |
|
482 |
-
if(!empty($rowMultiselects[$productId])) {
|
483 |
foreach ($rowMultiselects[$productId] as $attrKey => $attrVal) {
|
484 |
if (!empty($rowMultiselects[$productId][$attrKey])) {
|
485 |
$dataRow[$attrKey] = implode(",", $attrVal);
|
486 |
}
|
487 |
}
|
488 |
}
|
|
|
489 |
$writer->writeRow($dataRow);
|
490 |
}
|
491 |
}
|
492 |
|
493 |
-
$notification = Mage::
|
494 |
-
|
495 |
-
if($notification) {
|
496 |
$destination = tempnam(sys_get_temp_dir(), $this->getFilename() . '.xml');
|
497 |
$this->_wrap[$this->getFilename() . '.xml'] = $destination;
|
498 |
$xml = Mage::helper('core')->assocToXml(array('NOTIFICATION_EMAIL' => $notification), 'euro.message');
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
78 |
*/
|
79 |
protected function _getExportAttributes()
|
80 |
{
|
81 |
+
$exportAttributes = Mage::helper('euromsg')->getConfigData('general/attributes', 'catalog');
|
|
|
82 |
if (!is_array($exportAttributes)) {
|
83 |
$exportAttributes = empty($exportAttributes) ? array() : unserialize($exportAttributes);
|
84 |
}
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
$codes = array();
|
87 |
foreach($exportAttributes as $exportAttribute) {
|
88 |
$codes[] = $exportAttribute['attribute'];
|
89 |
}
|
90 |
|
91 |
+
$dataTypes = Mage::helper('euromsg')->getProductEntityDataTypes($codes);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
foreach($exportAttributes as $key => $exportAttribute) {
|
94 |
if(isset($dataTypes[$exportAttribute['attribute']])) {
|
130 |
$attributes = $this->_getExportAttributes();
|
131 |
|
132 |
$selectColumns = array('product_id');
|
133 |
+
if (isset($attributes['qty'])) {
|
134 |
$selectColumns[] = 'qty AS ' . $attributes['qty']['col_name'];
|
135 |
}
|
136 |
+
if (isset($attributes['is_in_stock'])) {
|
137 |
$selectColumns[] = 'is_in_stock AS ' . $attributes['is_in_stock']['col_name'];
|
138 |
}
|
139 |
|
147 |
$productId = $stockItemRow['product_id'];
|
148 |
unset($stockItemRow['product_id']);
|
149 |
|
150 |
+
if (isset($attributes['qty'])) {
|
151 |
+
if ($stockItemRow[$attributes['qty']['col_name']] < 0) {
|
152 |
$stockItemRow[$attributes['qty']['col_name']] = 0;
|
153 |
+
}
|
154 |
$stockItemRow[$attributes['qty']['col_name']] *= 1;
|
155 |
}
|
|
|
156 |
$stockItemRows[$productId] = $stockItemRow;
|
157 |
}
|
158 |
+
|
159 |
return $stockItemRows;
|
160 |
}
|
161 |
|
175 |
}
|
176 |
|
177 |
$attributes = $this->_getExportAttributes();
|
|
|
178 |
$categoryId = array_shift($rowCategories[$productId]);
|
179 |
|
180 |
if (isset($attributes[self::COL_ROOT_CATEGORY])) {
|
181 |
if (isset($this->_rootCategories[$categoryId])) {
|
182 |
$dataRow[$attributes[self::COL_ROOT_CATEGORY]['col_name']] = $this->_rootCategories[$categoryId];
|
183 |
+
} else {
|
184 |
$dataRow[$attributes[self::COL_ROOT_CATEGORY]['col_name']] = '';
|
185 |
}
|
186 |
}
|
187 |
+
|
188 |
if (isset($attributes[self::COL_CATEGORY])) {
|
189 |
if (isset($this->_categories[$categoryId])) {
|
190 |
|
191 |
$dataRow[$attributes[self::COL_CATEGORY]['col_name']] = $this->_categories[$categoryId];
|
192 |
+
} else {
|
193 |
$dataRow[$attributes[self::COL_CATEGORY]['col_name']] = '';
|
194 |
}
|
195 |
}
|
202 |
*
|
203 |
* @return int
|
204 |
*/
|
205 |
+
public function _getLimitProducts()
|
206 |
+
{
|
207 |
+
$helper = Mage::helper('euromsg');
|
208 |
+
$defaultMemoryLimit = $helper->getConfigData('advanced/memory_limit', 'catalog');
|
209 |
+
if (!$defaultMemoryLimit) {
|
210 |
$defaultMemoryLimit = 250000000;
|
211 |
+
}
|
212 |
|
213 |
$memoryLimit = trim(ini_get('memory_limit'));
|
214 |
$lastMemoryLimitLetter = strtolower($memoryLimit[strlen($memoryLimit)-1]);
|
215 |
+
switch ($lastMemoryLimitLetter) {
|
216 |
case 'g':
|
217 |
$memoryLimit *= 1024;
|
218 |
case 'm':
|
226 |
}
|
227 |
|
228 |
// Tested one product to have up to such size
|
229 |
+
$memoryPerProduct = $helper->getConfigData('advanced/memory_pp', 'catalog');
|
230 |
+
if (!$memoryPerProduct) {
|
231 |
$memoryPerProduct = 100000;
|
232 |
+
}
|
233 |
|
234 |
// Decrease memory limit to have supply
|
235 |
+
$memoryUsagePercent = $helper->getConfigData('advanced/memory_percent', 'catalog') / 100;
|
236 |
+
if (!$memoryUsagePercent || $memoryUsagePercent > 0.8) {
|
237 |
$memoryUsagePercent = 0.8;
|
238 |
+
}
|
239 |
|
240 |
// Minimum Products limit
|
241 |
+
$minProductsLimit = $helper->getConfigData('advanced/minimum_products', 'catalog');
|
242 |
+
if (!$minProductsLimit) {
|
243 |
$minProductsLimit = 500;
|
244 |
+
}
|
245 |
$limitProducts = intval(($memoryLimit * $memoryUsagePercent - memory_get_usage(true)) / $memoryPerProduct);
|
246 |
+
if ($limitProducts < $minProductsLimit) {
|
247 |
$limitProducts = $minProductsLimit;
|
248 |
+
}
|
249 |
|
250 |
return $limitProducts;
|
251 |
}
|
258 |
*/
|
259 |
protected function _prepareEntityCollection(Mage_Eav_Model_Entity_Collection_Abstract $collection)
|
260 |
{
|
261 |
+
$exportOnlyVisible = Mage::helper('euromsg')->getConfigData('general/export', 'catalog');
|
|
|
|
|
262 |
$collection = parent::_prepareEntityCollection($collection);
|
263 |
$collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');
|
264 |
|
265 |
+
if ($exportOnlyVisible) {
|
266 |
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
267 |
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
|
268 |
}
|
311 |
//Execution time may be very long
|
312 |
set_time_limit(0);
|
313 |
|
314 |
+
$attributes = $this->_getExportAttributes();
|
315 |
$validAttrCodes = $this->_getExportAttrCodes();
|
316 |
$writer = $this->getWriter();
|
|
|
317 |
$limitProducts = $this->_getLimitProducts();
|
318 |
$offsetProducts = 0;
|
319 |
|
331 |
$collection
|
332 |
->setPage($offsetProducts, $limitProducts);
|
333 |
|
334 |
+
if ($collection->getCurPage() < $offsetProducts) {
|
335 |
break;
|
336 |
+
}
|
337 |
|
338 |
$collection->load();
|
339 |
+
if ($collection->count() == 0) {
|
|
|
340 |
break;
|
341 |
+
}
|
342 |
|
343 |
foreach ($collection as $itemId => $item) { // go through all products
|
344 |
|
345 |
foreach ($validAttrCodes as &$attrCode) { // go through all valid attribute codes
|
346 |
$attrValue = $item->getData($attrCode);
|
347 |
|
348 |
+
if (Zend_Date::isDate($attrValue, Zend_Date::ISO_8601)) {
|
349 |
$attrValue = date("Y-m-d", strtotime($attrValue));
|
350 |
}
|
351 |
+
|
352 |
if (!empty($this->_attributeValues[$attrCode])) {
|
353 |
if ($this->_attributeTypes[$attrCode] == 'multiselect') {
|
354 |
$attrValue = explode(',', $attrValue);
|
363 |
$attrValue = null;
|
364 |
}
|
365 |
}
|
366 |
+
|
367 |
+
if (in_array($attrCode, array('image', 'small_image', 'thumbnail'))) {
|
368 |
+
$attrValue = (
|
369 |
+
($attrValue == 'no_selection' || $attrValue == '') ?
|
370 |
+
'' :
|
371 |
+
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $attrValue
|
372 |
+
);
|
373 |
}
|
374 |
+
|
375 |
if (is_scalar($attrValue) && isset($attributes[$attrCode])) {
|
376 |
$dataRows[$itemId][$attributes[$attrCode]['col_name']] = $attrValue;
|
377 |
}
|
378 |
}
|
379 |
|
380 |
$attrSetId = $item->getAttributeSetId();
|
381 |
+
if (isset($attributes[self::COL_ATTR_SET])) {
|
382 |
$dataRows[$itemId][$attributes[self::COL_ATTR_SET]['col_name']]
|
383 |
= $this->_attrSetIdToName[$attrSetId];
|
384 |
+
}
|
385 |
|
386 |
+
if (isset($attributes[self::COL_TYPE])) {
|
387 |
$dataRows[$itemId][$attributes[self::COL_TYPE]['col_name']] = $item->getTypeId();
|
388 |
+
}
|
389 |
|
390 |
if(isset($attributes['_url'])) {
|
391 |
+
if ($item->isVisibleInCatalog() && $item->isVisibleInSiteVisibility()) {
|
392 |
$url = Zend_Uri::factory($item->getProductUrl());
|
393 |
$url->removeQueryParameters();
|
394 |
$dataRows[$itemId][$attributes['_url']['col_name']] = $url->getUri();
|
395 |
+
} else {
|
396 |
$dataRows[$itemId][$attributes['_url']['col_name']] = '';
|
397 |
}
|
398 |
}
|
399 |
|
400 |
+
if (isset($attributes['_category']) || isset($attributes['_root_category'])) {
|
401 |
$rowCategories[$itemId] = $item->getCategoryIds();
|
402 |
+
}
|
403 |
$item = null;
|
404 |
}
|
405 |
$collection->clear();
|
406 |
|
407 |
if ($collection->getCurPage() < $offsetProducts) {
|
408 |
+
|
409 |
break;
|
410 |
}
|
411 |
|
416 |
}
|
417 |
|
418 |
// prepare catalog inventory information
|
419 |
+
if (isset($attributes['qty']) || isset($attributes['is_in_stock'])) {
|
420 |
$productIds = array_keys($dataRows);
|
421 |
$stockItemRows = $this->_prepareCatalogInventory($productIds);
|
422 |
}
|
423 |
|
424 |
foreach ($dataRows as $productId => &$dataRow) {
|
425 |
|
426 |
+
if (isset($stockItemRows[$productId])) {
|
427 |
$dataRow += $stockItemRows[$productId];
|
428 |
+
}
|
429 |
|
430 |
+
if (isset($rowCategories[$productId])) {
|
431 |
$this->_updateDataWithCategoryColumns($dataRow, $rowCategories, $productId);
|
432 |
+
}
|
433 |
|
434 |
+
if (!empty($rowMultiselects[$productId])) {
|
435 |
foreach ($rowMultiselects[$productId] as $attrKey => $attrVal) {
|
436 |
if (!empty($rowMultiselects[$productId][$attrKey])) {
|
437 |
$dataRow[$attrKey] = implode(",", $attrVal);
|
438 |
}
|
439 |
}
|
440 |
}
|
441 |
+
|
442 |
$writer->writeRow($dataRow);
|
443 |
}
|
444 |
}
|
445 |
|
446 |
+
$notification = Mage::helper('euromsg')->getConfigData('general/notify', 'catalog');
|
447 |
+
if ($notification) {
|
|
|
448 |
$destination = tempnam(sys_get_temp_dir(), $this->getFilename() . '.xml');
|
449 |
$this->_wrap[$this->getFilename() . '.xml'] = $destination;
|
450 |
$xml = Mage::helper('core')->assocToXml(array('NOTIFICATION_EMAIL' => $notification), 'euro.message');
|
app/code/local/Numerno/Euromsg/Model/Io/Sftp.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* SFTP I/O
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Model_Io_Sftp extends Varien_Io_Sftp
|
39 |
-
{
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Write a file
|
43 |
-
* @param $src Must be a local file name
|
44 |
-
*/
|
45 |
-
public function write($filename, $src, $mode=null)
|
46 |
-
{
|
47 |
-
return $this->_connection->put($filename, $src, $mode);
|
48 |
-
}
|
49 |
-
|
50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/Model/Mail.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/Mail/Log.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/Mail/Transport/EuroMessage.php
CHANGED
@@ -1,35 +1,38 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
32 |
-
*
|
33 |
*
|
34 |
* @category Numerno
|
35 |
* @package Numerno_Euromsg
|
@@ -37,7 +40,6 @@
|
|
37 |
*/
|
38 |
class Numerno_Euromsg_Model_Mail_Transport_EuroMessage extends Zend_Mail_Transport_Sendmail
|
39 |
{
|
40 |
-
|
41 |
/**
|
42 |
* Send a mail using this transport
|
43 |
*
|
@@ -48,29 +50,28 @@ class Numerno_Euromsg_Model_Mail_Transport_EuroMessage extends Zend_Mail_Transpo
|
|
48 |
*/
|
49 |
public function send(Zend_Mail $mail)
|
50 |
{
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
-
$client = Mage::getModel('euromsg/platform');
|
54 |
-
$client->_login();
|
55 |
-
|
56 |
-
$service = $client->getPostService();
|
57 |
-
$helper = Mage::helper('euromsg/post');
|
58 |
-
$logging = $helper->getStoreConfig('log/enabled');
|
59 |
-
|
60 |
if($mail->getCharset())
|
61 |
-
$
|
62 |
|
63 |
$mailType = isset($mail->template) ? $mail->template : 'general';
|
64 |
-
|
65 |
-
$headers = $mail->getHeaders();
|
66 |
$headersToCheck = array('To');
|
67 |
|
|
|
68 |
foreach($headersToCheck as $header) {
|
69 |
if(isset($headers[$header])) {
|
70 |
unset($headers[$header]['append']);
|
71 |
$recipients = $headers[$header];
|
72 |
foreach($recipients as $key => $recipient) {
|
73 |
-
|
|
|
|
|
74 |
$recipient,
|
75 |
$headers['Subject'][0],
|
76 |
$mail->getBodyHtml()->getRawContent(),
|
@@ -84,20 +85,23 @@ class Numerno_Euromsg_Model_Mail_Transport_EuroMessage extends Zend_Mail_Transpo
|
|
84 |
->setResponseMessage($result->Message)
|
85 |
->setResponseMessageDetailed($result->DetailedMessage)
|
86 |
->setMarkedSpam($result->MarkedSpam);
|
87 |
-
|
|
|
88 |
$log->setMailSubject(mb_decode_mimeheader($headers['Subject'][0]))
|
89 |
->setMailBody($mail->getBodyHtml()->getRawContent())
|
90 |
-
->setMailCharset($
|
91 |
->setMailToName(mb_decode_mimeheader($recipient['name']))
|
92 |
->setMailToAddress($recipient['email'])
|
93 |
->setMailType($mailType);
|
|
|
|
|
94 |
$log->save();
|
95 |
}
|
96 |
}
|
97 |
}
|
98 |
-
$client->_logout();
|
99 |
|
100 |
-
}catch(Exception $e){
|
|
|
101 |
Mage::logException($e);
|
102 |
}
|
103 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
35 |
+
* euro.message MTA (Mail Transport Agent)
|
36 |
*
|
37 |
* @category Numerno
|
38 |
* @package Numerno_Euromsg
|
40 |
*/
|
41 |
class Numerno_Euromsg_Model_Mail_Transport_EuroMessage extends Zend_Mail_Transport_Sendmail
|
42 |
{
|
|
|
43 |
/**
|
44 |
* Send a mail using this transport
|
45 |
*
|
50 |
*/
|
51 |
public function send(Zend_Mail $mail)
|
52 |
{
|
53 |
+
try {
|
54 |
+
$client = Mage::getModel('euromsg/platform');
|
55 |
+
$helper = Mage::helper('euromsg');
|
56 |
+
$logging = $helper->getConfigData('log/enabled', 'trx');
|
57 |
|
58 |
+
//TODO: TIA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
if($mail->getCharset())
|
60 |
+
$client->setCharset($mail->getCharset());
|
61 |
|
62 |
$mailType = isset($mail->template) ? $mail->template : 'general';
|
63 |
+
$headers = $mail->getHeaders();
|
|
|
64 |
$headersToCheck = array('To');
|
65 |
|
66 |
+
//TODO: CL
|
67 |
foreach($headersToCheck as $header) {
|
68 |
if(isset($headers[$header])) {
|
69 |
unset($headers[$header]['append']);
|
70 |
$recipients = $headers[$header];
|
71 |
foreach($recipients as $key => $recipient) {
|
72 |
+
|
73 |
+
//SEND
|
74 |
+
$result = $client->sendEmail(
|
75 |
$recipient,
|
76 |
$headers['Subject'][0],
|
77 |
$mail->getBodyHtml()->getRawContent(),
|
85 |
->setResponseMessage($result->Message)
|
86 |
->setResponseMessageDetailed($result->DetailedMessage)
|
87 |
->setMarkedSpam($result->MarkedSpam);
|
88 |
+
|
89 |
+
if ($logging) {
|
90 |
$log->setMailSubject(mb_decode_mimeheader($headers['Subject'][0]))
|
91 |
->setMailBody($mail->getBodyHtml()->getRawContent())
|
92 |
+
->setMailCharset($client->getCharset())
|
93 |
->setMailToName(mb_decode_mimeheader($recipient['name']))
|
94 |
->setMailToAddress($recipient['email'])
|
95 |
->setMailType($mailType);
|
96 |
+
}
|
97 |
+
|
98 |
$log->save();
|
99 |
}
|
100 |
}
|
101 |
}
|
|
|
102 |
|
103 |
+
} catch(Exception $e) {
|
104 |
+
//TODO: TIA
|
105 |
Mage::logException($e);
|
106 |
}
|
107 |
|
app/code/local/Numerno/Euromsg/Model/Newsletter/Subscriber/Collection.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -47,10 +50,11 @@ class Numerno_Euromsg_Model_Newsletter_Subscriber_Collection
|
|
47 |
public function showCustomerInfo($attributes = array('firstname', 'lastname', 'middlename'))
|
48 |
{
|
49 |
$adapter = $this->getConnection();
|
|
|
50 |
$customer = Mage::getModel('customer/customer');
|
51 |
$resource = Mage::getSingleton('core/resource');
|
52 |
|
53 |
-
foreach($attributes as $attribute_code) {
|
54 |
|
55 |
$attribute = $customer->getAttribute($attribute_code);
|
56 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
50 |
public function showCustomerInfo($attributes = array('firstname', 'lastname', 'middlename'))
|
51 |
{
|
52 |
$adapter = $this->getConnection();
|
53 |
+
//TODO: CL
|
54 |
$customer = Mage::getModel('customer/customer');
|
55 |
$resource = Mage::getSingleton('core/resource');
|
56 |
|
57 |
+
foreach ($attributes as $attribute_code) {
|
58 |
|
59 |
$attribute = $customer->getAttribute($attribute_code);
|
60 |
|
app/code/local/Numerno/Euromsg/Model/Observer.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -54,8 +57,8 @@ class Numerno_Euromsg_Model_Observer
|
|
54 |
$data = $controller->getRequest()->getPost('history');
|
55 |
$notifySms = isset($data['is_customer_notified_by_sms'])
|
56 |
? $data['is_customer_notified_by_sms'] : false;
|
57 |
-
$template = Mage::helper('euromsg
|
58 |
-
$suffix = Mage::helper('euromsg
|
59 |
|
60 |
if($notifySms) {
|
61 |
|
@@ -97,8 +100,8 @@ class Numerno_Euromsg_Model_Observer
|
|
97 |
$data = $controller->getRequest()->getPost('comment');
|
98 |
$notifySms = isset($data['is_customer_notified_by_sms'])
|
99 |
? $data['is_customer_notified_by_sms'] : false;
|
100 |
-
$template = Mage::helper('euromsg
|
101 |
-
$suffix = Mage::helper('euromsg
|
102 |
|
103 |
if($notifySms) {
|
104 |
$processor = new Varien_Filter_Template();
|
@@ -138,8 +141,8 @@ class Numerno_Euromsg_Model_Observer
|
|
138 |
$data = $controller->getRequest()->getPost('comment');
|
139 |
$notifySms = isset($data['is_customer_notified_by_sms'])
|
140 |
? $data['is_customer_notified_by_sms'] : false;
|
141 |
-
$template = Mage::helper('euromsg
|
142 |
-
$suffix = Mage::helper('euromsg
|
143 |
|
144 |
if($notifySms) {
|
145 |
$processor = new Varien_Filter_Template();
|
@@ -179,8 +182,8 @@ class Numerno_Euromsg_Model_Observer
|
|
179 |
$data = $controller->getRequest()->getPost('comment');
|
180 |
$notifySms = isset($data['is_customer_notified_by_sms'])
|
181 |
? $data['is_customer_notified_by_sms'] : false;
|
182 |
-
$template = Mage::helper('euromsg
|
183 |
-
$suffix = Mage::helper('euromsg
|
184 |
|
185 |
if($notifySms) {
|
186 |
$processor = new Varien_Filter_Template();
|
@@ -210,15 +213,15 @@ class Numerno_Euromsg_Model_Observer
|
|
210 |
{
|
211 |
$event = $observer->getEvent();
|
212 |
$order = $event->getOrder();
|
213 |
-
$enabled = Mage::helper('euromsg
|
214 |
-
$notifySms = Mage::helper('euromsg
|
215 |
|
216 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
217 |
try {
|
218 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
219 |
if($customer->getId()) {
|
220 |
-
$template = Mage::helper('euromsg
|
221 |
-
$suffix
|
222 |
$processor = new Varien_Filter_Template();
|
223 |
$processor->setVariables(array(
|
224 |
'order' => $order,
|
@@ -245,15 +248,15 @@ class Numerno_Euromsg_Model_Observer
|
|
245 |
$event = $observer->getEvent();
|
246 |
$invoice = $event->getInvoice();
|
247 |
$order = $invoice->getOrder();
|
248 |
-
$enabled = Mage::helper('euromsg
|
249 |
-
$notifySms = Mage::helper('euromsg
|
250 |
|
251 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
252 |
try {
|
253 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
254 |
if($customer->getId()) {
|
255 |
-
$template = Mage::helper('euromsg
|
256 |
-
$suffix
|
257 |
$processor = new Varien_Filter_Template();
|
258 |
$processor->setVariables(array(
|
259 |
'order' => $order,
|
@@ -281,15 +284,15 @@ class Numerno_Euromsg_Model_Observer
|
|
281 |
$event = $observer->getEvent();
|
282 |
$shipment = $event->getShipment();
|
283 |
$order = $shipment->getOrder();
|
284 |
-
$enabled = Mage::helper('euromsg
|
285 |
-
$notifySms = Mage::helper('euromsg
|
286 |
|
287 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
288 |
try {
|
289 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
290 |
if($customer->getId()) {
|
291 |
-
$template
|
292 |
-
$suffix = Mage::helper('euromsg
|
293 |
|
294 |
$processor = new Varien_Filter_Template();
|
295 |
$processor->setVariables(array(
|
@@ -319,15 +322,15 @@ class Numerno_Euromsg_Model_Observer
|
|
319 |
$track = $event->getTrack();
|
320 |
$shipment = $track->getShipment();
|
321 |
$order = $shipment->getOrder();
|
322 |
-
$enabled = Mage::helper('euromsg
|
323 |
-
$notifySms = Mage::helper('euromsg
|
324 |
|
325 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
326 |
try {
|
327 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
328 |
if($customer->getId()) {
|
329 |
-
$template
|
330 |
-
$suffix = Mage::helper('euromsg
|
331 |
|
332 |
$processor = new Varien_Filter_Template();
|
333 |
$processor->setVariables(array(
|
@@ -357,15 +360,15 @@ class Numerno_Euromsg_Model_Observer
|
|
357 |
$event = $observer->getEvent();
|
358 |
$creditmemo = $event->getCreditmemo();
|
359 |
$order = $creditmemo->getOrder();
|
360 |
-
$enabled = Mage::helper('euromsg
|
361 |
-
$notifySms = Mage::helper('euromsg
|
362 |
|
363 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
364 |
try {
|
365 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
366 |
if($customer->getId()) {
|
367 |
-
$template
|
368 |
-
$suffix = Mage::helper('euromsg
|
369 |
$processor = new Varien_Filter_Template();
|
370 |
$processor->setVariables(array(
|
371 |
'order' => $order,
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
57 |
$data = $controller->getRequest()->getPost('history');
|
58 |
$notifySms = isset($data['is_customer_notified_by_sms'])
|
59 |
? $data['is_customer_notified_by_sms'] : false;
|
60 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_order_update_template', 'sms');
|
61 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
62 |
|
63 |
if($notifySms) {
|
64 |
|
100 |
$data = $controller->getRequest()->getPost('comment');
|
101 |
$notifySms = isset($data['is_customer_notified_by_sms'])
|
102 |
? $data['is_customer_notified_by_sms'] : false;
|
103 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_order_update_template', 'sms');
|
104 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
105 |
|
106 |
if($notifySms) {
|
107 |
$processor = new Varien_Filter_Template();
|
141 |
$data = $controller->getRequest()->getPost('comment');
|
142 |
$notifySms = isset($data['is_customer_notified_by_sms'])
|
143 |
? $data['is_customer_notified_by_sms'] : false;
|
144 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_order_update_template', 'sms');
|
145 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
146 |
|
147 |
if($notifySms) {
|
148 |
$processor = new Varien_Filter_Template();
|
182 |
$data = $controller->getRequest()->getPost('comment');
|
183 |
$notifySms = isset($data['is_customer_notified_by_sms'])
|
184 |
? $data['is_customer_notified_by_sms'] : false;
|
185 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_order_update_template', 'sms');
|
186 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
187 |
|
188 |
if($notifySms) {
|
189 |
$processor = new Varien_Filter_Template();
|
213 |
{
|
214 |
$event = $observer->getEvent();
|
215 |
$order = $event->getOrder();
|
216 |
+
$enabled = Mage::helper('euromsg')->getConfigData('general/enabled', 'sms');
|
217 |
+
$notifySms = Mage::helper('euromsg')->getConfigData('template/sms_new_order', 'sms');
|
218 |
|
219 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
220 |
try {
|
221 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
222 |
if($customer->getId()) {
|
223 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_new_order_template', 'sms');
|
224 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
225 |
$processor = new Varien_Filter_Template();
|
226 |
$processor->setVariables(array(
|
227 |
'order' => $order,
|
248 |
$event = $observer->getEvent();
|
249 |
$invoice = $event->getInvoice();
|
250 |
$order = $invoice->getOrder();
|
251 |
+
$enabled = Mage::helper('euromsg')->getConfigData('general/enabled', 'sms');
|
252 |
+
$notifySms = Mage::helper('euromsg')->getConfigData('template/sms_new_invoice', 'sms');
|
253 |
|
254 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
255 |
try {
|
256 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
257 |
if($customer->getId()) {
|
258 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_new_invoice_template', 'sms');
|
259 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
260 |
$processor = new Varien_Filter_Template();
|
261 |
$processor->setVariables(array(
|
262 |
'order' => $order,
|
284 |
$event = $observer->getEvent();
|
285 |
$shipment = $event->getShipment();
|
286 |
$order = $shipment->getOrder();
|
287 |
+
$enabled = Mage::helper('euromsg')->getConfigData('general/enabled', 'sms');
|
288 |
+
$notifySms = Mage::helper('euromsg')->getConfigData('template/sms_new_shipment', 'sms');
|
289 |
|
290 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
291 |
try {
|
292 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
293 |
if($customer->getId()) {
|
294 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_new_shipment_template', 'sms');
|
295 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
296 |
|
297 |
$processor = new Varien_Filter_Template();
|
298 |
$processor->setVariables(array(
|
322 |
$track = $event->getTrack();
|
323 |
$shipment = $track->getShipment();
|
324 |
$order = $shipment->getOrder();
|
325 |
+
$enabled = Mage::helper('euromsg')->getConfigData('general/enabled', 'sms');
|
326 |
+
$notifySms = Mage::helper('euromsg')->getConfigData('template/sms_new_track', 'sms');
|
327 |
|
328 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
329 |
try {
|
330 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
331 |
if($customer->getId()) {
|
332 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_new_track_template', 'sms');
|
333 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
334 |
|
335 |
$processor = new Varien_Filter_Template();
|
336 |
$processor->setVariables(array(
|
360 |
$event = $observer->getEvent();
|
361 |
$creditmemo = $event->getCreditmemo();
|
362 |
$order = $creditmemo->getOrder();
|
363 |
+
$enabled = Mage::helper('euromsg')->getConfigData('general/enabled', 'sms');
|
364 |
+
$notifySms = Mage::helper('euromsg')->getConfigData('template/sms_new_creditmemo', 'sms');
|
365 |
|
366 |
if ($enabled && $notifySms && $order->getId() && $order->getCustomerId()) {
|
367 |
try {
|
368 |
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
|
369 |
if($customer->getId()) {
|
370 |
+
$template = Mage::helper('euromsg')->getConfigData('template/sms_new_creditmemo_template', 'sms');
|
371 |
+
$suffix = Mage::helper('euromsg')->getConfigData('template/footer', 'sms');
|
372 |
$processor = new Varien_Filter_Template();
|
373 |
$processor->setVariables(array(
|
374 |
'order' => $order,
|
app/code/local/Numerno/Euromsg/Model/Platform.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -35,9 +38,12 @@
|
|
35 |
* @package Numerno_Euromsg
|
36 |
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
*/
|
38 |
-
class Numerno_Euromsg_Model_Platform extends
|
39 |
{
|
40 |
|
|
|
|
|
|
|
41 |
/**
|
42 |
* Constructor
|
43 |
*
|
@@ -46,139 +52,448 @@ class Numerno_Euromsg_Model_Platform extends Numerno_Euromsg_Model_Platform_Abst
|
|
46 |
*/
|
47 |
public function __construct($wsdl = null, $options = null)
|
48 |
{
|
|
|
|
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
try {
|
51 |
-
$
|
52 |
-
$_uri = Zend_Uri::factory($
|
53 |
-
|
54 |
$wsdl = $_uri->getUri();
|
55 |
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
-
|
61 |
}
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
else
|
72 |
-
Mage::throwException($this->getHelper()->__('Cannot login to euro.message web service: %s', $_response->Message));
|
73 |
|
74 |
return $this;
|
75 |
}
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
-
|
83 |
-
$this->Logout(array('ServiceTicket' => $this->getServiceTicket()));
|
84 |
-
$this->setServiceTicket(null);
|
85 |
}
|
86 |
|
87 |
-
return $
|
88 |
}
|
89 |
|
90 |
/**
|
91 |
* Check if logged in
|
92 |
*/
|
93 |
-
|
94 |
-
|
95 |
-
if($this->
|
96 |
return true;
|
97 |
|
98 |
return false;
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
/**
|
102 |
-
*
|
103 |
*/
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
else
|
109 |
-
Mage::throwException($this->
|
110 |
|
111 |
-
return
|
112 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
|
119 |
-
return $
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
-
*
|
124 |
*/
|
125 |
-
public function
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
return false;
|
133 |
}
|
134 |
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
public function getReportService(){
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
return false;
|
|
|
154 |
}
|
155 |
|
156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
|
158 |
-
$
|
159 |
-
|
|
|
|
|
160 |
|
161 |
-
return $_service;
|
162 |
}
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
|
169 |
-
if($
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
|
174 |
return false;
|
175 |
}
|
176 |
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
-
$
|
180 |
-
|
181 |
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
183 |
}
|
184 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
38 |
* @package Numerno_Euromsg
|
39 |
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
40 |
*/
|
41 |
+
class Numerno_Euromsg_Model_Platform extends Zend_Soap_Client_DotNet
|
42 |
{
|
43 |
|
44 |
+
protected $_serviceTicket = null;
|
45 |
+
protected $_charset = 'UTF-8';
|
46 |
+
|
47 |
/**
|
48 |
* Constructor
|
49 |
*
|
52 |
*/
|
53 |
public function __construct($wsdl = null, $options = null)
|
54 |
{
|
55 |
+
$this->_init();
|
56 |
+
}
|
57 |
|
58 |
+
/**
|
59 |
+
* Initializer
|
60 |
+
*
|
61 |
+
* @param string $service
|
62 |
+
* @param array $options
|
63 |
+
*/
|
64 |
+
protected function _init($service = 'auth', $options = null)
|
65 |
+
{
|
66 |
try {
|
67 |
+
$webServiceUrl = $this->_getHelper()->getConfigData('general/platform');
|
68 |
+
$_uri = Zend_Uri::factory($webServiceUrl . $service . '.asmx?WSDL');
|
|
|
69 |
$wsdl = $_uri->getUri();
|
70 |
|
71 |
+
if(!is_array($options))
|
72 |
+
$options = array();
|
73 |
+
|
74 |
+
$options['encoding'] = $this->_charset;
|
75 |
+
$options['soap_version'] = SOAP_1_2;
|
76 |
+
|
77 |
+
parent::__construct($wsdl, $options);
|
78 |
+
|
79 |
+
}catch(Exception $e)
|
80 |
+
{
|
81 |
+
Mage::throwException($this->_getHelper()->__('Invalid euro.message web service: %s', $service));
|
82 |
}
|
83 |
|
84 |
+
return $this;
|
85 |
}
|
86 |
|
87 |
+
protected function _getHelper()
|
88 |
+
{
|
89 |
+
return Mage::helper('euromsg');
|
90 |
+
}
|
91 |
|
92 |
+
protected function _setServiceTicket($token)
|
93 |
+
{
|
94 |
+
$this->_serviceTicket = $token;
|
|
|
|
|
95 |
|
96 |
return $this;
|
97 |
}
|
98 |
|
99 |
+
protected function _getServiceTicket()
|
100 |
+
{
|
101 |
+
return $this->_serviceTicket;
|
102 |
+
}
|
103 |
+
|
104 |
+
public function setCharset($charset)
|
105 |
+
{
|
106 |
+
return $this->_charset = $charset;
|
107 |
+
}
|
108 |
+
|
109 |
+
public function getCharset()
|
110 |
+
{
|
111 |
+
return $this->_charset;
|
112 |
+
}
|
113 |
+
|
114 |
+
protected function _getResponseXml()
|
115 |
+
{
|
116 |
+
$response = str_ireplace('soap:', '', $this->getLastResponse()); //make readable for SoapXML
|
117 |
+
$responseXml = simplexml_load_string($response);
|
118 |
+
|
119 |
+
if (isset($responseXml->Body)) {
|
120 |
|
121 |
+
return $responseXml->Body;
|
|
|
|
|
122 |
}
|
123 |
|
124 |
+
return $responseXml;
|
125 |
}
|
126 |
|
127 |
/**
|
128 |
* Check if logged in
|
129 |
*/
|
130 |
+
private function _isLoggedIn()
|
131 |
+
{
|
132 |
+
if($this->_getServiceTicket())
|
133 |
return true;
|
134 |
|
135 |
return false;
|
136 |
}
|
137 |
|
138 |
+
public function _getMemberDemographics($customerId, &$data)
|
139 |
+
{
|
140 |
+
$helper = $this->_getHelper();
|
141 |
+
$attributes = unserialize($helper->getConfigData('general/attributes', 'customer'));
|
142 |
+
$attributeCodes = array();
|
143 |
+
foreach ($attributes as $attribute) {
|
144 |
+
$attributeCodes[] = $helper->removeCustomerPrefix($attribute['attribute']);
|
145 |
+
}
|
146 |
+
$customer = Mage::getResourceModel('customer/customer_collection')
|
147 |
+
->addAttributeToSelect($attributeCodes)
|
148 |
+
->addAttributeToFilter('entity_id', array('eq' => $customerId));
|
149 |
+
|
150 |
+
if($customer->count()) {
|
151 |
+
$prefix = $helper->getCustomerAttributePrefix();
|
152 |
+
$preset = array_keys($helper->getPresetCustomerAttributes());
|
153 |
+
|
154 |
+
$customer = $customer->getFirstItem();
|
155 |
+
foreach ($attributes as $key => $attribute) {
|
156 |
+
|
157 |
+
$attributeCode = preg_replace('/^' . $prefix . '/', '', $attribute['attribute']);
|
158 |
+
if($attributeCode == 'entity_id' || !in_array($key, $preset) ) {
|
159 |
+
|
160 |
+
$attribute = $customer->getResource()->getAttribute($helper->removeCustomerPrefix($attributeCode));
|
161 |
+
if ($attribute->usesSource()) {
|
162 |
+
$value = $attribute->getFrontend()->getValue($customer);
|
163 |
+
} else {
|
164 |
+
$value = $customer->getData($helper->removeCustomerPrefix($attributeCode));
|
165 |
+
}
|
166 |
+
|
167 |
+
if(Zend_Date::isDate($value, Zend_Date::ISO_8601)) {
|
168 |
+
$value = date("Ymd", strtotime($value));
|
169 |
+
}
|
170 |
+
|
171 |
+
$data[] = array(
|
172 |
+
'Key' => $attributes[$key]['col_name'],
|
173 |
+
'Value' => $value
|
174 |
+
);
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
/**
|
181 |
+
* Login to euro.message Web Service
|
182 |
*/
|
183 |
+
private function _login()
|
184 |
+
{
|
185 |
+
$helper = $this->_getHelper();
|
186 |
+
$params = array(
|
187 |
+
'Username' => $helper->getConfigData('general/ws_user'),
|
188 |
+
'Password' => $helper->getConfigData('general/ws_pass')
|
189 |
+
);
|
190 |
+
$result = $this->Login($params);
|
191 |
+
|
192 |
+
if($result->Code == '00')
|
193 |
+
$this->_setServiceTicket($result->ServiceTicket);
|
194 |
else
|
195 |
+
Mage::throwException($this->_getHelper()->__('Cannot login to euro.message web service: %s', $result->Message));
|
196 |
|
197 |
+
return $this;
|
198 |
}
|
199 |
+
/**
|
200 |
+
* Call web services
|
201 |
+
*/
|
202 |
+
public function connect($_serviceName)
|
203 |
+
{
|
204 |
+
if(!$this->_isLoggedIn())
|
205 |
+
$this->_login();
|
206 |
|
207 |
+
if($this->_isLoggedIn())
|
208 |
+
return $this->_init($_serviceName);
|
209 |
+
else
|
210 |
+
Mage::throwException($this->_getHelper()->__('Can not connect to %s Web Service. Login failed.', $_serviceName));
|
211 |
|
212 |
+
return $this;
|
213 |
}
|
214 |
|
215 |
/**
|
216 |
+
* Logout from euro.message Web Service
|
217 |
*/
|
218 |
+
public function disconnect()
|
219 |
+
{
|
220 |
+
if($this->_isLoggedIn()) {
|
221 |
+
$this->_init('auth');
|
222 |
+
$this->Logout(array('ServiceTicket' => $this->_getServiceTicket()));
|
223 |
+
$this->_setServiceTicket(null);
|
224 |
+
}
|
225 |
|
226 |
+
return $this;
|
227 |
+
}
|
228 |
+
|
229 |
+
public function sendEmail($recipient, $subject, $body, $type = 'general')
|
230 |
+
{
|
231 |
+
$this->connect('post');
|
232 |
+
|
233 |
+
$helper = $this->_getHelper();
|
234 |
+
$params = array(
|
235 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
236 |
+
'Subject' => $subject,
|
237 |
+
'HtmlBody' => $body,
|
238 |
+
'Charset' => $this->_charset,
|
239 |
+
'ToName' => $recipient['name'],
|
240 |
+
'ToEmailAddress' => $recipient['email'],
|
241 |
+
'PostType' => $type,
|
242 |
+
'FromName' => $helper->getConfigData('general/from_name', 'trx'),
|
243 |
+
'FromAddress' => $helper->getConfigData('general/from_addr', 'trx'),
|
244 |
+
'ReplyAddress' => $helper->getConfigData('general/reply_addr', 'trx')
|
245 |
+
);
|
246 |
+
$result = $this->PostHtmlWithType($params);
|
247 |
+
|
248 |
+
$this->disconnect();
|
249 |
+
|
250 |
+
return $result;
|
251 |
+
}
|
252 |
+
|
253 |
+
public function trackEmail($postId)
|
254 |
+
{
|
255 |
+
$this->connect('post');
|
256 |
+
|
257 |
+
$params = array(
|
258 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
259 |
+
'PostID' => $postId
|
260 |
+
);
|
261 |
+
$result = $this->GetPostResult($params);
|
262 |
+
|
263 |
+
$this->disconnect();
|
264 |
+
|
265 |
+
return $result;
|
266 |
+
}
|
267 |
+
|
268 |
+
public function trackEmails($postIds)
|
269 |
+
{
|
270 |
+
$this->connect('post');
|
271 |
+
|
272 |
+
$params = array(
|
273 |
+
'serviceTicket' => $this->_getServiceTicket(),
|
274 |
+
'postIds' => $postIds
|
275 |
+
);
|
276 |
+
$this->GetPostBulkResultByPostId($params);
|
277 |
+
$response = $this->_getResponseXml();
|
278 |
+
|
279 |
+
$this->disconnect();
|
280 |
+
|
281 |
+
if(isset($response->GetPostBulkResultByPostIdResponse)) {
|
282 |
+
return $response->GetPostBulkResultByPostIdResponse->bulkResult;
|
283 |
+
}
|
284 |
|
285 |
return false;
|
286 |
}
|
287 |
|
288 |
+
public function sendSMS($message, $recipient, $begin)
|
289 |
+
{
|
290 |
+
$this->connect('postsms');
|
291 |
+
|
292 |
+
$helper = $this->_getHelper();
|
293 |
+
$method = $helper->getConfigData('general/method', 'sms');
|
294 |
+
|
295 |
+
switch($method){
|
296 |
+
case 'single-shot':
|
297 |
+
|
298 |
+
$params = array(
|
299 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
300 |
+
'Originator' => $helper->getConfigData('general/originator', 'sms'),
|
301 |
+
'NumberMessagePair' => array(
|
302 |
+
'Key' => $message,
|
303 |
+
'Value' => $recipient
|
304 |
+
),
|
305 |
+
'BeginTime' => $begin
|
306 |
+
);
|
307 |
+
|
308 |
+
$this->SingleShotSms($params);
|
309 |
+
$response = $this->_getResponseXml();
|
310 |
+
$this->disconnect();
|
311 |
+
|
312 |
+
if(isset($response->SingleShotSmsResponse)) {
|
313 |
+
$result = $response->SingleShotSmsResponse->SendPersonalSmsResult;
|
314 |
+
$result->Type = 'singleshot';
|
315 |
+
|
316 |
+
return $result;
|
317 |
+
}
|
318 |
+
break;
|
319 |
+
|
320 |
+
case 'standard':
|
321 |
+
|
322 |
+
$params = array(
|
323 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
324 |
+
'Originator' => $helper->getConfigData('general/originator', 'sms'),
|
325 |
+
'NumberMessagePair' => array(
|
326 |
+
'Key' => $message,
|
327 |
+
'Value' => $recipient
|
328 |
+
),
|
329 |
+
'BeginTime' => $begin
|
330 |
+
);
|
331 |
+
|
332 |
+
$this->SendPersonalSms($params);
|
333 |
+
$response = $this->_getResponseXml();
|
334 |
+
$this->disconnect();
|
335 |
+
|
336 |
+
if(isset($response->SendPersonalSmsResponse)) {
|
337 |
+
$result = $response->SendPersonalSmsResponse->SendPersonalSmsResult;
|
338 |
+
$result->Type = 'standard';
|
339 |
+
|
340 |
+
return $result;
|
341 |
+
}
|
342 |
+
break;
|
343 |
+
|
344 |
+
default:
|
345 |
+
Mage::throwException($this->_getHelper()->__('Platform::sendSMS: Unrecognized method.'));
|
346 |
+
}
|
347 |
|
348 |
+
return false;
|
349 |
+
}
|
350 |
+
|
351 |
+
public function trackSMS($packetId, $type = 'standard')
|
352 |
+
{
|
353 |
+
$this->connect('postsms');
|
354 |
+
|
355 |
+
$params = array(
|
356 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
357 |
+
'PacketId' => $packetId
|
358 |
+
);
|
359 |
|
360 |
+
if ($type == 'standard') {
|
361 |
+
|
362 |
+
$this->ReportSmsWithPacketId($params);
|
363 |
+
$response = $this->_getResponseXml();
|
364 |
+
|
365 |
+
$this->disconnect();
|
366 |
+
|
367 |
+
if(isset($response->ReportSmsWithPacketIdResponse)) {
|
368 |
+
return $response
|
369 |
+
->ReportSmsWithPacketIdResponse
|
370 |
+
->ReportSmsWithPacketIdResult
|
371 |
+
->DeliveryResults
|
372 |
+
->EmSmsDeliveryResult;
|
373 |
+
}
|
374 |
+
}
|
375 |
+
|
376 |
+
if ($type == 'singleshot') {
|
377 |
+
|
378 |
+
$this->ReportSingleShotSms($params);
|
379 |
+
$response = $this->_getResponseXml();
|
380 |
+
|
381 |
+
$this->disconnect();
|
382 |
+
|
383 |
+
if(isset($response->ReportSingleShotSmsResponse)) {
|
384 |
+
return $response
|
385 |
+
->ReportSingleShotSmsResponse
|
386 |
+
->ReportSingleShotSmsResult
|
387 |
+
->DeliveryResults
|
388 |
+
->EmSmsDeliveryResult;
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
return false;
|
393 |
}
|
394 |
|
395 |
+
public function getUnsubscribers($begin, $end)
|
396 |
+
{
|
397 |
+
$this->connect('report');
|
|
|
398 |
|
399 |
+
$params = array(
|
400 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
401 |
+
'BeginDate' => $begin,
|
402 |
+
'EndDate' => $end
|
403 |
+
);
|
404 |
+
|
405 |
+
$this->GetUnsubscribeReportBetweenTwoDates($params);
|
406 |
+
$response = $this->_getResponseXml();
|
407 |
+
|
408 |
+
$this->disconnect();
|
409 |
+
|
410 |
+
if(isset($response->GetUnsubscribeReportBetweenTwoDatesResponse ))
|
411 |
+
return $response->GetUnsubscribeReportBetweenTwoDatesResponse->Unsubscribers;
|
412 |
|
413 |
return false;
|
414 |
+
|
415 |
}
|
416 |
|
417 |
+
public function getOptouts($begin, $end)
|
418 |
+
{
|
419 |
+
$this->connect('report');
|
420 |
+
|
421 |
+
$params = array(
|
422 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
423 |
+
'BeginDate' => $begin,
|
424 |
+
'EndDate' => $end
|
425 |
+
);
|
426 |
+
|
427 |
+
$this->GetSmsOptoutReportBetweenTwoDates($params);
|
428 |
+
$response = $this->_getResponseXml();
|
429 |
+
|
430 |
+
$this->disconnect();
|
431 |
|
432 |
+
if(isset($response->GetSmsOptoutReportBetweenTwoDatesResponse ))
|
433 |
+
return $response->GetSmsOptoutReportBetweenTwoDatesResponse->Unsubscribers;
|
434 |
+
|
435 |
+
return false;
|
436 |
|
|
|
437 |
}
|
438 |
|
439 |
+
public function updateMember($email)
|
440 |
+
{
|
441 |
+
$subscriber = Mage::getModel('newsletter/subscriber')
|
442 |
+
->loadByEmail($email);
|
443 |
|
444 |
+
if($subscriber->getId()){
|
445 |
+
|
446 |
+
$this->connect('member');
|
447 |
+
|
448 |
+
$data = array(
|
449 |
+
array(
|
450 |
+
'Key' => Numerno_Euromsg_Model_Export_Entity_Member::COL_EMAIL_PERMIT,
|
451 |
+
'Value' => $subscriber->isSubscribed() ? 'Y' : 'N'
|
452 |
+
)
|
453 |
+
);
|
454 |
+
|
455 |
+
if($subscriber->getCustomerId())
|
456 |
+
$this->_getMemberDemographics($subscriber->getCustomerId(), $data);
|
457 |
+
|
458 |
+
$params = array(
|
459 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
460 |
+
'Key' => Numerno_Euromsg_Model_Export_Entity_Member::COL_EMAIL,
|
461 |
+
'Value' => $subscriber->getEmail(),
|
462 |
+
'DemograficData' => $data,
|
463 |
+
'ForceInsert' => true
|
464 |
+
);
|
465 |
+
|
466 |
+
$this->UpdateMemberDemography($params);
|
467 |
+
$response = $this->_getResponseXml();
|
468 |
+
|
469 |
+
$this->disconnect();
|
470 |
+
|
471 |
+
if(isset($response->UpdateMemberDemographyResponse))
|
472 |
+
return true;
|
473 |
+
}else
|
474 |
+
Mage::throwException($this->_getHelper()->__('Platform::updateMember: Email not found.'));
|
475 |
|
476 |
return false;
|
477 |
}
|
478 |
|
479 |
+
public function getMember($email)
|
480 |
+
{
|
481 |
+
$this->connect('member');
|
482 |
+
|
483 |
+
$params = array(
|
484 |
+
'ServiceTicket' => $this->_getServiceTicket(),
|
485 |
+
'Key' => Numerno_Euromsg_Model_Export_Entity_Member::COL_EMAIL,
|
486 |
+
'Value' => $email,
|
487 |
+
);
|
488 |
|
489 |
+
$this->QueryMemberDemography($params);
|
490 |
+
$response = $this->_getResponseXml();
|
491 |
|
492 |
+
$this->disconnect();
|
493 |
+
|
494 |
+
if(isset($response->QueryMemberDemographyResponse))
|
495 |
+
return $response->QueryMemberDemographyResponse;
|
496 |
+
|
497 |
+
return false;
|
498 |
}
|
499 |
}
|
app/code/local/Numerno/Euromsg/Model/Platform/Abstract.php
DELETED
@@ -1,103 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Platform Abstract Class
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Model_Platform_Abstract extends Zend_Soap_Client_DotNet
|
39 |
-
{
|
40 |
-
|
41 |
-
protected $_serviceTicket = null;
|
42 |
-
protected $_charset = 'UTF-8';
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Constructor
|
46 |
-
*
|
47 |
-
* @param string $wsdl
|
48 |
-
* @param array $options
|
49 |
-
*/
|
50 |
-
public function __construct($wsdl = null, $options = null)
|
51 |
-
{
|
52 |
-
if(!is_array($options))
|
53 |
-
$options = array();
|
54 |
-
|
55 |
-
$options['encoding'] = $this->_charset;
|
56 |
-
$options['soap_version'] = SOAP_1_2;
|
57 |
-
|
58 |
-
parent::__construct($wsdl, $options);
|
59 |
-
}
|
60 |
-
|
61 |
-
public function getHelper()
|
62 |
-
{
|
63 |
-
|
64 |
-
return Mage::helper('euromsg');
|
65 |
-
}
|
66 |
-
|
67 |
-
public function setServiceTicket($token)
|
68 |
-
{
|
69 |
-
|
70 |
-
$this->_serviceTicket = $token;
|
71 |
-
|
72 |
-
return $this;
|
73 |
-
}
|
74 |
-
|
75 |
-
public function getServiceTicket()
|
76 |
-
{
|
77 |
-
|
78 |
-
return $this->_serviceTicket;
|
79 |
-
}
|
80 |
-
|
81 |
-
public function setCharset($charset)
|
82 |
-
{
|
83 |
-
|
84 |
-
return $this->_charset = $charset;
|
85 |
-
}
|
86 |
-
|
87 |
-
public function getCharset()
|
88 |
-
{
|
89 |
-
|
90 |
-
return $this->_charset;
|
91 |
-
}
|
92 |
-
|
93 |
-
public function getResponseXml()
|
94 |
-
{
|
95 |
-
$response = str_ireplace('soap:', '', $this->getLastResponse()); //make readable for SoapXML
|
96 |
-
$responseXml = simplexml_load_string($response);
|
97 |
-
|
98 |
-
if(isset($responseXml->Body))
|
99 |
-
return $responseXml->Body;
|
100 |
-
|
101 |
-
return $responseXml;
|
102 |
-
}
|
103 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/Model/Platform/Member.php
DELETED
@@ -1,146 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Member Service
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Model_Platform_Member extends Numerno_Euromsg_Model_Platform_Abstract
|
39 |
-
{
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Constructor
|
43 |
-
*
|
44 |
-
* @param string $wsdl
|
45 |
-
* @param array $options
|
46 |
-
*/
|
47 |
-
public function __construct($wsdl = null, $options = null)
|
48 |
-
{
|
49 |
-
try {
|
50 |
-
$_wsUri = $this->getHelper()->getWsUri();
|
51 |
-
$_uri = Zend_Uri::factory($_wsUri . 'member.asmx?WSDL');
|
52 |
-
|
53 |
-
$wsdl = $_uri->getUri();
|
54 |
-
|
55 |
-
}catch(Exception $e){
|
56 |
-
Mage::throwException($this->getHelper()->__('Invalid euro.message web service URL: %s', $_wsUri));
|
57 |
-
}
|
58 |
-
|
59 |
-
parent::__construct($wsdl, $options);
|
60 |
-
}
|
61 |
-
|
62 |
-
public function updateMember($email) {
|
63 |
-
|
64 |
-
$subscriber = Mage::getModel('newsletter/subscriber')
|
65 |
-
->loadByEmail($email);
|
66 |
-
|
67 |
-
if($subscriber->getId()){
|
68 |
-
$data = array(
|
69 |
-
array(
|
70 |
-
'Key' => Numerno_Euromsg_Model_Export_Entity_Member::COL_EMAIL_PERMIT,
|
71 |
-
'Value' => $subscriber->isSubscribed() ? 'Y' : 'N'
|
72 |
-
)
|
73 |
-
);
|
74 |
-
|
75 |
-
if($subscriber->getCustomerId()){
|
76 |
-
$helper = Mage::helper('euromsg');
|
77 |
-
$_prefix = $helper->getCustomerAttributePrefix();
|
78 |
-
$_preset = array_keys($helper->getPresetCustomerAttributes());
|
79 |
-
$customer = Mage::getModel('customer/customer')->load($subscriber->getCustomerId());
|
80 |
-
|
81 |
-
$attributes = Mage::getStoreConfig('euromsg_customer/general/attributes');
|
82 |
-
if (!is_array($attributes)) {
|
83 |
-
$attributes = empty($attributes) ? array() : unserialize($attributes);
|
84 |
-
}
|
85 |
-
|
86 |
-
foreach ($attributes as $key => $attribute) {
|
87 |
-
|
88 |
-
if (strlen($attribute['attribute']) > strlen($_prefix) &&
|
89 |
-
substr($attribute['attribute'], 0, strlen($_prefix)) == $_prefix) {
|
90 |
-
$attributes[$key]['attribute'] = substr($attribute['attribute'], strlen($_prefix));
|
91 |
-
}
|
92 |
-
|
93 |
-
if($attribute['attribute'] == 'entity_id' || !in_array($key, $_preset) ) {
|
94 |
-
$attribute = $customer->getResource()->getAttribute($attributes[$key]['attribute']);
|
95 |
-
if($attribute->usesSource())
|
96 |
-
$value = $attribute->getFrontend()->getValue($customer);
|
97 |
-
else
|
98 |
-
$value = $customer->getData($attributes[$key]['attribute']);
|
99 |
-
|
100 |
-
if(Zend_Date::isDate($value, Zend_Date::ISO_8601)) {
|
101 |
-
$value = date("Ymd", strtotime($value));
|
102 |
-
}
|
103 |
-
$data[] = array(
|
104 |
-
'Key' => $attributes[$key]['col_name'],
|
105 |
-
'Value' => $value
|
106 |
-
);
|
107 |
-
}
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
$_params = array(
|
112 |
-
'ServiceTicket' => $this->getServiceTicket(),
|
113 |
-
'Key' => Numerno_Euromsg_Model_Export_Entity_Member::COL_EMAIL,
|
114 |
-
'Value' => $subscriber->getEmail(),
|
115 |
-
'DemograficData'=> $data,
|
116 |
-
'ForceInsert' => true
|
117 |
-
);
|
118 |
-
|
119 |
-
$this->UpdateMemberDemography($_params);
|
120 |
-
$response = $this->getResponseXml();
|
121 |
-
|
122 |
-
if(isset($response->UpdateMemberDemographyResponse))
|
123 |
-
return true;
|
124 |
-
}
|
125 |
-
|
126 |
-
return false;
|
127 |
-
}
|
128 |
-
|
129 |
-
public function getMember($email)
|
130 |
-
{
|
131 |
-
$_params = array(
|
132 |
-
'ServiceTicket' => $this->getServiceTicket(),
|
133 |
-
'Key' => Numerno_Euromsg_Model_Export_Entity_Member::COL_EMAIL,
|
134 |
-
'Value' => $email,
|
135 |
-
);
|
136 |
-
|
137 |
-
$this->QueryMemberDemography($_params);
|
138 |
-
|
139 |
-
$response = $this->getResponseXml();
|
140 |
-
|
141 |
-
if(isset($response->QueryMemberDemographyResponse))
|
142 |
-
return $response->QueryMemberDemographyResponse;
|
143 |
-
|
144 |
-
return false;
|
145 |
-
}
|
146 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/Model/Platform/Post.php
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Post Service
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Model_Platform_Post extends Numerno_Euromsg_Model_Platform_Abstract
|
39 |
-
{
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Constructor
|
43 |
-
*
|
44 |
-
* @param string $wsdl
|
45 |
-
* @param array $options
|
46 |
-
*/
|
47 |
-
public function __construct($wsdl = null, $options = null)
|
48 |
-
{
|
49 |
-
|
50 |
-
try {
|
51 |
-
$_wsUri = $this->getHelper()->getWsUri();
|
52 |
-
$_uri = Zend_Uri::factory($_wsUri . 'post.asmx?WSDL');
|
53 |
-
|
54 |
-
$wsdl = $_uri->getUri();
|
55 |
-
|
56 |
-
}catch(Exception $e){
|
57 |
-
Mage::throwException($this->getHelper()->__('Invalid euro.message web service URL: %s', $_wsUri));
|
58 |
-
}
|
59 |
-
|
60 |
-
parent::__construct($wsdl, $options);
|
61 |
-
}
|
62 |
-
|
63 |
-
public function getPostHelper(){
|
64 |
-
|
65 |
-
return Mage::helper('euromsg/post');
|
66 |
-
}
|
67 |
-
|
68 |
-
public function post($recipient, $subject, $body, $type = 'general'){
|
69 |
-
|
70 |
-
$_params = array(
|
71 |
-
'ServiceTicket' => $this->getServiceTicket(),
|
72 |
-
'Subject' => $subject,
|
73 |
-
'HtmlBody' => $body,
|
74 |
-
'Charset' => $this->_charset,
|
75 |
-
'ToName' => $recipient['name'],
|
76 |
-
'ToEmailAddress' => $recipient['email'],
|
77 |
-
'PostType' => $type
|
78 |
-
);
|
79 |
-
$postParams = $this->getPostHelper()->getPostParams();
|
80 |
-
|
81 |
-
$params = array_merge($_params, $postParams);
|
82 |
-
|
83 |
-
return $this->PostHtmlWithType($params);
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
public function check($postId){
|
88 |
-
|
89 |
-
$params = array(
|
90 |
-
'ServiceTicket' => $this->getServiceTicket(),
|
91 |
-
'PostID' => $postId
|
92 |
-
);
|
93 |
-
|
94 |
-
return $this->GetPostResult($params);
|
95 |
-
|
96 |
-
}
|
97 |
-
|
98 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/Model/Platform/PostSms.php
DELETED
@@ -1,156 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* PostSms Service
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Model_Platform_PostSms extends Numerno_Euromsg_Model_Platform_Abstract
|
39 |
-
{
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Constructor
|
43 |
-
*
|
44 |
-
* @param string $wsdl
|
45 |
-
* @param array $options
|
46 |
-
*/
|
47 |
-
public function __construct($wsdl = null, $options = null)
|
48 |
-
{
|
49 |
-
try {
|
50 |
-
$_wsUri = $this->getHelper()->getWsUri();
|
51 |
-
$_uri = Zend_Uri::factory($_wsUri . 'postsms.asmx?WSDL');
|
52 |
-
|
53 |
-
$wsdl = $_uri->getUri();
|
54 |
-
|
55 |
-
}catch(Exception $e){
|
56 |
-
Mage::throwException($this->getHelper()->__('Invalid euro.message web service URL: %s', $_wsUri));
|
57 |
-
}
|
58 |
-
|
59 |
-
parent::__construct($wsdl, $options);
|
60 |
-
}
|
61 |
-
|
62 |
-
public function getSmsHelper()
|
63 |
-
{
|
64 |
-
return Mage::helper('euromsg/sms');
|
65 |
-
}
|
66 |
-
|
67 |
-
protected function _sendPersonal($message, $recipient, $begin)
|
68 |
-
{
|
69 |
-
$_params = array(
|
70 |
-
'ServiceTicket' => $this->getServiceTicket(),
|
71 |
-
'Originator' => $this->getSmsHelper()->getOriginator(),
|
72 |
-
'NumberMessagePair' => array(
|
73 |
-
'Key' => $message,
|
74 |
-
'Value' => $recipient
|
75 |
-
),
|
76 |
-
'BeginTime' => $begin
|
77 |
-
);
|
78 |
-
|
79 |
-
$this->SendPersonalSms($_params);
|
80 |
-
$response = $this->getResponseXml();
|
81 |
-
|
82 |
-
if(isset($response->SendPersonalSmsResponse)) {
|
83 |
-
$result = $response->SendPersonalSmsResponse->SendPersonalSmsResult;
|
84 |
-
$result->Type = 'standart';
|
85 |
-
|
86 |
-
return $result;
|
87 |
-
}
|
88 |
-
return false;
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
protected function _sendSingleShot($message, $recipient, $begin)
|
93 |
-
{
|
94 |
-
$_params = array(
|
95 |
-
'ServiceTicket' => $this->getServiceTicket(),
|
96 |
-
'Originator' => $this->getSmsHelper()->getOriginator(),
|
97 |
-
'NumberMessagePair' => array(
|
98 |
-
'Key' => $message,
|
99 |
-
'Value' => $recipient
|
100 |
-
),
|
101 |
-
'BeginTime' => $begin
|
102 |
-
);
|
103 |
-
|
104 |
-
$this->SingleShotSms($_params);
|
105 |
-
$response = $this->getResponseXml();
|
106 |
-
|
107 |
-
if(isset($response->SingleShotSmsResponse)) {
|
108 |
-
$result = $response->SingleShotSmsResponse->SendPersonalSmsResult;
|
109 |
-
$result->Type = 'singleshot';
|
110 |
-
|
111 |
-
return $result;
|
112 |
-
}
|
113 |
-
return false;
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
public function report($packetId)
|
118 |
-
{
|
119 |
-
$_params = array(
|
120 |
-
'ServiceTicket' => $this->getServiceTicket(),
|
121 |
-
'MessageId' => $packetId
|
122 |
-
);
|
123 |
-
|
124 |
-
$_response = $this->ReportSmsWithPacketId($_params);
|
125 |
-
|
126 |
-
return $_response;
|
127 |
-
|
128 |
-
}
|
129 |
-
|
130 |
-
public function send($message, $recipient, $begin)
|
131 |
-
{
|
132 |
-
if(!$this->getSmsHelper()->validateGsmNumber($recipient))
|
133 |
-
return false;
|
134 |
-
|
135 |
-
if(!strlen($message))
|
136 |
-
return false;
|
137 |
-
|
138 |
-
$method = $this->getSmsHelper()->getStoreConfig('general/method');
|
139 |
-
|
140 |
-
switch($method){
|
141 |
-
case 'single-shot':
|
142 |
-
|
143 |
-
$response = $this->_sendSingleShot($message, $recipient, $begin);
|
144 |
-
return $response;
|
145 |
-
break;
|
146 |
-
|
147 |
-
default:
|
148 |
-
|
149 |
-
$response = $this->_sendPersonal($message, $recipient, $begin);
|
150 |
-
return $response;
|
151 |
-
break;
|
152 |
-
}
|
153 |
-
return $response;
|
154 |
-
}
|
155 |
-
|
156 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/Model/Platform/Report.php
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* PostSms Service
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Model_Platform_Report extends Numerno_Euromsg_Model_Platform_Abstract
|
39 |
-
{
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Constructor
|
43 |
-
*
|
44 |
-
* @param string $wsdl
|
45 |
-
* @param array $options
|
46 |
-
*/
|
47 |
-
public function __construct($wsdl = null, $options = null)
|
48 |
-
{
|
49 |
-
try {
|
50 |
-
$_wsUri = $this->getHelper()->getWsUri();
|
51 |
-
$_uri = Zend_Uri::factory($_wsUri . 'report.asmx?WSDL');
|
52 |
-
|
53 |
-
$wsdl = $_uri->getUri();
|
54 |
-
|
55 |
-
}catch(Exception $e){
|
56 |
-
Mage::throwException($this->getHelper()->__('Invalid euro.message web service URL: %s', $_wsUri));
|
57 |
-
}
|
58 |
-
|
59 |
-
parent::__construct($wsdl, $options);
|
60 |
-
}
|
61 |
-
|
62 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/Model/Process.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -67,13 +70,14 @@ class Numerno_Euromsg_Model_Process extends Mage_Core_Model_Abstract
|
|
67 |
*/
|
68 |
protected function _prepareVersion()
|
69 |
{
|
|
|
70 |
$tableName = $this->getTableName();
|
71 |
$versionInc = 0;
|
72 |
|
73 |
do {
|
74 |
$versionInc++;
|
75 |
$version = date("Ymd") . str_pad($versionInc, 3, '0', STR_PAD_LEFT);
|
76 |
-
} while(!$this->_getResource()->isVersionUnique($tableName, $version));
|
77 |
|
78 |
$this->setVersion($version);
|
79 |
}
|
@@ -85,8 +89,10 @@ class Numerno_Euromsg_Model_Process extends Mage_Core_Model_Abstract
|
|
85 |
*/
|
86 |
public function isIncremental()
|
87 |
{
|
88 |
-
if($this->getVersion())
|
|
|
89 |
return true;
|
|
|
90 |
|
91 |
return !$this->_getResource()->isTableNameUnique($this->getTableName());
|
92 |
|
@@ -102,10 +108,13 @@ class Numerno_Euromsg_Model_Process extends Mage_Core_Model_Abstract
|
|
102 |
public function addFilter($attribute, $value)
|
103 |
{
|
104 |
$filters = array();
|
105 |
-
|
|
|
106 |
$filters = unserialize($this->getFilter());
|
107 |
}
|
|
|
108 |
$filters[] = array($attribute => $value);
|
|
|
109 |
$this->setFilter(serialize($filters));
|
110 |
|
111 |
return $this;
|
@@ -118,11 +127,13 @@ class Numerno_Euromsg_Model_Process extends Mage_Core_Model_Abstract
|
|
118 |
*/
|
119 |
public function getFilename()
|
120 |
{
|
121 |
-
if($this->getVersion())
|
|
|
122 |
return $this->getTableName() . '_' . $this->getVersion() . '_inc';
|
123 |
-
else
|
124 |
-
return $this->getTableName();
|
125 |
|
|
|
|
|
126 |
}
|
127 |
|
128 |
/*
|
@@ -132,16 +143,17 @@ class Numerno_Euromsg_Model_Process extends Mage_Core_Model_Abstract
|
|
132 |
*/
|
133 |
protected function _export()
|
134 |
{
|
135 |
-
if(!$this->getType()) {
|
136 |
Mage::throwException('Export type need to be set before export process.');
|
137 |
}
|
138 |
|
139 |
-
if(!($entity = Mage::getModel('euromsg/export_entity_' . $this->getType()))){
|
140 |
Mage::throwException('Unknown entity type.');
|
141 |
}
|
142 |
|
143 |
$_date = Mage::getModel('core/date');
|
144 |
-
if($this->getScheduledAt() > $_date->date('Y-m-d H:i:s')) {
|
|
|
145 |
return $this;
|
146 |
}
|
147 |
|
@@ -169,8 +181,8 @@ class Numerno_Euromsg_Model_Process extends Mage_Core_Model_Abstract
|
|
169 |
->setEndedAt($_date->date('Y-m-d H:i:s'))
|
170 |
->save();
|
171 |
|
172 |
-
}
|
173 |
-
|
174 |
$this
|
175 |
->setStatus('error')
|
176 |
->setError($e->getMessage())
|
@@ -180,7 +192,6 @@ class Numerno_Euromsg_Model_Process extends Mage_Core_Model_Abstract
|
|
180 |
}
|
181 |
|
182 |
return $this;
|
183 |
-
|
184 |
}
|
185 |
|
186 |
/*
|
@@ -189,17 +200,17 @@ class Numerno_Euromsg_Model_Process extends Mage_Core_Model_Abstract
|
|
189 |
public function export($overridePolicy = false)
|
190 |
{
|
191 |
$_date = Mage::getModel('core/date');
|
192 |
-
$policy = Mage::helper('euromsg')->
|
193 |
|
194 |
-
if(!$this->getTableName()) {
|
195 |
Mage::throwException('Table name can not be null.');
|
196 |
}
|
197 |
|
198 |
-
if($this->getType() != 'product' && $this->isIncremental()) {
|
199 |
$this->_prepareVersion();
|
200 |
}
|
201 |
|
202 |
-
if($policy == self::POLICY_SYNC || $overridePolicy) {
|
203 |
|
204 |
return $this->_export();
|
205 |
} else {
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
70 |
*/
|
71 |
protected function _prepareVersion()
|
72 |
{
|
73 |
+
//TODO: Get last version or optimize method
|
74 |
$tableName = $this->getTableName();
|
75 |
$versionInc = 0;
|
76 |
|
77 |
do {
|
78 |
$versionInc++;
|
79 |
$version = date("Ymd") . str_pad($versionInc, 3, '0', STR_PAD_LEFT);
|
80 |
+
} while (!$this->_getResource()->isVersionUnique($tableName, $version));
|
81 |
|
82 |
$this->setVersion($version);
|
83 |
}
|
89 |
*/
|
90 |
public function isIncremental()
|
91 |
{
|
92 |
+
if ($this->getVersion()) {
|
93 |
+
|
94 |
return true;
|
95 |
+
}
|
96 |
|
97 |
return !$this->_getResource()->isTableNameUnique($this->getTableName());
|
98 |
|
108 |
public function addFilter($attribute, $value)
|
109 |
{
|
110 |
$filters = array();
|
111 |
+
|
112 |
+
if ($this->getFilter()) {
|
113 |
$filters = unserialize($this->getFilter());
|
114 |
}
|
115 |
+
|
116 |
$filters[] = array($attribute => $value);
|
117 |
+
|
118 |
$this->setFilter(serialize($filters));
|
119 |
|
120 |
return $this;
|
127 |
*/
|
128 |
public function getFilename()
|
129 |
{
|
130 |
+
if ($this->getVersion()) {
|
131 |
+
|
132 |
return $this->getTableName() . '_' . $this->getVersion() . '_inc';
|
133 |
+
} else {
|
|
|
134 |
|
135 |
+
return $this->getTableName();
|
136 |
+
}
|
137 |
}
|
138 |
|
139 |
/*
|
143 |
*/
|
144 |
protected function _export()
|
145 |
{
|
146 |
+
if (!$this->getType()) {
|
147 |
Mage::throwException('Export type need to be set before export process.');
|
148 |
}
|
149 |
|
150 |
+
if (!($entity = Mage::getModel('euromsg/export_entity_' . $this->getType()))) {
|
151 |
Mage::throwException('Unknown entity type.');
|
152 |
}
|
153 |
|
154 |
$_date = Mage::getModel('core/date');
|
155 |
+
if ($this->getScheduledAt() > $_date->date('Y-m-d H:i:s')) {
|
156 |
+
|
157 |
return $this;
|
158 |
}
|
159 |
|
181 |
->setEndedAt($_date->date('Y-m-d H:i:s'))
|
182 |
->save();
|
183 |
|
184 |
+
}
|
185 |
+
catch(Exception $e) {
|
186 |
$this
|
187 |
->setStatus('error')
|
188 |
->setError($e->getMessage())
|
192 |
}
|
193 |
|
194 |
return $this;
|
|
|
195 |
}
|
196 |
|
197 |
/*
|
200 |
public function export($overridePolicy = false)
|
201 |
{
|
202 |
$_date = Mage::getModel('core/date');
|
203 |
+
$policy = Mage::helper('euromsg')->getConfigData('dwh/policy');
|
204 |
|
205 |
+
if (!$this->getTableName()) {
|
206 |
Mage::throwException('Table name can not be null.');
|
207 |
}
|
208 |
|
209 |
+
if ($this->getType() != 'product' && $this->isIncremental()) {
|
210 |
$this->_prepareVersion();
|
211 |
}
|
212 |
|
213 |
+
if ($policy == self::POLICY_SYNC || $overridePolicy) {
|
214 |
|
215 |
return $this->_export();
|
216 |
} else {
|
app/code/local/Numerno/Euromsg/Model/Resource/Mail/Log.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/Resource/Mail/Log/Collection.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/Resource/Process.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -48,6 +51,7 @@ class Numerno_Euromsg_Model_Resource_Process extends Mage_Core_Model_Resource_Db
|
|
48 |
|
49 |
public function isVersionUnique($tableName, $version)
|
50 |
{
|
|
|
51 |
$read = $this->_getReadAdapter();
|
52 |
$query = $read->select()
|
53 |
->from(array('main_table'=>$this->getMainTable()), $this->getIdFieldName())
|
@@ -61,6 +65,7 @@ class Numerno_Euromsg_Model_Resource_Process extends Mage_Core_Model_Resource_Db
|
|
61 |
|
62 |
public function isTableNameUnique($tableName)
|
63 |
{
|
|
|
64 |
$read = $this->_getReadAdapter();
|
65 |
$query = $read->select()
|
66 |
->from(array('main_table'=>$this->getMainTable()), $this->getIdFieldName())
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
51 |
|
52 |
public function isVersionUnique($tableName, $version)
|
53 |
{
|
54 |
+
//TODO: Select count in query
|
55 |
$read = $this->_getReadAdapter();
|
56 |
$query = $read->select()
|
57 |
->from(array('main_table'=>$this->getMainTable()), $this->getIdFieldName())
|
65 |
|
66 |
public function isTableNameUnique($tableName)
|
67 |
{
|
68 |
+
//TODO: Select count in query
|
69 |
$read = $this->_getReadAdapter();
|
70 |
$query = $read->select()
|
71 |
->from(array('main_table'=>$this->getMainTable()), $this->getIdFieldName())
|
app/code/local/Numerno/Euromsg/Model/Resource/Process/Collection.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/Resource/Sms.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/Resource/Sms/Collection.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/Sms.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -55,17 +58,14 @@ class Numerno_Euromsg_Model_Sms extends Mage_Core_Model_Abstract
|
|
55 |
|
56 |
public function getHelper()
|
57 |
{
|
58 |
-
return Mage::helper('euromsg
|
59 |
}
|
60 |
|
61 |
public function _send()
|
62 |
{
|
63 |
try {
|
64 |
$client = Mage::getModel('euromsg/platform');
|
65 |
-
$client->
|
66 |
-
|
67 |
-
$sms = $client->getSmsService()->send($this->getMessage(), $this->getGsmNumber(),
|
68 |
-
$this->getBeginTime());
|
69 |
|
70 |
if($sms) {
|
71 |
$this
|
@@ -86,8 +86,7 @@ class Numerno_Euromsg_Model_Sms extends Mage_Core_Model_Abstract
|
|
86 |
$client->_logout();
|
87 |
|
88 |
}
|
89 |
-
catch(Exception $e)
|
90 |
-
{
|
91 |
$this
|
92 |
->setResponseCode('99')
|
93 |
->setResponseMessage($e->getMessage())
|
@@ -99,12 +98,11 @@ class Numerno_Euromsg_Model_Sms extends Mage_Core_Model_Abstract
|
|
99 |
|
100 |
public function send($customer, $message, $sendNow = false){
|
101 |
|
102 |
-
$attributeCode = $this->getHelper()->
|
103 |
-
|
104 |
-
if($attributeCode && $customer->getId() && strlen($message)) {
|
105 |
|
106 |
$gsmNumber = $customer->getData($attributeCode);
|
107 |
-
if($this->getHelper()->validateGsmNumber($gsmNumber)) {
|
108 |
|
109 |
$this
|
110 |
->setBeginTime(Mage::getModel('core/date')->date('Y-m-d H:i:s'))
|
@@ -112,12 +110,13 @@ class Numerno_Euromsg_Model_Sms extends Mage_Core_Model_Abstract
|
|
112 |
->setGsmNumber($this->getHelper()->filterGsmNumber($gsmNumber))
|
113 |
->setMessage($message);
|
114 |
|
115 |
-
if($sendNow)
|
116 |
$this->_send();
|
117 |
-
else
|
118 |
$this
|
119 |
->setDeliveryStatus('P')
|
120 |
->save();
|
|
|
121 |
}
|
122 |
}
|
123 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
58 |
|
59 |
public function getHelper()
|
60 |
{
|
61 |
+
return Mage::helper('euromsg');
|
62 |
}
|
63 |
|
64 |
public function _send()
|
65 |
{
|
66 |
try {
|
67 |
$client = Mage::getModel('euromsg/platform');
|
68 |
+
$sms = $client->sendSMS($this->getMessage(), $this->getGsmNumber(), $this->getBeginTime());
|
|
|
|
|
|
|
69 |
|
70 |
if($sms) {
|
71 |
$this
|
86 |
$client->_logout();
|
87 |
|
88 |
}
|
89 |
+
catch(Exception $e) {
|
|
|
90 |
$this
|
91 |
->setResponseCode('99')
|
92 |
->setResponseMessage($e->getMessage())
|
98 |
|
99 |
public function send($customer, $message, $sendNow = false){
|
100 |
|
101 |
+
$attributeCode = $this->getHelper()->getConfigData('general/attribute', 'sms');
|
102 |
+
if ($attributeCode && $customer->getId() && strlen($message)) {
|
|
|
103 |
|
104 |
$gsmNumber = $customer->getData($attributeCode);
|
105 |
+
if ($this->getHelper()->validateGsmNumber($gsmNumber)) {
|
106 |
|
107 |
$this
|
108 |
->setBeginTime(Mage::getModel('core/date')->date('Y-m-d H:i:s'))
|
110 |
->setGsmNumber($this->getHelper()->filterGsmNumber($gsmNumber))
|
111 |
->setMessage($message);
|
112 |
|
113 |
+
if ($sendNow) {
|
114 |
$this->_send();
|
115 |
+
} else {
|
116 |
$this
|
117 |
->setDeliveryStatus('P')
|
118 |
->save();
|
119 |
+
}
|
120 |
}
|
121 |
}
|
122 |
}
|
app/code/local/Numerno/Euromsg/Model/System/Config/Backend/Attributes.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -45,11 +48,11 @@ class Numerno_Euromsg_Model_System_Config_Backend_Attributes
|
|
45 |
protected function _beforeSave()
|
46 |
{
|
47 |
$value = $this->getValue();
|
48 |
-
if(is_array($value))
|
49 |
-
foreach($value as $key => $attribute) {
|
50 |
-
$value[$key]['col_name'] = trim(preg_replace('/[^A-Za-z0-9_]+/i', '_',
|
51 |
-
$attribute['col_name']), '_');
|
52 |
}
|
|
|
53 |
$this->setValue($value);
|
54 |
|
55 |
parent::_beforeSave();
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
48 |
protected function _beforeSave()
|
49 |
{
|
50 |
$value = $this->getValue();
|
51 |
+
if (is_array($value)) {
|
52 |
+
foreach ($value as $key => $attribute) {
|
53 |
+
$value[$key]['col_name'] = trim(preg_replace('/[^A-Za-z0-9_]+/i', '_', $attribute['col_name']), '_');
|
|
|
54 |
}
|
55 |
+
}
|
56 |
$this->setValue($value);
|
57 |
|
58 |
parent::_beforeSave();
|
app/code/local/Numerno/Euromsg/Model/System/Config/Backend/Cron.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -47,18 +50,19 @@ class Numerno_Euromsg_Model_System_Config_Backend_Cron extends Mage_Core_Model_C
|
|
47 |
$autoSync = $this->getFieldsetDataValue('autosync');
|
48 |
$frequency = $this->getFieldsetDataValue('frequency');
|
49 |
|
50 |
-
$frequencyHourly = Numerno_Euromsg_Model_System_Config_Source_Cron_Frequency::
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
-
if($frequency == $frequencyHourly) {
|
54 |
|
55 |
$hour = $this->getFieldsetDataValue('hour');
|
56 |
-
|
57 |
-
if($hour && is_int(24/$hour) ){
|
58 |
$cronExprString = "0 */$hour * * *";
|
59 |
}
|
60 |
-
} else {
|
61 |
|
|
|
62 |
$time = $this->getFieldsetDataValue('time');
|
63 |
$frequencyWeekly = Numerno_Euromsg_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY;
|
64 |
$frequencyMonthly = Numerno_Euromsg_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY;
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
50 |
$autoSync = $this->getFieldsetDataValue('autosync');
|
51 |
$frequency = $this->getFieldsetDataValue('frequency');
|
52 |
|
53 |
+
$frequencyHourly = Numerno_Euromsg_Model_System_Config_Source_Cron_Frequency::CRON_HOURLY;
|
54 |
+
if ($autoSync) {
|
55 |
+
if (!$frequency) {
|
56 |
+
$cronExprString = '*/5 * * * *';
|
57 |
|
58 |
+
}elseif ($frequency == $frequencyHourly) {
|
|
|
59 |
|
60 |
$hour = $this->getFieldsetDataValue('hour');
|
61 |
+
if ($hour && is_int(24/$hour)) {
|
|
|
62 |
$cronExprString = "0 */$hour * * *";
|
63 |
}
|
|
|
64 |
|
65 |
+
} else {
|
66 |
$time = $this->getFieldsetDataValue('time');
|
67 |
$frequencyWeekly = Numerno_Euromsg_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY;
|
68 |
$frequencyMonthly = Numerno_Euromsg_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY;
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Cron/Frequency.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Cron/Hours.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -45,18 +48,19 @@ class Numerno_Euromsg_Model_System_Config_Source_Cron_Hours
|
|
45 |
public function toOptionArray()
|
46 |
{
|
47 |
$options = array();
|
48 |
-
for($i = 1; $i <= 12; $i ++) {
|
49 |
if (24 % $i == 0) {
|
50 |
-
if($i == 1)
|
51 |
$options[] = array(
|
52 |
'value' => $i,
|
53 |
'label' => Mage::helper('euromsg')->__('Every hour')
|
54 |
);
|
55 |
-
else
|
56 |
$options[] = array(
|
57 |
'value' => $i,
|
58 |
'label' => Mage::helper('euromsg')->__('Every %s hours', $i)
|
59 |
);
|
|
|
60 |
}
|
61 |
}
|
62 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
48 |
public function toOptionArray()
|
49 |
{
|
50 |
$options = array();
|
51 |
+
for ($i = 1; $i <= 12; $i ++) {
|
52 |
if (24 % $i == 0) {
|
53 |
+
if($i == 1) {
|
54 |
$options[] = array(
|
55 |
'value' => $i,
|
56 |
'label' => Mage::helper('euromsg')->__('Every hour')
|
57 |
);
|
58 |
+
} else {
|
59 |
$options[] = array(
|
60 |
'value' => $i,
|
61 |
'label' => Mage::helper('euromsg')->__('Every %s hours', $i)
|
62 |
);
|
63 |
+
}
|
64 |
}
|
65 |
}
|
66 |
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Customer/Attributes.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -48,10 +51,15 @@ class Numerno_Euromsg_Model_System_Config_Source_Customer_Attributes
|
|
48 |
->addFieldToFilter('is_system', false)
|
49 |
->addVisibleFilter();
|
50 |
$result = array();
|
|
|
51 |
foreach ($attributes as $attribute) {
|
52 |
-
|
|
|
53 |
$result[$attribute->getAttributeCode()] = $label;
|
|
|
|
|
54 |
}
|
|
|
55 |
return $result;
|
56 |
}
|
57 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
51 |
->addFieldToFilter('is_system', false)
|
52 |
->addVisibleFilter();
|
53 |
$result = array();
|
54 |
+
|
55 |
foreach ($attributes as $attribute) {
|
56 |
+
|
57 |
+
if (($label = $attribute->getFrontendLabel())) {
|
58 |
$result[$attribute->getAttributeCode()] = $label;
|
59 |
+
|
60 |
+
}
|
61 |
}
|
62 |
+
|
63 |
return $result;
|
64 |
}
|
65 |
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Customer/DataSource.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/{Helper/Post.php → Model/System/Config/Source/Customer/DeliveryStatus.php}
RENAMED
@@ -1,67 +1,52 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
32 |
-
*
|
33 |
*
|
34 |
* @category Numerno
|
35 |
* @package Numerno_Euromsg
|
36 |
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
*/
|
38 |
-
class
|
39 |
{
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
public function getPostParams(){
|
47 |
-
|
48 |
-
$params = array(
|
49 |
-
'FromName' => $this->getStoreConfig('general/from_name'),
|
50 |
-
'FromAddress' => $this->getStoreConfig('general/from_addr'),
|
51 |
-
'ReplyAddress' => $this->getStoreConfig('general/reply_addr')
|
52 |
-
);
|
53 |
-
|
54 |
-
return $params;
|
55 |
-
}
|
56 |
-
|
57 |
-
public function isEnabled(){
|
58 |
-
|
59 |
-
return $this->getStoreConfig('general/enabled');
|
60 |
-
}
|
61 |
-
|
62 |
-
public function getDeliveryStatusOptions()
|
63 |
{
|
64 |
-
|
65 |
return array(
|
66 |
'RE' => Mage::helper('euromsg')->__('Relayed'),
|
67 |
'HU' => Mage::helper('euromsg')->__('Undelivered (HARD)'),
|
@@ -69,4 +54,5 @@ class Numerno_Euromsg_Helper_Post extends Mage_Core_Helper_Abstract
|
|
69 |
'RD' => Mage::helper('euromsg')->__('Read')
|
70 |
);
|
71 |
}
|
|
|
72 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
35 |
+
* Email Delivery Status
|
36 |
*
|
37 |
* @category Numerno
|
38 |
* @package Numerno_Euromsg
|
39 |
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
40 |
*/
|
41 |
+
class Numerno_Euromsg_Model_System_Config_Source_Customer_DeliveryStatus
|
42 |
{
|
43 |
+
/**
|
44 |
+
* Retrieve Email Delivery Status Options
|
45 |
+
*
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
public function toArray()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
{
|
|
|
50 |
return array(
|
51 |
'RE' => Mage::helper('euromsg')->__('Relayed'),
|
52 |
'HU' => Mage::helper('euromsg')->__('Undelivered (HARD)'),
|
54 |
'RD' => Mage::helper('euromsg')->__('Read')
|
55 |
);
|
56 |
}
|
57 |
+
|
58 |
}
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Dwh/LangId.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Dwh/Policy.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Dwh/Report.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Platform.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Sms/Method.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -46,7 +49,7 @@ class Numerno_Euromsg_Model_System_Config_Source_Sms_Method extends Varien_Objec
|
|
46 |
{
|
47 |
return array(
|
48 |
array(
|
49 |
-
'value' => '
|
50 |
'label' => Mage::helper('euromsg')->__('Standard')
|
51 |
),
|
52 |
array(
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
49 |
{
|
50 |
return array(
|
51 |
array(
|
52 |
+
'value' => 'standard',
|
53 |
'label' => Mage::helper('euromsg')->__('Standard')
|
54 |
),
|
55 |
array(
|
app/code/local/Numerno/Euromsg/Model/System/Config/Source/Sms/Permit.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/code/local/Numerno/Euromsg/controllers/Adminhtml/EuromsgController.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
@@ -37,116 +40,189 @@
|
|
37 |
*/
|
38 |
class Numerno_Euromsg_Adminhtml_EuromsgController extends Mage_Adminhtml_Controller_Action
|
39 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
public function syncNowAction()
|
41 |
{
|
42 |
-
|
43 |
-
$sync = $this->getRequest()->getPost('sync');
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
$tableName = Mage::getStoreConfig('euromsg_customer/general/filename');
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
$
|
52 |
-
|
53 |
-
|
54 |
-
.
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
$
|
69 |
-
$
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
.
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
$session->addError(
|
95 |
-
|
96 |
);
|
97 |
-
|
98 |
-
|
99 |
-
default:
|
100 |
-
$session->addError(
|
101 |
-
Mage::helper('euromsg')->__('Cannot process the request.')
|
102 |
-
);
|
103 |
-
break;
|
104 |
}
|
105 |
}
|
106 |
|
107 |
public function exportAction()
|
108 |
{
|
109 |
-
$session
|
110 |
-
$
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
. 'numbers (0-9) or underscore(_) in this field, first character should be a letter.')
|
119 |
-
);
|
120 |
-
return;
|
121 |
-
}
|
122 |
}
|
123 |
|
124 |
$process = Mage::getModel('euromsg/process')
|
125 |
-
->setTableName($
|
126 |
->setType('member');
|
127 |
|
128 |
-
if(
|
129 |
-
$
|
|
|
130 |
}
|
131 |
|
132 |
-
if(
|
133 |
-
$
|
|
|
134 |
}
|
135 |
|
136 |
try {
|
137 |
-
//export process
|
138 |
$process->export();
|
|
|
139 |
$session->addSuccess(
|
140 |
-
Mage::helper('euromsg')->__('%s table successfully exported to euro.message platform.',
|
141 |
-
$params['dwhname'])
|
142 |
);
|
143 |
-
}catch(Exception $e) {
|
144 |
$session->addError(
|
145 |
$e->getMessage()
|
146 |
);
|
147 |
}
|
|
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
|
|
150 |
}
|
151 |
|
152 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
40 |
*/
|
41 |
class Numerno_Euromsg_Adminhtml_EuromsgController extends Mage_Adminhtml_Controller_Action
|
42 |
{
|
43 |
+
|
44 |
+
public function mailLogsAction()
|
45 |
+
{
|
46 |
+
$this->_title($this->__('euro.message'))->_title($this->__('Mail Logs'));
|
47 |
+
$this->loadLayout();
|
48 |
+
$this->_setActiveMenu('euromessage/trx');
|
49 |
+
$this->_addContent($this->getLayout()->createBlock('euromsg/adminhtml_mail_logs'));
|
50 |
+
$this->renderLayout();
|
51 |
+
}
|
52 |
+
|
53 |
+
public function smsLogsAction()
|
54 |
+
{
|
55 |
+
$this->_title($this->__('euro.message'))->_title($this->__('SMS Logs'));
|
56 |
+
$this->loadLayout();
|
57 |
+
$this->_setActiveMenu('euromessage/sms');
|
58 |
+
$this->_addContent($this->getLayout()->createBlock('euromsg/adminhtml_sms_logs'));
|
59 |
+
$this->renderLayout();
|
60 |
+
}
|
61 |
+
|
62 |
+
public function smsSubscribersAction()
|
63 |
+
{
|
64 |
+
$this->_title($this->__('euro.message'))->_title($this->__('SMS Subscribers'));
|
65 |
+
$this->loadLayout();
|
66 |
+
$this->_setActiveMenu('euromessage/sms');
|
67 |
+
$this->_addContent($this->getLayout()->createBlock('euromsg/adminhtml_sms_subscribers'));
|
68 |
+
$this->renderLayout();
|
69 |
+
}
|
70 |
+
|
71 |
public function syncNowAction()
|
72 |
{
|
73 |
+
if ($this->getRequest()->isAjax()) {
|
|
|
74 |
|
75 |
+
$session = Mage::getSingleton('adminhtml/session');
|
76 |
+
$syncType = $this->getRequest()->getPost('sync');
|
|
|
77 |
|
78 |
+
switch ($syncType) {
|
79 |
+
case 'member':
|
80 |
+
$tableName = Mage::helper('euromsg')->getConfigData('general/filename', 'customer');
|
81 |
+
if (!Mage::helper('euromsg')->validateTableName($tableName)) {
|
82 |
+
$session->addError(
|
83 |
+
Mage::helper('euromsg')->__('Default data warehouse table name is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')
|
84 |
+
);
|
85 |
+
break;
|
86 |
+
}
|
87 |
+
$process = Mage::getModel('euromsg/process')
|
88 |
+
->setTableName($tableName)
|
89 |
+
->setType($syncType);
|
90 |
+
|
91 |
+
try {
|
92 |
+
$process->export();
|
93 |
+
|
94 |
+
$session->addSuccess(
|
95 |
+
Mage::helper('euromsg')->__('All member data successfully exported to euro.message platform.')
|
96 |
+
);
|
97 |
+
} catch(Exception $e) {
|
98 |
+
$session->addError(
|
99 |
+
$e->getMessage()
|
100 |
+
);
|
101 |
+
}
|
102 |
+
break;
|
103 |
+
|
104 |
+
case 'product':
|
105 |
+
$tableName = Mage::helper('euromsg')->getConfigData('general/filename', 'catalog');
|
106 |
+
if (!Mage::helper('euromsg')->validateTableName($tableName)) {
|
107 |
+
$session->addError(
|
108 |
+
Mage::helper('euromsg')->__('Default data warehouse table name is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')
|
109 |
+
);
|
110 |
+
break;
|
111 |
+
}
|
112 |
+
$process = Mage::getModel('euromsg/process')
|
113 |
+
->setTableName($tableName)
|
114 |
+
->setType($syncType);
|
115 |
+
try {
|
116 |
+
//export process
|
117 |
+
$process->export();
|
118 |
+
|
119 |
+
$session->addSuccess(
|
120 |
+
Mage::helper('euromsg')->__('All product data successfully exported to euro.message platform.')
|
121 |
+
);
|
122 |
+
} catch(Exception $e) {
|
123 |
+
$session->addError(
|
124 |
+
$e->getMessage()
|
125 |
+
);
|
126 |
+
}
|
127 |
+
break;
|
128 |
+
|
129 |
+
default:
|
130 |
$session->addError(
|
131 |
+
Mage::helper('euromsg')->__('Cannot process the request.')
|
132 |
);
|
133 |
+
break;
|
134 |
+
}
|
|
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
}
|
137 |
|
138 |
public function exportAction()
|
139 |
{
|
140 |
+
$session = Mage::getSingleton('adminhtml/session');
|
141 |
+
$tableName = $this->getRequest()->getParam('dwhname');
|
142 |
+
|
143 |
+
if (!Mage::helper('euromsg')->validateTableName($tableName)) {
|
144 |
+
$session->addError(
|
145 |
+
Mage::helper('euromsg')->__('Data warehouse table name is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')
|
146 |
+
);
|
147 |
+
|
148 |
+
return;
|
|
|
|
|
|
|
|
|
149 |
}
|
150 |
|
151 |
$process = Mage::getModel('euromsg/process')
|
152 |
+
->setTableName($tableName)
|
153 |
->setType('member');
|
154 |
|
155 |
+
if ($this->getRequest()->getParam('internal_customer')) {
|
156 |
+
$customerIds = explode(',', $this->getRequest()->getParam('internal_customer'));
|
157 |
+
$process->addFilter('customer_id', $customerIds);
|
158 |
}
|
159 |
|
160 |
+
if ($this->getRequest()->getParam('internal_subscriber')) {
|
161 |
+
$subscriberIds = explode(',', $this->getRequest()->getParam('internal_subscriber'));
|
162 |
+
$process->addFilter('subscriber_id', $subscriberIds);
|
163 |
}
|
164 |
|
165 |
try {
|
|
|
166 |
$process->export();
|
167 |
+
|
168 |
$session->addSuccess(
|
169 |
+
Mage::helper('euromsg')->__('%s table successfully exported to euro.message platform.', $tableName)
|
|
|
170 |
);
|
171 |
+
} catch(Exception $e) {
|
172 |
$session->addError(
|
173 |
$e->getMessage()
|
174 |
);
|
175 |
}
|
176 |
+
}
|
177 |
|
178 |
+
public function massSmsSubscribeAction()
|
179 |
+
{
|
180 |
+
$customersIds = $this->getRequest()->getParam('customer');
|
181 |
+
if (!is_array($customersIds)) {
|
182 |
+
Mage::getSingleton('adminhtml/session')->addError(
|
183 |
+
Mage::helper('adminhtml')->__('Please select customer(s).')
|
184 |
+
);
|
185 |
+
|
186 |
+
} else {
|
187 |
+
try {
|
188 |
+
foreach ($customersIds as $customerId) {
|
189 |
+
$customer = Mage::getModel('customer/customer')->load($customerId);
|
190 |
+
$customer->setData((string) Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE, true);
|
191 |
+
$customer->save();
|
192 |
+
}
|
193 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
194 |
+
Mage::helper('adminhtml')->__('Total of %d record(s) were updated.', count($customersIds))
|
195 |
+
);
|
196 |
+
} catch (Exception $e) {
|
197 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
198 |
+
}
|
199 |
+
}
|
200 |
+
$this->_redirect('*/*/smsSubscribers');
|
201 |
+
}
|
202 |
+
|
203 |
+
public function massSmsUnsubscribeAction()
|
204 |
+
{
|
205 |
+
$customersIds = $this->getRequest()->getParam('customer');
|
206 |
+
if (!is_array($customersIds)) {
|
207 |
+
Mage::getSingleton('adminhtml/session')->addError(
|
208 |
+
Mage::helper('adminhtml')->__('Please select customer(s).')
|
209 |
+
);
|
210 |
+
} else {
|
211 |
+
try {
|
212 |
+
foreach ($customersIds as $customerId) {
|
213 |
+
$customer = Mage::getModel('customer/customer')->load($customerId);
|
214 |
+
$customer->setData((string) Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE, false);
|
215 |
+
$customer->save();
|
216 |
+
}
|
217 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
218 |
+
Mage::helper('adminhtml')->__('Total of %d record(s) were updated.', count($customersIds))
|
219 |
+
);
|
220 |
+
} catch (Exception $e) {
|
221 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
222 |
+
}
|
223 |
+
}
|
224 |
|
225 |
+
$this->_redirect('*/*/smsSubscribers');
|
226 |
}
|
227 |
|
228 |
}
|
app/code/local/Numerno/Euromsg/controllers/Adminhtml/NewsletterController.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Newsletter Controller
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Adminhtml_NewsletterController extends Mage_Adminhtml_Controller_Action
|
39 |
-
{
|
40 |
-
public function logsAction()
|
41 |
-
{
|
42 |
-
$this->_title($this->__('euro.message'))->_title($this->__('Mail Logs'));
|
43 |
-
$this->loadLayout();
|
44 |
-
$this->_setActiveMenu('euromessage/trx');
|
45 |
-
$this->_addContent($this->getLayout()->createBlock('euromsg/adminhtml_mail_logs'));
|
46 |
-
$this->renderLayout();
|
47 |
-
}
|
48 |
-
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/controllers/Adminhtml/SmsController.php
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Numerno - Euro.message Magento Extension
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0). The Euro.message Magento Extension License is available at this URL:
|
9 |
-
* http://numerno.com/licenses/euromsg-ce.txt The Open Software License is available at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
*
|
12 |
-
* DISCLAIMER
|
13 |
-
*
|
14 |
-
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
-
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided Euro.message Magento Extension
|
17 |
-
* License.
|
18 |
-
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
-
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
-
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
-
* code if caused by other Magento extension.
|
22 |
-
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
-
* so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* @category [Numerno]
|
26 |
-
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c) 2015 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://numerno.com/)
|
28 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Sms Controller
|
33 |
-
*
|
34 |
-
* @category Numerno
|
35 |
-
* @package Numerno_Euromsg
|
36 |
-
* @author Numerno Bilisim Hiz. Tic. Ltd. Sti. <info@numerno.com>
|
37 |
-
*/
|
38 |
-
class Numerno_Euromsg_Adminhtml_SmsController extends Mage_Adminhtml_Controller_Action
|
39 |
-
{
|
40 |
-
|
41 |
-
public function logsAction()
|
42 |
-
{
|
43 |
-
$this->_title($this->__('euro.Message'))->_title($this->__('SMS Logs'));
|
44 |
-
$this->loadLayout();
|
45 |
-
$this->_setActiveMenu('euromessage/sms');
|
46 |
-
$this->_addContent($this->getLayout()->createBlock('euromsg/adminhtml_sms_logs'));
|
47 |
-
$this->renderLayout();
|
48 |
-
}
|
49 |
-
|
50 |
-
public function subscribersAction()
|
51 |
-
{
|
52 |
-
$this->_title($this->__('euro.Message'))->_title($this->__('SMS Subscribers'));
|
53 |
-
$this->loadLayout();
|
54 |
-
$this->_setActiveMenu('euromessage/sms');
|
55 |
-
$this->_addContent($this->getLayout()->createBlock('euromsg/adminhtml_sms_subscribers'));
|
56 |
-
$this->renderLayout();
|
57 |
-
}
|
58 |
-
|
59 |
-
public function massSubscribeAction()
|
60 |
-
{
|
61 |
-
$customersIds = $this->getRequest()->getParam('customer');
|
62 |
-
if(!is_array($customersIds)) {
|
63 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select customer(s).'));
|
64 |
-
|
65 |
-
} else {
|
66 |
-
try {
|
67 |
-
foreach ($customersIds as $customerId) {
|
68 |
-
$customer = Mage::getModel('customer/customer')->load($customerId);
|
69 |
-
$customer->setData((string) Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE, true);
|
70 |
-
$customer->save();
|
71 |
-
}
|
72 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(
|
73 |
-
Mage::helper('adminhtml')->__('Total of %d record(s) were updated.', count($customersIds))
|
74 |
-
);
|
75 |
-
} catch (Exception $e) {
|
76 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
77 |
-
}
|
78 |
-
}
|
79 |
-
$this->_redirect('*/*/subscribers');
|
80 |
-
}
|
81 |
-
|
82 |
-
public function massUnsubscribeAction()
|
83 |
-
{
|
84 |
-
$customersIds = $this->getRequest()->getParam('customer');
|
85 |
-
if(!is_array($customersIds)) {
|
86 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select customer(s).'));
|
87 |
-
} else {
|
88 |
-
try {
|
89 |
-
foreach ($customersIds as $customerId) {
|
90 |
-
$customer = Mage::getModel('customer/customer')->load($customerId);
|
91 |
-
$customer->setData((string) Numerno_Euromsg_Model_Sms::SMS_PERMIT_ATTRIBUTE_CODE, false);
|
92 |
-
$customer->save();
|
93 |
-
}
|
94 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(
|
95 |
-
Mage::helper('adminhtml')->__('Total of %d record(s) were updated.', count($customersIds))
|
96 |
-
);
|
97 |
-
} catch (Exception $e) {
|
98 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
$this->_redirect('*/*/subscribers');
|
103 |
-
}
|
104 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Numerno/Euromsg/etc/adminhtml.xml
CHANGED
@@ -1,32 +1,35 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
9 |
-
* License (OSL 3.0).
|
10 |
-
*
|
11 |
-
*
|
|
|
|
|
12 |
*
|
13 |
* DISCLAIMER
|
14 |
*
|
15 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
16 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
17 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
18 |
-
*
|
19 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
20 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
21 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
22 |
* code if caused by other Magento extension.
|
|
|
23 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
24 |
* so we can send you a copy immediately.
|
25 |
*
|
26 |
* @category [Numerno]
|
27 |
* @package [Numerno_Euromsg]
|
28 |
-
* @copyright Copyright (c)
|
29 |
-
* @license http://
|
30 |
*/
|
31 |
-->
|
32 |
<config>
|
@@ -34,14 +37,13 @@
|
|
34 |
<euromessage translate="title" module="euromsg">
|
35 |
<title>euro.message</title>
|
36 |
<sort_order>61</sort_order>
|
37 |
-
<action>euromsg/euromsg/index</action>
|
38 |
<children>
|
39 |
<trx translate="title" module="euromsg">
|
40 |
<title>Transactional Emails</title>
|
41 |
<children>
|
42 |
<logs translate="title" module="euromsg">
|
43 |
<title>Email Logs</title>
|
44 |
-
<action>
|
45 |
<sort_order>10</sort_order>
|
46 |
</logs>
|
47 |
<settings translate="title" module="euromsg">
|
@@ -53,16 +55,15 @@
|
|
53 |
</trx>
|
54 |
<sms translate="title" module="euromsg">
|
55 |
<title>SMS</title>
|
56 |
-
<action>euromsg/sms/index</action>
|
57 |
<children>
|
58 |
<logs translate="title" module="euromsg">
|
59 |
<title>SMS Logs</title>
|
60 |
-
<action>
|
61 |
<sort_order>10</sort_order>
|
62 |
</logs>
|
63 |
<subscribers translate="title" module="euromsg">
|
64 |
<title>SMS Subscribers</title>
|
65 |
-
<action>
|
66 |
<sort_order>20</sort_order>
|
67 |
</subscribers>
|
68 |
<settings translate="title" module="euromsg">
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
9 |
+
* License (OSL 3.0).
|
10 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
11 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
12 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
13 |
+
* http://opensource.org/licenses/osl-3.0.php
|
14 |
*
|
15 |
* DISCLAIMER
|
16 |
*
|
17 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
18 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
19 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
20 |
+
*
|
21 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
22 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
23 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
24 |
* code if caused by other Magento extension.
|
25 |
+
*
|
26 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
27 |
* so we can send you a copy immediately.
|
28 |
*
|
29 |
* @category [Numerno]
|
30 |
* @package [Numerno_Euromsg]
|
31 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
32 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
33 |
*/
|
34 |
-->
|
35 |
<config>
|
37 |
<euromessage translate="title" module="euromsg">
|
38 |
<title>euro.message</title>
|
39 |
<sort_order>61</sort_order>
|
|
|
40 |
<children>
|
41 |
<trx translate="title" module="euromsg">
|
42 |
<title>Transactional Emails</title>
|
43 |
<children>
|
44 |
<logs translate="title" module="euromsg">
|
45 |
<title>Email Logs</title>
|
46 |
+
<action>adminhtml/adminhtml_euromsg/mailLogs</action>
|
47 |
<sort_order>10</sort_order>
|
48 |
</logs>
|
49 |
<settings translate="title" module="euromsg">
|
55 |
</trx>
|
56 |
<sms translate="title" module="euromsg">
|
57 |
<title>SMS</title>
|
|
|
58 |
<children>
|
59 |
<logs translate="title" module="euromsg">
|
60 |
<title>SMS Logs</title>
|
61 |
+
<action>adminhtml/adminhtml_euromsg/smsLogs</action>
|
62 |
<sort_order>10</sort_order>
|
63 |
</logs>
|
64 |
<subscribers translate="title" module="euromsg">
|
65 |
<title>SMS Subscribers</title>
|
66 |
+
<action>adminhtml/adminhtml_euromsg/smsSubscribers</action>
|
67 |
<sort_order>20</sort_order>
|
68 |
</subscribers>
|
69 |
<settings translate="title" module="euromsg">
|
app/code/local/Numerno/Euromsg/etc/config.xml
CHANGED
@@ -1,38 +1,41 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
9 |
-
* License (OSL 3.0).
|
10 |
-
*
|
11 |
-
*
|
|
|
|
|
12 |
*
|
13 |
* DISCLAIMER
|
14 |
*
|
15 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
16 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
17 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
18 |
-
*
|
19 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
20 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
21 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
22 |
* code if caused by other Magento extension.
|
|
|
23 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
24 |
* so we can send you a copy immediately.
|
25 |
*
|
26 |
* @category [Numerno]
|
27 |
* @package [Numerno_Euromsg]
|
28 |
-
* @copyright Copyright (c)
|
29 |
-
* @license http://
|
30 |
*/
|
31 |
-->
|
32 |
<config>
|
33 |
<modules>
|
34 |
<Numerno_Euromsg>
|
35 |
-
<version>1.0
|
36 |
</Numerno_Euromsg>
|
37 |
</modules>
|
38 |
<admin>
|
@@ -44,13 +47,6 @@
|
|
44 |
</modules>
|
45 |
</args>
|
46 |
</adminhtml>
|
47 |
-
<euromsg>
|
48 |
-
<use>admin</use>
|
49 |
-
<args>
|
50 |
-
<module>Numerno_Euromsg_Adminhtml</module>
|
51 |
-
<frontName>euromsg</frontName>
|
52 |
-
</args>
|
53 |
-
</euromsg>
|
54 |
</routers>
|
55 |
</admin>
|
56 |
<global>
|
@@ -200,40 +196,47 @@
|
|
200 |
<model>euromsg/cron::syncCatalogData</model>
|
201 |
</run>
|
202 |
</euromsg_autosync_catalog>
|
203 |
-
<
|
204 |
<run>
|
205 |
<model>euromsg/cron::runAllProcesses</model>
|
206 |
</run>
|
207 |
<schedule>
|
208 |
<cron_expr>*/5 * * * *</cron_expr>
|
209 |
</schedule>
|
210 |
-
</
|
211 |
-
<
|
212 |
<run>
|
213 |
-
<model>euromsg/cron::
|
214 |
</run>
|
215 |
-
</
|
216 |
-
<
|
217 |
<run>
|
218 |
-
<model>euromsg/cron::
|
219 |
</run>
|
220 |
-
|
221 |
-
<cron_expr>*/5 * * * *</cron_expr>
|
222 |
-
</schedule>
|
223 |
-
</euromsg_sms_queue_send_all>
|
224 |
<euromsg_email_log_cleanup>
|
225 |
<run>
|
226 |
<model>euromsg/cron::cleanMailLogs</model>
|
227 |
</run>
|
228 |
</euromsg_email_log_cleanup>
|
229 |
-
<
|
|
|
|
|
|
|
230 |
<schedule>
|
231 |
<cron_expr>*/5 * * * *</cron_expr>
|
232 |
</schedule>
|
|
|
|
|
233 |
<run>
|
234 |
-
<model>euromsg/cron::
|
235 |
</run>
|
236 |
-
</
|
|
|
|
|
|
|
|
|
|
|
237 |
</jobs>
|
238 |
</crontab>
|
239 |
<adminhtml>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
9 |
+
* License (OSL 3.0).
|
10 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
11 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
12 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
13 |
+
* http://opensource.org/licenses/osl-3.0.php
|
14 |
*
|
15 |
* DISCLAIMER
|
16 |
*
|
17 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
18 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
19 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
20 |
+
*
|
21 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
22 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
23 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
24 |
* code if caused by other Magento extension.
|
25 |
+
*
|
26 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
27 |
* so we can send you a copy immediately.
|
28 |
*
|
29 |
* @category [Numerno]
|
30 |
* @package [Numerno_Euromsg]
|
31 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
32 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
33 |
*/
|
34 |
-->
|
35 |
<config>
|
36 |
<modules>
|
37 |
<Numerno_Euromsg>
|
38 |
+
<version>1.1.0</version>
|
39 |
</Numerno_Euromsg>
|
40 |
</modules>
|
41 |
<admin>
|
47 |
</modules>
|
48 |
</args>
|
49 |
</adminhtml>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
</routers>
|
51 |
</admin>
|
52 |
<global>
|
196 |
<model>euromsg/cron::syncCatalogData</model>
|
197 |
</run>
|
198 |
</euromsg_autosync_catalog>
|
199 |
+
<euromsg_autosync_queue_run_all>
|
200 |
<run>
|
201 |
<model>euromsg/cron::runAllProcesses</model>
|
202 |
</run>
|
203 |
<schedule>
|
204 |
<cron_expr>*/5 * * * *</cron_expr>
|
205 |
</schedule>
|
206 |
+
</euromsg_autosync_queue_run_all>
|
207 |
+
<euromsg_autosync_unsubscribers>
|
208 |
<run>
|
209 |
+
<model>euromsg/cron::syncUnsubscribers</model>
|
210 |
</run>
|
211 |
+
</euromsg_autosync_unsubscribers>
|
212 |
+
<euromsg_email_track_delivery>
|
213 |
<run>
|
214 |
+
<model>euromsg/cron::trackMailDelivery</model>
|
215 |
</run>
|
216 |
+
</euromsg_email_track_delivery>
|
|
|
|
|
|
|
217 |
<euromsg_email_log_cleanup>
|
218 |
<run>
|
219 |
<model>euromsg/cron::cleanMailLogs</model>
|
220 |
</run>
|
221 |
</euromsg_email_log_cleanup>
|
222 |
+
<euromsg_sms_queue_send_all>
|
223 |
+
<run>
|
224 |
+
<model>euromsg/cron::sendSmsQueue</model>
|
225 |
+
</run>
|
226 |
<schedule>
|
227 |
<cron_expr>*/5 * * * *</cron_expr>
|
228 |
</schedule>
|
229 |
+
</euromsg_sms_queue_send_all>
|
230 |
+
<euromsg_sms_track_delivery>
|
231 |
<run>
|
232 |
+
<model>euromsg/cron::trackSmsDelivery</model>
|
233 |
</run>
|
234 |
+
</euromsg_sms_track_delivery>
|
235 |
+
<euromsg_sms_log_cleanup>
|
236 |
+
<run>
|
237 |
+
<model>euromsg/cron::cleanSmsLogs</model>
|
238 |
+
</run>
|
239 |
+
</euromsg_sms_log_cleanup>
|
240 |
</jobs>
|
241 |
</crontab>
|
242 |
<adminhtml>
|
app/code/local/Numerno/Euromsg/etc/system.xml
CHANGED
@@ -1,32 +1,35 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
9 |
-
* License (OSL 3.0).
|
10 |
-
*
|
11 |
-
*
|
|
|
|
|
12 |
*
|
13 |
* DISCLAIMER
|
14 |
*
|
15 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
16 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
17 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
18 |
-
*
|
19 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
20 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
21 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
22 |
* code if caused by other Magento extension.
|
|
|
23 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
24 |
* so we can send you a copy immediately.
|
25 |
*
|
26 |
* @category [Numerno]
|
27 |
* @package [Numerno_Euromsg]
|
28 |
-
* @copyright Copyright (c)
|
29 |
-
* @license http://
|
30 |
*/
|
31 |
-->
|
32 |
<config>
|
@@ -79,7 +82,7 @@
|
|
79 |
<show_in_default>1</show_in_default>
|
80 |
<show_in_website>1</show_in_website>
|
81 |
<show_in_store>1</show_in_store>
|
82 |
-
<depends><platform>max
|
83 |
</lang_id>
|
84 |
<ws_user translate="label">
|
85 |
<label>Web Service Username</label>
|
@@ -148,118 +151,22 @@
|
|
148 |
<feedback module="euromsg" translate="label comment">
|
149 |
<label>Data Warehouse Reporting</label>
|
150 |
<expanded>true</expanded>
|
151 |
-
<frontend_type>text</frontend_type>
|
152 |
<sort_order>30</sort_order>
|
153 |
<show_in_default>1</show_in_default>
|
154 |
<show_in_website>1</show_in_website>
|
155 |
<show_in_store>1</show_in_store>
|
156 |
-
<comment>Configure directory to get feedbacks from euro.message Data Warehouse. These settings are mandatory to get unsubscribe reports.</comment>
|
157 |
<fields>
|
158 |
<autosync translate="label">
|
159 |
<label>Enabled</label>
|
160 |
<frontend_type>select</frontend_type>
|
161 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
|
|
|
|
162 |
<sort_order>10</sort_order>
|
163 |
<show_in_default>1</show_in_default>
|
164 |
<show_in_website>0</show_in_website>
|
165 |
<show_in_store>0</show_in_store>
|
166 |
</autosync>
|
167 |
-
<destination translate="label comment">
|
168 |
-
<label>Reporting Source</label>
|
169 |
-
<frontend_type>select</frontend_type>
|
170 |
-
<source_model>euromsg/system_config_source_dwh_report</source_model>
|
171 |
-
<comment>You can either provide SFTP account details given to euro.message IT or a local directory under your Magento installation directory.</comment>
|
172 |
-
<sort_order>20</sort_order>
|
173 |
-
<show_in_default>1</show_in_default>
|
174 |
-
<show_in_website>1</show_in_website>
|
175 |
-
<show_in_store>1</show_in_store>
|
176 |
-
<depends><autosync>1</autosync></depends>
|
177 |
-
</destination>
|
178 |
-
<sftp_host translate="label">
|
179 |
-
<label>SFTP Host</label>
|
180 |
-
<frontend_type>text</frontend_type>
|
181 |
-
<sort_order>30</sort_order>
|
182 |
-
<show_in_default>1</show_in_default>
|
183 |
-
<show_in_website>1</show_in_website>
|
184 |
-
<show_in_store>1</show_in_store>
|
185 |
-
<depends>
|
186 |
-
<autosync>1</autosync>
|
187 |
-
<destination>sftp</destination>
|
188 |
-
</depends>
|
189 |
-
</sftp_host>
|
190 |
-
<sftp_user translate="label">
|
191 |
-
<label>SFTP Username</label>
|
192 |
-
<frontend_type>text</frontend_type>
|
193 |
-
<sort_order>40</sort_order>
|
194 |
-
<show_in_default>1</show_in_default>
|
195 |
-
<show_in_website>1</show_in_website>
|
196 |
-
<show_in_store>1</show_in_store>
|
197 |
-
<depends>
|
198 |
-
<autosync>1</autosync>
|
199 |
-
<destination>sftp</destination>
|
200 |
-
</depends>
|
201 |
-
</sftp_user>
|
202 |
-
<sftp_pass translate="label">
|
203 |
-
<label>SFTP Password</label>
|
204 |
-
<frontend_type>password</frontend_type>
|
205 |
-
<sort_order>50</sort_order>
|
206 |
-
<show_in_default>1</show_in_default>
|
207 |
-
<show_in_website>1</show_in_website>
|
208 |
-
<show_in_store>1</show_in_store>
|
209 |
-
<depends>
|
210 |
-
<autosync>1</autosync>
|
211 |
-
<destination>sftp</destination>
|
212 |
-
</depends>
|
213 |
-
</sftp_pass>
|
214 |
-
<sftp_dir translate="label">
|
215 |
-
<label>SFTP Directory</label>
|
216 |
-
<frontend_type>text</frontend_type>
|
217 |
-
<sort_order>60</sort_order>
|
218 |
-
<show_in_default>1</show_in_default>
|
219 |
-
<show_in_website>1</show_in_website>
|
220 |
-
<show_in_store>1</show_in_store>
|
221 |
-
<depends>
|
222 |
-
<autosync>1</autosync>
|
223 |
-
<destination>sftp</destination>
|
224 |
-
</depends>
|
225 |
-
</sftp_dir>
|
226 |
-
<local_dir translate="label">
|
227 |
-
<label>Local Directory</label>
|
228 |
-
<frontend_type>text</frontend_type>
|
229 |
-
<sort_order>70</sort_order>
|
230 |
-
<show_in_default>1</show_in_default>
|
231 |
-
<show_in_website>1</show_in_website>
|
232 |
-
<show_in_store>1</show_in_store>
|
233 |
-
<depends>
|
234 |
-
<autosync>1</autosync>
|
235 |
-
<destination>local</destination>
|
236 |
-
</depends>
|
237 |
-
</local_dir>
|
238 |
-
<time translate="label">
|
239 |
-
<label>Synchronization Time (Daily)</label>
|
240 |
-
<frontend_type>time</frontend_type>
|
241 |
-
<backend_model>euromsg/system_config_backend_cron</backend_model>
|
242 |
-
<job>euromsg_datawarehouse_checkreports</job>
|
243 |
-
<sort_order>80</sort_order>
|
244 |
-
<show_in_default>1</show_in_default>
|
245 |
-
<show_in_website>0</show_in_website>
|
246 |
-
<show_in_store>0</show_in_store>
|
247 |
-
<depends>
|
248 |
-
<autosync>1</autosync>
|
249 |
-
</depends>
|
250 |
-
</time>
|
251 |
-
<delete_after translate="label">
|
252 |
-
<label>Delete files after check?</label>
|
253 |
-
<frontend_type>select</frontend_type>
|
254 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
255 |
-
<sort_order>90</sort_order>
|
256 |
-
<show_in_default>1</show_in_default>
|
257 |
-
<show_in_website>0</show_in_website>
|
258 |
-
<show_in_store>0</show_in_store>
|
259 |
-
<depends>
|
260 |
-
<autosync>1</autosync>
|
261 |
-
</depends>
|
262 |
-
</delete_after>
|
263 |
</fields>
|
264 |
</feedback>
|
265 |
</groups>
|
@@ -276,7 +183,6 @@
|
|
276 |
<general module="euromsg" translate="label comment">
|
277 |
<label>General Settings</label>
|
278 |
<expanded>true</expanded>
|
279 |
-
<frontend_type>text</frontend_type>
|
280 |
<sort_order>10</sort_order>
|
281 |
<show_in_default>1</show_in_default>
|
282 |
<show_in_website>1</show_in_website>
|
@@ -328,7 +234,6 @@
|
|
328 |
<log module="euromsg" translate="label comment">
|
329 |
<label>Email Logs</label>
|
330 |
<expanded>true</expanded>
|
331 |
-
<frontend_type>text</frontend_type>
|
332 |
<sort_order>20</sort_order>
|
333 |
<show_in_default>1</show_in_default>
|
334 |
<show_in_website>1</show_in_website>
|
@@ -409,20 +314,29 @@
|
|
409 |
<frequency>H</frequency>
|
410 |
</depends>
|
411 |
</hour>
|
412 |
-
|
413 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
<frontend_type>select</frontend_type>
|
415 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
416 |
-
<
|
|
|
|
|
417 |
<show_in_default>1</show_in_default>
|
418 |
-
<show_in_website>
|
419 |
-
<show_in_store>
|
420 |
-
|
421 |
-
<enabled>1</enabled>
|
422 |
-
</depends>
|
423 |
-
</track_delivery>
|
424 |
</fields>
|
425 |
-
</
|
426 |
</groups>
|
427 |
</euromsg_trx>
|
428 |
<euromsg_sms translate="label" module="euromsg">
|
@@ -475,7 +389,6 @@
|
|
475 |
<label>Customer Attribute</label>
|
476 |
<frontend_type>select</frontend_type>
|
477 |
<source_model>euromsg/system_config_source_customer_attributes</source_model>
|
478 |
-
<backend_model>euromsg/system_config_backend_attributes</backend_model>
|
479 |
<comment>Customer attribute that includes gsm number.</comment>
|
480 |
<sort_order>40</sort_order>
|
481 |
<show_in_default>1</show_in_default>
|
@@ -486,15 +399,15 @@
|
|
486 |
</fields>
|
487 |
</general>
|
488 |
<log module="euromsg" translate="label comment">
|
489 |
-
<label>
|
490 |
-
<
|
491 |
<sort_order>20</sort_order>
|
492 |
<show_in_default>1</show_in_default>
|
493 |
<show_in_website>1</show_in_website>
|
494 |
<show_in_store>1</show_in_store>
|
495 |
<fields>
|
496 |
<enabled translate="label">
|
497 |
-
<label>Enable
|
498 |
<frontend_type>select</frontend_type>
|
499 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
500 |
<sort_order>10</sort_order>
|
@@ -502,27 +415,95 @@
|
|
502 |
<show_in_website>1</show_in_website>
|
503 |
<show_in_store>1</show_in_store>
|
504 |
</enabled>
|
505 |
-
<
|
506 |
-
<label>
|
507 |
-
<frontend_type>
|
|
|
508 |
<sort_order>20</sort_order>
|
509 |
<show_in_default>1</show_in_default>
|
510 |
-
<show_in_website>
|
511 |
-
<show_in_store>
|
512 |
-
<depends
|
513 |
-
|
514 |
-
|
515 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
516 |
<frontend_type>select</frontend_type>
|
517 |
-
<source_model>
|
|
|
|
|
518 |
<sort_order>30</sort_order>
|
519 |
<show_in_default>1</show_in_default>
|
520 |
-
<show_in_website>
|
521 |
-
<show_in_store>
|
522 |
-
<depends
|
523 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
524 |
</fields>
|
525 |
</log>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
<template module="euromsg" translate="label comment">
|
527 |
<label>SMS Templates</label>
|
528 |
<frontend_type>text</frontend_type>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
9 |
+
* License (OSL 3.0).
|
10 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
11 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
12 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
13 |
+
* http://opensource.org/licenses/osl-3.0.php
|
14 |
*
|
15 |
* DISCLAIMER
|
16 |
*
|
17 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
18 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
19 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
20 |
+
*
|
21 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
22 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
23 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
24 |
* code if caused by other Magento extension.
|
25 |
+
*
|
26 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
27 |
* so we can send you a copy immediately.
|
28 |
*
|
29 |
* @category [Numerno]
|
30 |
* @package [Numerno_Euromsg]
|
31 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
32 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
33 |
*/
|
34 |
-->
|
35 |
<config>
|
82 |
<show_in_default>1</show_in_default>
|
83 |
<show_in_website>1</show_in_website>
|
84 |
<show_in_store>1</show_in_store>
|
85 |
+
<depends><platform>http://ws.euromsg.com/max/</platform></depends>
|
86 |
</lang_id>
|
87 |
<ws_user translate="label">
|
88 |
<label>Web Service Username</label>
|
151 |
<feedback module="euromsg" translate="label comment">
|
152 |
<label>Data Warehouse Reporting</label>
|
153 |
<expanded>true</expanded>
|
|
|
154 |
<sort_order>30</sort_order>
|
155 |
<show_in_default>1</show_in_default>
|
156 |
<show_in_website>1</show_in_website>
|
157 |
<show_in_store>1</show_in_store>
|
|
|
158 |
<fields>
|
159 |
<autosync translate="label">
|
160 |
<label>Enabled</label>
|
161 |
<frontend_type>select</frontend_type>
|
162 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
163 |
+
<backend_model>euromsg/system_config_backend_cron</backend_model>
|
164 |
+
<job>euromsg_autosync_unsubscribers</job>
|
165 |
<sort_order>10</sort_order>
|
166 |
<show_in_default>1</show_in_default>
|
167 |
<show_in_website>0</show_in_website>
|
168 |
<show_in_store>0</show_in_store>
|
169 |
</autosync>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
</fields>
|
171 |
</feedback>
|
172 |
</groups>
|
183 |
<general module="euromsg" translate="label comment">
|
184 |
<label>General Settings</label>
|
185 |
<expanded>true</expanded>
|
|
|
186 |
<sort_order>10</sort_order>
|
187 |
<show_in_default>1</show_in_default>
|
188 |
<show_in_website>1</show_in_website>
|
234 |
<log module="euromsg" translate="label comment">
|
235 |
<label>Email Logs</label>
|
236 |
<expanded>true</expanded>
|
|
|
237 |
<sort_order>20</sort_order>
|
238 |
<show_in_default>1</show_in_default>
|
239 |
<show_in_website>1</show_in_website>
|
314 |
<frequency>H</frequency>
|
315 |
</depends>
|
316 |
</hour>
|
317 |
+
</fields>
|
318 |
+
</log>
|
319 |
+
<track_delivery module="euromsg" translate="label comment">
|
320 |
+
<label>Delivery Tracking</label>
|
321 |
+
<expanded>true</expanded>
|
322 |
+
<sort_order>30</sort_order>
|
323 |
+
<show_in_default>1</show_in_default>
|
324 |
+
<show_in_website>1</show_in_website>
|
325 |
+
<show_in_store>1</show_in_store>
|
326 |
+
<fields>
|
327 |
+
<autosync translate="label">
|
328 |
+
<label>Enable Tracking</label>
|
329 |
<frontend_type>select</frontend_type>
|
330 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
331 |
+
<backend_model>euromsg/system_config_backend_cron</backend_model>
|
332 |
+
<job>euromsg_email_track_delivery</job>
|
333 |
+
<sort_order>10</sort_order>
|
334 |
<show_in_default>1</show_in_default>
|
335 |
+
<show_in_website>0</show_in_website>
|
336 |
+
<show_in_store>0</show_in_store>
|
337 |
+
</autosync>
|
|
|
|
|
|
|
338 |
</fields>
|
339 |
+
</track_delivery>
|
340 |
</groups>
|
341 |
</euromsg_trx>
|
342 |
<euromsg_sms translate="label" module="euromsg">
|
389 |
<label>Customer Attribute</label>
|
390 |
<frontend_type>select</frontend_type>
|
391 |
<source_model>euromsg/system_config_source_customer_attributes</source_model>
|
|
|
392 |
<comment>Customer attribute that includes gsm number.</comment>
|
393 |
<sort_order>40</sort_order>
|
394 |
<show_in_default>1</show_in_default>
|
399 |
</fields>
|
400 |
</general>
|
401 |
<log module="euromsg" translate="label comment">
|
402 |
+
<label>SMS Logs</label>
|
403 |
+
<expanded>true</expanded>
|
404 |
<sort_order>20</sort_order>
|
405 |
<show_in_default>1</show_in_default>
|
406 |
<show_in_website>1</show_in_website>
|
407 |
<show_in_store>1</show_in_store>
|
408 |
<fields>
|
409 |
<enabled translate="label">
|
410 |
+
<label>Enable Logging</label>
|
411 |
<frontend_type>select</frontend_type>
|
412 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
413 |
<sort_order>10</sort_order>
|
415 |
<show_in_website>1</show_in_website>
|
416 |
<show_in_store>1</show_in_store>
|
417 |
</enabled>
|
418 |
+
<autosync translate="label">
|
419 |
+
<label>Clean Logs</label>
|
420 |
+
<frontend_type>select</frontend_type>
|
421 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
422 |
<sort_order>20</sort_order>
|
423 |
<show_in_default>1</show_in_default>
|
424 |
+
<show_in_website>0</show_in_website>
|
425 |
+
<show_in_store>0</show_in_store>
|
426 |
+
<depends>
|
427 |
+
<enabled>1</enabled>
|
428 |
+
</depends>
|
429 |
+
</autosync>
|
430 |
+
<keeplogs>
|
431 |
+
<label>Keep Logs For, Days</label>
|
432 |
+
<frontend_type>text</frontend_type>
|
433 |
+
<sort_order>25</sort_order>
|
434 |
+
<show_in_default>1</show_in_default>
|
435 |
+
<show_in_website>0</show_in_website>
|
436 |
+
<show_in_store>0</show_in_store>
|
437 |
+
<depends>
|
438 |
+
<enabled>1</enabled>
|
439 |
+
<autosync>1</autosync>
|
440 |
+
</depends>
|
441 |
+
</keeplogs>
|
442 |
+
<frequency translate="label">
|
443 |
+
<label>Log Cleaning Frequency</label>
|
444 |
<frontend_type>select</frontend_type>
|
445 |
+
<source_model>euromsg/system_config_source_cron_frequency</source_model>
|
446 |
+
<backend_model>euromsg/system_config_backend_cron</backend_model>
|
447 |
+
<job>euromsg_sms_log_cleanup</job>
|
448 |
<sort_order>30</sort_order>
|
449 |
<show_in_default>1</show_in_default>
|
450 |
+
<show_in_website>0</show_in_website>
|
451 |
+
<show_in_store>0</show_in_store>
|
452 |
+
<depends>
|
453 |
+
<enabled>1</enabled>
|
454 |
+
<autosync>1</autosync>
|
455 |
+
</depends>
|
456 |
+
</frequency>
|
457 |
+
<time translate="label">
|
458 |
+
<label>Log Cleaning Start Time</label>
|
459 |
+
<frontend_type>time</frontend_type>
|
460 |
+
<sort_order>40</sort_order>
|
461 |
+
<show_in_default>1</show_in_default>
|
462 |
+
<show_in_website>0</show_in_website>
|
463 |
+
<show_in_store>0</show_in_store>
|
464 |
+
<depends>
|
465 |
+
<enabled>1</enabled>
|
466 |
+
<autosync>1</autosync>
|
467 |
+
<frequency separator=",">D,W,M</frequency>
|
468 |
+
</depends>
|
469 |
+
</time>
|
470 |
+
<hour translate="label">
|
471 |
+
<label>Log Cleaning Interval</label>
|
472 |
+
<frontend_type>select</frontend_type>
|
473 |
+
<source_model>euromsg/system_config_source_cron_hours</source_model>
|
474 |
+
<sort_order>50</sort_order>
|
475 |
+
<show_in_default>1</show_in_default>
|
476 |
+
<show_in_website>0</show_in_website>
|
477 |
+
<show_in_store>0</show_in_store>
|
478 |
+
<depends>
|
479 |
+
<enabled>1</enabled>
|
480 |
+
<autosync>1</autosync>
|
481 |
+
<frequency>H</frequency>
|
482 |
+
</depends>
|
483 |
+
</hour>
|
484 |
</fields>
|
485 |
</log>
|
486 |
+
<track_delivery module="euromsg" translate="label comment">
|
487 |
+
<label>Delivery Tracking</label>
|
488 |
+
<expanded>true</expanded>
|
489 |
+
<sort_order>30</sort_order>
|
490 |
+
<show_in_default>1</show_in_default>
|
491 |
+
<show_in_website>1</show_in_website>
|
492 |
+
<show_in_store>1</show_in_store>
|
493 |
+
<fields>
|
494 |
+
<autosync translate="label">
|
495 |
+
<label>Enable Tracking</label>
|
496 |
+
<frontend_type>select</frontend_type>
|
497 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
498 |
+
<backend_model>euromsg/system_config_backend_cron</backend_model>
|
499 |
+
<job>euromsg_sms_track_delivery</job>
|
500 |
+
<sort_order>10</sort_order>
|
501 |
+
<show_in_default>1</show_in_default>
|
502 |
+
<show_in_website>0</show_in_website>
|
503 |
+
<show_in_store>0</show_in_store>
|
504 |
+
</autosync>
|
505 |
+
</fields>
|
506 |
+
</track_delivery>
|
507 |
<template module="euromsg" translate="label comment">
|
508 |
<label>SMS Templates</label>
|
509 |
<frontend_type>text</frontend_type>
|
app/code/local/Numerno/Euromsg/sql/euromsg_setup/install-1.0.0.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/* @var $installer Mage_Core_Model_Resource_Setup */
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/* @var $installer Mage_Core_Model_Resource_Setup */
|
app/design/adminhtml/default/default/layout/euromsg.xml
CHANGED
@@ -1,33 +1,36 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
*
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
9 |
-
* License (OSL 3.0).
|
10 |
-
*
|
11 |
-
*
|
12 |
-
*
|
13 |
-
*
|
14 |
-
*
|
15 |
-
*
|
16 |
-
*
|
17 |
-
*
|
18 |
-
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
*
|
25 |
-
*
|
26 |
-
* @
|
27 |
-
*
|
28 |
-
*
|
29 |
-
* @
|
30 |
-
|
|
|
|
|
|
|
31 |
-->
|
32 |
|
33 |
<layout>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
9 |
+
* License (OSL 3.0).
|
10 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
11 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
12 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
13 |
+
* http://opensource.org/licenses/osl-3.0.php
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
18 |
+
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
19 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
20 |
+
*
|
21 |
+
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
22 |
+
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
23 |
+
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
24 |
+
* code if caused by other Magento extension.
|
25 |
+
*
|
26 |
+
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
27 |
+
* so we can send you a copy immediately.
|
28 |
+
*
|
29 |
+
* @category [Numerno]
|
30 |
+
* @package [Numerno_Euromsg]
|
31 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
32 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
33 |
+
*/
|
34 |
-->
|
35 |
|
36 |
<layout>
|
app/design/adminhtml/default/default/template/euromsg/form/field/sync_now.phtml
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/design/adminhtml/default/default/template/euromsg/grid/export_js.phtml
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/design/adminhtml/default/default/template/euromsg/sales/order/comments/view.phtml
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/design/adminhtml/default/default/template/euromsg/sales/order/view/history.phtml
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
8 |
-
* License (OSL 3.0).
|
9 |
-
*
|
10 |
-
*
|
|
|
|
|
11 |
*
|
12 |
* DISCLAIMER
|
13 |
*
|
14 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
15 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
16 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
17 |
-
*
|
18 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
19 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
20 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
21 |
* code if caused by other Magento extension.
|
|
|
22 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
23 |
* so we can send you a copy immediately.
|
24 |
*
|
25 |
* @category [Numerno]
|
26 |
* @package [Numerno_Euromsg]
|
27 |
-
* @copyright Copyright (c)
|
28 |
-
* @license http://
|
29 |
*/
|
30 |
|
31 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
8 |
+
* License (OSL 3.0).
|
9 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
10 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
11 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
13 |
*
|
14 |
* DISCLAIMER
|
15 |
*
|
16 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
17 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
18 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
19 |
+
*
|
20 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
21 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
22 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
23 |
* code if caused by other Magento extension.
|
24 |
+
*
|
25 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
26 |
* so we can send you a copy immediately.
|
27 |
*
|
28 |
* @category [Numerno]
|
29 |
* @package [Numerno_Euromsg]
|
30 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
31 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
32 |
*/
|
33 |
|
34 |
/**
|
app/etc/modules/Numerno_Euromsg.xml
CHANGED
@@ -1,32 +1,35 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
-
* This source file is subject to the NUMERNO EUROMESSAGE MAGENTO EXTENSION License, which extends the Open Software
|
9 |
-
* License (OSL 3.0).
|
10 |
-
*
|
11 |
-
*
|
|
|
|
|
12 |
*
|
13 |
* DISCLAIMER
|
14 |
*
|
15 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
16 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
17 |
-
* terminates any agreement of support offered by Numerno, outlined in the provided
|
18 |
-
*
|
19 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
20 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
21 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
22 |
* code if caused by other Magento extension.
|
|
|
23 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
24 |
* so we can send you a copy immediately.
|
25 |
*
|
26 |
* @category [Numerno]
|
27 |
* @package [Numerno_Euromsg]
|
28 |
-
* @copyright Copyright (c)
|
29 |
-
* @license http://numerno.com/licenses/euromsg-ce.txt
|
30 |
*/
|
31 |
-->
|
32 |
<config>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
+
* euro.message Personalized Omni-channel Marketing Automation
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
+
* This source file is subject to the "NUMERNO EUROMESSAGE MAGENTO EXTENSION License", which extends the Open Software
|
9 |
+
* License (OSL 3.0).
|
10 |
+
* The "NUMERNO EUROMESSAGE MAGENTO EXTENSION License" is available at this URL:
|
11 |
+
* http://www.numerno.com/licenses/euromsg-ce.txt
|
12 |
+
* The Open Software License (OSL 3.0) is available at this URL:
|
13 |
+
* http://opensource.org/licenses/osl-3.0.php
|
14 |
*
|
15 |
* DISCLAIMER
|
16 |
*
|
17 |
* By adding to, editing, or in any way modifying this code, Numerno is not held liable for any inconsistencies or
|
18 |
* abnormalities in the behaviour of this code. By adding to, editing, or in any way modifying this code, the Licensee
|
19 |
+
* terminates any agreement of support offered by Numerno, outlined in the provided License.
|
20 |
+
*
|
21 |
* Upon discovery of modified code in the process of support, the Licensee is still held accountable for any and all
|
22 |
* billable time Numerno spent during the support process. Numerno does not guarantee compatibility with any other
|
23 |
* Magento extension. Numerno is not responsbile for any inconsistencies or abnormalities in the behaviour of this
|
24 |
* code if caused by other Magento extension.
|
25 |
+
*
|
26 |
* If you did not receive a copy of the license, please send an email to info@numerno.com or call +90-212-223-5093,
|
27 |
* so we can send you a copy immediately.
|
28 |
*
|
29 |
* @category [Numerno]
|
30 |
* @package [Numerno_Euromsg]
|
31 |
+
* @copyright Copyright (c) 2016 Numerno Bilisim Hiz. Tic. Ltd. Sti. (http://www.numerno.com/)
|
32 |
+
* @license http://numerno.com/licenses/euromsg-ce.txt NUMERNO EUROMESSAGE MAGENTO EXTENSION License
|
33 |
*/
|
34 |
-->
|
35 |
<config>
|
package.xml
CHANGED
@@ -1,21 +1,23 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Numerno_Euromsg</name>
|
4 |
-
<version>1.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://numerno.com/licenses/euromsg-ce.txt">NUMERNO EUROMESSAGE MAGENTO EXTENSION</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Email and omni-channel marketing automation. </summary>
|
10 |
<description>This extension allows you to integrate Customer and Catalog data with euro.message platform, send transactional emails and transactional SMS via euro.message platform.</description>
|
11 |
-
<notes>Version 1.0
|
12 |
-
*
|
|
|
|
|
13 |

|
14 |
-
Build Date:
|
15 |
<authors><author><name>Numerno</name><user>muhammedv</user><email>muhammedv@gmail.com</email></author></authors>
|
16 |
-
<date>2016-01-
|
17 |
-
<time>15:
|
18 |
-
<contents><target name="magelocal"><dir><dir name="Numerno"><dir name="Euromsg"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><file name="Grid.php" hash="
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Numerno_Euromsg</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://numerno.com/licenses/euromsg-ce.txt">NUMERNO EUROMESSAGE MAGENTO EXTENSION</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Email and omni-channel marketing automation. </summary>
|
10 |
<description>This extension allows you to integrate Customer and Catalog data with euro.message platform, send transactional emails and transactional SMS via euro.message platform.</description>
|
11 |
+
<notes>Version 1.1.0
|
12 |
+
* Unsubscriber synchronization method change
|
13 |
+
* Performance improvements
|
14 |
+
* Several bug fixes
|
15 |

|
16 |
+
Build Date: 2016-01-25</notes>
|
17 |
<authors><author><name>Numerno</name><user>muhammedv</user><email>muhammedv@gmail.com</email></author></authors>
|
18 |
+
<date>2016-01-25</date>
|
19 |
+
<time>15:20:00</time>
|
20 |
+
<contents><target name="magelocal"><dir><dir name="Numerno"><dir name="Euromsg"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><file name="Grid.php" hash="2bfe2194ef4fc8ca8d98ceee76bade95"/></dir><dir name="Form"><dir name="Field"><file name="Attribute.php" hash="14ce2adb447d1fdd622ac04f15ead5b6"/><file name="Attributes.php" hash="47ff695856954162dfb2dc64e25ce1d7"/><file name="CustomerAttribute.php" hash="1e9c910341049a736a4314773ab1b709"/><file name="CustomerAttributes.php" hash="d8d87d052087d724729173e31c641e69"/><file name="SyncNow.php" hash="212c4409d2cb6ed42d34a2a24ca841f7"/></dir></dir><dir name="Grid"><file name="ExportJs.php" hash="5747c7815785f7aa9531c18f508d866d"/></dir><dir name="Mail"><dir name="Logs"><file name="Grid.php" hash="abfc51b8711a0a0c4e1b83bbeadf62b4"/></dir><file name="Logs.php" hash="f8237ed574a70c82c312b4e543b9299c"/></dir><dir name="Newsletter"><dir name="Subscriber"><file name="Grid.php" hash="5a10899635939b887c3824b22ee9bf81"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Comments"><file name="View.php" hash="ebf83db747afba2dfde102d5356fc1cc"/></dir><dir name="View"><file name="History.php" hash="41ecc864a60fcd1bd2026b36b2e8bc39"/></dir></dir></dir><dir name="Sms"><dir name="Logs"><file name="Grid.php" hash="8ab5e52a3df96afc0105c820055ddec0"/></dir><file name="Logs.php" hash="c1efdacbaebdcc211683d1f713b0ebc0"/><dir name="Renderer"><file name="Customer.php" hash="465adf5a24dfc0d7332d7ae2ab858ff1"/></dir><dir name="Subscribers"><file name="Grid.php" hash="df5e6200dc55a6ddeda403762ecd6297"/></dir><file name="Subscribers.php" hash="923e5289c65c58f0148c685774d14b97"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4b19fcec3d622e562943d3716e7107ee"/></dir><dir name="Model"><dir name="Core"><dir name="Email"><file name="Queue.php" hash="dc2f4179e48c23c0a5091f02b739f4cb"/><file name="Template.php" hash="4146f49b71b4d0b7f7502aa6df963a3a"/></dir><file name="Email.php" hash="e52f375e812a6c7890fe6aef031aeb06"/></dir><file name="Cron.php" hash="3856cd0e6e56ee95956e7f7993622fa9"/><dir name="Export"><dir name="Adapter"><file name="Csv.php" hash="3f17da73bba91d2a4034aa3067aeb29e"/></dir><dir name="Entity"><file name="Member.php" hash="18ff9316c2ac682014c90fda66add39d"/><file name="Product.php" hash="10b32a2a767ac02c20eabccc5d1eccec"/></dir></dir><dir name="Mail"><file name="Log.php" hash="592edf47d01771f879a45155c0441380"/><dir name="Transport"><file name="EuroMessage.php" hash="7b356cd274530449343e7f0e2cc00741"/></dir></dir><file name="Mail.php" hash="f499ada65e3151ca7f79136d53dac643"/><dir name="Newsletter"><dir name="Subscriber"><file name="Collection.php" hash="1f609d5496ed403cd6bf21c36bd515a4"/></dir></dir><file name="Observer.php" hash="549f6ffe6416d366acc998b6295fcbaf"/><file name="Platform.php" hash="08052a6a8a6f6cbec921f2615df0ae99"/><file name="Process.php" hash="0d3a57681b9b5539f5154ae24aa0429a"/><dir name="Resource"><dir name="Mail"><dir name="Log"><file name="Collection.php" hash="53692826163d2e0e0bf7cac38064dae6"/></dir><file name="Log.php" hash="53d1ad4238bf9219e618a9a1627da51b"/></dir><dir name="Process"><file name="Collection.php" hash="ebc87b7ff2668bb007032535fe8da1d4"/></dir><file name="Process.php" hash="6372afb294958af8c8b40bf582473119"/><dir name="Sms"><file name="Collection.php" hash="fbcb93423de957afce0c934b5ed95662"/></dir><file name="Sms.php" hash="3ac30eed0749ea34600c23a37388a524"/></dir><file name="Sms.php" hash="9195765ab51d130afce65f00aa02ebfc"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Attributes.php" hash="9ca3376d31243c86c6eb5becdc993b59"/><file name="Cron.php" hash="041353ea004d6274b741aee687a33801"/></dir><dir name="Source"><dir name="Cron"><file name="Frequency.php" hash="76b0e261bb777cc28582a4b8797813aa"/><file name="Hours.php" hash="e056a5418b8571e7373b5854b8aee1f9"/></dir><dir name="Customer"><file name="Attributes.php" hash="ea147b5d20bb66b867ee1ebef3d46eca"/><file name="DataSource.php" hash="df0296204698d8409ce67ca8e438965c"/><file name="DeliveryStatus.php" hash="38df278537604ddcf9a9f4817fe30399"/></dir><dir name="Dwh"><file name="LangId.php" hash="8e86bb3f7dd1705dd02b37815971e75e"/><file name="Policy.php" hash="93bb2efba1f69787c1b20d58cd08078a"/><file name="Report.php" hash="c8db7db5b9ea89a43eb7808320e087b0"/></dir><file name="Platform.php" hash="0d5d0620d2d4397d7e8e6956d929dc5a"/><dir name="Sms"><file name="Method.php" hash="e6985bb039bd0d0df184fc0b59e18ed5"/><file name="Permit.php" hash="1000988bc0c6e2109a3b007e2ec82444"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="EuromsgController.php" hash="9954c00b7da10dd17f68270a589ba9e9"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="77cb0edb2e793d447119bcc50ee6da3c"/><file name="config.xml" hash="4a7a4a2e90ac4f5042e7d7fe1e609849"/><file name="system.xml" hash="604f315b2ade829ce888720a5e0b5a26"/></dir><dir name="sql"><dir name="euromsg_setup"><file name="install-1.0.0.php" hash="2628243f98a02788886c9abd4142ea93"/></dir></dir></dir></dir><dir name="en_US"><file name="Numerno_Euromsg.csv" hash=""/></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Numerno_Euromsg.xml" hash="0040ac0fe5a26e4835ba7ef441084560"/></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="euromsg.xml" hash="f69d78b5c06705d484f829ecb73259df"/></dir><dir name="template"><dir name="euromsg"><dir name="form"><dir name="field"><file name="sync_now.phtml" hash="b05377031be1f501c3a46228b6daabe3"/></dir></dir><dir name="grid"><file name="export_js.phtml" hash="0bb50438428592349e314f0f00f58f28"/></dir><dir name="sales"><dir name="order"><dir name="comments"><file name="view.phtml" hash="72d8b0dfa4e3290bdbdfe7d3fbc9b3af"/></dir><dir name="view"><file name="history.phtml" hash="ae47e214a9d29da01ab11ed365910e64"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="tr_TR"><file name="Numerno_Euromsg.csv" hash="46a8388bdafe296f0c5ead6137a929f3"/></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="euromsg"><file name="euromsg_logo.png" hash="8bc7732e48238d01a862f01cf0e6dcfb"/></dir></dir></dir></dir></dir></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
</package>
|