Version Notes
1.2.6.1
--------
Bug Fixes:
Problem with mixed emails sent when made simultaneously on checkout solved.
Problem with re-subscription breaking the checkout solved.
Download this release
Release Info
Developer | Ebizmarts Development Team |
Extension | Ebizmarts_MageMonkey |
Version | 1.2.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.6 to 1.2.6.1
- app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Abandonedmails/Grid.php +32 -16
- app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Abandonedorder/Grid.php +35 -19
- app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Dashboard.php +4 -2
- app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Dashboard/Totals.php +23 -21
- app/code/community/Ebizmarts/AbandonedCart/Block/Email/Order/Items.php +4 -4
- app/code/community/Ebizmarts/AbandonedCart/Block/Popup/Emailcatcher.php +7 -6
- app/code/community/Ebizmarts/AbandonedCart/Model/Cron.php +86 -85
- app/code/community/Ebizmarts/AbandonedCart/Model/EventObserver.php +1 -1
- app/code/community/Ebizmarts/AbandonedCart/Model/Resource/Order/Collection.php +22 -11
- app/code/community/Ebizmarts/AbandonedCart/controllers/AbandonedController.php +9 -11
- app/code/community/Ebizmarts/AbandonedCart/controllers/Adminhtml/AbandonedmailsController.php +2 -1
- app/code/community/Ebizmarts/AbandonedCart/controllers/Adminhtml/AbandonedorderController.php +2 -1
- app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-0.1.12-0.1.13.php +4 -2
- app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-0.1.18-0.1.19.php +4 -2
- app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-0.1.29-0.1.30.php +4 -2
- app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-0.1.30-0.1.31.php +4 -2
- app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-1.1.35-1.2.0.php +5 -3
- app/code/community/Ebizmarts/Autoresponder/Model/Cron.php +29 -29
- app/code/community/Ebizmarts/Autoresponder/Model/EventObserver.php +13 -15
- app/code/community/Ebizmarts/Autoresponder/Model/Resource/Review.php +3 -3
- app/code/community/Ebizmarts/Autoresponder/Model/Resource/Visited.php +3 -3
- app/code/community/Ebizmarts/Autoresponder/controllers/AutoresponderController.php +1 -1
- app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-install-0.1.0.php +4 -2
- app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-0.1.3-0.1.4.php +4 -2
- app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-0.1.4-0.1.5.php +9 -5
- app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-0.1.5-0.1.6.php +12 -6
- app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-1.1.14-1.2.0.php +1 -1
- app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-1.2.0-1.2.1.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/Export/Form.php +24 -12
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/Import/Form.php +32 -16
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/Queue/Grid.php +16 -8
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/QueueExport.php +7 -3
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/QueueExport/Grid.php +40 -20
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/QueueImport.php +7 -3
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/QueueImport/Grid.php +48 -24
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Ecommerce/Grid.php +24 -12
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Ecommerceapi/Grid.php +36 -18
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Memberactivity/Grid.php +24 -12
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Newsletter/Subscriber/Renderer/Firstname.php +5 -4
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Newsletter/Subscriber/Renderer/Lastname.php +5 -4
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/Form/Field/Mapfields.php +8 -4
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/OauthWizard.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/ResetLocalEcommerce.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/ResetRemoteEcommerce.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/UpgradeForPatch.php +8 -5
- app/code/community/Ebizmarts/MageMonkey/Block/Checkout/Subscribe.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/Block/Lists.php +8 -8
- app/code/community/Ebizmarts/MageMonkey/Helper/Data.php +79 -72
- app/code/community/Ebizmarts/MageMonkey/Model/Cron.php +20 -19
- app/code/community/Ebizmarts/MageMonkey/Model/Ecommerce360.php +18 -17
- app/code/community/Ebizmarts/MageMonkey/Model/Feed/Updates.php +5 -3
- app/code/community/Ebizmarts/MageMonkey/Model/MCAPI.php +6 -6
- app/code/community/Ebizmarts/MageMonkey/Model/Observer.php +35 -26
- app/code/community/Ebizmarts/MageMonkey/Model/Subscriber.php +2 -2
- app/code/community/Ebizmarts/MageMonkey/Model/System/Config/Source/Account.php +7 -7
- app/code/community/Ebizmarts/MageMonkey/Model/System/Config/Source/CustomerGroup.php +4 -6
- app/code/community/Ebizmarts/MageMonkey/controllers/Adminhtml/BulksyncController.php +6 -5
- app/code/community/Ebizmarts/MageMonkey/controllers/Adminhtml/ConfigController.php +7 -5
- app/code/community/Ebizmarts/MageMonkey/controllers/Adminhtml/EcommerceController.php +6 -4
- app/code/community/Ebizmarts/MageMonkey/etc/config.xml +1 -1
- app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-install-0.0.1.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-0.0.1-0.0.2.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-0.0.2-0.0.3.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-0.0.3-0.0.4.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.1.21-1.1.22.php +8 -4
- app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.1.23-1.1.24.php +6 -4
- app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.1.33-1.1.34.php +4 -2
- app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.2.4-1.2.5.php +4 -2
- app/code/community/Ebizmarts/Mandrill/Block/Adminhtml/Templates/Templates/Grid.php +40 -20
- app/code/community/Ebizmarts/Mandrill/Block/Adminhtml/Users/Senders/Grid.php +40 -20
- app/code/community/Ebizmarts/Mandrill/Model/Email/Queue.php +5 -8
- app/code/community/Ebizmarts/Mandrill/Model/Email/Template.php +10 -13
- app/code/community/Ebizmarts/Mandrill/Model/System/Config/Source/Userinfo.php +11 -11
- app/code/community/Ebizmarts/Mandrill/controllers/Adminhtml/Mandrill/UsersController.php +2 -1
- app/code/community/Ebizmarts/Mandrill/etc/config.xml +1 -1
- app/code/community/Ebizmarts/SweetMonkey/Block/Adminhtml/System/Config/Autovars.php +4 -2
- app/code/community/Ebizmarts/SweetMonkey/Block/Adminhtml/System/Config/Form/Field/Mapfields.php +8 -5
- app/code/community/Ebizmarts/SweetMonkey/Model/Observer.php +1 -1
- app/code/community/Ebizmarts/SweetMonkey/controllers/Adminhtml/MageMonkeyController.php +5 -4
- js/ebizmarts/autoresponders/visitedproducts.js +8 -4
- js/ebizmarts/autoresponders/visitedproductsstorecodes.js +8 -4
- lib/Mandrill/Mandrill.php +11 -11
- lib/Mandrill/Mandrill/Exports.php +12 -12
- lib/Mandrill/Mandrill/Inbound.php +5 -5
- lib/Mandrill/Mandrill/Ips.php +3 -3
- lib/Mandrill/Mandrill/Messages.php +33 -33
- lib/Mandrill/Mandrill/Metadata.php +6 -6
- lib/Mandrill/Mandrill/Rejects.php +3 -3
- lib/Mandrill/Mandrill/Subaccounts.php +6 -6
- lib/Mandrill/Mandrill/Templates.php +14 -14
- package.xml +7 -9
- skin/adminhtml/default/default/magemonkey/magemonkey.js +4 -2
- skin/frontend/base/default/magemonkey/monkey.js +4 -2
app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Abandonedmails/Grid.php
CHANGED
@@ -35,50 +35,66 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Abandonedmails_Grid extends Mage_A
|
|
35 |
protected function _prepareColumns()
|
36 |
{
|
37 |
|
38 |
-
$this->addColumn(
|
|
|
39 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Store'),
|
40 |
'type' => 'store',
|
41 |
'index' => 'store_id'
|
42 |
-
|
|
|
43 |
|
44 |
-
$this->addColumn(
|
|
|
45 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Sent At'),
|
46 |
'index' => 'sent_at',
|
47 |
'filter_index' => 'sent_at',
|
48 |
'type' => 'datetime',
|
49 |
'width' => '100px',
|
50 |
-
|
|
|
51 |
|
52 |
-
$this->addColumn(
|
|
|
53 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Customer Email'),
|
54 |
'index' => 'customer_email',
|
55 |
-
|
|
|
56 |
|
57 |
-
$this->addColumn(
|
|
|
58 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Customer Name'),
|
59 |
'index' => 'customer_name',
|
60 |
-
|
|
|
61 |
|
62 |
-
$this->addColumn(
|
|
|
63 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Mail Type'),
|
64 |
'index' => 'mail_type',
|
65 |
'type' => 'options',
|
66 |
'options' => $this->getMailTypeOptions(),
|
67 |
-
|
68 |
-
|
|
|
|
|
69 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Coupon #'),
|
70 |
'index' => 'coupon_number',
|
71 |
-
|
72 |
-
|
|
|
|
|
73 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Coupon type'),
|
74 |
'type' => 'options',
|
75 |
'index' => 'coupon_type',
|
76 |
'options' => Mage::getModel('Ebizmarts_AbandonedCart_Model_System_Config_Discounttype')->options(),
|
77 |
-
|
78 |
-
|
|
|
|
|
79 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Coupon amount'),
|
80 |
'index' => 'coupon_amount',
|
81 |
-
|
|
|
82 |
|
83 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
84 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));
|
35 |
protected function _prepareColumns()
|
36 |
{
|
37 |
|
38 |
+
$this->addColumn(
|
39 |
+
'store', array(
|
40 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Store'),
|
41 |
'type' => 'store',
|
42 |
'index' => 'store_id'
|
43 |
+
)
|
44 |
+
);
|
45 |
|
46 |
+
$this->addColumn(
|
47 |
+
'sent_at', array(
|
48 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Sent At'),
|
49 |
'index' => 'sent_at',
|
50 |
'filter_index' => 'sent_at',
|
51 |
'type' => 'datetime',
|
52 |
'width' => '100px',
|
53 |
+
)
|
54 |
+
);
|
55 |
|
56 |
+
$this->addColumn(
|
57 |
+
'customer_email', array(
|
58 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Customer Email'),
|
59 |
'index' => 'customer_email',
|
60 |
+
)
|
61 |
+
);
|
62 |
|
63 |
+
$this->addColumn(
|
64 |
+
'customer_name', array(
|
65 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Customer Name'),
|
66 |
'index' => 'customer_name',
|
67 |
+
)
|
68 |
+
);
|
69 |
|
70 |
+
$this->addColumn(
|
71 |
+
'mail_type', array(
|
72 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Mail Type'),
|
73 |
'index' => 'mail_type',
|
74 |
'type' => 'options',
|
75 |
'options' => $this->getMailTypeOptions(),
|
76 |
+
)
|
77 |
+
);
|
78 |
+
$this->addColumn(
|
79 |
+
'coupon', array(
|
80 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Coupon #'),
|
81 |
'index' => 'coupon_number',
|
82 |
+
)
|
83 |
+
);
|
84 |
+
$this->addColumn(
|
85 |
+
'coupon_type', array(
|
86 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Coupon type'),
|
87 |
'type' => 'options',
|
88 |
'index' => 'coupon_type',
|
89 |
'options' => Mage::getModel('Ebizmarts_AbandonedCart_Model_System_Config_Discounttype')->options(),
|
90 |
+
)
|
91 |
+
);
|
92 |
+
$this->addColumn(
|
93 |
+
'coupon_amount', array(
|
94 |
'header' => Mage::helper('ebizmarts_abandonedcart')->__('Coupon amount'),
|
95 |
'index' => 'coupon_amount',
|
96 |
+
)
|
97 |
+
);
|
98 |
|
99 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
100 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));
|
app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Abandonedorder/Grid.php
CHANGED
@@ -39,9 +39,9 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Abandonedorder_Grid extends Mage_A
|
|
39 |
{
|
40 |
$collection = Mage::getResourceModel($this->_getCollectionClass());
|
41 |
$this->setCollection($collection);
|
42 |
-
$
|
43 |
-
$collection->getSelect()->join($
|
44 |
-
$collection->addFieldToFilter($
|
45 |
return parent::_prepareCollection();
|
46 |
}
|
47 |
|
@@ -51,63 +51,79 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Abandonedorder_Grid extends Mage_A
|
|
51 |
protected function _prepareColumns()
|
52 |
{
|
53 |
|
54 |
-
$this->addColumn(
|
|
|
55 |
'header' => Mage::helper('sales')->__('Order #'),
|
56 |
'width' => '80px',
|
57 |
'type' => 'text',
|
58 |
'index' => 'increment_id',
|
59 |
-
|
|
|
60 |
|
61 |
if (!Mage::app()->isSingleStoreMode()) {
|
62 |
-
$this->addColumn(
|
|
|
63 |
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
64 |
'index' => 'store_id',
|
65 |
'filter_index' => 'main_table.store_id',
|
66 |
'type' => 'store',
|
67 |
'store_view' => true,
|
68 |
'display_deleted' => true,
|
69 |
-
|
|
|
70 |
}
|
71 |
|
72 |
-
$this->addColumn(
|
|
|
73 |
'header' => Mage::helper('sales')->__('Purchased On'),
|
74 |
'index' => 'created_at',
|
75 |
'filter_index' => 'main_table.created_at',
|
76 |
'type' => 'datetime',
|
77 |
'width' => '100px',
|
78 |
-
|
|
|
79 |
|
80 |
-
$this->addColumn(
|
|
|
81 |
'header' => Mage::helper('sales')->__('Bill to Name'),
|
82 |
'index' => 'billing_name',
|
83 |
-
|
|
|
84 |
|
85 |
-
$this->addColumn(
|
|
|
86 |
'header' => Mage::helper('sales')->__('Ship to Name'),
|
87 |
'index' => 'shipping_name',
|
88 |
-
|
|
|
89 |
|
90 |
-
$this->addColumn(
|
|
|
91 |
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
92 |
'index' => 'base_grand_total',
|
93 |
'type' => 'currency',
|
94 |
'currency' => 'base_currency_code',
|
95 |
-
|
|
|
96 |
|
97 |
-
$this->addColumn(
|
|
|
98 |
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
99 |
'index' => 'grand_total',
|
100 |
'type' => 'currency',
|
101 |
'currency' => 'order_currency_code',
|
102 |
-
|
|
|
103 |
|
104 |
-
$this->addColumn(
|
|
|
105 |
'header' => Mage::helper('sales')->__('Status'),
|
106 |
'index' => 'main_table.status',
|
107 |
'type' => 'options',
|
108 |
'width' => '70px',
|
109 |
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
110 |
-
|
|
|
111 |
|
112 |
|
113 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
39 |
{
|
40 |
$collection = Mage::getResourceModel($this->_getCollectionClass());
|
41 |
$this->setCollection($collection);
|
42 |
+
$salesFlatOrderTable = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');
|
43 |
+
$collection->getSelect()->join($salesFlatOrderTable, 'main_table.increment_id = ' . $salesFlatOrderTable . '.increment_id', 'ebizmarts_abandonedcart_flag');
|
44 |
+
$collection->addFieldToFilter($salesFlatOrderTable . '.ebizmarts_abandonedcart_flag', array('eq' => 1));
|
45 |
return parent::_prepareCollection();
|
46 |
}
|
47 |
|
51 |
protected function _prepareColumns()
|
52 |
{
|
53 |
|
54 |
+
$this->addColumn(
|
55 |
+
'real_order_id', array(
|
56 |
'header' => Mage::helper('sales')->__('Order #'),
|
57 |
'width' => '80px',
|
58 |
'type' => 'text',
|
59 |
'index' => 'increment_id',
|
60 |
+
)
|
61 |
+
);
|
62 |
|
63 |
if (!Mage::app()->isSingleStoreMode()) {
|
64 |
+
$this->addColumn(
|
65 |
+
'store_id', array(
|
66 |
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
67 |
'index' => 'store_id',
|
68 |
'filter_index' => 'main_table.store_id',
|
69 |
'type' => 'store',
|
70 |
'store_view' => true,
|
71 |
'display_deleted' => true,
|
72 |
+
)
|
73 |
+
);
|
74 |
}
|
75 |
|
76 |
+
$this->addColumn(
|
77 |
+
'created_at', array(
|
78 |
'header' => Mage::helper('sales')->__('Purchased On'),
|
79 |
'index' => 'created_at',
|
80 |
'filter_index' => 'main_table.created_at',
|
81 |
'type' => 'datetime',
|
82 |
'width' => '100px',
|
83 |
+
)
|
84 |
+
);
|
85 |
|
86 |
+
$this->addColumn(
|
87 |
+
'billing_name', array(
|
88 |
'header' => Mage::helper('sales')->__('Bill to Name'),
|
89 |
'index' => 'billing_name',
|
90 |
+
)
|
91 |
+
);
|
92 |
|
93 |
+
$this->addColumn(
|
94 |
+
'shipping_name', array(
|
95 |
'header' => Mage::helper('sales')->__('Ship to Name'),
|
96 |
'index' => 'shipping_name',
|
97 |
+
)
|
98 |
+
);
|
99 |
|
100 |
+
$this->addColumn(
|
101 |
+
'base_grand_total', array(
|
102 |
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
103 |
'index' => 'base_grand_total',
|
104 |
'type' => 'currency',
|
105 |
'currency' => 'base_currency_code',
|
106 |
+
)
|
107 |
+
);
|
108 |
|
109 |
+
$this->addColumn(
|
110 |
+
'grand_total', array(
|
111 |
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
112 |
'index' => 'grand_total',
|
113 |
'type' => 'currency',
|
114 |
'currency' => 'order_currency_code',
|
115 |
+
)
|
116 |
+
);
|
117 |
|
118 |
+
$this->addColumn(
|
119 |
+
'status', array(
|
120 |
'header' => Mage::helper('sales')->__('Status'),
|
121 |
'index' => 'main_table.status',
|
122 |
'type' => 'options',
|
123 |
'width' => '70px',
|
124 |
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
125 |
+
)
|
126 |
+
);
|
127 |
|
128 |
|
129 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Dashboard.php
CHANGED
@@ -19,10 +19,12 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Dashboard extends Mage_Adminhtml_B
|
|
19 |
|
20 |
protected function _prepareLayout()
|
21 |
{
|
22 |
-
$this->setChild(
|
|
|
23 |
$this->getLayout()->createBlock('ebizmarts_abandonedcart/adminhtml_dashboard_sales')
|
24 |
);
|
25 |
-
$this->setChild(
|
|
|
26 |
$this->getLayout()->createBlock('ebizmarts_abandonedcart/adminhtml_dashboard_totals')
|
27 |
);
|
28 |
|
19 |
|
20 |
protected function _prepareLayout()
|
21 |
{
|
22 |
+
$this->setChild(
|
23 |
+
'sales',
|
24 |
$this->getLayout()->createBlock('ebizmarts_abandonedcart/adminhtml_dashboard_sales')
|
25 |
);
|
26 |
+
$this->setChild(
|
27 |
+
'totals',
|
28 |
$this->getLayout()->createBlock('ebizmarts_abandonedcart/adminhtml_dashboard_totals')
|
29 |
);
|
30 |
|
app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Dashboard/Totals.php
CHANGED
@@ -45,7 +45,8 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Dashboard_Totals extends Mage_Admi
|
|
45 |
$storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
|
46 |
$collection->addFieldToFilter('main_table.store_id', array('in' => $storeIds));
|
47 |
} elseif (!$collection->isLive()) {
|
48 |
-
$collection->addFieldToFilter(
|
|
|
49 |
array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
|
50 |
);
|
51 |
}
|
@@ -67,7 +68,8 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Dashboard_Totals extends Mage_Admi
|
|
67 |
$storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
|
68 |
$collection2->addFieldToFilter('store_id', array('in' => $storeIds));
|
69 |
} elseif (!$collection2->isLive()) {
|
70 |
-
$collection->addFieldToFilter(
|
|
|
71 |
array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
|
72 |
);
|
73 |
}
|
@@ -96,19 +98,19 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Dashboard_Totals extends Mage_Admi
|
|
96 |
$particular = array('sent' => 0, 'soft_bounces' => 0, 'hard_bounces' => 0, 'unique_opens' => 0, 'unique_clicks' => 0);
|
97 |
if (!$isFilter) {
|
98 |
$stores = Mage::app()->getStores();
|
99 |
-
$
|
100 |
-
foreach ($stores as $
|
101 |
-
$storeid = Mage::app()->getStore($
|
102 |
$aux = $this->__getMandrillStatistics($period, $storeid);
|
103 |
if ($aux && !isset($aux['status'])) {
|
104 |
-
$
|
105 |
-
$
|
106 |
-
$
|
107 |
-
$
|
108 |
-
$
|
109 |
}
|
110 |
}
|
111 |
-
$particular = $
|
112 |
} else {
|
113 |
$data = $this->__getMandrillStatistics($period, $this->getRequest()->getParam('store'));
|
114 |
if (!isset($data['status'])) {
|
@@ -119,13 +121,13 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Dashboard_Totals extends Mage_Admi
|
|
119 |
if ($particular) {
|
120 |
|
121 |
$_sent = $particular['sent'];
|
122 |
-
$
|
123 |
-
$
|
124 |
-
$
|
125 |
|
126 |
|
127 |
//Emails Sent and Received
|
128 |
-
$aux = $_sent - $
|
129 |
if ($aux > 0) {
|
130 |
$aux2 = $aux / $_sent * 100;
|
131 |
} else {
|
@@ -137,23 +139,23 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Dashboard_Totals extends Mage_Admi
|
|
137 |
$this->addTotal($this->__('Emails Received'), $received, true);
|
138 |
|
139 |
//Emails Opened
|
140 |
-
if ($
|
141 |
-
$emailsOpened = $
|
142 |
} else {
|
143 |
$emailsOpened = 0;
|
144 |
}
|
145 |
|
146 |
-
$opens = sprintf('%d (%2.2f%%)', $
|
147 |
$this->addTotal($this->__('Emails Opened'), $opens, true);
|
148 |
|
149 |
//Emails Clicked
|
150 |
-
if ($
|
151 |
-
$emailsClicked = $
|
152 |
} else {
|
153 |
$emailsClicked = 0;
|
154 |
}
|
155 |
|
156 |
-
$clicks = sprintf('%d (%2.2f%%)', $
|
157 |
$this->addTotal($this->__('Emails Clicked'), $clicks, true);
|
158 |
}
|
159 |
}
|
45 |
$storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
|
46 |
$collection->addFieldToFilter('main_table.store_id', array('in' => $storeIds));
|
47 |
} elseif (!$collection->isLive()) {
|
48 |
+
$collection->addFieldToFilter(
|
49 |
+
'main_table.store_id',
|
50 |
array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
|
51 |
);
|
52 |
}
|
68 |
$storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
|
69 |
$collection2->addFieldToFilter('store_id', array('in' => $storeIds));
|
70 |
} elseif (!$collection2->isLive()) {
|
71 |
+
$collection->addFieldToFilter(
|
72 |
+
'store_id',
|
73 |
array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
|
74 |
);
|
75 |
}
|
98 |
$particular = array('sent' => 0, 'soft_bounces' => 0, 'hard_bounces' => 0, 'unique_opens' => 0, 'unique_clicks' => 0);
|
99 |
if (!$isFilter) {
|
100 |
$stores = Mage::app()->getStores();
|
101 |
+
$particularAux = $particular;
|
102 |
+
foreach ($stores as $store => $val) {
|
103 |
+
$storeid = Mage::app()->getStore($store)->getId();
|
104 |
$aux = $this->__getMandrillStatistics($period, $storeid);
|
105 |
if ($aux && !isset($aux['status'])) {
|
106 |
+
$particularAux['sent'] += $aux['sent'];
|
107 |
+
$particularAux['soft_bounces'] += $aux['soft_bounces'];
|
108 |
+
$particularAux['hard_bounces'] += $aux['hard_bounces'];
|
109 |
+
$particularAux['unique_opens'] += $aux['unique_opens'];
|
110 |
+
$particularAux['unique_clicks'] += $aux['unique_clicks'];
|
111 |
}
|
112 |
}
|
113 |
+
$particular = $particularAux;
|
114 |
} else {
|
115 |
$data = $this->__getMandrillStatistics($period, $this->getRequest()->getParam('store'));
|
116 |
if (!isset($data['status'])) {
|
121 |
if ($particular) {
|
122 |
|
123 |
$_sent = $particular['sent'];
|
124 |
+
$hardBounces = $particular['hard_bounces'];
|
125 |
+
$uniqueOpens = $particular['unique_opens'];
|
126 |
+
$uniqueClicks = $particular['unique_clicks'];
|
127 |
|
128 |
|
129 |
//Emails Sent and Received
|
130 |
+
$aux = $_sent - $hardBounces; // - $particular['soft_bounces'];
|
131 |
if ($aux > 0) {
|
132 |
$aux2 = $aux / $_sent * 100;
|
133 |
} else {
|
139 |
$this->addTotal($this->__('Emails Received'), $received, true);
|
140 |
|
141 |
//Emails Opened
|
142 |
+
if ($uniqueOpens > 0) {
|
143 |
+
$emailsOpened = $uniqueOpens / $_sent * 100;
|
144 |
} else {
|
145 |
$emailsOpened = 0;
|
146 |
}
|
147 |
|
148 |
+
$opens = sprintf('%d (%2.2f%%)', $uniqueOpens, $emailsOpened);
|
149 |
$this->addTotal($this->__('Emails Opened'), $opens, true);
|
150 |
|
151 |
//Emails Clicked
|
152 |
+
if ($uniqueClicks > 0) {
|
153 |
+
$emailsClicked = $uniqueClicks / $uniqueOpens * 100;
|
154 |
} else {
|
155 |
$emailsClicked = 0;
|
156 |
}
|
157 |
|
158 |
+
$clicks = sprintf('%d (%2.2f%%)', $uniqueClicks, $emailsClicked);
|
159 |
$this->addTotal($this->__('Emails Clicked'), $clicks, true);
|
160 |
}
|
161 |
}
|
app/code/community/Ebizmarts/AbandonedCart/Block/Email/Order/Items.php
CHANGED
@@ -33,10 +33,10 @@ class Ebizmarts_AbandonedCart_Block_Email_Order_Items extends Mage_Sales_Block_I
|
|
33 |
$imageUrl = $product->getThumbnailUrl();
|
34 |
if ($product->getImage() == "no_selection" && $product->getTypeId() == "configurable") {
|
35 |
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
|
36 |
-
$
|
37 |
-
foreach ($
|
38 |
-
if ($
|
39 |
-
$imageUrl = $
|
40 |
}
|
41 |
}
|
42 |
}
|
33 |
$imageUrl = $product->getThumbnailUrl();
|
34 |
if ($product->getImage() == "no_selection" && $product->getTypeId() == "configurable") {
|
35 |
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
|
36 |
+
$simpleCollection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
|
37 |
+
foreach ($simpleCollection as $simpleProduct) {
|
38 |
+
if ($simpleProduct->getImage() != "no_selection") {
|
39 |
+
$imageUrl = $simpleProduct->getThumbnailUrl();
|
40 |
}
|
41 |
}
|
42 |
}
|
app/code/community/Ebizmarts/AbandonedCart/Block/Popup/Emailcatcher.php
CHANGED
@@ -36,7 +36,7 @@ class Ebizmarts_AbandonedCart_Block_Popup_Emailcatcher extends Mage_Core_Block_T
|
|
36 |
protected function _createCoupon($cookie)
|
37 |
{
|
38 |
$storeId = Mage::app()->getStore()->getId();
|
39 |
-
if(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_CREATE_COUPON, $storeId)) {
|
40 |
$cookieValues = explode('/', $cookie);
|
41 |
$email = $cookieValues[0];
|
42 |
$email = str_replace(' ', '+', $email);
|
@@ -58,7 +58,8 @@ class Ebizmarts_AbandonedCart_Block_Popup_Emailcatcher extends Mage_Core_Block_T
|
|
58 |
return Mage::app()->getStore()->getId();
|
59 |
}
|
60 |
|
61 |
-
protected function _handleCookie()
|
|
|
62 |
$storeId = Mage::app()->getStore()->getId();
|
63 |
$emailCookie = Mage::getModel('core/cookie')->get('email');
|
64 |
$subscribeCookie = Mage::getModel('core/cookie')->get('subscribe');
|
@@ -67,15 +68,15 @@ class Ebizmarts_AbandonedCart_Block_Popup_Emailcatcher extends Mage_Core_Block_T
|
|
67 |
$email = str_replace(' ', '+', $email);
|
68 |
$fName = $cookieValues[1];
|
69 |
$lName = $cookieValues[2];
|
70 |
-
if($subscribeCookie == 'true'){
|
71 |
$subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
|
72 |
-
if(!$subscriber->getId()) {
|
73 |
$subscriber = Mage::getModel('newsletter/subscriber')
|
74 |
->setStoreId($storeId);
|
75 |
-
if($fName){
|
76 |
$subscriber->setSubscriberFirstname($fName);
|
77 |
}
|
78 |
-
if($lName){
|
79 |
$subscriber->setSubscriberLastname($lName);
|
80 |
}
|
81 |
$subscriber->setStoreId($storeId)
|
36 |
protected function _createCoupon($cookie)
|
37 |
{
|
38 |
$storeId = Mage::app()->getStore()->getId();
|
39 |
+
if (Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_CREATE_COUPON, $storeId)) {
|
40 |
$cookieValues = explode('/', $cookie);
|
41 |
$email = $cookieValues[0];
|
42 |
$email = str_replace(' ', '+', $email);
|
58 |
return Mage::app()->getStore()->getId();
|
59 |
}
|
60 |
|
61 |
+
protected function _handleCookie()
|
62 |
+
{
|
63 |
$storeId = Mage::app()->getStore()->getId();
|
64 |
$emailCookie = Mage::getModel('core/cookie')->get('email');
|
65 |
$subscribeCookie = Mage::getModel('core/cookie')->get('subscribe');
|
68 |
$email = str_replace(' ', '+', $email);
|
69 |
$fName = $cookieValues[1];
|
70 |
$lName = $cookieValues[2];
|
71 |
+
if ($subscribeCookie == 'true') {
|
72 |
$subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
|
73 |
+
if (!$subscriber->getId()) {
|
74 |
$subscriber = Mage::getModel('newsletter/subscriber')
|
75 |
->setStoreId($storeId);
|
76 |
+
if ($fName) {
|
77 |
$subscriber->setSubscriberFirstname($fName);
|
78 |
}
|
79 |
+
if ($lName) {
|
80 |
$subscriber->setSubscriberLastname($lName);
|
81 |
}
|
82 |
$subscriber->setStoreId($storeId)
|
app/code/community/Ebizmarts/AbandonedCart/Model/Cron.php
CHANGED
@@ -11,19 +11,19 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
11 |
{
|
12 |
// const EMAIL_TEMPLATE_XML_PATH = 'ebizmarts_abandonedcart/general/template';
|
13 |
// const EMAIL_TEMPLATE_XML_PATH_W_COUPON = 'ebizmarts_abandonedcart/general/coupon_template';
|
14 |
-
protected $
|
15 |
-
protected $
|
16 |
-
protected $
|
17 |
-
protected $
|
18 |
-
protected $
|
19 |
-
protected $
|
20 |
-
protected $
|
21 |
-
protected $
|
22 |
-
protected $
|
23 |
-
protected $
|
24 |
-
protected $
|
25 |
-
protected $
|
26 |
-
protected $
|
27 |
|
28 |
/**
|
29 |
*
|
@@ -64,51 +64,51 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
64 |
|
65 |
|
66 |
$adapter = Mage::getSingleton('core/resource')->getConnection('sales_read');
|
67 |
-
$this->
|
68 |
0 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_1, $storeId),
|
69 |
1 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_2, $storeId),
|
70 |
2 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_3, $storeId),
|
71 |
3 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_4, $storeId),
|
72 |
4 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_5, $storeId)
|
73 |
);
|
74 |
-
$this->
|
75 |
-
$this->
|
76 |
-
$this->
|
77 |
-
$this->
|
78 |
-
$this->
|
79 |
-
$this->
|
80 |
|
81 |
|
82 |
|
83 |
//coupon vars
|
84 |
-
$this->
|
85 |
-
$this->
|
86 |
-
$this->
|
87 |
-
$this->
|
88 |
-
$this->
|
89 |
|
90 |
// iterates one time for each mail number
|
91 |
-
for ($run = 0; $run < $this->
|
92 |
-
if (!$this->
|
93 |
return;
|
94 |
}
|
95 |
$this->_processRun($adapter, $run, $storeId);
|
96 |
|
97 |
-
|
98 |
}
|
99 |
protected function _processRun($adapter, $run, $storeId)
|
100 |
{
|
101 |
// subtract days from latest run to get difference from the actual abandon date of the cart
|
102 |
-
$diff = $this->
|
103 |
-
if ($run == 1 && $this->
|
104 |
-
$diff -= $this->
|
105 |
} elseif ($run != 0) {
|
106 |
-
$diff -= $this->
|
107 |
}
|
108 |
|
109 |
// set the top date of the carts to get
|
110 |
$expr = sprintf('DATE_SUB(%s, %s)', $adapter->quote(now()), $this->_getIntervalUnitSql($diff, 'DAY'));
|
111 |
-
if ($run == 0 && $this->
|
112 |
$expr = sprintf('DATE_SUB(%s, %s)', $adapter->quote(now()), $this->_getIntervalUnitSql($diff, 'HOUR'));
|
113 |
}
|
114 |
$from = new Zend_Db_Expr($expr);
|
@@ -122,12 +122,12 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
122 |
->setOrder('updated_at');
|
123 |
|
124 |
$collection->addFieldToFilter('main_table.converted_at', array(array('null' => true), $this->_getSuggestedZeroDate()))
|
125 |
-
->addFieldToFilter('main_table.updated_at', array('to' => $from, 'from' => $this->
|
126 |
->addFieldToFilter('main_table.ebizmarts_abandonedcart_counter', array('eq' => $run));
|
127 |
|
128 |
$collection->addFieldToFilter('main_table.customer_email', array('neq' => ''));
|
129 |
-
if (count($this->
|
130 |
-
$collection->addFieldToFilter('main_table.customer_group_id', array('in' => $this->
|
131 |
}
|
132 |
|
133 |
$abTesting = false;
|
@@ -143,20 +143,20 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
143 |
}
|
144 |
}
|
145 |
if ($abTesting) {
|
146 |
-
$this->
|
147 |
-
$this->
|
148 |
} else {
|
149 |
-
$this->
|
150 |
}
|
151 |
$ganalytics='';
|
152 |
-
if(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_ACTIVE, $storeId)) {
|
153 |
-
if(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_SOURCE, $storeId)!='') {
|
154 |
$ganalytics .= '&utm_source='.Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_SOURCE, $storeId);
|
155 |
}
|
156 |
-
if(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_MEDIUM, $storeId)!='') {
|
157 |
$ganalytics .= '&utm_medium='.Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_MEDIUM, $storeId);
|
158 |
}
|
159 |
-
if(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_CAMPAIGN, $storeId)!='') {
|
160 |
$ganalytics .= '&utm_campaign='.Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_CAMPAIGN, $storeId);
|
161 |
}
|
162 |
}
|
@@ -181,7 +181,7 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
181 |
->addFieldToFilter('main_table.updated_at', array('from' => $quote->getUpdatedAt()));
|
182 |
if ($collection2->getSize() || $collection3->getSize()) {
|
183 |
//Set counter to its max value to prevent this quote to slow the process in the future
|
184 |
-
$quote->setEbizmartsAbandonedcartCounter($this->
|
185 |
$quote->save();
|
186 |
continue;
|
187 |
}
|
@@ -213,30 +213,30 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
213 |
$today = idate('U', strtotime(now()));
|
214 |
$updatedAt = idate('U', strtotime($quote->getUpdatedAt()));
|
215 |
$updatedAtDiff = ($today - $updatedAt) / 60 / 60 / 24;
|
216 |
-
if ($this->
|
217 |
$updatedAtDiff = ($today - $updatedAt) / 60 / 60;
|
218 |
}
|
219 |
|
220 |
// if days have passed proceed to send mail
|
221 |
if ($updatedAtDiff >= $diff) {
|
222 |
-
$mailsubject = $this->_getMailSubject($run, $
|
223 |
-
$templateId = $this->_getTemplateId($run, $
|
224 |
-
if ($this->
|
225 |
//$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
|
226 |
// create a new coupon
|
227 |
if (Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_AUTOMATIC) == 2) {
|
228 |
-
list($couponcode, $discount, $toDate) = $this->_createNewCoupon($storeId, $email
|
229 |
$url .= '&coupon=' . $couponcode;
|
230 |
$vars = array('quote' => $quote, 'url' => $url, 'couponcode' => $couponcode, 'discount' => $discount,
|
231 |
-
'todate' => $toDate, 'name' => $name, 'tags' => array($this->
|
232 |
} else {
|
233 |
$couponcode = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_CODE);
|
234 |
$url .= '&coupon=' . $couponcode;
|
235 |
-
$vars = array('quote' => $quote, 'url' => $url, 'couponcode' => $couponcode, 'name' => $name, 'tags' => array($this->
|
236 |
}
|
237 |
} else {
|
238 |
//$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
|
239 |
-
$vars = array('quote' => $quote, 'url' => $url, 'unsubscribeurl' => $unsubscribeUrl, 'tags' => array($this->
|
240 |
|
241 |
}
|
242 |
|
@@ -277,10 +277,10 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
277 |
$counterCollection = Mage::getModel('ebizmarts_abandonedcart/abtesting')->getCollection();
|
278 |
$defaultStore = Mage::app()->getStore($storeId)->getWebsite()->getDefaultStore();
|
279 |
$normalFilter = array('eq' => $storeId);
|
280 |
-
if($storeId == $defaultStore->getId()){
|
281 |
$newFilter = array('eq' => '0');
|
282 |
$collection->addFieldToFilter('store_id', array($normalFilter, $newFilter));
|
283 |
-
}else{
|
284 |
$collection->addFieldToFilter('store_id', $normalFilter);
|
285 |
}
|
286 |
$counter = $counterCollection->getFirstItem();
|
@@ -307,10 +307,10 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
307 |
$stockQty = $stock->getQty();
|
308 |
} elseif ($product->getTypeId() == 'bundle') {
|
309 |
$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
|
310 |
-
$
|
311 |
-
$
|
312 |
-
$selectionCollection = $
|
313 |
-
$
|
314 |
);
|
315 |
$stockQty = -1;
|
316 |
foreach ($selectionCollection as $option) {
|
@@ -356,11 +356,11 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
356 |
|
357 |
|
358 |
//coupon vars
|
359 |
-
$this->
|
360 |
-
$this->
|
361 |
-
$this->
|
362 |
-
$this->
|
363 |
-
$this->
|
364 |
|
365 |
$collection = Mage::getModel('ebizmarts_abandonedcart/popup')->getCollection()
|
366 |
->addFieldToFilter('email', array('neq' => ''))
|
@@ -400,22 +400,22 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
400 |
if (!count($collection)) {
|
401 |
|
402 |
$fromDate = date("Y-m-d");
|
403 |
-
$toDate = date('Y-m-d', strtotime($fromDate . " + $this->
|
404 |
-
if ($this->
|
405 |
$action = 'cart_fixed';
|
406 |
-
$discount = Mage::app()->getStore($store)->getCurrentCurrencyCode() . "$this->
|
407 |
-
} elseif ($this->
|
408 |
$action = 'by_percent';
|
409 |
-
$discount = "$this->
|
410 |
}
|
411 |
-
$
|
412 |
-
$allGroups = $
|
413 |
$groups = array();
|
414 |
foreach ($allGroups as $groupid => $name) {
|
415 |
$groups[] = $groupid;
|
416 |
}
|
417 |
-
$
|
418 |
-
$
|
419 |
->setDescription("Abandoned coupon $email")
|
420 |
->setStopRulesProcessing(0)
|
421 |
->setFromDate($fromDate)
|
@@ -426,21 +426,21 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
426 |
->setUsesPerCustomer(1)
|
427 |
->setCustomerGroupIds($groups)
|
428 |
->setProductIds('')
|
429 |
-
->setLengthMin($this->
|
430 |
-
->setLengthMax($this->
|
431 |
->setSortOrder(0)
|
432 |
-
->setStoreLabels(array($this->
|
433 |
->setSimpleAction($action)
|
434 |
-
->setDiscountAmount($this->
|
435 |
->setDiscountQty(0)
|
436 |
->setDiscountStep('0')
|
437 |
->setSimpleFreeShipping('0')
|
438 |
->setApplyToShipping('0')
|
439 |
->setIsRss(0)
|
440 |
->setWebsiteIds($websiteid);
|
441 |
-
$uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $this->
|
442 |
-
$
|
443 |
-
$
|
444 |
return array($uniqueId, $discount, $toDate);
|
445 |
} else {
|
446 |
$coupon = $collection->getFirstItem();
|
@@ -455,10 +455,10 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
455 |
|
456 |
/**
|
457 |
* @param $interval
|
458 |
-
* @param $
|
459 |
* @return string
|
460 |
*/
|
461 |
-
function _getIntervalUnitSql($interval, $unit)
|
462 |
{
|
463 |
return sprintf('INTERVAL %d %s', $interval, $unit);
|
464 |
}
|
@@ -466,7 +466,7 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
466 |
/**
|
467 |
* @return string
|
468 |
*/
|
469 |
-
function _getSuggestedZeroDate()
|
470 |
{
|
471 |
return '0000-00-00 00:00:00';
|
472 |
}
|
@@ -483,9 +483,10 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
483 |
/**
|
484 |
* @param $currentCount
|
485 |
* @param $store
|
486 |
-
* @
|
|
|
487 |
*/
|
488 |
-
protected function _getMailSubject($currentCount, $abTesting = false
|
489 |
{
|
490 |
|
491 |
$ret = NULL;
|
@@ -534,7 +535,7 @@ class Ebizmarts_AbandonedCart_Model_Cron
|
|
534 |
* @param $currentCount
|
535 |
* @return mixed
|
536 |
*/
|
537 |
-
protected function _getTemplateId($currentCount, $abTesting = false
|
538 |
{
|
539 |
|
540 |
$ret = NULL;
|
11 |
{
|
12 |
// const EMAIL_TEMPLATE_XML_PATH = 'ebizmarts_abandonedcart/general/template';
|
13 |
// const EMAIL_TEMPLATE_XML_PATH_W_COUPON = 'ebizmarts_abandonedcart/general/coupon_template';
|
14 |
+
protected $_days;
|
15 |
+
protected $_maxtimes;
|
16 |
+
protected $_sendcoupon;
|
17 |
+
protected $_firstdate;
|
18 |
+
protected $_unit;
|
19 |
+
protected $_customergroups;
|
20 |
+
protected $_mandrillTag;
|
21 |
+
protected $_couponamount;
|
22 |
+
protected $_couponexpiredays;
|
23 |
+
protected $_coupontype;
|
24 |
+
protected $_couponlength;
|
25 |
+
protected $_couponlabel;
|
26 |
+
protected $_sendcoupondays;
|
27 |
|
28 |
/**
|
29 |
*
|
64 |
|
65 |
|
66 |
$adapter = Mage::getSingleton('core/resource')->getConnection('sales_read');
|
67 |
+
$this->_days = array(
|
68 |
0 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_1, $storeId),
|
69 |
1 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_2, $storeId),
|
70 |
2 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_3, $storeId),
|
71 |
3 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_4, $storeId),
|
72 |
4 => Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::DAYS_5, $storeId)
|
73 |
);
|
74 |
+
$this->_maxtimes = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::MAXTIMES, $storeId) + 1;
|
75 |
+
$this->_sendcoupon = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::SEND_COUPON, $storeId);
|
76 |
+
$this->_firstdate = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::FIRST_DATE, $storeId);
|
77 |
+
$this->_unit = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::UNIT, $storeId);
|
78 |
+
$this->_customergroups = explode(",", Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::CUSTOMER_GROUPS, $storeId));
|
79 |
+
$this->_mandrillTag = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::MANDRILL_TAG, $storeId) . "_$storeId";
|
80 |
|
81 |
|
82 |
|
83 |
//coupon vars
|
84 |
+
$this->_couponamount = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_AMOUNT, $storeId);
|
85 |
+
$this->_couponexpiredays = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_EXPIRE, $storeId);
|
86 |
+
$this->_coupontype = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_TYPE, $storeId);
|
87 |
+
$this->_couponlength = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_LENGTH, $storeId);
|
88 |
+
$this->_couponlabel = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_LABEL, $storeId);
|
89 |
|
90 |
// iterates one time for each mail number
|
91 |
+
for ($run = 0; $run < $this->_maxtimes; $run++) {
|
92 |
+
if (!$this->_days[$run]) {
|
93 |
return;
|
94 |
}
|
95 |
$this->_processRun($adapter, $run, $storeId);
|
96 |
|
97 |
+
}
|
98 |
}
|
99 |
protected function _processRun($adapter, $run, $storeId)
|
100 |
{
|
101 |
// subtract days from latest run to get difference from the actual abandon date of the cart
|
102 |
+
$diff = $this->_days[$run];
|
103 |
+
if ($run == 1 && $this->_unit == Ebizmarts_AbandonedCart_Model_Config::IN_HOURS) {
|
104 |
+
$diff -= $this->_days[0] / 24;
|
105 |
} elseif ($run != 0) {
|
106 |
+
$diff -= $this->_days[$run - 1];
|
107 |
}
|
108 |
|
109 |
// set the top date of the carts to get
|
110 |
$expr = sprintf('DATE_SUB(%s, %s)', $adapter->quote(now()), $this->_getIntervalUnitSql($diff, 'DAY'));
|
111 |
+
if ($run == 0 && $this->_unit == Ebizmarts_AbandonedCart_Model_Config::IN_HOURS) {
|
112 |
$expr = sprintf('DATE_SUB(%s, %s)', $adapter->quote(now()), $this->_getIntervalUnitSql($diff, 'HOUR'));
|
113 |
}
|
114 |
$from = new Zend_Db_Expr($expr);
|
122 |
->setOrder('updated_at');
|
123 |
|
124 |
$collection->addFieldToFilter('main_table.converted_at', array(array('null' => true), $this->_getSuggestedZeroDate()))
|
125 |
+
->addFieldToFilter('main_table.updated_at', array('to' => $from, 'from' => $this->_firstdate))
|
126 |
->addFieldToFilter('main_table.ebizmarts_abandonedcart_counter', array('eq' => $run));
|
127 |
|
128 |
$collection->addFieldToFilter('main_table.customer_email', array('neq' => ''));
|
129 |
+
if (count($this->_customergroups)) {
|
130 |
+
$collection->addFieldToFilter('main_table.customer_group_id', array('in' => $this->_customergroups));
|
131 |
}
|
132 |
|
133 |
$abTesting = false;
|
143 |
}
|
144 |
}
|
145 |
if ($abTesting) {
|
146 |
+
$this->_mandrillTag .= '_' . $suffix;
|
147 |
+
$this->_sendcoupondays = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::AB_TESTING_COUPON_SENDON, $storeId);
|
148 |
} else {
|
149 |
+
$this->_sendcoupondays = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_DAYS, $storeId);
|
150 |
}
|
151 |
$ganalytics='';
|
152 |
+
if (Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_ACTIVE, $storeId)) {
|
153 |
+
if (Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_SOURCE, $storeId)!='') {
|
154 |
$ganalytics .= '&utm_source='.Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_SOURCE, $storeId);
|
155 |
}
|
156 |
+
if (Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_MEDIUM, $storeId)!='') {
|
157 |
$ganalytics .= '&utm_medium='.Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_MEDIUM, $storeId);
|
158 |
}
|
159 |
+
if (Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_CAMPAIGN, $storeId)!='') {
|
160 |
$ganalytics .= '&utm_campaign='.Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::GANALYTICS_CAMPAIGN, $storeId);
|
161 |
}
|
162 |
}
|
181 |
->addFieldToFilter('main_table.updated_at', array('from' => $quote->getUpdatedAt()));
|
182 |
if ($collection2->getSize() || $collection3->getSize()) {
|
183 |
//Set counter to its max value to prevent this quote to slow the process in the future
|
184 |
+
$quote->setEbizmartsAbandonedcartCounter($this->_maxtimes);
|
185 |
$quote->save();
|
186 |
continue;
|
187 |
}
|
213 |
$today = idate('U', strtotime(now()));
|
214 |
$updatedAt = idate('U', strtotime($quote->getUpdatedAt()));
|
215 |
$updatedAtDiff = ($today - $updatedAt) / 60 / 60 / 24;
|
216 |
+
if ($this->_unit == Ebizmarts_AbandonedCart_Model_Config::IN_HOURS && $run == 0) {
|
217 |
$updatedAtDiff = ($today - $updatedAt) / 60 / 60;
|
218 |
}
|
219 |
|
220 |
// if days have passed proceed to send mail
|
221 |
if ($updatedAtDiff >= $diff) {
|
222 |
+
$mailsubject = $this->_getMailSubject($run, $storeId, $abTesting);
|
223 |
+
$templateId = $this->_getTemplateId($run, $storeId, $abTesting);
|
224 |
+
if ($this->_sendcoupon && $run + 1 == $this->_sendcoupondays) {
|
225 |
//$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
|
226 |
// create a new coupon
|
227 |
if (Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_AUTOMATIC) == 2) {
|
228 |
+
list($couponcode, $discount, $toDate) = $this->_createNewCoupon($storeId, $email);
|
229 |
$url .= '&coupon=' . $couponcode;
|
230 |
$vars = array('quote' => $quote, 'url' => $url, 'couponcode' => $couponcode, 'discount' => $discount,
|
231 |
+
'todate' => $toDate, 'name' => $name, 'tags' => array($this->_mandrillTag), 'unsubscribeurl' => $unsubscribeUrl);
|
232 |
} else {
|
233 |
$couponcode = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_CODE);
|
234 |
$url .= '&coupon=' . $couponcode;
|
235 |
+
$vars = array('quote' => $quote, 'url' => $url, 'couponcode' => $couponcode, 'name' => $name, 'tags' => array($this->_mandrillTag), 'unsubscribeurl' => $unsubscribeUrl);
|
236 |
}
|
237 |
} else {
|
238 |
//$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
|
239 |
+
$vars = array('quote' => $quote, 'url' => $url, 'unsubscribeurl' => $unsubscribeUrl, 'tags' => array($this->_mandrillTag));
|
240 |
|
241 |
}
|
242 |
|
277 |
$counterCollection = Mage::getModel('ebizmarts_abandonedcart/abtesting')->getCollection();
|
278 |
$defaultStore = Mage::app()->getStore($storeId)->getWebsite()->getDefaultStore();
|
279 |
$normalFilter = array('eq' => $storeId);
|
280 |
+
if ($storeId == $defaultStore->getId()) {
|
281 |
$newFilter = array('eq' => '0');
|
282 |
$collection->addFieldToFilter('store_id', array($normalFilter, $newFilter));
|
283 |
+
} else {
|
284 |
$collection->addFieldToFilter('store_id', $normalFilter);
|
285 |
}
|
286 |
$counter = $counterCollection->getFirstItem();
|
307 |
$stockQty = $stock->getQty();
|
308 |
} elseif ($product->getTypeId() == 'bundle') {
|
309 |
$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
|
310 |
+
$bundledProduct = new Mage_Catalog_Model_Product();
|
311 |
+
$bundledProduct->load($product->getId());
|
312 |
+
$selectionCollection = $bundledProduct->getTypeInstance(true)->getSelectionsCollection(
|
313 |
+
$bundledProduct->getTypeInstance(true)->getOptionsIds($bundledProduct), $bundledProduct
|
314 |
);
|
315 |
$stockQty = -1;
|
316 |
foreach ($selectionCollection as $option) {
|
356 |
|
357 |
|
358 |
//coupon vars
|
359 |
+
$this->_couponamount = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_COUPON_DISCOUNT, $storeId);
|
360 |
+
$this->_couponexpiredays = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_COUPON_EXPIRE, $storeId);
|
361 |
+
$this->_coupontype = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_COUPON_DISCOUNTTYPE, $storeId);
|
362 |
+
$this->_couponlength = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_COUPON_LENGTH, $storeId);
|
363 |
+
$this->_couponlabel = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_COUPON_LABEL, $storeId);
|
364 |
|
365 |
$collection = Mage::getModel('ebizmarts_abandonedcart/popup')->getCollection()
|
366 |
->addFieldToFilter('email', array('neq' => ''))
|
400 |
if (!count($collection)) {
|
401 |
|
402 |
$fromDate = date("Y-m-d");
|
403 |
+
$toDate = date('Y-m-d', strtotime($fromDate . " + $this->_couponexpiredays day"));
|
404 |
+
if ($this->_coupontype == 1) {
|
405 |
$action = 'cart_fixed';
|
406 |
+
$discount = Mage::app()->getStore($store)->getCurrentCurrencyCode() . "$this->_couponamount";
|
407 |
+
} elseif ($this->_coupontype == 2) {
|
408 |
$action = 'by_percent';
|
409 |
+
$discount = "$this->_couponamount%";
|
410 |
}
|
411 |
+
$customerGroup = new Mage_Customer_Model_Group();
|
412 |
+
$allGroups = $customerGroup->getCollection()->toOptionHash();
|
413 |
$groups = array();
|
414 |
foreach ($allGroups as $groupid => $name) {
|
415 |
$groups[] = $groupid;
|
416 |
}
|
417 |
+
$couponRule = Mage::getModel('salesrule/rule');
|
418 |
+
$couponRule->setName("Abandoned coupon $email")
|
419 |
->setDescription("Abandoned coupon $email")
|
420 |
->setStopRulesProcessing(0)
|
421 |
->setFromDate($fromDate)
|
426 |
->setUsesPerCustomer(1)
|
427 |
->setCustomerGroupIds($groups)
|
428 |
->setProductIds('')
|
429 |
+
->setLengthMin($this->_couponlength)
|
430 |
+
->setLengthMax($this->_couponlength)
|
431 |
->setSortOrder(0)
|
432 |
+
->setStoreLabels(array($this->_couponlabel))
|
433 |
->setSimpleAction($action)
|
434 |
+
->setDiscountAmount($this->_couponamount)
|
435 |
->setDiscountQty(0)
|
436 |
->setDiscountStep('0')
|
437 |
->setSimpleFreeShipping('0')
|
438 |
->setApplyToShipping('0')
|
439 |
->setIsRss(0)
|
440 |
->setWebsiteIds($websiteid);
|
441 |
+
$uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $this->_couponlength))->generateCode();
|
442 |
+
$couponRule->setCouponCode($uniqueId);
|
443 |
+
$couponRule->save();
|
444 |
return array($uniqueId, $discount, $toDate);
|
445 |
} else {
|
446 |
$coupon = $collection->getFirstItem();
|
455 |
|
456 |
/**
|
457 |
* @param $interval
|
458 |
+
* @param $unit
|
459 |
* @return string
|
460 |
*/
|
461 |
+
protected function _getIntervalUnitSql($interval, $unit)
|
462 |
{
|
463 |
return sprintf('INTERVAL %d %s', $interval, $unit);
|
464 |
}
|
466 |
/**
|
467 |
* @return string
|
468 |
*/
|
469 |
+
protected function _getSuggestedZeroDate()
|
470 |
{
|
471 |
return '0000-00-00 00:00:00';
|
472 |
}
|
483 |
/**
|
484 |
* @param $currentCount
|
485 |
* @param $store
|
486 |
+
* @param bool $abTesting
|
487 |
+
* @return null
|
488 |
*/
|
489 |
+
protected function _getMailSubject($currentCount, $store, $abTesting = false)
|
490 |
{
|
491 |
|
492 |
$ret = NULL;
|
535 |
* @param $currentCount
|
536 |
* @return mixed
|
537 |
*/
|
538 |
+
protected function _getTemplateId($currentCount, $store, $abTesting = false)
|
539 |
{
|
540 |
|
541 |
$ret = NULL;
|
app/code/community/Ebizmarts/AbandonedCart/Model/EventObserver.php
CHANGED
@@ -77,7 +77,7 @@ class Ebizmarts_AbandonedCart_Model_EventObserver
|
|
77 |
if (!Mage::getSingleton('customer/session')->isLoggedIn() && Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::ENABLE_POPUP, $quote->getStoreId())) {
|
78 |
$action = Mage::app()->getRequest()->getActionName();
|
79 |
$onCheckout = ($action == 'saveOrder' || $action == 'savePayment' || $action == 'saveShippingMethod' || $action == 'saveBilling');
|
80 |
-
if(Mage::getModel('core/cookie')->get('email') && Mage::getModel('core/cookie')->get('email')!= 'none' && !$onCheckout) {
|
81 |
// if (isset($_COOKIE['email']) && $_COOKIE['email'] != 'none' && !$onCheckout) {
|
82 |
$emailCookie = Mage::getModel('core/cookie')->get('email');
|
83 |
$emailCookieArr = explode('/', $emailCookie);
|
77 |
if (!Mage::getSingleton('customer/session')->isLoggedIn() && Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::ENABLE_POPUP, $quote->getStoreId())) {
|
78 |
$action = Mage::app()->getRequest()->getActionName();
|
79 |
$onCheckout = ($action == 'saveOrder' || $action == 'savePayment' || $action == 'saveShippingMethod' || $action == 'saveBilling');
|
80 |
+
if (Mage::getModel('core/cookie')->get('email') && Mage::getModel('core/cookie')->get('email')!= 'none' && !$onCheckout) {
|
81 |
// if (isset($_COOKIE['email']) && $_COOKIE['email'] != 'none' && !$onCheckout) {
|
82 |
$emailCookie = Mage::getModel('core/cookie')->get('email');
|
83 |
$emailCookieArr = explode('/', $emailCookie);
|
app/code/community/Ebizmarts/AbandonedCart/Model/Resource/Order/Collection.php
CHANGED
@@ -30,10 +30,12 @@ class Ebizmarts_AbandonedCart_Model_Resource_Order_Collection extends Mage_Repor
|
|
30 |
$fieldToFilter = 'period';
|
31 |
}
|
32 |
|
33 |
-
$this->addFieldToFilter(
|
|
|
34 |
'from' => $from->toString(Varien_Date::DATETIME_INTERNAL_FORMAT),
|
35 |
'to' => $to->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)
|
36 |
-
|
|
|
37 |
|
38 |
return $this;
|
39 |
}
|
@@ -58,14 +60,18 @@ class Ebizmarts_AbandonedCart_Model_Resource_Order_Collection extends Mage_Repor
|
|
58 |
$averageExpr = $adapter->getCheckSql(
|
59 |
'SUM(main_table.orders_count) > 0',
|
60 |
'SUM(main_table.total_revenue_amount)/SUM(main_table.orders_count)',
|
61 |
-
0
|
62 |
-
|
|
|
|
|
63 |
'lifetime' => 'SUM(main_table.total_revenue_amount)',
|
64 |
'average' => $averageExpr
|
65 |
-
|
|
|
66 |
|
67 |
if (!$isFilter) {
|
68 |
-
$this->addFieldToFilter(
|
|
|
69 |
array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
|
70 |
);
|
71 |
}
|
@@ -78,7 +84,8 @@ class Ebizmarts_AbandonedCart_Model_Resource_Order_Collection extends Mage_Repor
|
|
78 |
. ' - IFNULL(main_table.base_subtotal_canceled, 0) - ABS(IFNULL(main_table.base_discount_amount, 0))'
|
79 |
. ' + IFNULL(main_table.base_discount_refunded, 0)';
|
80 |
} else if (version_compare(Mage::getVersion(), '1.6.0.0', '<')) {
|
81 |
-
$expr = sprintf(
|
|
|
82 |
"IFNULL('main_table.base_total_invoiced', 0)",
|
83 |
"IFNULL('main_table.base_tax_invoiced', 0)",
|
84 |
"IFNULL('main_table.base_shipping_invoiced', 0)",
|
@@ -87,7 +94,8 @@ class Ebizmarts_AbandonedCart_Model_Resource_Order_Collection extends Mage_Repor
|
|
87 |
"IFNULL('main_table.base_shipping_refunded', 0)"
|
88 |
);
|
89 |
} else {
|
90 |
-
$expr = sprintf(
|
|
|
91 |
$adapter->getIfNullSql('main_table.base_total_invoiced', 0),
|
92 |
$adapter->getIfNullSql('main_table.base_tax_invoiced', 0),
|
93 |
$adapter->getIfNullSql('main_table.base_shipping_invoiced', 0),
|
@@ -102,12 +110,15 @@ class Ebizmarts_AbandonedCart_Model_Resource_Order_Collection extends Mage_Repor
|
|
102 |
}
|
103 |
|
104 |
$this->getSelect()
|
105 |
-
->columns(
|
|
|
106 |
'lifetime' => "SUM({$expr})",
|
107 |
'average' => "AVG({$expr})"
|
108 |
-
|
|
|
109 |
->where('main_table.status NOT IN(?)', $statuses)
|
110 |
-
->where(
|
|
|
111 |
Mage_Sales_Model_Order::STATE_NEW,
|
112 |
Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)
|
113 |
);
|
30 |
$fieldToFilter = 'period';
|
31 |
}
|
32 |
|
33 |
+
$this->addFieldToFilter(
|
34 |
+
$fieldToFilter, array(
|
35 |
'from' => $from->toString(Varien_Date::DATETIME_INTERNAL_FORMAT),
|
36 |
'to' => $to->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)
|
37 |
+
)
|
38 |
+
);
|
39 |
|
40 |
return $this;
|
41 |
}
|
60 |
$averageExpr = $adapter->getCheckSql(
|
61 |
'SUM(main_table.orders_count) > 0',
|
62 |
'SUM(main_table.total_revenue_amount)/SUM(main_table.orders_count)',
|
63 |
+
0
|
64 |
+
);
|
65 |
+
$this->getSelect()->columns(
|
66 |
+
array(
|
67 |
'lifetime' => 'SUM(main_table.total_revenue_amount)',
|
68 |
'average' => $averageExpr
|
69 |
+
)
|
70 |
+
);
|
71 |
|
72 |
if (!$isFilter) {
|
73 |
+
$this->addFieldToFilter(
|
74 |
+
'main_table.store_id',
|
75 |
array('eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId())
|
76 |
);
|
77 |
}
|
84 |
. ' - IFNULL(main_table.base_subtotal_canceled, 0) - ABS(IFNULL(main_table.base_discount_amount, 0))'
|
85 |
. ' + IFNULL(main_table.base_discount_refunded, 0)';
|
86 |
} else if (version_compare(Mage::getVersion(), '1.6.0.0', '<')) {
|
87 |
+
$expr = sprintf(
|
88 |
+
'%s - %s - %s - (%s - %s - %s)',
|
89 |
"IFNULL('main_table.base_total_invoiced', 0)",
|
90 |
"IFNULL('main_table.base_tax_invoiced', 0)",
|
91 |
"IFNULL('main_table.base_shipping_invoiced', 0)",
|
94 |
"IFNULL('main_table.base_shipping_refunded', 0)"
|
95 |
);
|
96 |
} else {
|
97 |
+
$expr = sprintf(
|
98 |
+
'%s - %s - %s - (%s - %s - %s)',
|
99 |
$adapter->getIfNullSql('main_table.base_total_invoiced', 0),
|
100 |
$adapter->getIfNullSql('main_table.base_tax_invoiced', 0),
|
101 |
$adapter->getIfNullSql('main_table.base_shipping_invoiced', 0),
|
110 |
}
|
111 |
|
112 |
$this->getSelect()
|
113 |
+
->columns(
|
114 |
+
array(
|
115 |
'lifetime' => "SUM({$expr})",
|
116 |
'average' => "AVG({$expr})"
|
117 |
+
)
|
118 |
+
)
|
119 |
->where('main_table.status NOT IN(?)', $statuses)
|
120 |
+
->where(
|
121 |
+
'main_table.state NOT IN(?)', array(
|
122 |
Mage_Sales_Model_Order::STATE_NEW,
|
123 |
Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)
|
124 |
);
|
app/code/community/Ebizmarts/AbandonedCart/controllers/AbandonedController.php
CHANGED
@@ -22,24 +22,23 @@ class Ebizmarts_AbandonedCart_AbandonedController extends Mage_Checkout_CartCont
|
|
22 |
//restore the quote
|
23 |
// Mage::log($params['id']);
|
24 |
$analytics = array();
|
25 |
-
if(isset($params['utm_source'])) {
|
26 |
$analytics['utm_source'] = $params['utm_source'];
|
27 |
}
|
28 |
-
if(isset($params['utm_medium'])) {
|
29 |
$analytics['utm_medium'] = $params['utm_medium'];
|
30 |
}
|
31 |
-
if(isset($params['utm_campaign'])) {
|
32 |
$analytics['utm_campaign'] = $params['utm_campaign'];
|
33 |
}
|
34 |
$quote = Mage::getModel('sales/quote')->load($params['id']);
|
35 |
$url = Mage::getUrl(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::PAGE, $quote->getStoreId()));
|
36 |
$first = true;
|
37 |
-
foreach($analytics as $key => $value) {
|
38 |
-
if($first) {
|
39 |
$char = '?';
|
40 |
$first = false;
|
41 |
-
}
|
42 |
-
else {
|
43 |
$char = '&';
|
44 |
}
|
45 |
$url .= "$char$key=$value";
|
@@ -50,12 +49,11 @@ class Ebizmarts_AbandonedCart_AbandonedController extends Mage_Checkout_CartCont
|
|
50 |
}
|
51 |
$url = Mage::getUrl(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::PAGE, $quote->getStoreId()));
|
52 |
$first = true;
|
53 |
-
foreach($analytics as $key => $value) {
|
54 |
-
if($first) {
|
55 |
$char = '?';
|
56 |
$first = false;
|
57 |
-
}
|
58 |
-
else {
|
59 |
$char = '&';
|
60 |
}
|
61 |
$url .= "$char$key=$value";
|
22 |
//restore the quote
|
23 |
// Mage::log($params['id']);
|
24 |
$analytics = array();
|
25 |
+
if (isset($params['utm_source'])) {
|
26 |
$analytics['utm_source'] = $params['utm_source'];
|
27 |
}
|
28 |
+
if (isset($params['utm_medium'])) {
|
29 |
$analytics['utm_medium'] = $params['utm_medium'];
|
30 |
}
|
31 |
+
if (isset($params['utm_campaign'])) {
|
32 |
$analytics['utm_campaign'] = $params['utm_campaign'];
|
33 |
}
|
34 |
$quote = Mage::getModel('sales/quote')->load($params['id']);
|
35 |
$url = Mage::getUrl(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::PAGE, $quote->getStoreId()));
|
36 |
$first = true;
|
37 |
+
foreach ($analytics as $key => $value) {
|
38 |
+
if ($first) {
|
39 |
$char = '?';
|
40 |
$first = false;
|
41 |
+
} else {
|
|
|
42 |
$char = '&';
|
43 |
}
|
44 |
$url .= "$char$key=$value";
|
49 |
}
|
50 |
$url = Mage::getUrl(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::PAGE, $quote->getStoreId()));
|
51 |
$first = true;
|
52 |
+
foreach ($analytics as $key => $value) {
|
53 |
+
if ($first) {
|
54 |
$char = '?';
|
55 |
$first = false;
|
56 |
+
} else {
|
|
|
57 |
$char = '&';
|
58 |
}
|
59 |
$url .= "$char$key=$value";
|
app/code/community/Ebizmarts/AbandonedCart/controllers/Adminhtml/AbandonedmailsController.php
CHANGED
@@ -66,7 +66,8 @@ class Ebizmarts_AbandonedCart_Adminhtml_AbandonedmailsController extends Mage_Ad
|
|
66 |
/**
|
67 |
*
|
68 |
*/
|
69 |
-
protected function _isAllowed()
|
|
|
70 |
switch ($this->getRequest()->getActionName()) {
|
71 |
case 'index':
|
72 |
case 'grid':
|
66 |
/**
|
67 |
*
|
68 |
*/
|
69 |
+
protected function _isAllowed()
|
70 |
+
{
|
71 |
switch ($this->getRequest()->getActionName()) {
|
72 |
case 'index':
|
73 |
case 'grid':
|
app/code/community/Ebizmarts/AbandonedCart/controllers/Adminhtml/AbandonedorderController.php
CHANGED
@@ -93,7 +93,8 @@ class Ebizmarts_AbandonedCart_Adminhtml_AbandonedorderController extends Mage_Ad
|
|
93 |
return;
|
94 |
}
|
95 |
|
96 |
-
protected function _isAllowed()
|
|
|
97 |
switch ($this->getRequest()->getActionName()) {
|
98 |
case 'dashboard':
|
99 |
case 'ajaxBlock':
|
93 |
return;
|
94 |
}
|
95 |
|
96 |
+
protected function _isAllowed()
|
97 |
+
{
|
98 |
switch ($this->getRequest()->getActionName()) {
|
99 |
case 'dashboard':
|
100 |
case 'ajaxBlock':
|
app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-0.1.12-0.1.13.php
CHANGED
@@ -10,12 +10,14 @@ $installer = $this;
|
|
10 |
|
11 |
$installer->startSetup();
|
12 |
|
13 |
-
$installer->run(
|
|
|
14 |
|
15 |
ALTER TABLE `{$this->getTable('sales_flat_quote')}` CHANGE `ebizmarts_abandonedcart_counter` `ebizmarts_abandonedcart_counter` INT( 5 ) NOT NULL DEFAULT '0';
|
16 |
ALTER TABLE `{$this->getTable('sales_flat_quote')}` CHANGE `ebizmarts_abandonedcart_flag` `ebizmarts_abandonedcart_flag` INT( 5 ) NOT NULL DEFAULT '0';
|
17 |
|
18 |
|
19 |
-
"
|
|
|
20 |
|
21 |
$installer->endSetup();
|
10 |
|
11 |
$installer->startSetup();
|
12 |
|
13 |
+
$installer->run(
|
14 |
+
"
|
15 |
|
16 |
ALTER TABLE `{$this->getTable('sales_flat_quote')}` CHANGE `ebizmarts_abandonedcart_counter` `ebizmarts_abandonedcart_counter` INT( 5 ) NOT NULL DEFAULT '0';
|
17 |
ALTER TABLE `{$this->getTable('sales_flat_quote')}` CHANGE `ebizmarts_abandonedcart_flag` `ebizmarts_abandonedcart_flag` INT( 5 ) NOT NULL DEFAULT '0';
|
18 |
|
19 |
|
20 |
+
"
|
21 |
+
);
|
22 |
|
23 |
$installer->endSetup();
|
app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-0.1.18-0.1.19.php
CHANGED
@@ -10,7 +10,8 @@ $installer = $this;
|
|
10 |
|
11 |
$installer->startSetup();
|
12 |
|
13 |
-
$installer->run(
|
|
|
14 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_mails_sent')}` (
|
15 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
16 |
`store_id` smallint(5),
|
@@ -23,6 +24,7 @@ $installer->run("
|
|
23 |
`sent_at` DATETIME NOT NULL ,
|
24 |
PRIMARY KEY (`id`)
|
25 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
26 |
-
"
|
|
|
27 |
|
28 |
$installer->endSetup();
|
10 |
|
11 |
$installer->startSetup();
|
12 |
|
13 |
+
$installer->run(
|
14 |
+
"
|
15 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_mails_sent')}` (
|
16 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
17 |
`store_id` smallint(5),
|
24 |
`sent_at` DATETIME NOT NULL ,
|
25 |
PRIMARY KEY (`id`)
|
26 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
27 |
+
"
|
28 |
+
);
|
29 |
|
30 |
$installer->endSetup();
|
app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-0.1.29-0.1.30.php
CHANGED
@@ -12,7 +12,8 @@ $installer = $this;
|
|
12 |
|
13 |
$installer->startSetup();
|
14 |
|
15 |
-
$installer->run(
|
|
|
16 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_abandonedcart_popup')}` (
|
17 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
18 |
`email` varchar(128),
|
@@ -22,6 +23,7 @@ $installer->run("
|
|
22 |
PRIMARY KEY (`id`)
|
23 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
24 |
|
25 |
-
"
|
|
|
26 |
|
27 |
$installer->endSetup();
|
12 |
|
13 |
$installer->startSetup();
|
14 |
|
15 |
+
$installer->run(
|
16 |
+
"
|
17 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_abandonedcart_popup')}` (
|
18 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
19 |
`email` varchar(128),
|
23 |
PRIMARY KEY (`id`)
|
24 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
25 |
|
26 |
+
"
|
27 |
+
);
|
28 |
|
29 |
$installer->endSetup();
|
app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-0.1.30-0.1.31.php
CHANGED
@@ -12,7 +12,8 @@ $installer = $this;
|
|
12 |
|
13 |
$installer->startSetup();
|
14 |
|
15 |
-
$installer->run(
|
|
|
16 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_abandonedcart_abtesting')}` (
|
17 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
18 |
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
@@ -21,6 +22,7 @@ $installer->run("
|
|
21 |
PRIMARY KEY (`id`)
|
22 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
23 |
|
24 |
-
"
|
|
|
25 |
|
26 |
$installer->endSetup();
|
12 |
|
13 |
$installer->startSetup();
|
14 |
|
15 |
+
$installer->run(
|
16 |
+
"
|
17 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_abandonedcart_abtesting')}` (
|
18 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
19 |
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
22 |
PRIMARY KEY (`id`)
|
23 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
24 |
|
25 |
+
"
|
26 |
+
);
|
27 |
|
28 |
$installer->endSetup();
|
app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-1.1.35-1.2.0.php
CHANGED
@@ -24,13 +24,15 @@ if ($tableExists) {
|
|
24 |
)
|
25 |
);
|
26 |
}catch (Exception $e){
|
27 |
-
|
28 |
}
|
29 |
}
|
30 |
|
31 |
$installer->getConnection()
|
32 |
-
->addColumn(
|
|
|
33 |
'nullable' => false,
|
34 |
-
|
|
|
35 |
|
36 |
$installer->endSetup();
|
24 |
)
|
25 |
);
|
26 |
}catch (Exception $e){
|
27 |
+
Mage::log($e->getMessage());
|
28 |
}
|
29 |
}
|
30 |
|
31 |
$installer->getConnection()
|
32 |
+
->addColumn(
|
33 |
+
$installer->getTable('ebizmarts_abandonedcart/popup'), 'store_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
34 |
'nullable' => false,
|
35 |
+
), 'Store Id'
|
36 |
+
);
|
37 |
|
38 |
$installer->endSetup();
|
app/code/community/Ebizmarts/Autoresponder/Model/Cron.php
CHANGED
@@ -138,10 +138,10 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
138 |
$collection->addAttributeToFilter('dob', array('neq' => 'null'));
|
139 |
$defaultStore = Mage::app()->getStore($storeId)->getWebsite()->getDefaultStore();
|
140 |
$normalFilter = array('eq' => $storeId);
|
141 |
-
if($storeId == $defaultStore->getId()){
|
142 |
$newFilter = array('eq' => '0');
|
143 |
$collection->addFieldToFilter('store_id', array($normalFilter, $newFilter));
|
144 |
-
}else{
|
145 |
$collection->addFieldToFilter('store_id', $normalFilter);
|
146 |
}
|
147 |
|
@@ -213,10 +213,10 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
213 |
}
|
214 |
$defaultStore = Mage::app()->getStore($storeId)->getWebsite()->getDefaultStore();
|
215 |
$normalFilter = array('eq' => $storeId);
|
216 |
-
if($storeId == $defaultStore->getId()){
|
217 |
$newFilter = array('eq' => '0');
|
218 |
$collection->addFieldToFilter('store_id', array($normalFilter, $newFilter));
|
219 |
-
}else{
|
220 |
$collection->addFieldToFilter('store_id', $normalFilter);
|
221 |
}
|
222 |
|
@@ -370,7 +370,7 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
370 |
|
371 |
$collection = Mage::getResourceModel('sales/order_collection');
|
372 |
$collection->addFieldToFilter('main_table.store_id', array('eq' => $storeId))
|
373 |
-
->addFieldToFilter('main_table.created_at',array('from'=>$from,'to'=>$to))
|
374 |
->addFieldToFilter('main_table.status', array('eq' => $status));
|
375 |
// Mage::log((string)$collection->getSelect());
|
376 |
if (count($customerGroups)) {
|
@@ -453,12 +453,12 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
453 |
$collection->addFieldToFilter('main_table.added_at', array('from' => $from, 'to' => $to))
|
454 |
->addFieldToFilter('main_table.store_id', array('eq' => $storeId))
|
455 |
->setOrder('main_table.wishlist_id');
|
456 |
-
$
|
457 |
$products = array();
|
458 |
foreach ($collection as $item) {
|
459 |
$wishlistId = $item->getWishlistId();
|
460 |
-
if ($wishlistId != $
|
461 |
-
if ($
|
462 |
$translate = Mage::getSingleton('core/translate');
|
463 |
$email = $customer->getEmail();
|
464 |
if (Mage::helper('ebizmarts_autoresponder')->isSubscribed($email, 'wishlist', $storeId)) {
|
@@ -488,7 +488,7 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
488 |
}
|
489 |
|
490 |
}
|
491 |
-
$
|
492 |
$wishlist = Mage::getModel('wishlist/wishlist')->load($wishlistId);
|
493 |
$customer = Mage::getModel('customer/customer')->load($wishlist->getCustomerId());
|
494 |
$products = array();
|
@@ -557,7 +557,7 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
557 |
if (Mage::helper('ebizmarts_autoresponder')->isSubscribed($email, 'visitedproducts', $storeId)) {
|
558 |
$translate = Mage::getSingleton('core/translate');
|
559 |
$name = $customer->getFirstname() . ' ' . $customer->getLastname();
|
560 |
-
$this->_sendVisitedProductEmail($email
|
561 |
}
|
562 |
}
|
563 |
$products = array();
|
@@ -589,7 +589,7 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
589 |
$translate = Mage::getSingleton('core/translate');
|
590 |
$email = $item->getCustomerEmail();
|
591 |
$name = 'customer';
|
592 |
-
$this->_sendVisitedProductEmail($email
|
593 |
}
|
594 |
}
|
595 |
if (count($products)) {
|
@@ -598,13 +598,13 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
598 |
if (Mage::helper('ebizmarts_autoresponder')->isSubscribed($email, 'visitedproducts', $storeId)) {
|
599 |
$translate = Mage::getSingleton('core/translate');
|
600 |
$name = $customer->getFirstname() . ' ' . $customer->getLastname();
|
601 |
-
$this->_sendVisitedProductEmail($email
|
602 |
}
|
603 |
} else {
|
604 |
//add customer by email placed on Abandoned Cart Popup
|
605 |
$email = $item->getCustomerEmail();
|
606 |
$name = 'customer';
|
607 |
-
$this->_sendVisitedProductEmail($email
|
608 |
}
|
609 |
}
|
610 |
|
@@ -618,9 +618,9 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
618 |
$store=Mage::getModel('core/store')->load($storeId);
|
619 |
$storeCode=$store->getCode();
|
620 |
$storeCodeUrl = Mage::getStoreConfig('web/url/use_store', $storeId);
|
621 |
-
if($storeCodeUrl){
|
622 |
$url = Mage::getModel('core/url')->setStore($storeId)->getUrl() . $storeCode . '/ebizautoresponder/autoresponder/unsubscribe?list=visitedproducts&email=' . $email . '&store=' . $storeId;
|
623 |
-
}else {
|
624 |
$url = Mage::getModel('core/url')->setStore($storeId)->getUrl() . 'ebizautoresponder/autoresponder/unsubscribe?list=visitedproducts&email=' . $email . '&store=' . $storeId;
|
625 |
}
|
626 |
$vars = array('name' => $name, 'tags' => array($tags), 'products' => $products, 'url' => $url);
|
@@ -808,25 +808,25 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
808 |
|
809 |
/**
|
810 |
* Back to Stock : Disable Alerts and Subscribers for a specific Product ID
|
811 |
-
* @param int $
|
812 |
* @return bool
|
813 |
*/
|
814 |
-
private function disableStockAlertsForProduct($
|
815 |
{
|
816 |
-
if (!$
|
817 |
return false;
|
818 |
}
|
819 |
|
820 |
$stockAlert = Mage::getModel('ebizmarts_autoresponder/backtostockalert')->getCollection();
|
821 |
$stockAlert->addFieldToFilter('is_active', array('eq' => 1));
|
822 |
-
$stockAlert->addFieldToFilter('product_id', array('eq' => $
|
823 |
|
824 |
if ($stockAlert->getSize() > 0) {
|
825 |
foreach ($stockAlert as $alert) {
|
826 |
-
$
|
827 |
|
828 |
$subscribers = Mage::getModel('ebizmarts_autoresponder/backtostock')->getCollection();
|
829 |
-
$subscribers->addFieldToFilter('alert_id', array('eq' => $
|
830 |
|
831 |
foreach ($subscribers as $subscriber) {
|
832 |
$subscriber->setIsActive(0);
|
@@ -838,7 +838,7 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
838 |
}
|
839 |
}
|
840 |
|
841 |
-
Mage::helper('ebizmarts_autoresponder')->log('Back to Stock Notifications deactivated in database for Product ID ' . $
|
842 |
}
|
843 |
|
844 |
/**
|
@@ -904,14 +904,14 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
904 |
$action = 'by_percent';
|
905 |
$discount = "$couponamount%";
|
906 |
}
|
907 |
-
$
|
908 |
-
$allGroups = $
|
909 |
$groups = array();
|
910 |
foreach ($allGroups as $groupid => $name) {
|
911 |
$groups[] = $groupid;
|
912 |
}
|
913 |
-
$
|
914 |
-
$
|
915 |
->setDescription($string . ' ' . $email)
|
916 |
->setStopRulesProcessing(0)
|
917 |
->setFromDate($fromDate)
|
@@ -935,8 +935,8 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
935 |
->setIsRss(0)
|
936 |
->setWebsiteIds($websiteid);
|
937 |
$uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $couponlength))->generateCode();
|
938 |
-
$
|
939 |
-
$
|
940 |
return array($uniqueId, $discount, $toDate);
|
941 |
} else {
|
942 |
$coupon = $collection->getFirstItem();
|
@@ -949,7 +949,7 @@ class Ebizmarts_Autoresponder_Model_Cron
|
|
949 |
}
|
950 |
}
|
951 |
|
952 |
-
function _getIntervalUnitSql($interval, $unit)
|
953 |
{
|
954 |
return sprintf('INTERVAL %d %s', $interval, $unit);
|
955 |
}
|
138 |
$collection->addAttributeToFilter('dob', array('neq' => 'null'));
|
139 |
$defaultStore = Mage::app()->getStore($storeId)->getWebsite()->getDefaultStore();
|
140 |
$normalFilter = array('eq' => $storeId);
|
141 |
+
if ($storeId == $defaultStore->getId()) {
|
142 |
$newFilter = array('eq' => '0');
|
143 |
$collection->addFieldToFilter('store_id', array($normalFilter, $newFilter));
|
144 |
+
} else {
|
145 |
$collection->addFieldToFilter('store_id', $normalFilter);
|
146 |
}
|
147 |
|
213 |
}
|
214 |
$defaultStore = Mage::app()->getStore($storeId)->getWebsite()->getDefaultStore();
|
215 |
$normalFilter = array('eq' => $storeId);
|
216 |
+
if ($storeId == $defaultStore->getId()) {
|
217 |
$newFilter = array('eq' => '0');
|
218 |
$collection->addFieldToFilter('store_id', array($normalFilter, $newFilter));
|
219 |
+
} else {
|
220 |
$collection->addFieldToFilter('store_id', $normalFilter);
|
221 |
}
|
222 |
|
370 |
|
371 |
$collection = Mage::getResourceModel('sales/order_collection');
|
372 |
$collection->addFieldToFilter('main_table.store_id', array('eq' => $storeId))
|
373 |
+
->addFieldToFilter('main_table.created_at', array('from'=>$from,'to'=>$to))
|
374 |
->addFieldToFilter('main_table.status', array('eq' => $status));
|
375 |
// Mage::log((string)$collection->getSelect());
|
376 |
if (count($customerGroups)) {
|
453 |
$collection->addFieldToFilter('main_table.added_at', array('from' => $from, 'to' => $to))
|
454 |
->addFieldToFilter('main_table.store_id', array('eq' => $storeId))
|
455 |
->setOrder('main_table.wishlist_id');
|
456 |
+
$wishlistAnt = -1;
|
457 |
$products = array();
|
458 |
foreach ($collection as $item) {
|
459 |
$wishlistId = $item->getWishlistId();
|
460 |
+
if ($wishlistId != $wishlistAnt) {
|
461 |
+
if ($wishlistAnt != -1 && count($products) > 0) {
|
462 |
$translate = Mage::getSingleton('core/translate');
|
463 |
$email = $customer->getEmail();
|
464 |
if (Mage::helper('ebizmarts_autoresponder')->isSubscribed($email, 'wishlist', $storeId)) {
|
488 |
}
|
489 |
|
490 |
}
|
491 |
+
$wishlistAnt = $wishlistId;
|
492 |
$wishlist = Mage::getModel('wishlist/wishlist')->load($wishlistId);
|
493 |
$customer = Mage::getModel('customer/customer')->load($wishlist->getCustomerId());
|
494 |
$products = array();
|
557 |
if (Mage::helper('ebizmarts_autoresponder')->isSubscribed($email, 'visitedproducts', $storeId)) {
|
558 |
$translate = Mage::getSingleton('core/translate');
|
559 |
$name = $customer->getFirstname() . ' ' . $customer->getLastname();
|
560 |
+
$this->_sendVisitedProductEmail($email, $storeId, $products, $name, $tags);
|
561 |
}
|
562 |
}
|
563 |
$products = array();
|
589 |
$translate = Mage::getSingleton('core/translate');
|
590 |
$email = $item->getCustomerEmail();
|
591 |
$name = 'customer';
|
592 |
+
$this->_sendVisitedProductEmail($email, $storeId, $products, $name, $tags);
|
593 |
}
|
594 |
}
|
595 |
if (count($products)) {
|
598 |
if (Mage::helper('ebizmarts_autoresponder')->isSubscribed($email, 'visitedproducts', $storeId)) {
|
599 |
$translate = Mage::getSingleton('core/translate');
|
600 |
$name = $customer->getFirstname() . ' ' . $customer->getLastname();
|
601 |
+
$this->_sendVisitedProductEmail($email, $storeId, $products, $name, $tags);
|
602 |
}
|
603 |
} else {
|
604 |
//add customer by email placed on Abandoned Cart Popup
|
605 |
$email = $item->getCustomerEmail();
|
606 |
$name = 'customer';
|
607 |
+
$this->_sendVisitedProductEmail($email, $storeId, $products, $name, $tags);
|
608 |
}
|
609 |
}
|
610 |
|
618 |
$store=Mage::getModel('core/store')->load($storeId);
|
619 |
$storeCode=$store->getCode();
|
620 |
$storeCodeUrl = Mage::getStoreConfig('web/url/use_store', $storeId);
|
621 |
+
if ($storeCodeUrl) {
|
622 |
$url = Mage::getModel('core/url')->setStore($storeId)->getUrl() . $storeCode . '/ebizautoresponder/autoresponder/unsubscribe?list=visitedproducts&email=' . $email . '&store=' . $storeId;
|
623 |
+
} else {
|
624 |
$url = Mage::getModel('core/url')->setStore($storeId)->getUrl() . 'ebizautoresponder/autoresponder/unsubscribe?list=visitedproducts&email=' . $email . '&store=' . $storeId;
|
625 |
}
|
626 |
$vars = array('name' => $name, 'tags' => array($tags), 'products' => $products, 'url' => $url);
|
808 |
|
809 |
/**
|
810 |
* Back to Stock : Disable Alerts and Subscribers for a specific Product ID
|
811 |
+
* @param int $productId
|
812 |
* @return bool
|
813 |
*/
|
814 |
+
private function disableStockAlertsForProduct($productId)
|
815 |
{
|
816 |
+
if (!$productId) {
|
817 |
return false;
|
818 |
}
|
819 |
|
820 |
$stockAlert = Mage::getModel('ebizmarts_autoresponder/backtostockalert')->getCollection();
|
821 |
$stockAlert->addFieldToFilter('is_active', array('eq' => 1));
|
822 |
+
$stockAlert->addFieldToFilter('product_id', array('eq' => $productId));
|
823 |
|
824 |
if ($stockAlert->getSize() > 0) {
|
825 |
foreach ($stockAlert as $alert) {
|
826 |
+
$alertId = $alert->getAlertId();
|
827 |
|
828 |
$subscribers = Mage::getModel('ebizmarts_autoresponder/backtostock')->getCollection();
|
829 |
+
$subscribers->addFieldToFilter('alert_id', array('eq' => $alertId));
|
830 |
|
831 |
foreach ($subscribers as $subscriber) {
|
832 |
$subscriber->setIsActive(0);
|
838 |
}
|
839 |
}
|
840 |
|
841 |
+
Mage::helper('ebizmarts_autoresponder')->log('Back to Stock Notifications deactivated in database for Product ID ' . $productId);
|
842 |
}
|
843 |
|
844 |
/**
|
904 |
$action = 'by_percent';
|
905 |
$discount = "$couponamount%";
|
906 |
}
|
907 |
+
$customerGroup = new Mage_Customer_Model_Group();
|
908 |
+
$allGroups = $customerGroup->getCollection()->toOptionHash();
|
909 |
$groups = array();
|
910 |
foreach ($allGroups as $groupid => $name) {
|
911 |
$groups[] = $groupid;
|
912 |
}
|
913 |
+
$couponRule = Mage::getModel('salesrule/rule');
|
914 |
+
$couponRule->setName($string . ' ' . $email)
|
915 |
->setDescription($string . ' ' . $email)
|
916 |
->setStopRulesProcessing(0)
|
917 |
->setFromDate($fromDate)
|
935 |
->setIsRss(0)
|
936 |
->setWebsiteIds($websiteid);
|
937 |
$uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $couponlength))->generateCode();
|
938 |
+
$couponRule->setCouponCode($uniqueId);
|
939 |
+
$couponRule->save();
|
940 |
return array($uniqueId, $discount, $toDate);
|
941 |
} else {
|
942 |
$coupon = $collection->getFirstItem();
|
949 |
}
|
950 |
}
|
951 |
|
952 |
+
protected function _getIntervalUnitSql($interval, $unit)
|
953 |
{
|
954 |
return sprintf('INTERVAL %d %s', $interval, $unit);
|
955 |
}
|
app/code/community/Ebizmarts/Autoresponder/Model/EventObserver.php
CHANGED
@@ -80,12 +80,10 @@ class Ebizmarts_Autoresponder_Model_EventObserver
|
|
80 |
if ($this->_generateReviewCoupon($reviewData)) {
|
81 |
//generate coupon
|
82 |
$customer = Mage::getModel('customer/customer')->load($reviewData->getCustomerId());
|
83 |
-
if($customer->getId()) {
|
84 |
$email = $customer->getEmail();
|
85 |
$name = $customer->getFirstname() . ' ' . $customer->getLastname();
|
86 |
$customerGroup = $customer->getGroupId();
|
87 |
-
}else{
|
88 |
-
|
89 |
}
|
90 |
if (in_array($customerGroup, $customerGroupsCoupon)) {
|
91 |
if (Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::REVIEW_COUPON_AUTOMATIC, $storeId) == Ebizmarts_Autoresponder_Model_Config::COUPON_AUTOMATIC) {
|
@@ -193,14 +191,14 @@ class Ebizmarts_Autoresponder_Model_EventObserver
|
|
193 |
$action = 'by_percent';
|
194 |
$discount = "$couponamount%";
|
195 |
}
|
196 |
-
$
|
197 |
-
$allGroups = $
|
198 |
$groups = array();
|
199 |
foreach ($allGroups as $groupid => $name) {
|
200 |
$groups[] = $groupid;
|
201 |
}
|
202 |
-
$
|
203 |
-
$
|
204 |
->setDescription("Review coupon $email")
|
205 |
->setFromDate($fromDate)
|
206 |
->setToDate($toDate)
|
@@ -223,25 +221,25 @@ class Ebizmarts_Autoresponder_Model_EventObserver
|
|
223 |
->setIsRss(0)
|
224 |
->setWebsiteIds($websiteid);
|
225 |
$uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $couponlength))->generateCode();
|
226 |
-
$
|
227 |
-
$
|
228 |
return array($uniqueId, $discount, $toDate);
|
229 |
}
|
230 |
|
231 |
public function orderSaved(Varien_Event_Observer $observer)
|
232 |
{
|
233 |
$storeId = $observer->getEvent()->getOrder()->getStoreId();
|
234 |
-
if(Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_ACTIVE, $storeId)) {
|
235 |
|
236 |
|
237 |
-
$
|
238 |
-
$
|
239 |
|
240 |
$order = $observer->getEvent()->getOrder();
|
241 |
-
$configStatuses = explode(',',Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_ORDER_STATUS, $storeId));
|
242 |
|
243 |
-
foreach($configStatuses as $status) {
|
244 |
-
if (isset($
|
245 |
if (Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_ACTIVE, $storeId) && Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_TRIGGER, $storeId) == 1) {
|
246 |
$tags = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_MANDRILL_TAG, $storeId) . "_$storeId";
|
247 |
$mailSubject = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_SUBJECT, $storeId);
|
80 |
if ($this->_generateReviewCoupon($reviewData)) {
|
81 |
//generate coupon
|
82 |
$customer = Mage::getModel('customer/customer')->load($reviewData->getCustomerId());
|
83 |
+
if ($customer->getId()) {
|
84 |
$email = $customer->getEmail();
|
85 |
$name = $customer->getFirstname() . ' ' . $customer->getLastname();
|
86 |
$customerGroup = $customer->getGroupId();
|
|
|
|
|
87 |
}
|
88 |
if (in_array($customerGroup, $customerGroupsCoupon)) {
|
89 |
if (Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::REVIEW_COUPON_AUTOMATIC, $storeId) == Ebizmarts_Autoresponder_Model_Config::COUPON_AUTOMATIC) {
|
191 |
$action = 'by_percent';
|
192 |
$discount = "$couponamount%";
|
193 |
}
|
194 |
+
$customerGroup = new Mage_Customer_Model_Group();
|
195 |
+
$allGroups = $customerGroup->getCollection()->toOptionHash();
|
196 |
$groups = array();
|
197 |
foreach ($allGroups as $groupid => $name) {
|
198 |
$groups[] = $groupid;
|
199 |
}
|
200 |
+
$couponRule = Mage::getModel('salesrule/rule');
|
201 |
+
$couponRule->setName("Review coupon $email")
|
202 |
->setDescription("Review coupon $email")
|
203 |
->setFromDate($fromDate)
|
204 |
->setToDate($toDate)
|
221 |
->setIsRss(0)
|
222 |
->setWebsiteIds($websiteid);
|
223 |
$uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $couponlength))->generateCode();
|
224 |
+
$couponRule->setCouponCode($uniqueId);
|
225 |
+
$couponRule->save();
|
226 |
return array($uniqueId, $discount, $toDate);
|
227 |
}
|
228 |
|
229 |
public function orderSaved(Varien_Event_Observer $observer)
|
230 |
{
|
231 |
$storeId = $observer->getEvent()->getOrder()->getStoreId();
|
232 |
+
if (Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_ACTIVE, $storeId)) {
|
233 |
|
234 |
|
235 |
+
$originalData = $observer->getEvent()->getData('data_object')->getOrigData();
|
236 |
+
$newData = $observer->getEvent()->getData('data_object')->getData();
|
237 |
|
238 |
$order = $observer->getEvent()->getOrder();
|
239 |
+
$configStatuses = explode(',', Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_ORDER_STATUS, $storeId));
|
240 |
|
241 |
+
foreach ($configStatuses as $status) {
|
242 |
+
if (isset($newData['status']) && isset($originalData['status']) && $originalData['status'] !== $newData['status'] && $newData['status'] == $status) {
|
243 |
if (Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_ACTIVE, $storeId) && Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_TRIGGER, $storeId) == 1) {
|
244 |
$tags = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_MANDRILL_TAG, $storeId) . "_$storeId";
|
245 |
$mailSubject = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::NEWORDER_SUBJECT, $storeId);
|
app/code/community/Ebizmarts/Autoresponder/Model/Resource/Review.php
CHANGED
@@ -19,9 +19,9 @@ class Ebizmarts_Autoresponder_Model_Resource_Review extends Mage_Core_Model_Mysq
|
|
19 |
$select = $this->_getReadAdapter()->select()
|
20 |
->from($this->getMainTable())
|
21 |
->where($this->getMainTable() . '.' . 'token =?', $token);
|
22 |
-
$
|
23 |
-
if ($
|
24 |
-
$this->load($obj, $
|
25 |
}
|
26 |
return $this;
|
27 |
}
|
19 |
$select = $this->_getReadAdapter()->select()
|
20 |
->from($this->getMainTable())
|
21 |
->where($this->getMainTable() . '.' . 'token =?', $token);
|
22 |
+
$tokenId = $this->_getReadAdapter()->fetchOne($select);
|
23 |
+
if ($tokenId) {
|
24 |
+
$this->load($obj, $tokenId);
|
25 |
}
|
26 |
return $this;
|
27 |
}
|
app/code/community/Ebizmarts/Autoresponder/Model/Resource/Visited.php
CHANGED
@@ -21,9 +21,9 @@ class Ebizmarts_Autoresponder_Model_Resource_Visited extends Mage_Core_Model_Mys
|
|
21 |
->where($this->getMainTable() . '.' . 'customer_id =?', $customerId)
|
22 |
->where($this->getMainTable() . '.' . 'product_id =?', $productId)
|
23 |
->where($this->getMainTable() . '.' . 'store_id =?', $storeId);
|
24 |
-
$
|
25 |
-
if ($
|
26 |
-
$this->load($obj, $
|
27 |
}
|
28 |
return $this;
|
29 |
}
|
21 |
->where($this->getMainTable() . '.' . 'customer_id =?', $customerId)
|
22 |
->where($this->getMainTable() . '.' . 'product_id =?', $productId)
|
23 |
->where($this->getMainTable() . '.' . 'store_id =?', $storeId);
|
24 |
+
$visitedId = $this->_getReadAdapter()->fetchOne($select);
|
25 |
+
if ($visitedId) {
|
26 |
+
$this->load($obj, $visitedId);
|
27 |
}
|
28 |
return $this;
|
29 |
}
|
app/code/community/Ebizmarts/Autoresponder/controllers/AutoresponderController.php
CHANGED
@@ -111,7 +111,7 @@ class Ebizmarts_Autoresponder_AutoresponderController extends Mage_Core_Controll
|
|
111 |
return;
|
112 |
}
|
113 |
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
114 |
-
if(Mage::getModel('core/cookie')->get('email')&&Mage::getModel('core/cookie')->get('email')!='none') {
|
115 |
// if (isset($_COOKIE['email']) && $_COOKIE['email'] != 'none') {
|
116 |
$cookie = Mage::getModel('core/cookie')->get('email');
|
117 |
$cookieValues = explode('/', $cookie);
|
111 |
return;
|
112 |
}
|
113 |
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
114 |
+
if (Mage::getModel('core/cookie')->get('email')&&Mage::getModel('core/cookie')->get('email')!='none') {
|
115 |
// if (isset($_COOKIE['email']) && $_COOKIE['email'] != 'none') {
|
116 |
$cookie = Mage::getModel('core/cookie')->get('email');
|
117 |
$cookieValues = explode('/', $cookie);
|
app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-install-0.1.0.php
CHANGED
@@ -11,7 +11,8 @@ $installer = $this;
|
|
11 |
|
12 |
$installer->startSetup();
|
13 |
|
14 |
-
$installer->run(
|
|
|
15 |
|
16 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_unsubscribe')}` (
|
17 |
`id` int(10) unsigned NOT NULL auto_increment,
|
@@ -22,6 +23,7 @@ $installer->run("
|
|
22 |
PRIMARY KEY (`id`)
|
23 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
24 |
|
25 |
-
"
|
|
|
26 |
|
27 |
$installer->endSetup();
|
11 |
|
12 |
$installer->startSetup();
|
13 |
|
14 |
+
$installer->run(
|
15 |
+
"
|
16 |
|
17 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_unsubscribe')}` (
|
18 |
`id` int(10) unsigned NOT NULL auto_increment,
|
23 |
PRIMARY KEY (`id`)
|
24 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
25 |
|
26 |
+
"
|
27 |
+
);
|
28 |
|
29 |
$installer->endSetup();
|
app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-0.1.3-0.1.4.php
CHANGED
@@ -9,7 +9,8 @@ $installer = $this;
|
|
9 |
|
10 |
$installer->startSetup();
|
11 |
|
12 |
-
$installer->run(
|
|
|
13 |
|
14 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_visited')}` (
|
15 |
`id` int(10) unsigned NOT NULL auto_increment,
|
@@ -20,7 +21,8 @@ $installer->run("
|
|
20 |
PRIMARY KEY (`id`)
|
21 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
22 |
|
23 |
-
"
|
|
|
24 |
|
25 |
$applyTo = array(
|
26 |
Mage_Catalog_Model_Product_Type::TYPE_SIMPLE,
|
9 |
|
10 |
$installer->startSetup();
|
11 |
|
12 |
+
$installer->run(
|
13 |
+
"
|
14 |
|
15 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_visited')}` (
|
16 |
`id` int(10) unsigned NOT NULL auto_increment,
|
21 |
PRIMARY KEY (`id`)
|
22 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
23 |
|
24 |
+
"
|
25 |
+
);
|
26 |
|
27 |
$applyTo = array(
|
28 |
Mage_Catalog_Model_Product_Type::TYPE_SIMPLE,
|
app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-0.1.4-0.1.5.php
CHANGED
@@ -9,7 +9,8 @@ $installer = $this;
|
|
9 |
|
10 |
$installer->startSetup();
|
11 |
|
12 |
-
$installer->run(
|
|
|
13 |
|
14 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_review')}` (
|
15 |
`id` int(10) unsigned NOT NULL auto_increment,
|
@@ -21,15 +22,18 @@ $installer->run("
|
|
21 |
`order_id` int(10) unsigned not null,
|
22 |
PRIMARY KEY (`id`)
|
23 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
24 |
-
"
|
|
|
25 |
try {
|
26 |
-
$installer->run(
|
|
|
27 |
ALTER TABLE `{$this->getTable('magemonkey_mails_sent')}`
|
28 |
CHANGE `mail_type` `mail_type` ENUM( 'abandoned cart', 'happy birthday', 'new order', 'related products', 'product review', 'no activity', 'wishlist', 'review coupon' )
|
29 |
CHARACTER SET utf8 NOT NULL;
|
30 |
-
"
|
|
|
31 |
}catch (Exception $e){
|
32 |
-
|
33 |
}
|
34 |
|
35 |
$installer->addAttribute(
|
9 |
|
10 |
$installer->startSetup();
|
11 |
|
12 |
+
$installer->run(
|
13 |
+
"
|
14 |
|
15 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_review')}` (
|
16 |
`id` int(10) unsigned NOT NULL auto_increment,
|
22 |
`order_id` int(10) unsigned not null,
|
23 |
PRIMARY KEY (`id`)
|
24 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
25 |
+
"
|
26 |
+
);
|
27 |
try {
|
28 |
+
$installer->run(
|
29 |
+
"
|
30 |
ALTER TABLE `{$this->getTable('magemonkey_mails_sent')}`
|
31 |
CHANGE `mail_type` `mail_type` ENUM( 'abandoned cart', 'happy birthday', 'new order', 'related products', 'product review', 'no activity', 'wishlist', 'review coupon' )
|
32 |
CHARACTER SET utf8 NOT NULL;
|
33 |
+
"
|
34 |
+
);
|
35 |
}catch (Exception $e){
|
36 |
+
Mage::log($e->getMessage());
|
37 |
}
|
38 |
|
39 |
$installer->addAttribute(
|
app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-0.1.5-0.1.6.php
CHANGED
@@ -12,7 +12,8 @@ $installer = $this;
|
|
12 |
|
13 |
$installer->startSetup();
|
14 |
|
15 |
-
$installer->run(
|
|
|
16 |
|
17 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_backtostock')}` (
|
18 |
`backtostock_id` int(10) unsigned NOT NULL auto_increment,
|
@@ -21,9 +22,11 @@ $installer->run("
|
|
21 |
`is_active` smallint(5) unsigned NOT NULL DEFAULT '1',
|
22 |
PRIMARY KEY (`backtostock_id`)
|
23 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
24 |
-
"
|
|
|
25 |
|
26 |
-
$installer->run(
|
|
|
27 |
|
28 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_backtostock_alert')}` (
|
29 |
`alert_id` int(10) unsigned NOT NULL auto_increment,
|
@@ -31,12 +34,15 @@ $installer->run("
|
|
31 |
`is_active` smallint(5) unsigned NOT NULL DEFAULT '1',
|
32 |
PRIMARY KEY (`alert_id`)
|
33 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
34 |
-
"
|
|
|
35 |
|
36 |
-
$installer->run(
|
|
|
37 |
ALTER TABLE `{$this->getTable('magemonkey_mails_sent')}`
|
38 |
CHANGE `mail_type` `mail_type` ENUM( 'abandoned cart', 'happy birthday', 'new order', 'related products', 'product review', 'no activity', 'wishlist', 'review coupon', 'back to stock' )
|
39 |
CHARACTER SET utf8 NOT NULL;
|
40 |
-
"
|
|
|
41 |
|
42 |
$installer->endSetup();
|
12 |
|
13 |
$installer->startSetup();
|
14 |
|
15 |
+
$installer->run(
|
16 |
+
"
|
17 |
|
18 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_backtostock')}` (
|
19 |
`backtostock_id` int(10) unsigned NOT NULL auto_increment,
|
22 |
`is_active` smallint(5) unsigned NOT NULL DEFAULT '1',
|
23 |
PRIMARY KEY (`backtostock_id`)
|
24 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
25 |
+
"
|
26 |
+
);
|
27 |
|
28 |
+
$installer->run(
|
29 |
+
"
|
30 |
|
31 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('ebizmarts_autoresponder_backtostock_alert')}` (
|
32 |
`alert_id` int(10) unsigned NOT NULL auto_increment,
|
34 |
`is_active` smallint(5) unsigned NOT NULL DEFAULT '1',
|
35 |
PRIMARY KEY (`alert_id`)
|
36 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
37 |
+
"
|
38 |
+
);
|
39 |
|
40 |
+
$installer->run(
|
41 |
+
"
|
42 |
ALTER TABLE `{$this->getTable('magemonkey_mails_sent')}`
|
43 |
CHANGE `mail_type` `mail_type` ENUM( 'abandoned cart', 'happy birthday', 'new order', 'related products', 'product review', 'no activity', 'wishlist', 'review coupon', 'back to stock' )
|
44 |
CHARACTER SET utf8 NOT NULL;
|
45 |
+
"
|
46 |
+
);
|
47 |
|
48 |
$installer->endSetup();
|
app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-1.1.14-1.2.0.php
CHANGED
@@ -26,7 +26,7 @@ if ($tableExists) {
|
|
26 |
)
|
27 |
);
|
28 |
}catch (Exception $e){
|
29 |
-
|
30 |
}
|
31 |
}
|
32 |
|
26 |
)
|
27 |
);
|
28 |
}catch (Exception $e){
|
29 |
+
Mage::log($e->getMessage());
|
30 |
}
|
31 |
}
|
32 |
|
app/code/community/Ebizmarts/Autoresponder/sql/ebizmarts_autoresponder_setup/mysql4-upgrade-1.2.0-1.2.1.php
CHANGED
@@ -12,8 +12,10 @@ $installer = $this;
|
|
12 |
|
13 |
$installer->startSetup();
|
14 |
$installer->getConnection()
|
15 |
-
->addColumn(
|
|
|
16 |
'nullable' => false,
|
17 |
-
|
|
|
18 |
|
19 |
$installer->endSetup();
|
12 |
|
13 |
$installer->startSetup();
|
14 |
$installer->getConnection()
|
15 |
+
->addColumn(
|
16 |
+
$installer->getTable('ebizmarts_autoresponder/backtostock'), 'store_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
17 |
'nullable' => false,
|
18 |
+
), 'Store Id'
|
19 |
+
);
|
20 |
|
21 |
$installer->endSetup();
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/Export/Form.php
CHANGED
@@ -18,49 +18,61 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_Export_Form extends Mage_Adm
|
|
18 |
*/
|
19 |
protected function _prepareForm()
|
20 |
{
|
21 |
-
$form = new Varien_Data_Form(
|
|
|
22 |
'id' => 'edit_form',
|
23 |
'action' => $this->getUrl('*/*/save'),
|
24 |
'method' => 'post'
|
25 |
-
|
|
|
26 |
|
27 |
-
$fieldset = $form->addFieldset(
|
|
|
28 |
'legend' => Mage::helper('monkey')->__('Export Configuration')
|
29 |
-
|
|
|
30 |
|
31 |
$dataSource = Mage::getSingleton('monkey/system_config_source_bulksyncDatasource')->toOptionArray();
|
32 |
-
$fieldset->addField(
|
|
|
33 |
'label' => Mage::helper('monkey')->__('Data Source'),
|
34 |
'title' => Mage::helper('monkey')->__('Data Source'),
|
35 |
'name' => 'data_source_entity',
|
36 |
'values' => $dataSource,
|
37 |
'class' => 'required-entry',
|
38 |
'required' => true,
|
39 |
-
|
|
|
40 |
|
41 |
$lists = Mage::getSingleton('monkey/system_config_source_list')->toOptionArray();
|
42 |
-
$fieldset->addField(
|
|
|
43 |
'label' => Mage::helper('monkey')->__('Choose Lists'),
|
44 |
'title' => Mage::helper('monkey')->__('Choose Lists'),
|
45 |
'name' => 'list',
|
46 |
'values' => $lists,
|
47 |
'class' => 'required-entry',
|
48 |
'required' => true,
|
49 |
-
|
|
|
50 |
|
51 |
-
$storeSwitcher = $fieldset->addField(
|
|
|
52 |
'name' => 'store_id',
|
53 |
'label' => Mage::helper('monkey')->__('Store'),
|
54 |
'title' => Mage::helper('monkey')->__('Store'),
|
55 |
'onchange' => 'javascript:getLists();',
|
56 |
'required' => true,
|
57 |
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
|
58 |
-
|
|
|
59 |
|
60 |
-
$fieldset->addField(
|
|
|
61 |
'name' => 'direction',
|
62 |
'value' => 'export',
|
63 |
-
|
|
|
64 |
|
65 |
$form->setUseContainer(true);
|
66 |
$this->setForm($form);
|
18 |
*/
|
19 |
protected function _prepareForm()
|
20 |
{
|
21 |
+
$form = new Varien_Data_Form(
|
22 |
+
array(
|
23 |
'id' => 'edit_form',
|
24 |
'action' => $this->getUrl('*/*/save'),
|
25 |
'method' => 'post'
|
26 |
+
)
|
27 |
+
);
|
28 |
|
29 |
+
$fieldset = $form->addFieldset(
|
30 |
+
'export_settings', array(
|
31 |
'legend' => Mage::helper('monkey')->__('Export Configuration')
|
32 |
+
)
|
33 |
+
);
|
34 |
|
35 |
$dataSource = Mage::getSingleton('monkey/system_config_source_bulksyncDatasource')->toOptionArray();
|
36 |
+
$fieldset->addField(
|
37 |
+
'data_source_entity', 'select', array(
|
38 |
'label' => Mage::helper('monkey')->__('Data Source'),
|
39 |
'title' => Mage::helper('monkey')->__('Data Source'),
|
40 |
'name' => 'data_source_entity',
|
41 |
'values' => $dataSource,
|
42 |
'class' => 'required-entry',
|
43 |
'required' => true,
|
44 |
+
)
|
45 |
+
);
|
46 |
|
47 |
$lists = Mage::getSingleton('monkey/system_config_source_list')->toOptionArray();
|
48 |
+
$fieldset->addField(
|
49 |
+
'list', 'multiselect', array(
|
50 |
'label' => Mage::helper('monkey')->__('Choose Lists'),
|
51 |
'title' => Mage::helper('monkey')->__('Choose Lists'),
|
52 |
'name' => 'list',
|
53 |
'values' => $lists,
|
54 |
'class' => 'required-entry',
|
55 |
'required' => true,
|
56 |
+
)
|
57 |
+
);
|
58 |
|
59 |
+
$storeSwitcher = $fieldset->addField(
|
60 |
+
'store_id', 'select', array(
|
61 |
'name' => 'store_id',
|
62 |
'label' => Mage::helper('monkey')->__('Store'),
|
63 |
'title' => Mage::helper('monkey')->__('Store'),
|
64 |
'onchange' => 'javascript:getLists();',
|
65 |
'required' => true,
|
66 |
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
|
67 |
+
)
|
68 |
+
);
|
69 |
|
70 |
+
$fieldset->addField(
|
71 |
+
'direction', 'hidden', array(
|
72 |
'name' => 'direction',
|
73 |
'value' => 'export',
|
74 |
+
)
|
75 |
+
);
|
76 |
|
77 |
$form->setUseContainer(true);
|
78 |
$this->setForm($form);
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/Import/Form.php
CHANGED
@@ -18,64 +18,80 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_Import_Form extends Mage_Adm
|
|
18 |
*/
|
19 |
protected function _prepareForm()
|
20 |
{
|
21 |
-
$form = new Varien_Data_Form(
|
|
|
22 |
'id' => 'edit_form',
|
23 |
'action' => $this->getUrl('*/*/save'),
|
24 |
'method' => 'post'
|
25 |
-
|
|
|
26 |
|
27 |
-
$fieldset = $form->addFieldset(
|
|
|
28 |
'legend' => Mage::helper('monkey')->__('Import Configuration')
|
29 |
-
|
|
|
30 |
|
31 |
$lists = Mage::getSingleton('monkey/system_config_source_list')->toOptionArray();
|
32 |
-
$fieldset->addField(
|
|
|
33 |
'label' => Mage::helper('monkey')->__('Choose Lists'),
|
34 |
'title' => Mage::helper('monkey')->__('Choose Lists'),
|
35 |
'name' => 'list',
|
36 |
'values' => $lists,
|
37 |
'class' => 'required-entry',
|
38 |
'required' => true,
|
39 |
-
|
|
|
40 |
|
41 |
$statuses = Mage::getSingleton('monkey/system_config_source_status')->toOptionArray();
|
42 |
-
$fieldset->addField(
|
|
|
43 |
'label' => Mage::helper('monkey')->__('Statuses to import'),
|
44 |
'title' => Mage::helper('monkey')->__('Statuses to import'),
|
45 |
'name' => 'import_types',
|
46 |
'values' => $statuses,
|
47 |
'class' => 'required-entry',
|
48 |
'required' => true,
|
49 |
-
|
|
|
50 |
|
51 |
-
$fieldset->addField(
|
|
|
52 |
'label' => Mage::helper('monkey')->__('Create customer accounts'),
|
53 |
'title' => Mage::helper('monkey')->__('Create customer accounts'),
|
54 |
'name' => 'create_customers',
|
55 |
'value' => '1'
|
56 |
-
|
|
|
57 |
|
58 |
-
$fieldset->addField(
|
|
|
59 |
'label' => Mage::helper('monkey')->__('Retrieve data since'),
|
60 |
'title' => Mage::helper('monkey')->__('Retrieve data since'),
|
61 |
'name' => 'since',
|
62 |
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
63 |
'format' => Varien_Date::DATE_INTERNAL_FORMAT
|
64 |
-
|
|
|
65 |
|
66 |
-
$fieldset->addField(
|
|
|
67 |
'name' => 'direction',
|
68 |
'value' => 'import',
|
69 |
-
|
|
|
70 |
|
71 |
-
$fieldset->addField(
|
|
|
72 |
'name' => 'store_id',
|
73 |
'label' => Mage::helper('monkey')->__('Store'),
|
74 |
'title' => Mage::helper('monkey')->__('Store'),
|
75 |
'onchange' => 'javascript:getLists();',
|
76 |
'required' => true,
|
77 |
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
|
78 |
-
|
|
|
79 |
|
80 |
//Set default FORM values
|
81 |
$formValues = array(
|
18 |
*/
|
19 |
protected function _prepareForm()
|
20 |
{
|
21 |
+
$form = new Varien_Data_Form(
|
22 |
+
array(
|
23 |
'id' => 'edit_form',
|
24 |
'action' => $this->getUrl('*/*/save'),
|
25 |
'method' => 'post'
|
26 |
+
)
|
27 |
+
);
|
28 |
|
29 |
+
$fieldset = $form->addFieldset(
|
30 |
+
'import_settings', array(
|
31 |
'legend' => Mage::helper('monkey')->__('Import Configuration')
|
32 |
+
)
|
33 |
+
);
|
34 |
|
35 |
$lists = Mage::getSingleton('monkey/system_config_source_list')->toOptionArray();
|
36 |
+
$fieldset->addField(
|
37 |
+
'list', 'multiselect', array(
|
38 |
'label' => Mage::helper('monkey')->__('Choose Lists'),
|
39 |
'title' => Mage::helper('monkey')->__('Choose Lists'),
|
40 |
'name' => 'list',
|
41 |
'values' => $lists,
|
42 |
'class' => 'required-entry',
|
43 |
'required' => true,
|
44 |
+
)
|
45 |
+
);
|
46 |
|
47 |
$statuses = Mage::getSingleton('monkey/system_config_source_status')->toOptionArray();
|
48 |
+
$fieldset->addField(
|
49 |
+
'import_types', 'multiselect', array(
|
50 |
'label' => Mage::helper('monkey')->__('Statuses to import'),
|
51 |
'title' => Mage::helper('monkey')->__('Statuses to import'),
|
52 |
'name' => 'import_types',
|
53 |
'values' => $statuses,
|
54 |
'class' => 'required-entry',
|
55 |
'required' => true,
|
56 |
+
)
|
57 |
+
);
|
58 |
|
59 |
+
$fieldset->addField(
|
60 |
+
'create_customers', 'checkbox', array(
|
61 |
'label' => Mage::helper('monkey')->__('Create customer accounts'),
|
62 |
'title' => Mage::helper('monkey')->__('Create customer accounts'),
|
63 |
'name' => 'create_customers',
|
64 |
'value' => '1'
|
65 |
+
)
|
66 |
+
);
|
67 |
|
68 |
+
$fieldset->addField(
|
69 |
+
'since', 'date', array(
|
70 |
'label' => Mage::helper('monkey')->__('Retrieve data since'),
|
71 |
'title' => Mage::helper('monkey')->__('Retrieve data since'),
|
72 |
'name' => 'since',
|
73 |
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
74 |
'format' => Varien_Date::DATE_INTERNAL_FORMAT
|
75 |
+
)
|
76 |
+
);
|
77 |
|
78 |
+
$fieldset->addField(
|
79 |
+
'direction', 'hidden', array(
|
80 |
'name' => 'direction',
|
81 |
'value' => 'import',
|
82 |
+
)
|
83 |
+
);
|
84 |
|
85 |
+
$fieldset->addField(
|
86 |
+
'store_id', 'select', array(
|
87 |
'name' => 'store_id',
|
88 |
'label' => Mage::helper('monkey')->__('Store'),
|
89 |
'title' => Mage::helper('monkey')->__('Store'),
|
90 |
'onchange' => 'javascript:getLists();',
|
91 |
'required' => true,
|
92 |
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
|
93 |
+
)
|
94 |
+
);
|
95 |
|
96 |
//Set default FORM values
|
97 |
$formValues = array(
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/Queue/Grid.php
CHANGED
@@ -32,32 +32,40 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_Queue_Grid extends Mage_Admi
|
|
32 |
protected function _prepareColumns()
|
33 |
{
|
34 |
|
35 |
-
$this->addColumn(
|
|
|
36 |
'header' => Mage::helper('monkey')->__('ID'),
|
37 |
'width' => '80px',
|
38 |
'index' => 'id',
|
39 |
'type' => 'number'
|
40 |
-
|
|
|
41 |
|
42 |
-
$this->addColumn(
|
|
|
43 |
'header' => Mage::helper('monkey')->__('Status'),
|
44 |
'width' => '80px',
|
45 |
'index' => 'status',
|
46 |
-
|
|
|
47 |
|
48 |
-
$this->addColumn(
|
|
|
49 |
'header' => Mage::helper('monkey')->__('Date Sent'),
|
50 |
'width' => '80px',
|
51 |
'index' => 'updated_at',
|
52 |
'type' => 'datetime'
|
53 |
-
|
|
|
54 |
|
55 |
-
$this->addColumn(
|
|
|
56 |
'header' => Mage::helper('monkey')->__('Date Sent'),
|
57 |
'width' => '80px',
|
58 |
'index' => 'created_at',
|
59 |
'type' => 'datetime'
|
60 |
-
|
|
|
61 |
|
62 |
return parent::_prepareColumns();
|
63 |
}
|
32 |
protected function _prepareColumns()
|
33 |
{
|
34 |
|
35 |
+
$this->addColumn(
|
36 |
+
'id', array(
|
37 |
'header' => Mage::helper('monkey')->__('ID'),
|
38 |
'width' => '80px',
|
39 |
'index' => 'id',
|
40 |
'type' => 'number'
|
41 |
+
)
|
42 |
+
);
|
43 |
|
44 |
+
$this->addColumn(
|
45 |
+
'status', array(
|
46 |
'header' => Mage::helper('monkey')->__('Status'),
|
47 |
'width' => '80px',
|
48 |
'index' => 'status',
|
49 |
+
)
|
50 |
+
);
|
51 |
|
52 |
+
$this->addColumn(
|
53 |
+
'updated_at', array(
|
54 |
'header' => Mage::helper('monkey')->__('Date Sent'),
|
55 |
'width' => '80px',
|
56 |
'index' => 'updated_at',
|
57 |
'type' => 'datetime'
|
58 |
+
)
|
59 |
+
);
|
60 |
|
61 |
+
$this->addColumn(
|
62 |
+
'created_at', array(
|
63 |
'header' => Mage::helper('monkey')->__('Date Sent'),
|
64 |
'width' => '80px',
|
65 |
'index' => 'created_at',
|
66 |
'type' => 'datetime'
|
67 |
+
)
|
68 |
+
);
|
69 |
|
70 |
return parent::_prepareColumns();
|
71 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/QueueExport.php
CHANGED
@@ -24,9 +24,13 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_QueueExport extends Mage_Adm
|
|
24 |
|
25 |
protected function _prepareLayout()
|
26 |
{
|
27 |
-
$this->setChild(
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
return Mage_Adminhtml_Block_Widget_Container::_prepareLayout();
|
31 |
}
|
32 |
|
24 |
|
25 |
protected function _prepareLayout()
|
26 |
{
|
27 |
+
$this->setChild(
|
28 |
+
'grid',
|
29 |
+
$this->getLayout()->createBlock(
|
30 |
+
$this->_blockGroup . '/' . $this->_controller . 'Export_grid',
|
31 |
+
$this->_controller . '.grid'
|
32 |
+
)->setSaveParametersInSession(true)
|
33 |
+
);
|
34 |
return Mage_Adminhtml_Block_Widget_Container::_prepareLayout();
|
35 |
}
|
36 |
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/QueueExport/Grid.php
CHANGED
@@ -33,64 +33,81 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_QueueExport_Grid extends Mag
|
|
33 |
|
34 |
protected function _prepareColumns()
|
35 |
{
|
36 |
-
$this->addColumn(
|
|
|
37 |
'header' => Mage::helper('monkey')->__('ID'),
|
38 |
'index' => 'id',
|
39 |
'type' => 'number'
|
40 |
-
|
|
|
41 |
|
42 |
-
$this->addColumn(
|
|
|
43 |
'header' => Mage::helper('monkey')->__('Entity'),
|
44 |
'index' => 'data_source_entity',
|
45 |
'filter' => false,
|
46 |
'sortable' => false,
|
47 |
-
|
|
|
48 |
|
49 |
-
$this->addColumn(
|
|
|
50 |
'header' => Mage::helper('monkey')->__('Status'),
|
51 |
'index' => 'status',
|
52 |
'type' => 'options',
|
53 |
'options' => Mage::getModel('monkey/system_config_source_bulksyncStatus')->toOption()
|
54 |
-
|
|
|
55 |
|
56 |
-
$this->addColumn(
|
|
|
57 |
'header' => Mage::helper('monkey')->__('Progress'),
|
58 |
'index' => 'progress',
|
59 |
'filter' => false,
|
60 |
'sortable' => false,
|
61 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Progress'
|
62 |
-
|
|
|
63 |
|
64 |
-
$this->addColumn(
|
|
|
65 |
'header' => Mage::helper('monkey')->__('Lists'),
|
66 |
'index' => 'lists',
|
67 |
'filter' => false,
|
68 |
'sortable' => false,
|
69 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Lists'
|
70 |
-
|
|
|
71 |
|
72 |
-
$this->addColumn(
|
|
|
73 |
'header' => Mage::helper('monkey')->__('Started At'),
|
74 |
'index' => 'started_at',
|
75 |
'type' => 'datetime'
|
76 |
-
|
|
|
77 |
|
78 |
-
$this->addColumn(
|
|
|
79 |
'header' => Mage::helper('monkey')->__('Updated At'),
|
80 |
'index' => 'updated_at',
|
81 |
'type' => 'datetime'
|
82 |
-
|
|
|
83 |
|
84 |
-
$this->addColumn(
|
|
|
85 |
'header' => Mage::helper('monkey')->__('Created At'),
|
86 |
'index' => 'created_at',
|
87 |
'type' => 'datetime'
|
88 |
-
|
|
|
89 |
|
90 |
$views = Mage::getModel('core/store')->getCollection()->toOptionHash();
|
91 |
$views[0] = Mage::helper('monkey')->__('All store views');
|
92 |
|
93 |
-
$this->addColumn(
|
|
|
94 |
array(
|
95 |
'header' => Mage::helper('monkey')->__('Store'),
|
96 |
'width' => '100px',
|
@@ -99,9 +116,11 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_QueueExport_Grid extends Mag
|
|
99 |
'index' => 'store_id',
|
100 |
'type' => 'options',
|
101 |
'options' => $views,
|
102 |
-
)
|
|
|
103 |
|
104 |
-
$this->addColumn(
|
|
|
105 |
array(
|
106 |
'header' => Mage::helper('monkey')->__('Action'),
|
107 |
'width' => '60px',
|
@@ -124,7 +143,8 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_QueueExport_Grid extends Mag
|
|
124 |
'filter' => false,
|
125 |
'sortable' => false,
|
126 |
'is_system' => true,
|
127 |
-
)
|
|
|
128 |
|
129 |
return parent::_prepareColumns();
|
130 |
}
|
33 |
|
34 |
protected function _prepareColumns()
|
35 |
{
|
36 |
+
$this->addColumn(
|
37 |
+
'id', array(
|
38 |
'header' => Mage::helper('monkey')->__('ID'),
|
39 |
'index' => 'id',
|
40 |
'type' => 'number'
|
41 |
+
)
|
42 |
+
);
|
43 |
|
44 |
+
$this->addColumn(
|
45 |
+
'data_source_entity', array(
|
46 |
'header' => Mage::helper('monkey')->__('Entity'),
|
47 |
'index' => 'data_source_entity',
|
48 |
'filter' => false,
|
49 |
'sortable' => false,
|
50 |
+
)
|
51 |
+
);
|
52 |
|
53 |
+
$this->addColumn(
|
54 |
+
'status', array(
|
55 |
'header' => Mage::helper('monkey')->__('Status'),
|
56 |
'index' => 'status',
|
57 |
'type' => 'options',
|
58 |
'options' => Mage::getModel('monkey/system_config_source_bulksyncStatus')->toOption()
|
59 |
+
)
|
60 |
+
);
|
61 |
|
62 |
+
$this->addColumn(
|
63 |
+
'progress', array(
|
64 |
'header' => Mage::helper('monkey')->__('Progress'),
|
65 |
'index' => 'progress',
|
66 |
'filter' => false,
|
67 |
'sortable' => false,
|
68 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Progress'
|
69 |
+
)
|
70 |
+
);
|
71 |
|
72 |
+
$this->addColumn(
|
73 |
+
'lists', array(
|
74 |
'header' => Mage::helper('monkey')->__('Lists'),
|
75 |
'index' => 'lists',
|
76 |
'filter' => false,
|
77 |
'sortable' => false,
|
78 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Lists'
|
79 |
+
)
|
80 |
+
);
|
81 |
|
82 |
+
$this->addColumn(
|
83 |
+
'started_at', array(
|
84 |
'header' => Mage::helper('monkey')->__('Started At'),
|
85 |
'index' => 'started_at',
|
86 |
'type' => 'datetime'
|
87 |
+
)
|
88 |
+
);
|
89 |
|
90 |
+
$this->addColumn(
|
91 |
+
'updated_at', array(
|
92 |
'header' => Mage::helper('monkey')->__('Updated At'),
|
93 |
'index' => 'updated_at',
|
94 |
'type' => 'datetime'
|
95 |
+
)
|
96 |
+
);
|
97 |
|
98 |
+
$this->addColumn(
|
99 |
+
'created_at', array(
|
100 |
'header' => Mage::helper('monkey')->__('Created At'),
|
101 |
'index' => 'created_at',
|
102 |
'type' => 'datetime'
|
103 |
+
)
|
104 |
+
);
|
105 |
|
106 |
$views = Mage::getModel('core/store')->getCollection()->toOptionHash();
|
107 |
$views[0] = Mage::helper('monkey')->__('All store views');
|
108 |
|
109 |
+
$this->addColumn(
|
110 |
+
'store_id',
|
111 |
array(
|
112 |
'header' => Mage::helper('monkey')->__('Store'),
|
113 |
'width' => '100px',
|
116 |
'index' => 'store_id',
|
117 |
'type' => 'options',
|
118 |
'options' => $views,
|
119 |
+
)
|
120 |
+
);
|
121 |
|
122 |
+
$this->addColumn(
|
123 |
+
'action',
|
124 |
array(
|
125 |
'header' => Mage::helper('monkey')->__('Action'),
|
126 |
'width' => '60px',
|
143 |
'filter' => false,
|
144 |
'sortable' => false,
|
145 |
'is_system' => true,
|
146 |
+
)
|
147 |
+
);
|
148 |
|
149 |
return parent::_prepareColumns();
|
150 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/QueueImport.php
CHANGED
@@ -24,9 +24,13 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_QueueImport extends Mage_Adm
|
|
24 |
|
25 |
protected function _prepareLayout()
|
26 |
{
|
27 |
-
$this->setChild(
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
return Mage_Adminhtml_Block_Widget_Container::_prepareLayout();
|
31 |
}
|
32 |
|
24 |
|
25 |
protected function _prepareLayout()
|
26 |
{
|
27 |
+
$this->setChild(
|
28 |
+
'grid',
|
29 |
+
$this->getLayout()->createBlock(
|
30 |
+
$this->_blockGroup . '/' . $this->_controller . 'Import_grid',
|
31 |
+
$this->_controller . '.grid'
|
32 |
+
)->setSaveParametersInSession(true)
|
33 |
+
);
|
34 |
return Mage_Adminhtml_Block_Widget_Container::_prepareLayout();
|
35 |
}
|
36 |
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Bulksync/QueueImport/Grid.php
CHANGED
@@ -34,80 +34,101 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_QueueImport_Grid extends Mag
|
|
34 |
|
35 |
protected function _prepareColumns()
|
36 |
{
|
37 |
-
$this->addColumn(
|
|
|
38 |
'header' => Mage::helper('monkey')->__('ID'),
|
39 |
'index' => 'id',
|
40 |
'type' => 'number'
|
41 |
-
|
|
|
42 |
|
43 |
-
$this->addColumn(
|
|
|
44 |
'header' => Mage::helper('monkey')->__('Status'),
|
45 |
'index' => 'status',
|
46 |
'type' => 'options',
|
47 |
'options' => Mage::getModel('monkey/system_config_source_bulksyncStatus')->toOption()
|
48 |
-
|
|
|
49 |
|
50 |
-
$this->addColumn(
|
|
|
51 |
'header' => Mage::helper('monkey')->__('Progress'),
|
52 |
'index' => 'progress',
|
53 |
'filter' => false,
|
54 |
'sortable' => false,
|
55 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Progress'
|
56 |
-
|
|
|
57 |
|
58 |
-
$this->addColumn(
|
|
|
59 |
'header' => Mage::helper('monkey')->__('Import'),
|
60 |
'index' => 'import_types',
|
61 |
'filter' => false,
|
62 |
'sortable' => false,
|
63 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Importypes'
|
64 |
-
|
|
|
65 |
|
66 |
-
$this->addColumn(
|
|
|
67 |
'header' => Mage::helper('monkey')->__('Lists'),
|
68 |
'index' => 'lists',
|
69 |
'filter' => false,
|
70 |
'sortable' => false,
|
71 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Lists'
|
72 |
-
|
|
|
73 |
|
74 |
-
$this->addColumn(
|
|
|
75 |
'header' => Mage::helper('monkey')->__('Create Customer'),
|
76 |
'index' => 'create_customer',
|
77 |
'filter' => false,
|
78 |
'sortable' => false,
|
79 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Yesno'
|
80 |
-
|
|
|
81 |
|
82 |
-
$this->addColumn(
|
|
|
83 |
'header' => Mage::helper('monkey')->__('Retrieve Since'),
|
84 |
'index' => 'since',
|
85 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Date',
|
86 |
'filter' => false,
|
87 |
'sortable' => false,
|
88 |
-
|
|
|
89 |
|
90 |
-
$this->addColumn(
|
|
|
91 |
'header' => Mage::helper('monkey')->__('Started At'),
|
92 |
'index' => 'started_at',
|
93 |
'type' => 'datetime'
|
94 |
-
|
|
|
95 |
|
96 |
-
$this->addColumn(
|
|
|
97 |
'header' => Mage::helper('monkey')->__('Updated At'),
|
98 |
'index' => 'updated_at',
|
99 |
'type' => 'datetime'
|
100 |
-
|
|
|
101 |
|
102 |
-
$this->addColumn(
|
|
|
103 |
'header' => Mage::helper('monkey')->__('Created At'),
|
104 |
'index' => 'created_at',
|
105 |
'type' => 'datetime'
|
106 |
-
|
|
|
107 |
|
108 |
$views = Mage::getModel('core/store')->getCollection()->toOptionHash();
|
109 |
$views[0] = Mage::helper('monkey')->__('All store views');
|
110 |
-
$this->addColumn(
|
|
|
111 |
array(
|
112 |
'header' => Mage::helper('monkey')->__('Store'),
|
113 |
'width' => '100px',
|
@@ -116,9 +137,11 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_QueueImport_Grid extends Mag
|
|
116 |
'index' => 'store_id',
|
117 |
'type' => 'options',
|
118 |
'options' => $views,
|
119 |
-
)
|
|
|
120 |
|
121 |
-
$this->addColumn(
|
|
|
122 |
array(
|
123 |
'header' => Mage::helper('monkey')->__('Action'),
|
124 |
'width' => '60px',
|
@@ -141,7 +164,8 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Bulksync_QueueImport_Grid extends Mag
|
|
141 |
'filter' => false,
|
142 |
'sortable' => false,
|
143 |
'is_system' => true,
|
144 |
-
)
|
|
|
145 |
|
146 |
return parent::_prepareColumns();
|
147 |
}
|
34 |
|
35 |
protected function _prepareColumns()
|
36 |
{
|
37 |
+
$this->addColumn(
|
38 |
+
'id', array(
|
39 |
'header' => Mage::helper('monkey')->__('ID'),
|
40 |
'index' => 'id',
|
41 |
'type' => 'number'
|
42 |
+
)
|
43 |
+
);
|
44 |
|
45 |
+
$this->addColumn(
|
46 |
+
'status', array(
|
47 |
'header' => Mage::helper('monkey')->__('Status'),
|
48 |
'index' => 'status',
|
49 |
'type' => 'options',
|
50 |
'options' => Mage::getModel('monkey/system_config_source_bulksyncStatus')->toOption()
|
51 |
+
)
|
52 |
+
);
|
53 |
|
54 |
+
$this->addColumn(
|
55 |
+
'progress', array(
|
56 |
'header' => Mage::helper('monkey')->__('Progress'),
|
57 |
'index' => 'progress',
|
58 |
'filter' => false,
|
59 |
'sortable' => false,
|
60 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Progress'
|
61 |
+
)
|
62 |
+
);
|
63 |
|
64 |
+
$this->addColumn(
|
65 |
+
'import_types', array(
|
66 |
'header' => Mage::helper('monkey')->__('Import'),
|
67 |
'index' => 'import_types',
|
68 |
'filter' => false,
|
69 |
'sortable' => false,
|
70 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Importypes'
|
71 |
+
)
|
72 |
+
);
|
73 |
|
74 |
+
$this->addColumn(
|
75 |
+
'lists', array(
|
76 |
'header' => Mage::helper('monkey')->__('Lists'),
|
77 |
'index' => 'lists',
|
78 |
'filter' => false,
|
79 |
'sortable' => false,
|
80 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Lists'
|
81 |
+
)
|
82 |
+
);
|
83 |
|
84 |
+
$this->addColumn(
|
85 |
+
'create_customer', array(
|
86 |
'header' => Mage::helper('monkey')->__('Create Customer'),
|
87 |
'index' => 'create_customer',
|
88 |
'filter' => false,
|
89 |
'sortable' => false,
|
90 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Yesno'
|
91 |
+
)
|
92 |
+
);
|
93 |
|
94 |
+
$this->addColumn(
|
95 |
+
'since', array(
|
96 |
'header' => Mage::helper('monkey')->__('Retrieve Since'),
|
97 |
'index' => 'since',
|
98 |
'renderer' => 'Ebizmarts_MageMonkey_Block_Adminhtml_Renderer_Date',
|
99 |
'filter' => false,
|
100 |
'sortable' => false,
|
101 |
+
)
|
102 |
+
);
|
103 |
|
104 |
+
$this->addColumn(
|
105 |
+
'started_at', array(
|
106 |
'header' => Mage::helper('monkey')->__('Started At'),
|
107 |
'index' => 'started_at',
|
108 |
'type' => 'datetime'
|
109 |
+
)
|
110 |
+
);
|
111 |
|
112 |
+
$this->addColumn(
|
113 |
+
'updated_at', array(
|
114 |
'header' => Mage::helper('monkey')->__('Updated At'),
|
115 |
'index' => 'updated_at',
|
116 |
'type' => 'datetime'
|
117 |
+
)
|
118 |
+
);
|
119 |
|
120 |
+
$this->addColumn(
|
121 |
+
'created_at', array(
|
122 |
'header' => Mage::helper('monkey')->__('Created At'),
|
123 |
'index' => 'created_at',
|
124 |
'type' => 'datetime'
|
125 |
+
)
|
126 |
+
);
|
127 |
|
128 |
$views = Mage::getModel('core/store')->getCollection()->toOptionHash();
|
129 |
$views[0] = Mage::helper('monkey')->__('All store views');
|
130 |
+
$this->addColumn(
|
131 |
+
'store_id',
|
132 |
array(
|
133 |
'header' => Mage::helper('monkey')->__('Store'),
|
134 |
'width' => '100px',
|
137 |
'index' => 'store_id',
|
138 |
'type' => 'options',
|
139 |
'options' => $views,
|
140 |
+
)
|
141 |
+
);
|
142 |
|
143 |
+
$this->addColumn(
|
144 |
+
'action',
|
145 |
array(
|
146 |
'header' => Mage::helper('monkey')->__('Action'),
|
147 |
'width' => '60px',
|
164 |
'filter' => false,
|
165 |
'sortable' => false,
|
166 |
'is_system' => true,
|
167 |
+
)
|
168 |
+
);
|
169 |
|
170 |
return parent::_prepareColumns();
|
171 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Ecommerce/Grid.php
CHANGED
@@ -33,37 +33,47 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Ecommerce_Grid extends Mage_Adminhtml
|
|
33 |
|
34 |
protected function _prepareColumns()
|
35 |
{
|
36 |
-
$this->addColumn(
|
|
|
37 |
'header' => Mage::helper('monkey')->__('ID'),
|
38 |
'width' => '80px',
|
39 |
'index' => 'id',
|
40 |
'type' => 'number'
|
41 |
-
|
|
|
42 |
|
43 |
-
$this->addColumn(
|
|
|
44 |
'header' => Mage::helper('monkey')->__('Order #'),
|
45 |
'width' => '80px',
|
46 |
'index' => 'order_increment_id',
|
47 |
-
|
|
|
48 |
|
49 |
-
$this->addColumn(
|
|
|
50 |
'header' => Mage::helper('monkey')->__('Campaign #'),
|
51 |
'width' => '80px',
|
52 |
'index' => 'mc_campaign_id'
|
53 |
-
|
|
|
54 |
|
55 |
-
$this->addColumn(
|
|
|
56 |
'header' => Mage::helper('monkey')->__('Email #'),
|
57 |
'width' => '80px',
|
58 |
'index' => 'mc_email_id'
|
59 |
-
|
|
|
60 |
|
61 |
-
$this->addColumn(
|
|
|
62 |
'header' => Mage::helper('monkey')->__('Date Sent'),
|
63 |
'width' => '80px',
|
64 |
'index' => 'created_at',
|
65 |
'type' => 'datetime'
|
66 |
-
|
|
|
67 |
|
68 |
return parent::_prepareColumns();
|
69 |
}
|
@@ -82,11 +92,13 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Ecommerce_Grid extends Mage_Adminhtml
|
|
82 |
{
|
83 |
$this->setMassactionIdField('order_id');
|
84 |
$this->getMassactionBlock()->setFormFieldName('orders');
|
85 |
-
$this->getMassactionBlock()->addItem(
|
|
|
86 |
'label' => Mage::helper('monkey')->__('Delete'),
|
87 |
'url' => $this->getUrl('*/*/massDelete', array('' => '')),
|
88 |
'confirm' => Mage::helper('tax')->__('Are you sure?')
|
89 |
-
|
|
|
90 |
return $this;
|
91 |
}
|
92 |
|
33 |
|
34 |
protected function _prepareColumns()
|
35 |
{
|
36 |
+
$this->addColumn(
|
37 |
+
'id', array(
|
38 |
'header' => Mage::helper('monkey')->__('ID'),
|
39 |
'width' => '80px',
|
40 |
'index' => 'id',
|
41 |
'type' => 'number'
|
42 |
+
)
|
43 |
+
);
|
44 |
|
45 |
+
$this->addColumn(
|
46 |
+
'order_increment_id', array(
|
47 |
'header' => Mage::helper('monkey')->__('Order #'),
|
48 |
'width' => '80px',
|
49 |
'index' => 'order_increment_id',
|
50 |
+
)
|
51 |
+
);
|
52 |
|
53 |
+
$this->addColumn(
|
54 |
+
'mc_campaign_id', array(
|
55 |
'header' => Mage::helper('monkey')->__('Campaign #'),
|
56 |
'width' => '80px',
|
57 |
'index' => 'mc_campaign_id'
|
58 |
+
)
|
59 |
+
);
|
60 |
|
61 |
+
$this->addColumn(
|
62 |
+
'mc_email_id', array(
|
63 |
'header' => Mage::helper('monkey')->__('Email #'),
|
64 |
'width' => '80px',
|
65 |
'index' => 'mc_email_id'
|
66 |
+
)
|
67 |
+
);
|
68 |
|
69 |
+
$this->addColumn(
|
70 |
+
'created_at', array(
|
71 |
'header' => Mage::helper('monkey')->__('Date Sent'),
|
72 |
'width' => '80px',
|
73 |
'index' => 'created_at',
|
74 |
'type' => 'datetime'
|
75 |
+
)
|
76 |
+
);
|
77 |
|
78 |
return parent::_prepareColumns();
|
79 |
}
|
92 |
{
|
93 |
$this->setMassactionIdField('order_id');
|
94 |
$this->getMassactionBlock()->setFormFieldName('orders');
|
95 |
+
$this->getMassactionBlock()->addItem(
|
96 |
+
'delete', array(
|
97 |
'label' => Mage::helper('monkey')->__('Delete'),
|
98 |
'url' => $this->getUrl('*/*/massDelete', array('' => '')),
|
99 |
'confirm' => Mage::helper('tax')->__('Are you sure?')
|
100 |
+
)
|
101 |
+
);
|
102 |
return $this;
|
103 |
}
|
104 |
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Ecommerceapi/Grid.php
CHANGED
@@ -44,43 +44,61 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Ecommerceapi_Grid extends Mage_Adminh
|
|
44 |
|
45 |
protected function _prepareColumns()
|
46 |
{
|
47 |
-
$this->addColumn(
|
|
|
48 |
'header' => Mage::helper('monkey')->__('Store ID'),
|
49 |
'index' => 'store_id',
|
50 |
-
|
51 |
-
|
|
|
|
|
52 |
'header' => Mage::helper('monkey')->__('Store Name'),
|
53 |
'index' => 'store_name',
|
54 |
-
|
55 |
-
|
|
|
|
|
56 |
'header' => Mage::helper('monkey')->__('Order #'),
|
57 |
'index' => 'order_id',
|
58 |
-
|
59 |
-
|
|
|
|
|
60 |
'header' => Mage::helper('monkey')->__('Email'),
|
61 |
'index' => 'email',
|
62 |
-
|
63 |
-
|
|
|
|
|
64 |
'header' => Mage::helper('monkey')->__('Order Total'),
|
65 |
'index' => 'order_total',
|
66 |
-
|
67 |
-
|
|
|
|
|
68 |
'header' => Mage::helper('monkey')->__('Tax Total'),
|
69 |
'index' => 'tax_total',
|
70 |
-
|
71 |
-
|
|
|
|
|
72 |
'header' => Mage::helper('monkey')->__('Ship Total'),
|
73 |
'index' => 'ship_total',
|
74 |
-
|
75 |
-
|
|
|
|
|
76 |
'header' => Mage::helper('monkey')->__('Order Date'),
|
77 |
'index' => 'order_date',
|
78 |
-
|
79 |
-
|
|
|
|
|
80 |
'header' => Mage::helper('monkey')->__('Items'),
|
81 |
'index' => 'items',
|
82 |
'renderer' => 'monkey/adminhtml_ecommerceapi_renderer_items'
|
83 |
-
|
|
|
84 |
|
85 |
return parent::_prepareColumns();
|
86 |
}
|
44 |
|
45 |
protected function _prepareColumns()
|
46 |
{
|
47 |
+
$this->addColumn(
|
48 |
+
'store_id', array(
|
49 |
'header' => Mage::helper('monkey')->__('Store ID'),
|
50 |
'index' => 'store_id',
|
51 |
+
)
|
52 |
+
);
|
53 |
+
$this->addColumn(
|
54 |
+
'store_name', array(
|
55 |
'header' => Mage::helper('monkey')->__('Store Name'),
|
56 |
'index' => 'store_name',
|
57 |
+
)
|
58 |
+
);
|
59 |
+
$this->addColumn(
|
60 |
+
'order_id', array(
|
61 |
'header' => Mage::helper('monkey')->__('Order #'),
|
62 |
'index' => 'order_id',
|
63 |
+
)
|
64 |
+
);
|
65 |
+
$this->addColumn(
|
66 |
+
'email', array(
|
67 |
'header' => Mage::helper('monkey')->__('Email'),
|
68 |
'index' => 'email',
|
69 |
+
)
|
70 |
+
);
|
71 |
+
$this->addColumn(
|
72 |
+
'order_total', array(
|
73 |
'header' => Mage::helper('monkey')->__('Order Total'),
|
74 |
'index' => 'order_total',
|
75 |
+
)
|
76 |
+
);
|
77 |
+
$this->addColumn(
|
78 |
+
'tax_total', array(
|
79 |
'header' => Mage::helper('monkey')->__('Tax Total'),
|
80 |
'index' => 'tax_total',
|
81 |
+
)
|
82 |
+
);
|
83 |
+
$this->addColumn(
|
84 |
+
'ship_total', array(
|
85 |
'header' => Mage::helper('monkey')->__('Ship Total'),
|
86 |
'index' => 'ship_total',
|
87 |
+
)
|
88 |
+
);
|
89 |
+
$this->addColumn(
|
90 |
+
'order_date', array(
|
91 |
'header' => Mage::helper('monkey')->__('Order Date'),
|
92 |
'index' => 'order_date',
|
93 |
+
)
|
94 |
+
);
|
95 |
+
$this->addColumn(
|
96 |
+
'items', array(
|
97 |
'header' => Mage::helper('monkey')->__('Items'),
|
98 |
'index' => 'items',
|
99 |
'renderer' => 'monkey/adminhtml_ecommerceapi_renderer_items'
|
100 |
+
)
|
101 |
+
);
|
102 |
|
103 |
return parent::_prepareColumns();
|
104 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Memberactivity/Grid.php
CHANGED
@@ -60,36 +60,48 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_Memberactivity_Grid extends Mage_Admi
|
|
60 |
protected function _prepareColumns()
|
61 |
{
|
62 |
|
63 |
-
$this->addColumn(
|
|
|
64 |
'header' => Mage::helper('monkey')->__('Action'),
|
65 |
'index' => 'action',
|
66 |
'sortable' => false
|
67 |
-
|
68 |
-
|
|
|
|
|
69 |
'header' => Mage::helper('monkey')->__('Url'),
|
70 |
'index' => 'url',
|
71 |
'sortable' => false
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
'header' => Mage::helper('monkey')->__('Bounce Type'),
|
75 |
'index' => 'bounce_type',
|
76 |
'sortable' => false
|
77 |
-
|
78 |
-
|
|
|
|
|
79 |
'header' => Mage::helper('monkey')->__('Campaign ID'),
|
80 |
'index' => 'campaign_id',
|
81 |
'sortable' => false
|
82 |
-
|
83 |
-
|
|
|
|
|
84 |
'header' => Mage::helper('monkey')->__('Campaign Title'),
|
85 |
'index' => 'title',
|
86 |
'sortable' => false
|
87 |
-
|
88 |
-
|
|
|
|
|
89 |
'header' => Mage::helper('monkey')->__('Timestamp'),
|
90 |
'index' => 'timestamp',
|
91 |
'sortable' => false
|
92 |
-
|
|
|
93 |
|
94 |
return parent::_prepareColumns();
|
95 |
}
|
60 |
protected function _prepareColumns()
|
61 |
{
|
62 |
|
63 |
+
$this->addColumn(
|
64 |
+
'action', array(
|
65 |
'header' => Mage::helper('monkey')->__('Action'),
|
66 |
'index' => 'action',
|
67 |
'sortable' => false
|
68 |
+
)
|
69 |
+
);
|
70 |
+
$this->addColumn(
|
71 |
+
'url', array(
|
72 |
'header' => Mage::helper('monkey')->__('Url'),
|
73 |
'index' => 'url',
|
74 |
'sortable' => false
|
75 |
+
)
|
76 |
+
);
|
77 |
+
$this->addColumn(
|
78 |
+
'bounce_type', array(
|
79 |
'header' => Mage::helper('monkey')->__('Bounce Type'),
|
80 |
'index' => 'bounce_type',
|
81 |
'sortable' => false
|
82 |
+
)
|
83 |
+
);
|
84 |
+
$this->addColumn(
|
85 |
+
'campaign_id', array(
|
86 |
'header' => Mage::helper('monkey')->__('Campaign ID'),
|
87 |
'index' => 'campaign_id',
|
88 |
'sortable' => false
|
89 |
+
)
|
90 |
+
);
|
91 |
+
$this->addColumn(
|
92 |
+
'title', array(
|
93 |
'header' => Mage::helper('monkey')->__('Campaign Title'),
|
94 |
'index' => 'title',
|
95 |
'sortable' => false
|
96 |
+
)
|
97 |
+
);
|
98 |
+
$this->addColumn(
|
99 |
+
'timestamp', array(
|
100 |
'header' => Mage::helper('monkey')->__('Timestamp'),
|
101 |
'index' => 'timestamp',
|
102 |
'sortable' => false
|
103 |
+
)
|
104 |
+
);
|
105 |
|
106 |
return parent::_prepareColumns();
|
107 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Newsletter/Subscriber/Renderer/Firstname.php
CHANGED
@@ -5,17 +5,18 @@
|
|
5 |
* Date: 22/05/15
|
6 |
* Time: 05:23 PM
|
7 |
*/
|
8 |
-
class Ebizmarts_MageMonkey_Block_Adminhtml_Newsletter_Subscriber_Renderer_Firstname extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
|
|
9 |
|
10 |
public function render(Varien_Object $row)
|
11 |
{
|
12 |
$subscriberFirstName = $row->getData('subscriber_firstname');
|
13 |
$customerFirstName = $row->getData('customer_firstname');
|
14 |
-
if($customerFirstName){
|
15 |
return $customerFirstName;
|
16 |
-
}elseif($subscriberFirstName){
|
17 |
return $subscriberFirstName;
|
18 |
-
}else{
|
19 |
return '----';
|
20 |
}
|
21 |
}
|
5 |
* Date: 22/05/15
|
6 |
* Time: 05:23 PM
|
7 |
*/
|
8 |
+
class Ebizmarts_MageMonkey_Block_Adminhtml_Newsletter_Subscriber_Renderer_Firstname extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
9 |
+
{
|
10 |
|
11 |
public function render(Varien_Object $row)
|
12 |
{
|
13 |
$subscriberFirstName = $row->getData('subscriber_firstname');
|
14 |
$customerFirstName = $row->getData('customer_firstname');
|
15 |
+
if ($customerFirstName) {
|
16 |
return $customerFirstName;
|
17 |
+
} elseif ($subscriberFirstName) {
|
18 |
return $subscriberFirstName;
|
19 |
+
} else {
|
20 |
return '----';
|
21 |
}
|
22 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/Newsletter/Subscriber/Renderer/Lastname.php
CHANGED
@@ -5,17 +5,18 @@
|
|
5 |
* Date: 22/05/15
|
6 |
* Time: 05:23 PM
|
7 |
*/
|
8 |
-
class Ebizmarts_MageMonkey_Block_Adminhtml_Newsletter_Subscriber_Renderer_Lastname extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
|
|
9 |
|
10 |
public function render(Varien_Object $row)
|
11 |
{
|
12 |
$subscriberLastName = $row->getData('subscriber_lastname');
|
13 |
$customerLastName = $row->getData('customer_lastname');
|
14 |
-
if($customerLastName){
|
15 |
return $customerLastName;
|
16 |
-
}elseif($subscriberLastName){
|
17 |
return $subscriberLastName;
|
18 |
-
}else{
|
19 |
return '----';
|
20 |
}
|
21 |
}
|
5 |
* Date: 22/05/15
|
6 |
* Time: 05:23 PM
|
7 |
*/
|
8 |
+
class Ebizmarts_MageMonkey_Block_Adminhtml_Newsletter_Subscriber_Renderer_Lastname extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
9 |
+
{
|
10 |
|
11 |
public function render(Varien_Object $row)
|
12 |
{
|
13 |
$subscriberLastName = $row->getData('subscriber_lastname');
|
14 |
$customerLastName = $row->getData('customer_lastname');
|
15 |
+
if ($customerLastName) {
|
16 |
return $customerLastName;
|
17 |
+
} elseif ($subscriberLastName) {
|
18 |
return $subscriberLastName;
|
19 |
+
} else {
|
20 |
return '----';
|
21 |
}
|
22 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/Form/Field/Mapfields.php
CHANGED
@@ -14,14 +14,18 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_System_Config_Form_Field_Mapfields ex
|
|
14 |
|
15 |
public function __construct()
|
16 |
{
|
17 |
-
$this->addColumn(
|
|
|
18 |
'label' => Mage::helper('monkey')->__('Customer'),
|
19 |
'style' => 'width:120px',
|
20 |
-
|
21 |
-
|
|
|
|
|
22 |
'label' => Mage::helper('monkey')->__('MailChimp'),
|
23 |
'style' => 'width:120px',
|
24 |
-
|
|
|
25 |
$this->_addAfter = false;
|
26 |
$this->_addButtonLabel = Mage::helper('monkey')->__('Add field');
|
27 |
parent::__construct();
|
14 |
|
15 |
public function __construct()
|
16 |
{
|
17 |
+
$this->addColumn(
|
18 |
+
'magento', array(
|
19 |
'label' => Mage::helper('monkey')->__('Customer'),
|
20 |
'style' => 'width:120px',
|
21 |
+
)
|
22 |
+
);
|
23 |
+
$this->addColumn(
|
24 |
+
'mailchimp', array(
|
25 |
'label' => Mage::helper('monkey')->__('MailChimp'),
|
26 |
'style' => 'width:120px',
|
27 |
+
)
|
28 |
+
);
|
29 |
$this->_addAfter = false;
|
30 |
$this->_addButtonLabel = Mage::helper('monkey')->__('Add field');
|
31 |
parent::__construct();
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/OauthWizard.php
CHANGED
@@ -54,11 +54,13 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_System_Config_OauthWizard extends Mag
|
|
54 |
$label = "Change API credentials";
|
55 |
}
|
56 |
|
57 |
-
$this->addData(
|
|
|
58 |
'button_label' => $this->helper('monkey')->__($label),
|
59 |
'button_url' => $this->helper('monkey/oauth2')->authorizeRequestUrl(),
|
60 |
'html_id' => $element->getHtmlId(),
|
61 |
-
|
|
|
62 |
return $this->_toHtml();
|
63 |
}
|
64 |
}
|
54 |
$label = "Change API credentials";
|
55 |
}
|
56 |
|
57 |
+
$this->addData(
|
58 |
+
array(
|
59 |
'button_label' => $this->helper('monkey')->__($label),
|
60 |
'button_url' => $this->helper('monkey/oauth2')->authorizeRequestUrl(),
|
61 |
'html_id' => $element->getHtmlId(),
|
62 |
+
)
|
63 |
+
);
|
64 |
return $this->_toHtml();
|
65 |
}
|
66 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/ResetLocalEcommerce.php
CHANGED
@@ -39,11 +39,13 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_System_Config_ResetLocalEcommerce ext
|
|
39 |
public function getButtonHtml()
|
40 |
{
|
41 |
$button = $this->getLayout()->createBlock('adminhtml/widget_button')
|
42 |
-
->setData(
|
|
|
43 |
'id' => 'resetecommerce_button',
|
44 |
'label' => $this->helper('monkey')->__('Reset Local Orders Ecommerce360'),
|
45 |
'onclick' => 'javascript:check(); return false;'
|
46 |
-
|
|
|
47 |
|
48 |
return $button->toHtml();
|
49 |
}
|
39 |
public function getButtonHtml()
|
40 |
{
|
41 |
$button = $this->getLayout()->createBlock('adminhtml/widget_button')
|
42 |
+
->setData(
|
43 |
+
array(
|
44 |
'id' => 'resetecommerce_button',
|
45 |
'label' => $this->helper('monkey')->__('Reset Local Orders Ecommerce360'),
|
46 |
'onclick' => 'javascript:check(); return false;'
|
47 |
+
)
|
48 |
+
);
|
49 |
|
50 |
return $button->toHtml();
|
51 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/ResetRemoteEcommerce.php
CHANGED
@@ -39,11 +39,13 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_System_Config_ResetRemoteEcommerce ex
|
|
39 |
public function getButtonHtml()
|
40 |
{
|
41 |
$button = $this->getLayout()->createBlock('adminhtml/widget_button')
|
42 |
-
->setData(
|
|
|
43 |
'id' => 'resetecommerce_button',
|
44 |
'label' => $this->helper('monkey')->__('Reset Remote Orders Ecommerce360'),
|
45 |
'onclick' => 'javascript:check2(); return false;'
|
46 |
-
|
|
|
47 |
|
48 |
return $button->toHtml();
|
49 |
}
|
39 |
public function getButtonHtml()
|
40 |
{
|
41 |
$button = $this->getLayout()->createBlock('adminhtml/widget_button')
|
42 |
+
->setData(
|
43 |
+
array(
|
44 |
'id' => 'resetecommerce_button',
|
45 |
'label' => $this->helper('monkey')->__('Reset Remote Orders Ecommerce360'),
|
46 |
'onclick' => 'javascript:check2(); return false;'
|
47 |
+
)
|
48 |
+
);
|
49 |
|
50 |
return $button->toHtml();
|
51 |
}
|
app/code/community/Ebizmarts/MageMonkey/Block/Adminhtml/System/Config/UpgradeForPatch.php
CHANGED
@@ -38,20 +38,23 @@ class Ebizmarts_MageMonkey_Block_Adminhtml_System_Config_UpgradeForPatch extends
|
|
38 |
public function getButtonHtml()
|
39 |
{
|
40 |
$button = $this->getLayout()->createBlock('adminhtml/widget_button')
|
41 |
-
->setData(
|
|
|
42 |
'id' => 'upgradeforpatch_button',
|
43 |
'label' => $this->helper('monkey')->__('Upgrade for Patch SUPEE-6788'),
|
44 |
'onclick' => 'javascript:upgradeForPatch(); return false;'
|
45 |
-
|
|
|
46 |
|
47 |
return $button->toHtml();
|
48 |
}
|
49 |
|
50 |
-
protected function tableExists()
|
|
|
51 |
$prefix = Mage::getConfig()->getTablePrefix();
|
52 |
-
if($prefix[0]){
|
53 |
$pre = $prefix[0];
|
54 |
-
}else{
|
55 |
$pre = '';
|
56 |
}
|
57 |
$resource = Mage::getSingleton('core/resource')
|
38 |
public function getButtonHtml()
|
39 |
{
|
40 |
$button = $this->getLayout()->createBlock('adminhtml/widget_button')
|
41 |
+
->setData(
|
42 |
+
array(
|
43 |
'id' => 'upgradeforpatch_button',
|
44 |
'label' => $this->helper('monkey')->__('Upgrade for Patch SUPEE-6788'),
|
45 |
'onclick' => 'javascript:upgradeForPatch(); return false;'
|
46 |
+
)
|
47 |
+
);
|
48 |
|
49 |
return $button->toHtml();
|
50 |
}
|
51 |
|
52 |
+
protected function tableExists()
|
53 |
+
{
|
54 |
$prefix = Mage::getConfig()->getTablePrefix();
|
55 |
+
if ($prefix[0]) {
|
56 |
$pre = $prefix[0];
|
57 |
+
} else {
|
58 |
$pre = '';
|
59 |
}
|
60 |
$resource = Mage::getSingleton('core/resource')
|
app/code/community/Ebizmarts/MageMonkey/Block/Checkout/Subscribe.php
CHANGED
@@ -22,11 +22,13 @@ class Ebizmarts_MageMonkey_Block_Checkout_Subscribe extends Ebizmarts_MageMonkey
|
|
22 |
$this->getQuote()->getCustomer()->getId()
|
23 |
);
|
24 |
|
25 |
-
$this->addData(
|
|
|
26 |
'cache_lifetime' => 60 * 60 * 4, // four hours valid
|
27 |
'cache_tags' => array('EbizMageMonkey_Checkout_Subscribe'),
|
28 |
'cache_key' => implode('_', $key),
|
29 |
-
|
|
|
30 |
}
|
31 |
|
32 |
/**
|
22 |
$this->getQuote()->getCustomer()->getId()
|
23 |
);
|
24 |
|
25 |
+
$this->addData(
|
26 |
+
array(
|
27 |
'cache_lifetime' => 60 * 60 * 4, // four hours valid
|
28 |
'cache_tags' => array('EbizMageMonkey_Checkout_Subscribe'),
|
29 |
'cache_key' => implode('_', $key),
|
30 |
+
)
|
31 |
+
);
|
32 |
}
|
33 |
|
34 |
/**
|
app/code/community/Ebizmarts/MageMonkey/Block/Lists.php
CHANGED
@@ -215,10 +215,11 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
|
|
215 |
return $this->_info[$listId];
|
216 |
}
|
217 |
|
218 |
-
public function hasGroupSelected($group)
|
|
|
219 |
$ret = false;
|
220 |
-
foreach($group['groups'] as $g){
|
221 |
-
if($this->_groupAllowed($g['name'])){
|
222 |
$ret = true;
|
223 |
}
|
224 |
}
|
@@ -266,7 +267,7 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
|
|
266 |
}
|
267 |
}
|
268 |
if (isset($groupings)) {
|
269 |
-
$myGroups = $this->_setGrouping($groupings
|
270 |
}
|
271 |
}
|
272 |
}
|
@@ -289,8 +290,7 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
|
|
289 |
break;
|
290 |
}
|
291 |
$html = '';
|
292 |
-
if($fieldType!='hidden')
|
293 |
-
{
|
294 |
$html = $this->_generateHtml($myGroups, $group, $checked, $list, $class, $fieldType);
|
295 |
}
|
296 |
|
@@ -449,8 +449,8 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
|
|
449 |
if (isset($allowedGroups)) {
|
450 |
foreach ($allowedGroups as $group) {
|
451 |
$group = explode('_', $group);
|
452 |
-
if(count($group) > 2){
|
453 |
-
for ($i = 2; $i < count($group); $i++){
|
454 |
$group[1] .= '_'.$group[$i];
|
455 |
}
|
456 |
}
|
215 |
return $this->_info[$listId];
|
216 |
}
|
217 |
|
218 |
+
public function hasGroupSelected($group)
|
219 |
+
{
|
220 |
$ret = false;
|
221 |
+
foreach ($group['groups'] as $g) {
|
222 |
+
if ($this->_groupAllowed($g['name'])) {
|
223 |
$ret = true;
|
224 |
}
|
225 |
}
|
267 |
}
|
268 |
}
|
269 |
if (isset($groupings)) {
|
270 |
+
$myGroups = $this->_setGrouping($groupings, $fieldType, $myGroups);
|
271 |
}
|
272 |
}
|
273 |
}
|
290 |
break;
|
291 |
}
|
292 |
$html = '';
|
293 |
+
if ($fieldType!='hidden') {
|
|
|
294 |
$html = $this->_generateHtml($myGroups, $group, $checked, $list, $class, $fieldType);
|
295 |
}
|
296 |
|
449 |
if (isset($allowedGroups)) {
|
450 |
foreach ($allowedGroups as $group) {
|
451 |
$group = explode('_', $group);
|
452 |
+
if (count($group) > 2) {
|
453 |
+
for ($i = 2; $i < count($group); $i++) {
|
454 |
$group[1] .= '_'.$group[$i];
|
455 |
}
|
456 |
}
|
app/code/community/Ebizmarts/MageMonkey/Helper/Data.php
CHANGED
@@ -208,7 +208,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
208 |
$ret = Mage::getStoreConfig("monkey/general/$value", $storeExists->getId());
|
209 |
}
|
210 |
}
|
211 |
-
if(!$ret){
|
212 |
$ret = Mage::getStoreConfig("monkey/general/$value", $store);
|
213 |
}
|
214 |
return $ret;
|
@@ -276,13 +276,13 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
276 |
public function canMonkey($stores = null)
|
277 |
{
|
278 |
$ret = false;
|
279 |
-
if(is_array($stores)){
|
280 |
-
foreach($stores as $store){
|
281 |
-
if((bool)((int)$this->config('active', $store) !== 0)){
|
282 |
$ret = true;
|
283 |
}
|
284 |
}
|
285 |
-
}else{
|
286 |
$ret = (bool)((int)$this->config('active') !== 0);
|
287 |
}
|
288 |
return $ret;
|
@@ -409,7 +409,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
409 |
*/
|
410 |
public function getMergeVars($customer, $includeEmail = FALSE, $websiteId = NULL)
|
411 |
{
|
412 |
-
$
|
413 |
$maps = $this->getMergeMaps($customer->getStoreId());
|
414 |
|
415 |
if (!$maps && !$customer->getListGroups()) {
|
@@ -420,46 +420,50 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
420 |
|
421 |
//Add Customer data to Subscriber if is Newsletter_Subscriber is Customer
|
422 |
if (!$customer->getDefaultShipping() && $customer->getEntityId()) {
|
423 |
-
$customer->addData(
|
|
|
424 |
->setStoreId($customer->getStoreId())
|
425 |
-
->toArray()
|
|
|
426 |
} elseif ($customer->getCustomerId()) {
|
427 |
-
$customer->addData(
|
|
|
428 |
->setStoreId($customer->getStoreId())
|
429 |
-
->toArray()
|
|
|
430 |
}
|
431 |
|
432 |
-
$
|
433 |
|
434 |
//GUEST
|
435 |
$guestFirstName = '';
|
436 |
if (!$customer->getId() && !$request->getPost('firstname')) {
|
437 |
-
if($customer->getSubscriberFirstname()){
|
438 |
$guestFirstName = $this->config('guest_name', $customer->getStoreId());
|
439 |
-
}elseif($this->config('guest_name', $customer->getStoreId())) {
|
440 |
$guestFirstName = $this->config('guest_name', $customer->getStoreId());
|
441 |
}
|
442 |
|
443 |
if ($guestFirstName) {
|
444 |
-
$
|
445 |
}
|
446 |
}
|
447 |
$guestLastName = '';
|
448 |
if (!$customer->getId() && !$request->getPost('lastname')) {
|
449 |
-
if($customer->getSubscriberLastname()){
|
450 |
$guestLastName = $this->config('guest_lastname', $customer->getStoreId());
|
451 |
-
}elseif($this->config('guest_lastname', $customer->getStoreId())){
|
452 |
$guestLastName = $this->config('guest_lastname', $customer->getStoreId());
|
453 |
}
|
454 |
|
455 |
if ($guestLastName) {
|
456 |
-
$
|
457 |
}
|
458 |
}
|
459 |
//GUEST
|
460 |
|
461 |
if ($includeEmail) {
|
462 |
-
$
|
463 |
}
|
464 |
|
465 |
$groups = $customer->getListGroups();
|
@@ -486,20 +490,23 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
486 |
}
|
487 |
}
|
488 |
|
489 |
-
$
|
490 |
|
491 |
//magemonkey_mergevars_after
|
492 |
$blank = new Varien_Object;
|
493 |
-
Mage::dispatchEvent(
|
494 |
-
|
|
|
|
|
495 |
if ($blank->hasData()) {
|
496 |
-
$
|
497 |
}
|
498 |
//magemonkey_mergevars_after
|
499 |
-
return $
|
500 |
}
|
501 |
|
502 |
-
public function getMergeVarsFromOrder($maps, $order, $
|
|
|
503 |
|
504 |
foreach ($maps as $map) {
|
505 |
|
@@ -514,11 +521,11 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
514 |
|
515 |
case 'billing_address':
|
516 |
case 'shipping_address':
|
517 |
-
$
|
518 |
break;
|
519 |
case 'date_of_purchase':
|
520 |
|
521 |
-
$
|
522 |
|
523 |
break;
|
524 |
|
@@ -526,22 +533,22 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
526 |
$storeId = (string)$order->getData('store_id');
|
527 |
$storeCode = Mage::getModel('core/store')->load($storeId)->getCode();
|
528 |
if ($storeCode) {
|
529 |
-
$
|
530 |
}
|
531 |
break;
|
532 |
case 'fname':
|
533 |
-
$
|
534 |
break;
|
535 |
case 'lname':
|
536 |
-
$
|
537 |
break;
|
538 |
}
|
539 |
|
540 |
}
|
541 |
}
|
542 |
-
return $
|
543 |
}
|
544 |
-
private function _setMaps($maps,$customer,$
|
545 |
{
|
546 |
foreach ($maps as $map) {
|
547 |
$request = Mage::app()->getRequest();
|
@@ -557,35 +564,35 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
557 |
case 'gender':
|
558 |
$val = (int)$customer->getData(strtolower($customAtt));
|
559 |
if ($val == 1) {
|
560 |
-
$
|
561 |
} elseif ($val == 2) {
|
562 |
-
$
|
563 |
}
|
564 |
break;
|
565 |
case 'dob':
|
566 |
$dob = (string)$customer->getData(strtolower($customAtt));
|
567 |
if ($dob) {
|
568 |
-
$
|
569 |
}
|
570 |
break;
|
571 |
case 'billing_address':
|
572 |
case 'shipping_address':
|
573 |
-
$
|
574 |
break;
|
575 |
case 'date_of_purchase':
|
576 |
|
577 |
-
$
|
578 |
->getCollection()
|
579 |
->addFieldToFilter('email', array('eq' => $customer->getEmail()))
|
580 |
->getFirstItem();
|
581 |
-
if ($
|
582 |
-
$
|
583 |
}
|
584 |
|
585 |
break;
|
586 |
case 'ee_customer_balance':
|
587 |
|
588 |
-
$
|
589 |
|
590 |
if ($this->isEnterprise() && $customer->getId()) {
|
591 |
|
@@ -600,33 +607,33 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
600 |
->setCustomerId($_customer->getId())
|
601 |
->loadByCustomer();
|
602 |
|
603 |
-
$
|
604 |
}
|
605 |
|
606 |
}
|
607 |
|
608 |
break;
|
609 |
case 'group_id':
|
610 |
-
$
|
611 |
$customerGroup = Mage::helper('customer')->getGroups()->toOptionHash();
|
612 |
-
if ($
|
613 |
-
$
|
614 |
} else {
|
615 |
-
$
|
616 |
}
|
617 |
break;
|
618 |
case 'store_code':
|
619 |
$storeId = (string)$customer->getData('store_id');
|
620 |
$storeCode = Mage::getModel('core/store')->load($storeId)->getCode();
|
621 |
if ($storeCode) {
|
622 |
-
$
|
623 |
}
|
624 |
break;
|
625 |
default:
|
626 |
if (($value = (string)$customer->getData(strtolower($customAtt)))
|
627 |
OR ($value = (string)$request->getPost(strtolower($customAtt)))
|
628 |
) {
|
629 |
-
$
|
630 |
}
|
631 |
|
632 |
break;
|
@@ -634,14 +641,14 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
634 |
|
635 |
}
|
636 |
}
|
637 |
-
return $
|
638 |
}
|
639 |
-
protected function _setAddress($customAtt,$
|
640 |
{
|
641 |
-
if($object instanceof Mage_Sales_Model_Order){
|
642 |
$addr = explode('_', $customAtt);
|
643 |
$address = $object->{'get' . ucfirst($addr[0]) . 'Address'}();
|
644 |
-
}else {
|
645 |
|
646 |
$addr = explode('_', $customAtt);
|
647 |
$address = $object->{'getPrimary' . ucfirst($addr[0]) . 'Address'}();
|
@@ -652,7 +659,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
652 |
}
|
653 |
}
|
654 |
if ($address) {
|
655 |
-
$
|
656 |
'addr1' => $address->getStreet(1),
|
657 |
'addr2' => $address->getStreet(2),
|
658 |
'city' => $address->getCity(),
|
@@ -662,23 +669,23 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
662 |
);
|
663 |
$telephone = $address->getTelephone();
|
664 |
if ($telephone) {
|
665 |
-
$
|
666 |
}
|
667 |
$company = $address->getCompany();
|
668 |
if ($company) {
|
669 |
-
$
|
670 |
}
|
671 |
$country = $address->getCountryId();
|
672 |
if ($country) {
|
673 |
$countryName = Mage::getModel('directory/country')->load($country)->getName();
|
674 |
-
$
|
675 |
}
|
676 |
$zipCode = $address->getPostcode();
|
677 |
if ($zipCode) {
|
678 |
-
$
|
679 |
}
|
680 |
}
|
681 |
-
return $
|
682 |
}
|
683 |
/**
|
684 |
* Get Mergevars
|
@@ -729,7 +736,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
729 |
$post = unserialize($monkeyPost);
|
730 |
}
|
731 |
//if post exists && is not admin backend subscription && not footer subscription
|
732 |
-
$mergeVars = array_merge($mergeVars, $this->_checkGrouping($post
|
733 |
|
734 |
return $mergeVars;
|
735 |
}
|
@@ -770,12 +777,12 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
770 |
if ($currentGroup == $_prevGroup || $_prevGroup == null) {
|
771 |
$checkboxes[] = $item[1];
|
772 |
$_prevGroup = $currentGroup;
|
773 |
-
} elseif($checkboxes && isset($item[1])) {
|
774 |
$subscribeGroups[] = array('id' => $_prevGroup, "groups" => str_replace('%C%', '\\,', implode(', ', $checkboxes)));
|
775 |
$checkboxes = array();
|
776 |
$_prevGroup = $currentGroup;
|
777 |
$checkboxes[] = $item[1];
|
778 |
-
}else{
|
779 |
$checkboxes = array();
|
780 |
$_prevGroup = null;
|
781 |
}
|
@@ -984,7 +991,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
984 |
//Subscription for One Step Checkout with force subscription
|
985 |
} elseif (Mage::getSingleton('core/session')->getIsOneStepCheckout() && Mage::helper('monkey')->config('checkout_subscribe') > 2 && !Mage::getSingleton('core/session')->getIsUpdateCustomer()) {
|
986 |
$this->subscribeToList($object, $db, null, false, $orderId);
|
987 |
-
} elseif(!Mage::getSingleton('core/session')->getMonkeyCheckout()){
|
988 |
$this->subscribeToList($object, $db, NULL, TRUE, $orderId);
|
989 |
}
|
990 |
|
@@ -1011,7 +1018,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
1011 |
}
|
1012 |
|
1013 |
$defaultList = Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_LIST, $storeId);
|
1014 |
-
if(!$listId){
|
1015 |
$listId = $defaultList;
|
1016 |
}
|
1017 |
$alreadySubscribed = Mage::getSingleton('newsletter/subscriber')->loadByEmail($email);
|
@@ -1036,7 +1043,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
1036 |
$isOnMailChimp = Mage::helper('monkey')->subscribedToList($email, $listId);
|
1037 |
//if( TRUE === $subscriber->getIsStatusChanged() ){
|
1038 |
if ($isOnMailChimp == 1) {
|
1039 |
-
if(Mage::getSingleton('core/session')->getIsOneStepCheckout() || Mage::getSingleton('core/session')->getMonkeyCheckout()) {
|
1040 |
$this->_subscribe($listId, $email, $mergeVars, 0, 1, $orderId);
|
1041 |
}
|
1042 |
return;
|
@@ -1048,7 +1055,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
1048 |
|
1049 |
$this->_subscribe($listId, $email, $mergeVars, $isConfirmNeed, $db, $orderId);
|
1050 |
$subscriberExists = Mage::getModel('newsletter/subscriber')->loadbyEmail($email);
|
1051 |
-
if(Mage::getSingleton('core/session')->getMonkeyCheckout() && !$subscriberExists->getId()){
|
1052 |
$subscriber->subscribe($email);
|
1053 |
}
|
1054 |
}
|
@@ -1101,24 +1108,24 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
1101 |
//<state> param is an html serialized field containing the default form state
|
1102 |
//before submission, we need to parse it as a request in order to save it to $odata and process it
|
1103 |
// parse_str($request->getPost('state'), $odata);
|
1104 |
-
$m = explode('&'
|
1105 |
$odata = array();
|
1106 |
$list = array();
|
1107 |
-
foreach($m as $v) {
|
1108 |
|
1109 |
-
$g = explode('='
|
1110 |
-
$u = explode('%5B'
|
1111 |
-
if($u[0] == 'list') {
|
1112 |
$suffixListId = $u[1];
|
1113 |
$listId = substr($u[1], 0, (strlen($suffixListId)-3));
|
1114 |
$list[$listId] = array();
|
1115 |
$listIdArray = $list[$listId];
|
1116 |
-
$tail = explode('%5D'
|
1117 |
$subscribed = $tail[0];
|
1118 |
$listIdArray[$subscribed] = $g[1];
|
1119 |
$list[$listId] = $listIdArray;
|
1120 |
$odata['list'] = $list;
|
1121 |
-
}else {
|
1122 |
$odata[$g[0]] = $g[1];
|
1123 |
}
|
1124 |
}
|
@@ -1158,7 +1165,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
1158 |
->addFieldToFilter('email', $email)
|
1159 |
->addFieldToFilter('processed', 0);
|
1160 |
|
1161 |
-
if(count($alreadyOnDb) > 0) {
|
1162 |
foreach ($alreadyOnDb as $listToDelete) {
|
1163 |
$toDelete = Mage::getModel('monkey/asyncsubscribers')->load($listToDelete->getId());
|
1164 |
$toDelete->delete();
|
@@ -1189,7 +1196,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
|
|
1189 |
$mergeVars = Mage::helper('monkey')->mergeVars($customer, FALSE, $listId);
|
1190 |
|
1191 |
//Handle groups update
|
1192 |
-
$api->listUpdateMember($listId, $email, $mergeVars, 'html'
|
1193 |
Mage::getSingleton('core/session')
|
1194 |
->addSuccess($this->__('Your profile has been updated!'));
|
1195 |
|
208 |
$ret = Mage::getStoreConfig("monkey/general/$value", $storeExists->getId());
|
209 |
}
|
210 |
}
|
211 |
+
if (!$ret) {
|
212 |
$ret = Mage::getStoreConfig("monkey/general/$value", $store);
|
213 |
}
|
214 |
return $ret;
|
276 |
public function canMonkey($stores = null)
|
277 |
{
|
278 |
$ret = false;
|
279 |
+
if (is_array($stores)) {
|
280 |
+
foreach ($stores as $store) {
|
281 |
+
if ((bool)((int)$this->config('active', $store) !== 0)) {
|
282 |
$ret = true;
|
283 |
}
|
284 |
}
|
285 |
+
} else {
|
286 |
$ret = (bool)((int)$this->config('active') !== 0);
|
287 |
}
|
288 |
return $ret;
|
409 |
*/
|
410 |
public function getMergeVars($customer, $includeEmail = FALSE, $websiteId = NULL)
|
411 |
{
|
412 |
+
$mergeVars = array();
|
413 |
$maps = $this->getMergeMaps($customer->getStoreId());
|
414 |
|
415 |
if (!$maps && !$customer->getListGroups()) {
|
420 |
|
421 |
//Add Customer data to Subscriber if is Newsletter_Subscriber is Customer
|
422 |
if (!$customer->getDefaultShipping() && $customer->getEntityId()) {
|
423 |
+
$customer->addData(
|
424 |
+
Mage::getModel('customer/customer')->load($customer->getEntityId())
|
425 |
->setStoreId($customer->getStoreId())
|
426 |
+
->toArray()
|
427 |
+
);
|
428 |
} elseif ($customer->getCustomerId()) {
|
429 |
+
$customer->addData(
|
430 |
+
Mage::getModel('customer/customer')->load($customer->getCustomerId())
|
431 |
->setStoreId($customer->getStoreId())
|
432 |
+
->toArray()
|
433 |
+
);
|
434 |
}
|
435 |
|
436 |
+
$mergeVars = $this->_setMaps($maps, $customer, $mergeVars, $websiteId);
|
437 |
|
438 |
//GUEST
|
439 |
$guestFirstName = '';
|
440 |
if (!$customer->getId() && !$request->getPost('firstname')) {
|
441 |
+
if ($customer->getSubscriberFirstname()) {
|
442 |
$guestFirstName = $this->config('guest_name', $customer->getStoreId());
|
443 |
+
} elseif ($this->config('guest_name', $customer->getStoreId())) {
|
444 |
$guestFirstName = $this->config('guest_name', $customer->getStoreId());
|
445 |
}
|
446 |
|
447 |
if ($guestFirstName) {
|
448 |
+
$mergeVars['FNAME'] = $guestFirstName;
|
449 |
}
|
450 |
}
|
451 |
$guestLastName = '';
|
452 |
if (!$customer->getId() && !$request->getPost('lastname')) {
|
453 |
+
if ($customer->getSubscriberLastname()) {
|
454 |
$guestLastName = $this->config('guest_lastname', $customer->getStoreId());
|
455 |
+
} elseif ($this->config('guest_lastname', $customer->getStoreId())) {
|
456 |
$guestLastName = $this->config('guest_lastname', $customer->getStoreId());
|
457 |
}
|
458 |
|
459 |
if ($guestLastName) {
|
460 |
+
$mergeVars['LNAME'] = $guestLastName;
|
461 |
}
|
462 |
}
|
463 |
//GUEST
|
464 |
|
465 |
if ($includeEmail) {
|
466 |
+
$mergeVars['EMAIL'] = $customer->getEmail();
|
467 |
}
|
468 |
|
469 |
$groups = $customer->getListGroups();
|
490 |
}
|
491 |
}
|
492 |
|
493 |
+
$mergeVars['GROUPINGS'] = $groupings;
|
494 |
|
495 |
//magemonkey_mergevars_after
|
496 |
$blank = new Varien_Object;
|
497 |
+
Mage::dispatchEvent(
|
498 |
+
'magemonkey_mergevars_after',
|
499 |
+
array('vars' => $mergeVars, 'customer' => $customer, 'newvars' => $blank)
|
500 |
+
);
|
501 |
if ($blank->hasData()) {
|
502 |
+
$mergeVars = array_merge($mergeVars, $blank->toArray());
|
503 |
}
|
504 |
//magemonkey_mergevars_after
|
505 |
+
return $mergeVars;
|
506 |
}
|
507 |
|
508 |
+
public function getMergeVarsFromOrder($maps, $order, $mergeVars)
|
509 |
+
{
|
510 |
|
511 |
foreach ($maps as $map) {
|
512 |
|
521 |
|
522 |
case 'billing_address':
|
523 |
case 'shipping_address':
|
524 |
+
$mergeVars = array_merge($mergeVars, $this->_setAddress($customAtt, $mergeVars, $order, $key));
|
525 |
break;
|
526 |
case 'date_of_purchase':
|
527 |
|
528 |
+
$mergeVars[$key] = $order->getUpdatedAt();
|
529 |
|
530 |
break;
|
531 |
|
533 |
$storeId = (string)$order->getData('store_id');
|
534 |
$storeCode = Mage::getModel('core/store')->load($storeId)->getCode();
|
535 |
if ($storeCode) {
|
536 |
+
$mergeVars[$key] = $storeCode;
|
537 |
}
|
538 |
break;
|
539 |
case 'fname':
|
540 |
+
$mergeVars[$key] = $order->getCustomerFirstname();
|
541 |
break;
|
542 |
case 'lname':
|
543 |
+
$mergeVars[$key] = $order->getCustomerLastname();
|
544 |
break;
|
545 |
}
|
546 |
|
547 |
}
|
548 |
}
|
549 |
+
return $mergeVars;
|
550 |
}
|
551 |
+
private function _setMaps($maps,$customer,$mergeVars, $websiteId)
|
552 |
{
|
553 |
foreach ($maps as $map) {
|
554 |
$request = Mage::app()->getRequest();
|
564 |
case 'gender':
|
565 |
$val = (int)$customer->getData(strtolower($customAtt));
|
566 |
if ($val == 1) {
|
567 |
+
$mergeVars[$key] = 'Male';
|
568 |
} elseif ($val == 2) {
|
569 |
+
$mergeVars[$key] = 'Female';
|
570 |
}
|
571 |
break;
|
572 |
case 'dob':
|
573 |
$dob = (string)$customer->getData(strtolower($customAtt));
|
574 |
if ($dob) {
|
575 |
+
$mergeVars[$key] = (substr($dob, 5, 2) . '/' . substr($dob, 8, 2));
|
576 |
}
|
577 |
break;
|
578 |
case 'billing_address':
|
579 |
case 'shipping_address':
|
580 |
+
$mergeVars = array_merge($mergeVars, $this->_setAddress($customAtt, $mergeVars, $customer, $key));
|
581 |
break;
|
582 |
case 'date_of_purchase':
|
583 |
|
584 |
+
$lastOrder = Mage::getModel('monkey/lastorder')
|
585 |
->getCollection()
|
586 |
->addFieldToFilter('email', array('eq' => $customer->getEmail()))
|
587 |
->getFirstItem();
|
588 |
+
if ($lastOrder->getId()) {
|
589 |
+
$mergeVars[$key] = $lastOrder->getDate();
|
590 |
}
|
591 |
|
592 |
break;
|
593 |
case 'ee_customer_balance':
|
594 |
|
595 |
+
$mergeVars[$key] = '';
|
596 |
|
597 |
if ($this->isEnterprise() && $customer->getId()) {
|
598 |
|
607 |
->setCustomerId($_customer->getId())
|
608 |
->loadByCustomer();
|
609 |
|
610 |
+
$mergeVars[$key] = $balance->getAmount();
|
611 |
}
|
612 |
|
613 |
}
|
614 |
|
615 |
break;
|
616 |
case 'group_id':
|
617 |
+
$groupId = (int)$customer->getData(strtolower($customAtt));
|
618 |
$customerGroup = Mage::helper('customer')->getGroups()->toOptionHash();
|
619 |
+
if ($groupId == 0) {
|
620 |
+
$mergeVars[$key] = 'NOT LOGGED IN';
|
621 |
} else {
|
622 |
+
$mergeVars[$key] = $customerGroup[$groupId];
|
623 |
}
|
624 |
break;
|
625 |
case 'store_code':
|
626 |
$storeId = (string)$customer->getData('store_id');
|
627 |
$storeCode = Mage::getModel('core/store')->load($storeId)->getCode();
|
628 |
if ($storeCode) {
|
629 |
+
$mergeVars[$key] = $storeCode;
|
630 |
}
|
631 |
break;
|
632 |
default:
|
633 |
if (($value = (string)$customer->getData(strtolower($customAtt)))
|
634 |
OR ($value = (string)$request->getPost(strtolower($customAtt)))
|
635 |
) {
|
636 |
+
$mergeVars[$key] = $value;
|
637 |
}
|
638 |
|
639 |
break;
|
641 |
|
642 |
}
|
643 |
}
|
644 |
+
return $mergeVars;
|
645 |
}
|
646 |
+
protected function _setAddress($customAtt,$mergeVars, $object, $key)
|
647 |
{
|
648 |
+
if ($object instanceof Mage_Sales_Model_Order) {
|
649 |
$addr = explode('_', $customAtt);
|
650 |
$address = $object->{'get' . ucfirst($addr[0]) . 'Address'}();
|
651 |
+
} else {
|
652 |
|
653 |
$addr = explode('_', $customAtt);
|
654 |
$address = $object->{'getPrimary' . ucfirst($addr[0]) . 'Address'}();
|
659 |
}
|
660 |
}
|
661 |
if ($address) {
|
662 |
+
$mergeVars[$key] = array(
|
663 |
'addr1' => $address->getStreet(1),
|
664 |
'addr2' => $address->getStreet(2),
|
665 |
'city' => $address->getCity(),
|
669 |
);
|
670 |
$telephone = $address->getTelephone();
|
671 |
if ($telephone) {
|
672 |
+
$mergeVars['TELEPHONE'] = $telephone;
|
673 |
}
|
674 |
$company = $address->getCompany();
|
675 |
if ($company) {
|
676 |
+
$mergeVars['COMPANY'] = $company;
|
677 |
}
|
678 |
$country = $address->getCountryId();
|
679 |
if ($country) {
|
680 |
$countryName = Mage::getModel('directory/country')->load($country)->getName();
|
681 |
+
$mergeVars['COUNTRY'] = $countryName;
|
682 |
}
|
683 |
$zipCode = $address->getPostcode();
|
684 |
if ($zipCode) {
|
685 |
+
$mergeVars['ZIPCODE'] = $zipCode;
|
686 |
}
|
687 |
}
|
688 |
+
return $mergeVars;
|
689 |
}
|
690 |
/**
|
691 |
* Get Mergevars
|
736 |
$post = unserialize($monkeyPost);
|
737 |
}
|
738 |
//if post exists && is not admin backend subscription && not footer subscription
|
739 |
+
$mergeVars = array_merge($mergeVars, $this->_checkGrouping($post, $currentList, $object));
|
740 |
|
741 |
return $mergeVars;
|
742 |
}
|
777 |
if ($currentGroup == $_prevGroup || $_prevGroup == null) {
|
778 |
$checkboxes[] = $item[1];
|
779 |
$_prevGroup = $currentGroup;
|
780 |
+
} elseif ($checkboxes && isset($item[1])) {
|
781 |
$subscribeGroups[] = array('id' => $_prevGroup, "groups" => str_replace('%C%', '\\,', implode(', ', $checkboxes)));
|
782 |
$checkboxes = array();
|
783 |
$_prevGroup = $currentGroup;
|
784 |
$checkboxes[] = $item[1];
|
785 |
+
} else {
|
786 |
$checkboxes = array();
|
787 |
$_prevGroup = null;
|
788 |
}
|
991 |
//Subscription for One Step Checkout with force subscription
|
992 |
} elseif (Mage::getSingleton('core/session')->getIsOneStepCheckout() && Mage::helper('monkey')->config('checkout_subscribe') > 2 && !Mage::getSingleton('core/session')->getIsUpdateCustomer()) {
|
993 |
$this->subscribeToList($object, $db, null, false, $orderId);
|
994 |
+
} elseif (!Mage::getSingleton('core/session')->getMonkeyCheckout()) {
|
995 |
$this->subscribeToList($object, $db, NULL, TRUE, $orderId);
|
996 |
}
|
997 |
|
1018 |
}
|
1019 |
|
1020 |
$defaultList = Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_LIST, $storeId);
|
1021 |
+
if (!$listId) {
|
1022 |
$listId = $defaultList;
|
1023 |
}
|
1024 |
$alreadySubscribed = Mage::getSingleton('newsletter/subscriber')->loadByEmail($email);
|
1043 |
$isOnMailChimp = Mage::helper('monkey')->subscribedToList($email, $listId);
|
1044 |
//if( TRUE === $subscriber->getIsStatusChanged() ){
|
1045 |
if ($isOnMailChimp == 1) {
|
1046 |
+
if (Mage::getSingleton('core/session')->getIsOneStepCheckout() || Mage::getSingleton('core/session')->getMonkeyCheckout()) {
|
1047 |
$this->_subscribe($listId, $email, $mergeVars, 0, 1, $orderId);
|
1048 |
}
|
1049 |
return;
|
1055 |
|
1056 |
$this->_subscribe($listId, $email, $mergeVars, $isConfirmNeed, $db, $orderId);
|
1057 |
$subscriberExists = Mage::getModel('newsletter/subscriber')->loadbyEmail($email);
|
1058 |
+
if (Mage::getSingleton('core/session')->getMonkeyCheckout() && !$subscriberExists->getId()) {
|
1059 |
$subscriber->subscribe($email);
|
1060 |
}
|
1061 |
}
|
1108 |
//<state> param is an html serialized field containing the default form state
|
1109 |
//before submission, we need to parse it as a request in order to save it to $odata and process it
|
1110 |
// parse_str($request->getPost('state'), $odata);
|
1111 |
+
$m = explode('&', $request->getPost('state'));
|
1112 |
$odata = array();
|
1113 |
$list = array();
|
1114 |
+
foreach ($m as $v) {
|
1115 |
|
1116 |
+
$g = explode('=', $v);
|
1117 |
+
$u = explode('%5B', $v);
|
1118 |
+
if ($u[0] == 'list') {
|
1119 |
$suffixListId = $u[1];
|
1120 |
$listId = substr($u[1], 0, (strlen($suffixListId)-3));
|
1121 |
$list[$listId] = array();
|
1122 |
$listIdArray = $list[$listId];
|
1123 |
+
$tail = explode('%5D', $u[2]);
|
1124 |
$subscribed = $tail[0];
|
1125 |
$listIdArray[$subscribed] = $g[1];
|
1126 |
$list[$listId] = $listIdArray;
|
1127 |
$odata['list'] = $list;
|
1128 |
+
} else {
|
1129 |
$odata[$g[0]] = $g[1];
|
1130 |
}
|
1131 |
}
|
1165 |
->addFieldToFilter('email', $email)
|
1166 |
->addFieldToFilter('processed', 0);
|
1167 |
|
1168 |
+
if (count($alreadyOnDb) > 0) {
|
1169 |
foreach ($alreadyOnDb as $listToDelete) {
|
1170 |
$toDelete = Mage::getModel('monkey/asyncsubscribers')->load($listToDelete->getId());
|
1171 |
$toDelete->delete();
|
1196 |
$mergeVars = Mage::helper('monkey')->mergeVars($customer, FALSE, $listId);
|
1197 |
|
1198 |
//Handle groups update
|
1199 |
+
$api->listUpdateMember($listId, $email, $mergeVars, 'html', false);
|
1200 |
Mage::getSingleton('core/session')
|
1201 |
->addSuccess($this->__('Your profile has been updated!'));
|
1202 |
|
app/code/community/Ebizmarts/MageMonkey/Model/Cron.php
CHANGED
@@ -298,7 +298,7 @@ class Ebizmarts_MageMonkey_Model_Cron
|
|
298 |
}
|
299 |
|
300 |
}
|
301 |
-
if($job->getProcessedCount() >= $job->getTotalCount()) {
|
302 |
$job->setStatus('finished');
|
303 |
}
|
304 |
$job->save();
|
@@ -487,7 +487,7 @@ class Ebizmarts_MageMonkey_Model_Cron
|
|
487 |
$oldList = $newList;
|
488 |
}
|
489 |
$mergeVars = unserialize($item->getMapfields());
|
490 |
-
if($item->getOrderId()){
|
491 |
$mergeVars = $this->_addOrderData($item->getOrderId(), $mergeVars);
|
492 |
}
|
493 |
if ($newList != $oldList || $eachIsConfirmNeed != $isConfirmNeed) {
|
@@ -500,9 +500,9 @@ class Ebizmarts_MageMonkey_Model_Cron
|
|
500 |
|
501 |
$mergeVars['EMAIL'] = $item->getEmail();
|
502 |
$isOnMailChimp = Mage::helper('monkey')->subscribedToList($item->getEmail(), $oldList);
|
503 |
-
if($isOnMailChimp) {
|
504 |
Mage::getSingleton('monkey/api')->listUpdateMember($oldList, $item->getEmail(), $mergeVars);
|
505 |
-
}else {
|
506 |
$batch[] = $mergeVars;
|
507 |
}
|
508 |
//$email = $item->getEmail();
|
@@ -515,7 +515,8 @@ class Ebizmarts_MageMonkey_Model_Cron
|
|
515 |
|
516 |
}
|
517 |
|
518 |
-
protected function _addOrderData($orderId, $mergeVars)
|
|
|
519 |
$order = Mage::getModel('sales/order')->load($orderId);
|
520 |
$maps = Mage::helper('monkey')->getMergeMaps($order->getStoreId());
|
521 |
$mergeVars = Mage::helper('monkey')->getMergeVarsFromOrder($maps, $order, $mergeVars);
|
@@ -617,15 +618,15 @@ class Ebizmarts_MageMonkey_Model_Cron
|
|
617 |
->save();
|
618 |
} else {
|
619 |
$subscriber = Mage::getModel('newsletter/subscriber')->setImportMode(TRUE);
|
620 |
-
if(isset($data['data']['fname'])){
|
621 |
$subscriber->setSubscriberFirstname($data['data']['fname']);
|
622 |
}
|
623 |
-
if(isset($data['data']['lname'])){
|
624 |
$subscriber->setSubscriberLastname($data['data']['lname']);
|
625 |
}
|
626 |
-
if(isset($data['data']['merges']['STOREID'])){
|
627 |
$subscriberStoreId=$data['data']['merges']['STOREID'];
|
628 |
-
}else {
|
629 |
$subscriberStoreId = Mage::helper('monkey')->getStoreByList($data['data']['id']);
|
630 |
}
|
631 |
Mage::app()->setCurrentStore($subscriberStoreId);
|
@@ -635,12 +636,12 @@ class Ebizmarts_MageMonkey_Model_Cron
|
|
635 |
}
|
636 |
$customerExist = Mage::getSingleton('customer/customer')
|
637 |
->getCollection()
|
638 |
-
->addAttributeToFilter('email', array('eq' => $data['data']['email'])
|
639 |
->getFirstItem();
|
640 |
-
if($customerExist){
|
641 |
$storeId = $customerExist->getStoreId();
|
642 |
}
|
643 |
-
if($customerExist && Mage::getStoreConfig('sweetmonkey/general/active', $storeId)){
|
644 |
Mage::helper('sweetmonkey')->pushVars($customerExist);
|
645 |
}
|
646 |
} catch (Exception $e) {
|
@@ -665,9 +666,9 @@ class Ebizmarts_MageMonkey_Model_Cron
|
|
665 |
$subscriber = Mage::getModel('newsletter/subscriber')
|
666 |
->loadByEmail($data['data']['email']);
|
667 |
}
|
668 |
-
if($subscriber->getId()){
|
669 |
try {
|
670 |
-
if(!Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_CONFIRMATION_EMAIL, $subscriber->getStoreId())){
|
671 |
$subscriber->setImportMode(true);
|
672 |
}
|
673 |
|
@@ -755,18 +756,18 @@ class Ebizmarts_MageMonkey_Model_Cron
|
|
755 |
->addFieldToFilter('email', array('eq' => $email));
|
756 |
if (count($customerCollection) > 0) {
|
757 |
$toUpdate = $customerCollection->getFirstItem();
|
758 |
-
if(isset($data['data']['merges']['FNAME'])) {
|
759 |
$toUpdate->setFirstname($data['data']['merges']['FNAME']);
|
760 |
}
|
761 |
-
if(isset($data['data']['merges']['LNAME'])) {
|
762 |
$toUpdate->setLastname($data['data']['merges']['LNAME']);
|
763 |
}
|
764 |
-
}else {
|
765 |
$toUpdate = $subscriber;
|
766 |
-
if(isset($data['data']['merges']['FNAME'])) {
|
767 |
$toUpdate->setSubscriberFirstname($data['data']['merges']['FNAME']);
|
768 |
}
|
769 |
-
if(isset($data['data']['merges']['LNAME'])) {
|
770 |
$toUpdate->setSubscriberLastname($data['data']['merges']['LNAME']);
|
771 |
}
|
772 |
}
|
298 |
}
|
299 |
|
300 |
}
|
301 |
+
if ($job->getProcessedCount() >= $job->getTotalCount()) {
|
302 |
$job->setStatus('finished');
|
303 |
}
|
304 |
$job->save();
|
487 |
$oldList = $newList;
|
488 |
}
|
489 |
$mergeVars = unserialize($item->getMapfields());
|
490 |
+
if ($item->getOrderId()) {
|
491 |
$mergeVars = $this->_addOrderData($item->getOrderId(), $mergeVars);
|
492 |
}
|
493 |
if ($newList != $oldList || $eachIsConfirmNeed != $isConfirmNeed) {
|
500 |
|
501 |
$mergeVars['EMAIL'] = $item->getEmail();
|
502 |
$isOnMailChimp = Mage::helper('monkey')->subscribedToList($item->getEmail(), $oldList);
|
503 |
+
if ($isOnMailChimp) {
|
504 |
Mage::getSingleton('monkey/api')->listUpdateMember($oldList, $item->getEmail(), $mergeVars);
|
505 |
+
} else {
|
506 |
$batch[] = $mergeVars;
|
507 |
}
|
508 |
//$email = $item->getEmail();
|
515 |
|
516 |
}
|
517 |
|
518 |
+
protected function _addOrderData($orderId, $mergeVars)
|
519 |
+
{
|
520 |
$order = Mage::getModel('sales/order')->load($orderId);
|
521 |
$maps = Mage::helper('monkey')->getMergeMaps($order->getStoreId());
|
522 |
$mergeVars = Mage::helper('monkey')->getMergeVarsFromOrder($maps, $order, $mergeVars);
|
618 |
->save();
|
619 |
} else {
|
620 |
$subscriber = Mage::getModel('newsletter/subscriber')->setImportMode(TRUE);
|
621 |
+
if (isset($data['data']['fname'])) {
|
622 |
$subscriber->setSubscriberFirstname($data['data']['fname']);
|
623 |
}
|
624 |
+
if (isset($data['data']['lname'])) {
|
625 |
$subscriber->setSubscriberLastname($data['data']['lname']);
|
626 |
}
|
627 |
+
if (isset($data['data']['merges']['STOREID'])) {
|
628 |
$subscriberStoreId=$data['data']['merges']['STOREID'];
|
629 |
+
} else {
|
630 |
$subscriberStoreId = Mage::helper('monkey')->getStoreByList($data['data']['id']);
|
631 |
}
|
632 |
Mage::app()->setCurrentStore($subscriberStoreId);
|
636 |
}
|
637 |
$customerExist = Mage::getSingleton('customer/customer')
|
638 |
->getCollection()
|
639 |
+
->addAttributeToFilter('email', array('eq' => $data['data']['email']))
|
640 |
->getFirstItem();
|
641 |
+
if ($customerExist) {
|
642 |
$storeId = $customerExist->getStoreId();
|
643 |
}
|
644 |
+
if ($customerExist && Mage::getStoreConfig('sweetmonkey/general/active', $storeId)) {
|
645 |
Mage::helper('sweetmonkey')->pushVars($customerExist);
|
646 |
}
|
647 |
} catch (Exception $e) {
|
666 |
$subscriber = Mage::getModel('newsletter/subscriber')
|
667 |
->loadByEmail($data['data']['email']);
|
668 |
}
|
669 |
+
if ($subscriber->getId()) {
|
670 |
try {
|
671 |
+
if (!Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_CONFIRMATION_EMAIL, $subscriber->getStoreId())) {
|
672 |
$subscriber->setImportMode(true);
|
673 |
}
|
674 |
|
756 |
->addFieldToFilter('email', array('eq' => $email));
|
757 |
if (count($customerCollection) > 0) {
|
758 |
$toUpdate = $customerCollection->getFirstItem();
|
759 |
+
if (isset($data['data']['merges']['FNAME'])) {
|
760 |
$toUpdate->setFirstname($data['data']['merges']['FNAME']);
|
761 |
}
|
762 |
+
if (isset($data['data']['merges']['LNAME'])) {
|
763 |
$toUpdate->setLastname($data['data']['merges']['LNAME']);
|
764 |
}
|
765 |
+
} else {
|
766 |
$toUpdate = $subscriber;
|
767 |
+
if (isset($data['data']['merges']['FNAME'])) {
|
768 |
$toUpdate->setSubscriberFirstname($data['data']['merges']['FNAME']);
|
769 |
}
|
770 |
+
if (isset($data['data']['merges']['LNAME'])) {
|
771 |
$toUpdate->setSubscriberLastname($data['data']['merges']['LNAME']);
|
772 |
}
|
773 |
}
|
app/code/community/Ebizmarts/MageMonkey/Model/Ecommerce360.php
CHANGED
@@ -95,9 +95,9 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
|
|
95 |
$order = $observer->getEvent()->getOrder();
|
96 |
if (is_object($order) && $order->getId()) {
|
97 |
//Set Campaign Id if exist
|
98 |
-
$
|
99 |
-
if ($
|
100 |
-
$order->setEbizmartsMagemonkeyCampaignId($
|
101 |
}
|
102 |
$this->_deleteCampaignCookie();
|
103 |
$customerEmail = $order->getCustomerEmail();
|
@@ -271,10 +271,10 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
|
|
271 |
}
|
272 |
|
273 |
$names = array();
|
274 |
-
$
|
275 |
|
276 |
-
if (is_array($
|
277 |
-
foreach($
|
278 |
$category = Mage::getModel('catalog/category')->load($id);
|
279 |
$names[] = $category->getName();
|
280 |
$mcitem['category_id'] = $id;
|
@@ -285,7 +285,7 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
|
|
285 |
// }
|
286 |
}
|
287 |
$mcitem['category_name'] = (count($names)) ? implode(" - ", $names) : 'None';
|
288 |
-
if(!isset($mcitem['category_id'])) {
|
289 |
$mcitem['category_id'] = 0;
|
290 |
}
|
291 |
$mcitem['qty'] = $item->getQtyOrdered();
|
@@ -315,18 +315,16 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
|
|
315 |
protected function _getCampaignCookie()
|
316 |
{
|
317 |
$cookie = Mage::getModel('core/cookie')->get('magemonkey_campaign_id');
|
318 |
-
if($cookie && Mage::getModel('core/cookie')->getLifetime('magemonkey_campaign_id') == 3600) {
|
319 |
return $cookie;
|
320 |
-
}
|
321 |
-
else {
|
322 |
return null;
|
323 |
}
|
324 |
}
|
325 |
|
326 |
protected function _deleteCampaignCookie()
|
327 |
{
|
328 |
-
if($this->_getCampaignCookie())
|
329 |
-
{
|
330 |
Mage::getModel('core/cookie')->delete('magemonkey_campaign_id');
|
331 |
}
|
332 |
}
|
@@ -354,7 +352,6 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
|
|
354 |
*/
|
355 |
public function autoExportJobs($storeId)
|
356 |
{
|
357 |
-
$allow_sent = false;
|
358 |
//Get status options selected in the Configuration
|
359 |
$states = explode(',', Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::ECOMMERCE360_ORDER_STATUS, $storeId));
|
360 |
$max = Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::ECOMMERCE360_ORDER_MAX, $storeId);
|
@@ -368,16 +365,20 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
|
|
368 |
$orders = Mage::getResourceModel('sales/order_collection')->addFieldToFilter('main_table.store_id', array('eq' => $storeId));
|
369 |
// $orders->getSelect()->joinLeft(array('ecommerce' => Mage::getSingleton('core/resource')->getTableName('monkey/ecommerce')), 'main_table.entity_id = ecommerce.order_id', 'main_table.*')->where('ecommerce.order_id is null AND main_table.status = \'' . $state . '\'')
|
370 |
// ->limit($max - $count);
|
371 |
-
$orders->getSelect()->where(
|
|
|
372 |
'AND main_table.entity_id NOT IN ' .
|
373 |
-
"(SELECT ecommerce.order_id FROM {$ecommerceTable} AS ecommerce WHERE ecommerce.store_id = {$storeId})"
|
|
|
374 |
->limit($max - $count);
|
375 |
} else {
|
376 |
$orders = Mage::getResourceModel('sales/order_collection')->addFieldToFilter('main_table.store_id', array('eq' => $storeId));
|
377 |
// $orders->getSelect()->joinLeft(array('ecommerce' => Mage::getSingleton('core/resource')->getTableName('monkey/ecommerce')), 'main_table.entity_id = ecommerce.order_id', 'main_table.*')->where('ecommerce.order_id is null')
|
378 |
// ->limit($max - $count);
|
379 |
-
$orders->getSelect()->where(
|
380 |
-
|
|
|
|
|
381 |
->limit($max - $count);
|
382 |
}
|
383 |
$count += count($orders);
|
95 |
$order = $observer->getEvent()->getOrder();
|
96 |
if (is_object($order) && $order->getId()) {
|
97 |
//Set Campaign Id if exist
|
98 |
+
$campaignId = $this->_getCampaignCookie();
|
99 |
+
if ($campaignId && $order->getEbizmartsMagemonkeyCampaignId() == null) {
|
100 |
+
$order->setEbizmartsMagemonkeyCampaignId($campaignId)->save();
|
101 |
}
|
102 |
$this->_deleteCampaignCookie();
|
103 |
$customerEmail = $order->getCustomerEmail();
|
271 |
}
|
272 |
|
273 |
$names = array();
|
274 |
+
$catIds = $product->getCategoryIds();
|
275 |
|
276 |
+
if (is_array($catIds) && count($catIds) > 0) {
|
277 |
+
foreach ($catIds as $id) {
|
278 |
$category = Mage::getModel('catalog/category')->load($id);
|
279 |
$names[] = $category->getName();
|
280 |
$mcitem['category_id'] = $id;
|
285 |
// }
|
286 |
}
|
287 |
$mcitem['category_name'] = (count($names)) ? implode(" - ", $names) : 'None';
|
288 |
+
if (!isset($mcitem['category_id'])) {
|
289 |
$mcitem['category_id'] = 0;
|
290 |
}
|
291 |
$mcitem['qty'] = $item->getQtyOrdered();
|
315 |
protected function _getCampaignCookie()
|
316 |
{
|
317 |
$cookie = Mage::getModel('core/cookie')->get('magemonkey_campaign_id');
|
318 |
+
if ($cookie && Mage::getModel('core/cookie')->getLifetime('magemonkey_campaign_id') == 3600) {
|
319 |
return $cookie;
|
320 |
+
} else {
|
|
|
321 |
return null;
|
322 |
}
|
323 |
}
|
324 |
|
325 |
protected function _deleteCampaignCookie()
|
326 |
{
|
327 |
+
if ($this->_getCampaignCookie()) {
|
|
|
328 |
Mage::getModel('core/cookie')->delete('magemonkey_campaign_id');
|
329 |
}
|
330 |
}
|
352 |
*/
|
353 |
public function autoExportJobs($storeId)
|
354 |
{
|
|
|
355 |
//Get status options selected in the Configuration
|
356 |
$states = explode(',', Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::ECOMMERCE360_ORDER_STATUS, $storeId));
|
357 |
$max = Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::ECOMMERCE360_ORDER_MAX, $storeId);
|
365 |
$orders = Mage::getResourceModel('sales/order_collection')->addFieldToFilter('main_table.store_id', array('eq' => $storeId));
|
366 |
// $orders->getSelect()->joinLeft(array('ecommerce' => Mage::getSingleton('core/resource')->getTableName('monkey/ecommerce')), 'main_table.entity_id = ecommerce.order_id', 'main_table.*')->where('ecommerce.order_id is null AND main_table.status = \'' . $state . '\'')
|
367 |
// ->limit($max - $count);
|
368 |
+
$orders->getSelect()->where(
|
369 |
+
'main_table.status = \'' . $state . '\' ' .
|
370 |
'AND main_table.entity_id NOT IN ' .
|
371 |
+
"(SELECT ecommerce.order_id FROM {$ecommerceTable} AS ecommerce WHERE ecommerce.store_id = {$storeId})"
|
372 |
+
)
|
373 |
->limit($max - $count);
|
374 |
} else {
|
375 |
$orders = Mage::getResourceModel('sales/order_collection')->addFieldToFilter('main_table.store_id', array('eq' => $storeId));
|
376 |
// $orders->getSelect()->joinLeft(array('ecommerce' => Mage::getSingleton('core/resource')->getTableName('monkey/ecommerce')), 'main_table.entity_id = ecommerce.order_id', 'main_table.*')->where('ecommerce.order_id is null')
|
377 |
// ->limit($max - $count);
|
378 |
+
$orders->getSelect()->where(
|
379 |
+
'main_table.entity_id NOT IN ' .
|
380 |
+
"(SELECT ecommerce.order_id FROM {$ecommerceTable} AS ecommerce WHERE ecommerce.store_id = {$storeId})"
|
381 |
+
)
|
382 |
->limit($max - $count);
|
383 |
}
|
384 |
$count += count($orders);
|
app/code/community/Ebizmarts/MageMonkey/Model/Feed/Updates.php
CHANGED
@@ -22,9 +22,11 @@ class Ebizmarts_MageMonkey_Model_Feed_Updates
|
|
22 |
public function getFeedData($uri)
|
23 |
{
|
24 |
$curl = new Varien_Http_Adapter_Curl;
|
25 |
-
$curl->setConfig(
|
|
|
26 |
'timeout' => 30
|
27 |
-
|
|
|
28 |
$curl->write(Zend_Http_Client::GET, $uri, '1.0');
|
29 |
$data = $curl->read();
|
30 |
if ($data === false) {
|
@@ -111,7 +113,7 @@ class Ebizmarts_MageMonkey_Model_Feed_Updates
|
|
111 |
|
112 |
foreach ($node->xpath('items/item') as $item) {
|
113 |
|
114 |
-
if(isset($item->date_end) && (time() - strtotime($item->date_end)) > 0) {
|
115 |
$feedData[] = array(
|
116 |
'severity' => (string)$item->severity,
|
117 |
'date_added' => (string)$item->created_at,
|
22 |
public function getFeedData($uri)
|
23 |
{
|
24 |
$curl = new Varien_Http_Adapter_Curl;
|
25 |
+
$curl->setConfig(
|
26 |
+
array(
|
27 |
'timeout' => 30
|
28 |
+
)
|
29 |
+
);
|
30 |
$curl->write(Zend_Http_Client::GET, $uri, '1.0');
|
31 |
$data = $curl->read();
|
32 |
if ($data === false) {
|
113 |
|
114 |
foreach ($node->xpath('items/item') as $item) {
|
115 |
|
116 |
+
if (isset($item->date_end) && (time() - strtotime($item->date_end)) > 0) {
|
117 |
$feedData[] = array(
|
118 |
'severity' => (string)$item->severity,
|
119 |
'date_added' => (string)$item->created_at,
|
app/code/community/Ebizmarts/MageMonkey/Model/MCAPI.php
CHANGED
@@ -1612,7 +1612,7 @@ class Ebizmarts_MageMonkey_Model_MCAPI
|
|
1612 |
*
|
1613 |
* @param string $id the list id to connect to. Get by calling lists()
|
1614 |
* @param string $email_address the email address to subscribe
|
1615 |
-
* @param array $
|
1616 |
* string EMAIL set this to change the email address. This is only respected on calls using update_existing or when passed to listUpdateMember()
|
1617 |
* array GROUPINGS Set Interest Groups by Grouping. Each element in this array should be an array containing the "groups" parameter which contains a comma delimited list of Interest Groups to add. Commas in Interest Group names should be escaped with a backslash. ie, "," => "\," and either an "id" or "name" parameter to specify the Grouping - get from listInterestGroupings()
|
1618 |
* string OPTINIP Set the Opt-in IP fields. <em>Abusing this may cause your account to be suspended.</em> We do validate this and it must not be a private IP address.
|
@@ -1637,12 +1637,12 @@ class Ebizmarts_MageMonkey_Model_MCAPI
|
|
1637 |
* @param bool $send_welcome optional if your double_optin is false and this is true, we will send your lists Welcome Email if this subscribe succeeds - this will *not* fire if we end up updating an existing subscriber. If double_optin is true, this has no effect. defaults to false.
|
1638 |
* @return boolean true on success, false on failure. When using MCAPI.class.php, the value can be tested and error messages pulled from the MCAPI object (see below)
|
1639 |
*/
|
1640 |
-
function listSubscribe($id, $email_address, $
|
1641 |
{
|
1642 |
$params = array();
|
1643 |
$params["id"] = $id;
|
1644 |
$params["email_address"] = $email_address;
|
1645 |
-
$params["merge_vars"] = $
|
1646 |
$params["email_type"] = $email_type;
|
1647 |
$params["double_optin"] = $double_optin;
|
1648 |
$params["update_existing"] = $update_existing;
|
@@ -1685,17 +1685,17 @@ class Ebizmarts_MageMonkey_Model_MCAPI
|
|
1685 |
*
|
1686 |
* @param string $id the list id to connect to. Get by calling lists()
|
1687 |
* @param string $email_address the current email address of the member to update OR the "id" for the member returned from listMemberInfo, Webhooks, and Campaigns
|
1688 |
-
* @param array $
|
1689 |
* @param string $email_type change the email type preference for the member ("html", "text", or "mobile"). Leave blank to keep the existing preference (optional)
|
1690 |
* @param boolean $replace_interests flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true)
|
1691 |
* @return boolean true on success, false on failure. When using MCAPI.class.php, the value can be tested and error messages pulled from the MCAPI object
|
1692 |
*/
|
1693 |
-
function listUpdateMember($id, $email_address, $
|
1694 |
{
|
1695 |
$params = array();
|
1696 |
$params["id"] = $id;
|
1697 |
$params["email_address"] = $email_address;
|
1698 |
-
$params["merge_vars"] = $
|
1699 |
$params["email_type"] = $email_type;
|
1700 |
$params["replace_interests"] = $replace_interests;
|
1701 |
return $this->callServer("listUpdateMember", $params);
|
1612 |
*
|
1613 |
* @param string $id the list id to connect to. Get by calling lists()
|
1614 |
* @param string $email_address the email address to subscribe
|
1615 |
+
* @param array $mergeVars optional merges for the email (FNAME, LNAME, etc.) (see examples below for handling "blank" arrays). Note that a merge field can only hold up to 255 bytes. Also, there are a few "special" keys:
|
1616 |
* string EMAIL set this to change the email address. This is only respected on calls using update_existing or when passed to listUpdateMember()
|
1617 |
* array GROUPINGS Set Interest Groups by Grouping. Each element in this array should be an array containing the "groups" parameter which contains a comma delimited list of Interest Groups to add. Commas in Interest Group names should be escaped with a backslash. ie, "," => "\," and either an "id" or "name" parameter to specify the Grouping - get from listInterestGroupings()
|
1618 |
* string OPTINIP Set the Opt-in IP fields. <em>Abusing this may cause your account to be suspended.</em> We do validate this and it must not be a private IP address.
|
1637 |
* @param bool $send_welcome optional if your double_optin is false and this is true, we will send your lists Welcome Email if this subscribe succeeds - this will *not* fire if we end up updating an existing subscriber. If double_optin is true, this has no effect. defaults to false.
|
1638 |
* @return boolean true on success, false on failure. When using MCAPI.class.php, the value can be tested and error messages pulled from the MCAPI object (see below)
|
1639 |
*/
|
1640 |
+
function listSubscribe($id, $email_address, $mergeVars = NULL, $email_type = 'html', $double_optin = true, $update_existing = false, $replace_interests = true, $send_welcome = false)
|
1641 |
{
|
1642 |
$params = array();
|
1643 |
$params["id"] = $id;
|
1644 |
$params["email_address"] = $email_address;
|
1645 |
+
$params["merge_vars"] = $mergeVars;
|
1646 |
$params["email_type"] = $email_type;
|
1647 |
$params["double_optin"] = $double_optin;
|
1648 |
$params["update_existing"] = $update_existing;
|
1685 |
*
|
1686 |
* @param string $id the list id to connect to. Get by calling lists()
|
1687 |
* @param string $email_address the current email address of the member to update OR the "id" for the member returned from listMemberInfo, Webhooks, and Campaigns
|
1688 |
+
* @param array $mergeVars array of new field values to update the member with. See mergeVars in listSubscribe() for details.
|
1689 |
* @param string $email_type change the email type preference for the member ("html", "text", or "mobile"). Leave blank to keep the existing preference (optional)
|
1690 |
* @param boolean $replace_interests flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true)
|
1691 |
* @return boolean true on success, false on failure. When using MCAPI.class.php, the value can be tested and error messages pulled from the MCAPI object
|
1692 |
*/
|
1693 |
+
function listUpdateMember($id, $email_address, $mergeVars, $email_type = '', $replace_interests = true)
|
1694 |
{
|
1695 |
$params = array();
|
1696 |
$params["id"] = $id;
|
1697 |
$params["email_address"] = $email_address;
|
1698 |
+
$params["merge_vars"] = $mergeVars;
|
1699 |
$params["email_type"] = $email_type;
|
1700 |
$params["replace_interests"] = $replace_interests;
|
1701 |
return $this->callServer("listUpdateMember", $params);
|
app/code/community/Ebizmarts/MageMonkey/Model/Observer.php
CHANGED
@@ -28,7 +28,7 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
28 |
|
29 |
$subscriber = $observer->getEvent()->getSubscriber();
|
30 |
$defaultList = Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_LIST, $subscriber->getStoreId());
|
31 |
-
if($subscriber->getOrigData('subscriber_status') != 3 && $subscriber->getData('subscriber_status') == 3){
|
32 |
Mage::getSingleton('monkey/api', array('store' => $subscriber->getStoreId()))->listUnsubscribe($defaultList, $subscriber->getSubscriberEmail());
|
33 |
}
|
34 |
|
@@ -36,21 +36,21 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
36 |
return $observer;
|
37 |
}
|
38 |
|
39 |
-
if((Mage::getSingleton('core/session')->getIsOneStepCheckout() || Mage::getSingleton('core/session')->getMonkeyCheckout()) && !Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_CHECKOUT_SUBSCRIBE, $subscriber->getStoreId()))
|
40 |
-
{
|
41 |
return $observer;
|
42 |
}
|
43 |
-
if(Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $subscriber->getStoreId()) && Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_CONFIRMATION_EMAIL, $subscriber->getStoreId()) && !Mage::getSingleton('customer/session')->isLoggedIn() && Mage::app()->getRequest()->getActionName() != 'createpost'){
|
44 |
return $observer;
|
45 |
}
|
46 |
|
47 |
if (Mage::getSingleton('core/session')->getIsOneStepCheckout() && !Mage::getSingleton('core/session')->getMonkeyCheckout()) {
|
48 |
return $observer;
|
49 |
}
|
50 |
-
if (TRUE === $subscriber->getIsStatusChanged()) {
|
51 |
Mage::getSingleton('core/session')->setIsHandleSubscriber(TRUE);
|
52 |
if (Mage::getSingleton('core/session')->getIsOneStepCheckout() || Mage::getSingleton('core/session')->getMonkeyCheckout()) {
|
53 |
$saveOnDb = Mage::helper('monkey')->config('checkout_async');
|
|
|
54 |
Mage::helper('monkey')->subscribeToList($subscriber, $saveOnDb);
|
55 |
} else {
|
56 |
$post = Mage::app()->getRequest()->getPost();
|
@@ -58,7 +58,8 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
58 |
Mage::helper('monkey')->subscribeToList($subscriber, 0);
|
59 |
}
|
60 |
}
|
61 |
-
Mage::getSingleton('core/session')->
|
|
|
62 |
}
|
63 |
return $observer;
|
64 |
}
|
@@ -196,7 +197,7 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
196 |
$allowWebhooks = Mage::getStoreConfig('monkey/general/enable_webhooks', $store);
|
197 |
|
198 |
//Generating Webhooks URL
|
199 |
-
if($allowWebhooks) {
|
200 |
$hookUrl = '';
|
201 |
try {
|
202 |
$hookUrl = Mage::getModel('core/url')->setStore($store)->getUrl(Ebizmarts_MageMonkey_Model_Monkey::WEBHOOKS_PATH, array('wkey' => $webhooksKey));
|
@@ -219,7 +220,7 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
219 |
|
220 |
$lists = $api->lists();
|
221 |
|
222 |
-
$this->_saveCustomerGroups($lists
|
223 |
}
|
224 |
|
225 |
return $observer;
|
@@ -303,7 +304,7 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
303 |
// ) {
|
304 |
// $isConfirmNeed = TRUE;
|
305 |
// }
|
306 |
-
if(!$isCheckout) {
|
307 |
$oldEmail = $customer->getOrigData('email');
|
308 |
$email = $customer->getEmail();
|
309 |
$defaultList = Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_LIST, $customer->getStoreId());
|
@@ -355,7 +356,8 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
355 |
return $observer;
|
356 |
}
|
357 |
|
358 |
-
public function registerCheckoutSubscribeWithSagePay(Varien_Event_Observer $observer)
|
|
|
359 |
if (!Mage::helper('monkey')->canMonkey()) {
|
360 |
return $observer;
|
361 |
}
|
@@ -384,10 +386,10 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
384 |
if (!Mage::helper('monkey')->canMonkey()) {
|
385 |
return $observer;
|
386 |
}
|
387 |
-
if (Mage::getSingleton('core/session')->getMonkeyPost()){
|
388 |
$order = $observer->getEvent()->getOrder();
|
389 |
$this->_handleCheckoutSubscription($order, true);
|
390 |
-
}else {
|
391 |
$oneStep = Mage::app()->getRequest()->getModuleName() == 'onestepcheckout';
|
392 |
if (Mage::app()->getRequest()->isPost()) {
|
393 |
$subscribe = Mage::app()->getRequest()->getPost('magemonkey_subscribe');
|
@@ -400,7 +402,7 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
400 |
if ($oneStep) {
|
401 |
Mage::getSingleton('core/session')->setIsOneStepCheckout(true);
|
402 |
}
|
403 |
-
if (Mage::getSingleton('core/session')->getMonkeyPost()){
|
404 |
$order = $observer->getEvent()->getOrder();
|
405 |
$this->_handleCheckoutSubscription($order, true);
|
406 |
}
|
@@ -451,22 +453,25 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
451 |
|
452 |
if ($block->getRequest()->getControllerName() == 'sales_order') {
|
453 |
|
454 |
-
$block->addItem(
|
|
|
455 |
'label' => Mage::helper('monkey')->__('Send to MailChimp'),
|
456 |
'url' => Mage::getModel('adminhtml/url')->getUrl('adminhtml/ecommerce/masssend', Mage::app()->getStore()->isCurrentlySecure() ? array('_secure' => true) : array()),
|
457 |
-
|
|
|
458 |
|
459 |
}
|
460 |
}
|
461 |
return $observer;
|
462 |
}
|
463 |
|
464 |
-
protected function _handleCheckoutSubscription($order, $isSaveOrderBefore = false)
|
|
|
465 |
if (is_object($order) && ($order->getId() || $isSaveOrderBefore)) {
|
466 |
//Set Campaign Id if exist
|
467 |
-
$
|
468 |
-
if ($
|
469 |
-
$order->setEbizmartsMagemonkeyCampaignId($
|
470 |
}
|
471 |
|
472 |
$sessionFlag = Mage::getSingleton('core/session')->getMonkeyCheckout() || Mage::getSingleton('core/session')->getIsOneStepCheckout();
|
@@ -490,7 +495,7 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
490 |
}
|
491 |
$orderId = $order->getId();
|
492 |
|
493 |
-
if(Mage::getSingleton('core/session')->getMonkeyCheckout() || Mage::getSingleton('core/session')->getIsOneStepCheckout()) {
|
494 |
Mage::helper('monkey')->listsSubscription($toSubscribe, $saveOnDb, $orderId);
|
495 |
}
|
496 |
|
@@ -501,26 +506,30 @@ class Ebizmarts_MageMonkey_Model_Observer
|
|
501 |
Mage::getSingleton('core/session')->setRegisterCheckoutSuccess(FALSE);
|
502 |
}
|
503 |
|
504 |
-
public function alterNewsletterGrid(Varien_Event_Observer $observer)
|
|
|
505 |
|
506 |
$block = $observer->getEvent()->getBlock();
|
507 |
if (!isset($block)) {
|
508 |
return $this;
|
509 |
}
|
510 |
-
if($block instanceof Mage_Adminhtml_Block_Newsletter_Subscriber_Grid) {
|
511 |
|
512 |
-
$block->addColumnAfter(
|
|
|
513 |
'header' => Mage::helper('newsletter')->__('Customer First Name'),
|
514 |
'index' => 'customer_firstname',
|
515 |
'renderer' => 'monkey/adminhtml_newsletter_subscriber_renderer_firstname',
|
516 |
-
|
517 |
);
|
518 |
|
519 |
-
$block->addColumnAfter(
|
|
|
520 |
'header' => Mage::helper('newsletter')->__('Customer Last Name'),
|
521 |
'index' => 'customer_lastname',
|
522 |
'renderer' => 'monkey/adminhtml_newsletter_subscriber_renderer_lastname'
|
523 |
-
|
|
|
524 |
}
|
525 |
return $observer;
|
526 |
}
|
28 |
|
29 |
$subscriber = $observer->getEvent()->getSubscriber();
|
30 |
$defaultList = Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_LIST, $subscriber->getStoreId());
|
31 |
+
if ($subscriber->getOrigData('subscriber_status') != 3 && $subscriber->getData('subscriber_status') == 3) {
|
32 |
Mage::getSingleton('monkey/api', array('store' => $subscriber->getStoreId()))->listUnsubscribe($defaultList, $subscriber->getSubscriberEmail());
|
33 |
}
|
34 |
|
36 |
return $observer;
|
37 |
}
|
38 |
|
39 |
+
if ((Mage::getSingleton('core/session')->getIsOneStepCheckout() || Mage::getSingleton('core/session')->getMonkeyCheckout()) && !Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_CHECKOUT_SUBSCRIBE, $subscriber->getStoreId())) {
|
|
|
40 |
return $observer;
|
41 |
}
|
42 |
+
if (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $subscriber->getStoreId()) && Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_CONFIRMATION_EMAIL, $subscriber->getStoreId()) && !Mage::getSingleton('customer/session')->isLoggedIn() && Mage::app()->getRequest()->getActionName() != 'createpost') {
|
43 |
return $observer;
|
44 |
}
|
45 |
|
46 |
if (Mage::getSingleton('core/session')->getIsOneStepCheckout() && !Mage::getSingleton('core/session')->getMonkeyCheckout()) {
|
47 |
return $observer;
|
48 |
}
|
49 |
+
if (TRUE === $subscriber->getIsStatusChanged() && !Mage::getSingleton('core/session')->getAlreadySubscribed()) {
|
50 |
Mage::getSingleton('core/session')->setIsHandleSubscriber(TRUE);
|
51 |
if (Mage::getSingleton('core/session')->getIsOneStepCheckout() || Mage::getSingleton('core/session')->getMonkeyCheckout()) {
|
52 |
$saveOnDb = Mage::helper('monkey')->config('checkout_async');
|
53 |
+
Mage::getSingleton('core/session')->setAlreadySubscribed(true);
|
54 |
Mage::helper('monkey')->subscribeToList($subscriber, $saveOnDb);
|
55 |
} else {
|
56 |
$post = Mage::app()->getRequest()->getPost();
|
58 |
Mage::helper('monkey')->subscribeToList($subscriber, 0);
|
59 |
}
|
60 |
}
|
61 |
+
Mage::getSingleton('core/session')->setAlreadySubscribed(false);
|
62 |
+
Mage::getSingleton('core/session')->setIsHandleSubscriber(false);
|
63 |
}
|
64 |
return $observer;
|
65 |
}
|
197 |
$allowWebhooks = Mage::getStoreConfig('monkey/general/enable_webhooks', $store);
|
198 |
|
199 |
//Generating Webhooks URL
|
200 |
+
if ($allowWebhooks) {
|
201 |
$hookUrl = '';
|
202 |
try {
|
203 |
$hookUrl = Mage::getModel('core/url')->setStore($store)->getUrl(Ebizmarts_MageMonkey_Model_Monkey::WEBHOOKS_PATH, array('wkey' => $webhooksKey));
|
220 |
|
221 |
$lists = $api->lists();
|
222 |
|
223 |
+
$this->_saveCustomerGroups($lists, $api, $selectedLists, $hookUrl);
|
224 |
}
|
225 |
|
226 |
return $observer;
|
304 |
// ) {
|
305 |
// $isConfirmNeed = TRUE;
|
306 |
// }
|
307 |
+
if (!$isCheckout) {
|
308 |
$oldEmail = $customer->getOrigData('email');
|
309 |
$email = $customer->getEmail();
|
310 |
$defaultList = Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_LIST, $customer->getStoreId());
|
356 |
return $observer;
|
357 |
}
|
358 |
|
359 |
+
public function registerCheckoutSubscribeWithSagePay(Varien_Event_Observer $observer)
|
360 |
+
{
|
361 |
if (!Mage::helper('monkey')->canMonkey()) {
|
362 |
return $observer;
|
363 |
}
|
386 |
if (!Mage::helper('monkey')->canMonkey()) {
|
387 |
return $observer;
|
388 |
}
|
389 |
+
if (Mage::getSingleton('core/session')->getMonkeyPost()) {
|
390 |
$order = $observer->getEvent()->getOrder();
|
391 |
$this->_handleCheckoutSubscription($order, true);
|
392 |
+
} else {
|
393 |
$oneStep = Mage::app()->getRequest()->getModuleName() == 'onestepcheckout';
|
394 |
if (Mage::app()->getRequest()->isPost()) {
|
395 |
$subscribe = Mage::app()->getRequest()->getPost('magemonkey_subscribe');
|
402 |
if ($oneStep) {
|
403 |
Mage::getSingleton('core/session')->setIsOneStepCheckout(true);
|
404 |
}
|
405 |
+
if (Mage::getSingleton('core/session')->getMonkeyPost()) {
|
406 |
$order = $observer->getEvent()->getOrder();
|
407 |
$this->_handleCheckoutSubscription($order, true);
|
408 |
}
|
453 |
|
454 |
if ($block->getRequest()->getControllerName() == 'sales_order') {
|
455 |
|
456 |
+
$block->addItem(
|
457 |
+
'magemonkey_ecommerce360', array(
|
458 |
'label' => Mage::helper('monkey')->__('Send to MailChimp'),
|
459 |
'url' => Mage::getModel('adminhtml/url')->getUrl('adminhtml/ecommerce/masssend', Mage::app()->getStore()->isCurrentlySecure() ? array('_secure' => true) : array()),
|
460 |
+
)
|
461 |
+
);
|
462 |
|
463 |
}
|
464 |
}
|
465 |
return $observer;
|
466 |
}
|
467 |
|
468 |
+
protected function _handleCheckoutSubscription($order, $isSaveOrderBefore = false)
|
469 |
+
{
|
470 |
if (is_object($order) && ($order->getId() || $isSaveOrderBefore)) {
|
471 |
//Set Campaign Id if exist
|
472 |
+
$campaignId = Mage::getModel('monkey/ecommerce360')->getCookie()->get('magemonkey_campaign_id');
|
473 |
+
if ($campaignId) {
|
474 |
+
$order->setEbizmartsMagemonkeyCampaignId($campaignId);
|
475 |
}
|
476 |
|
477 |
$sessionFlag = Mage::getSingleton('core/session')->getMonkeyCheckout() || Mage::getSingleton('core/session')->getIsOneStepCheckout();
|
495 |
}
|
496 |
$orderId = $order->getId();
|
497 |
|
498 |
+
if (Mage::getSingleton('core/session')->getMonkeyCheckout() || Mage::getSingleton('core/session')->getIsOneStepCheckout()) {
|
499 |
Mage::helper('monkey')->listsSubscription($toSubscribe, $saveOnDb, $orderId);
|
500 |
}
|
501 |
|
506 |
Mage::getSingleton('core/session')->setRegisterCheckoutSuccess(FALSE);
|
507 |
}
|
508 |
|
509 |
+
public function alterNewsletterGrid(Varien_Event_Observer $observer)
|
510 |
+
{
|
511 |
|
512 |
$block = $observer->getEvent()->getBlock();
|
513 |
if (!isset($block)) {
|
514 |
return $this;
|
515 |
}
|
516 |
+
if ($block instanceof Mage_Adminhtml_Block_Newsletter_Subscriber_Grid) {
|
517 |
|
518 |
+
$block->addColumnAfter(
|
519 |
+
'firstname', array(
|
520 |
'header' => Mage::helper('newsletter')->__('Customer First Name'),
|
521 |
'index' => 'customer_firstname',
|
522 |
'renderer' => 'monkey/adminhtml_newsletter_subscriber_renderer_firstname',
|
523 |
+
), 'type'
|
524 |
);
|
525 |
|
526 |
+
$block->addColumnAfter(
|
527 |
+
'lastname', array(
|
528 |
'header' => Mage::helper('newsletter')->__('Customer Last Name'),
|
529 |
'index' => 'customer_lastname',
|
530 |
'renderer' => 'monkey/adminhtml_newsletter_subscriber_renderer_lastname'
|
531 |
+
), 'firstname'
|
532 |
+
);
|
533 |
}
|
534 |
return $observer;
|
535 |
}
|
app/code/community/Ebizmarts/MageMonkey/Model/Subscriber.php
CHANGED
@@ -41,10 +41,10 @@ class Ebizmarts_MageMonkey_Model_Subscriber extends Mage_Newsletter_Model_Subscr
|
|
41 |
public function confirm($code)
|
42 |
{
|
43 |
$store = Mage::helper('monkey')->getThisStore();
|
44 |
-
if (Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_ACTIVE, $store) && Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $this->getStoreId()) && Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_CONFIRMATION_EMAIL, $this->getStoreId())){
|
45 |
Mage::helper('monkey')->listsSubscription($this, 0);
|
46 |
}
|
47 |
-
if($this->getCode()==$code) {
|
48 |
$this->setStatus(self::STATUS_SUBSCRIBED)
|
49 |
->setIsStatusChanged(true)
|
50 |
->save();
|
41 |
public function confirm($code)
|
42 |
{
|
43 |
$store = Mage::helper('monkey')->getThisStore();
|
44 |
+
if (Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_ACTIVE, $store) && Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $this->getStoreId()) && Mage::getStoreConfig(Ebizmarts_MageMonkey_Model_Config::GENERAL_CONFIRMATION_EMAIL, $this->getStoreId())) {
|
45 |
Mage::helper('monkey')->listsSubscription($this, 0);
|
46 |
}
|
47 |
+
if ($this->getCode()==$code) {
|
48 |
$this->setStatus(self::STATUS_SUBSCRIBED)
|
49 |
->setIsStatusChanged(true)
|
50 |
->save();
|
app/code/community/Ebizmarts/MageMonkey/Model/System/Config/Source/Account.php
CHANGED
@@ -17,7 +17,7 @@ class Ebizmarts_MageMonkey_Model_System_Config_Source_Account
|
|
17 |
* @access protected
|
18 |
* @var bool|array
|
19 |
*/
|
20 |
-
protected $
|
21 |
|
22 |
/**
|
23 |
* Set AccountDetails on class property if not already set
|
@@ -26,8 +26,8 @@ class Ebizmarts_MageMonkey_Model_System_Config_Source_Account
|
|
26 |
*/
|
27 |
public function __construct()
|
28 |
{
|
29 |
-
if (!$this->
|
30 |
-
$this->
|
31 |
->getAccountDetails();
|
32 |
}
|
33 |
}
|
@@ -39,11 +39,11 @@ class Ebizmarts_MageMonkey_Model_System_Config_Source_Account
|
|
39 |
*/
|
40 |
public function toOptionArray()
|
41 |
{
|
42 |
-
if (is_array($this->
|
43 |
return array(
|
44 |
-
array('value' => 0, 'label' => Mage::helper('monkey')->__('Username:') . ' ' . $this->
|
45 |
-
array('value' => 1, 'label' => Mage::helper('monkey')->__('Plan type:') . ' ' . $this->
|
46 |
-
array('value' => 2, 'label' => Mage::helper('monkey')->__('Is in trial mode?:') . ' ' . ($this->
|
47 |
);
|
48 |
} else {
|
49 |
return array(array('value' => '', 'label' => Mage::helper('monkey')->__('--- Enter your API KEY first ---')));
|
17 |
* @access protected
|
18 |
* @var bool|array
|
19 |
*/
|
20 |
+
protected $_accountDetails = FALSE;
|
21 |
|
22 |
/**
|
23 |
* Set AccountDetails on class property if not already set
|
26 |
*/
|
27 |
public function __construct()
|
28 |
{
|
29 |
+
if (!$this->_accountDetails) {
|
30 |
+
$this->_accountDetails = Mage::getSingleton('monkey/api')
|
31 |
->getAccountDetails();
|
32 |
}
|
33 |
}
|
39 |
*/
|
40 |
public function toOptionArray()
|
41 |
{
|
42 |
+
if (is_array($this->_accountDetails)) {
|
43 |
return array(
|
44 |
+
array('value' => 0, 'label' => Mage::helper('monkey')->__('Username:') . ' ' . $this->_accountDetails['username']),
|
45 |
+
array('value' => 1, 'label' => Mage::helper('monkey')->__('Plan type:') . ' ' . $this->_accountDetails['plan_type']),
|
46 |
+
array('value' => 2, 'label' => Mage::helper('monkey')->__('Is in trial mode?:') . ' ' . ($this->_accountDetails['is_trial'] ? Mage::helper('monkey')->__('Yes') : Mage::helper('monkey')->__('No')))
|
47 |
);
|
48 |
} else {
|
49 |
return array(array('value' => '', 'label' => Mage::helper('monkey')->__('--- Enter your API KEY first ---')));
|
app/code/community/Ebizmarts/MageMonkey/Model/System/Config/Source/CustomerGroup.php
CHANGED
@@ -13,8 +13,6 @@ class Ebizmarts_MageMonkey_Model_System_Config_Source_CustomerGroup
|
|
13 |
|
14 |
/**
|
15 |
* Load lists and store on class property
|
16 |
-
*
|
17 |
-
* @return void
|
18 |
*/
|
19 |
public function __construct()
|
20 |
{
|
@@ -34,16 +32,16 @@ class Ebizmarts_MageMonkey_Model_System_Config_Source_CustomerGroup
|
|
34 |
{
|
35 |
$groups = array();
|
36 |
|
37 |
-
if(is_array($this->_group)){
|
38 |
-
foreach($this->_group as $group) {
|
39 |
$groups[] = array('value'=> $group['id'], 'label' => $group['name'],'style'=>'font-weight: bold;');
|
40 |
$prefix = $group['id'];
|
41 |
-
foreach($group['groups'] as $key=>$list){
|
42 |
$groups []= array('value' => $prefix.'_'.$list['name'], 'label' => $list['name'],'style'=>'padding-left:20px');
|
43 |
}
|
44 |
}
|
45 |
|
46 |
-
}else{
|
47 |
$groups []= array('value' => '', 'label' => Mage::helper('monkey')->__('--- No data ---'));
|
48 |
}
|
49 |
return $groups;
|
13 |
|
14 |
/**
|
15 |
* Load lists and store on class property
|
|
|
|
|
16 |
*/
|
17 |
public function __construct()
|
18 |
{
|
32 |
{
|
33 |
$groups = array();
|
34 |
|
35 |
+
if (is_array($this->_group)) {
|
36 |
+
foreach ($this->_group as $group) {
|
37 |
$groups[] = array('value'=> $group['id'], 'label' => $group['name'],'style'=>'font-weight: bold;');
|
38 |
$prefix = $group['id'];
|
39 |
+
foreach ($group['groups'] as $key=>$list) {
|
40 |
$groups []= array('value' => $prefix.'_'.$list['name'], 'label' => $list['name'],'style'=>'padding-left:20px');
|
41 |
}
|
42 |
}
|
43 |
|
44 |
+
} else {
|
45 |
$groups []= array('value' => '', 'label' => Mage::helper('monkey')->__('--- No data ---'));
|
46 |
}
|
47 |
return $groups;
|
app/code/community/Ebizmarts/MageMonkey/controllers/Adminhtml/BulksyncController.php
CHANGED
@@ -202,7 +202,8 @@ class Ebizmarts_MageMonkey_Adminhtml_BulksyncController extends Mage_Adminhtml_C
|
|
202 |
$this->_redirectReferer($this->_defredirect);
|
203 |
}
|
204 |
|
205 |
-
public function getListsAction()
|
|
|
206 |
$params = $this->getRequest()->getParams();
|
207 |
$storeId = $params['store_id'];
|
208 |
$curstore = Mage::app()->getStore();
|
@@ -213,7 +214,8 @@ class Ebizmarts_MageMonkey_Adminhtml_BulksyncController extends Mage_Adminhtml_C
|
|
213 |
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($lists));
|
214 |
}
|
215 |
|
216 |
-
protected function _isAllowed()
|
|
|
217 |
switch ($this->getRequest()->getActionName()) {
|
218 |
case 'getLists':
|
219 |
case 'export':
|
@@ -232,10 +234,9 @@ class Ebizmarts_MageMonkey_Adminhtml_BulksyncController extends Mage_Adminhtml_C
|
|
232 |
$acl2 = 'newsletter/magemonkey/bulksync/mc_to_mage';
|
233 |
break;
|
234 |
}
|
235 |
-
$
|
236 |
-
if(!Mage::getSingleton('admin/session')->isAllowed($acl) && $acl2){
|
237 |
$ret = Mage::getSingleton('admin/session')->isAllowed($acl2);
|
238 |
-
}else{
|
239 |
$ret = Mage::getSingleton('admin/session')->isAllowed($acl);
|
240 |
}
|
241 |
return $ret;
|
202 |
$this->_redirectReferer($this->_defredirect);
|
203 |
}
|
204 |
|
205 |
+
public function getListsAction()
|
206 |
+
{
|
207 |
$params = $this->getRequest()->getParams();
|
208 |
$storeId = $params['store_id'];
|
209 |
$curstore = Mage::app()->getStore();
|
214 |
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($lists));
|
215 |
}
|
216 |
|
217 |
+
protected function _isAllowed()
|
218 |
+
{
|
219 |
switch ($this->getRequest()->getActionName()) {
|
220 |
case 'getLists':
|
221 |
case 'export':
|
234 |
$acl2 = 'newsletter/magemonkey/bulksync/mc_to_mage';
|
235 |
break;
|
236 |
}
|
237 |
+
if (!Mage::getSingleton('admin/session')->isAllowed($acl) && $acl2) {
|
|
|
238 |
$ret = Mage::getSingleton('admin/session')->isAllowed($acl2);
|
239 |
+
} else {
|
240 |
$ret = Mage::getSingleton('admin/session')->isAllowed($acl);
|
241 |
}
|
242 |
return $ret;
|
app/code/community/Ebizmarts/MageMonkey/controllers/Adminhtml/ConfigController.php
CHANGED
@@ -41,12 +41,13 @@ class Ebizmarts_MageMonkey_Adminhtml_ConfigController extends Mage_Adminhtml_Con
|
|
41 |
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($rc));
|
42 |
}
|
43 |
|
44 |
-
public function upgradeForPatchAction()
|
|
|
45 |
|
46 |
$prefix = Mage::getConfig()->getTablePrefix();
|
47 |
-
if($prefix){
|
48 |
$pre = $prefix[0];
|
49 |
-
}else{
|
50 |
$pre = '';
|
51 |
}
|
52 |
$resource = Mage::getSingleton('core/resource')
|
@@ -54,7 +55,7 @@ class Ebizmarts_MageMonkey_Adminhtml_ConfigController extends Mage_Adminhtml_Con
|
|
54 |
|
55 |
$table = $resource->getTableName($pre.'permission_block');
|
56 |
$exists = (bool)$resource->showTableStatus($table);
|
57 |
-
if($exists) {
|
58 |
$blocks = array(
|
59 |
array('block_name' => 'ebizmarts_abandonedcart/email_order_items', 'is_allowed' => 1),
|
60 |
array('block_name' => 'ebizmarts_autoresponder/email_backtostock_item', 'is_allowed' => 1),
|
@@ -90,7 +91,8 @@ class Ebizmarts_MageMonkey_Adminhtml_ConfigController extends Mage_Adminhtml_Con
|
|
90 |
return false;
|
91 |
}
|
92 |
|
93 |
-
protected function _isAllowed()
|
|
|
94 |
switch ($this->getRequest()->getActionName()) {
|
95 |
case 'getGroups':
|
96 |
case 'upgradeForPatch':
|
41 |
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($rc));
|
42 |
}
|
43 |
|
44 |
+
public function upgradeForPatchAction()
|
45 |
+
{
|
46 |
|
47 |
$prefix = Mage::getConfig()->getTablePrefix();
|
48 |
+
if ($prefix) {
|
49 |
$pre = $prefix[0];
|
50 |
+
} else {
|
51 |
$pre = '';
|
52 |
}
|
53 |
$resource = Mage::getSingleton('core/resource')
|
55 |
|
56 |
$table = $resource->getTableName($pre.'permission_block');
|
57 |
$exists = (bool)$resource->showTableStatus($table);
|
58 |
+
if ($exists) {
|
59 |
$blocks = array(
|
60 |
array('block_name' => 'ebizmarts_abandonedcart/email_order_items', 'is_allowed' => 1),
|
61 |
array('block_name' => 'ebizmarts_autoresponder/email_backtostock_item', 'is_allowed' => 1),
|
91 |
return false;
|
92 |
}
|
93 |
|
94 |
+
protected function _isAllowed()
|
95 |
+
{
|
96 |
switch ($this->getRequest()->getActionName()) {
|
97 |
case 'getGroups':
|
98 |
case 'upgradeForPatch':
|
app/code/community/Ebizmarts/MageMonkey/controllers/Adminhtml/EcommerceController.php
CHANGED
@@ -94,9 +94,9 @@ class Ebizmarts_MageMonkey_Adminhtml_EcommerceController extends Mage_Adminhtml_
|
|
94 |
try {
|
95 |
$ecommerce = Mage::getModel('monkey/ecommerce');
|
96 |
$asyncOrders = Mage::getModel('monkey/asyncorders')->getCollection();
|
97 |
-
foreach($asyncOrders as $order) {
|
98 |
$info = unserialize($order->getInfo());
|
99 |
-
if(in_array($info['order_id'], $orderIds)){
|
100 |
$order->delete();
|
101 |
}
|
102 |
}
|
@@ -175,7 +175,8 @@ class Ebizmarts_MageMonkey_Adminhtml_EcommerceController extends Mage_Adminhtml_
|
|
175 |
Mage::app()->getResponse()->setBody($result);
|
176 |
}
|
177 |
|
178 |
-
protected function _isAllowed()
|
|
|
179 |
switch ($this->getRequest()->getActionName()) {
|
180 |
case 'index':
|
181 |
case 'grid':
|
@@ -189,9 +190,10 @@ class Ebizmarts_MageMonkey_Adminhtml_EcommerceController extends Mage_Adminhtml_
|
|
189 |
case 'resetLocalEcommerce':
|
190 |
case 'resetRemoteEcommerce':
|
191 |
$acl = 'system/config/monkey';
|
192 |
-
|
193 |
case 'masssend':
|
194 |
$acl = 'sales/orders';
|
|
|
195 |
}
|
196 |
return Mage::getSingleton('admin/session')->isAllowed($acl);
|
197 |
}
|
94 |
try {
|
95 |
$ecommerce = Mage::getModel('monkey/ecommerce');
|
96 |
$asyncOrders = Mage::getModel('monkey/asyncorders')->getCollection();
|
97 |
+
foreach ($asyncOrders as $order) {
|
98 |
$info = unserialize($order->getInfo());
|
99 |
+
if (in_array($info['order_id'], $orderIds)) {
|
100 |
$order->delete();
|
101 |
}
|
102 |
}
|
175 |
Mage::app()->getResponse()->setBody($result);
|
176 |
}
|
177 |
|
178 |
+
protected function _isAllowed()
|
179 |
+
{
|
180 |
switch ($this->getRequest()->getActionName()) {
|
181 |
case 'index':
|
182 |
case 'grid':
|
190 |
case 'resetLocalEcommerce':
|
191 |
case 'resetRemoteEcommerce':
|
192 |
$acl = 'system/config/monkey';
|
193 |
+
break;
|
194 |
case 'masssend':
|
195 |
$acl = 'sales/orders';
|
196 |
+
break;
|
197 |
}
|
198 |
return Mage::getSingleton('admin/session')->isAllowed($acl);
|
199 |
}
|
app/code/community/Ebizmarts/MageMonkey/etc/config.xml
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<config>
|
11 |
<modules>
|
12 |
<Ebizmarts_MageMonkey>
|
13 |
-
<version>1.2.6</version>
|
14 |
</Ebizmarts_MageMonkey>
|
15 |
</modules>
|
16 |
<global>
|
10 |
<config>
|
11 |
<modules>
|
12 |
<Ebizmarts_MageMonkey>
|
13 |
+
<version>1.2.6.1</version>
|
14 |
</Ebizmarts_MageMonkey>
|
15 |
</modules>
|
16 |
<global>
|
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-install-0.0.1.php
CHANGED
@@ -4,7 +4,8 @@ $installer = $this;
|
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
-
$installer->run(
|
|
|
8 |
|
9 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_api_debug')}` (
|
10 |
`debug_id` int(10) unsigned NOT NULL auto_increment,
|
@@ -15,6 +16,7 @@ $installer->run("
|
|
15 |
KEY `debug_at` (`debug_at`)
|
16 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
17 |
|
18 |
-
"
|
|
|
19 |
|
20 |
$installer->endSetup();
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
+
$installer->run(
|
8 |
+
"
|
9 |
|
10 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_api_debug')}` (
|
11 |
`debug_id` int(10) unsigned NOT NULL auto_increment,
|
16 |
KEY `debug_at` (`debug_at`)
|
17 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
18 |
|
19 |
+
"
|
20 |
+
);
|
21 |
|
22 |
$installer->endSetup();
|
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-0.0.1-0.0.2.php
CHANGED
@@ -4,7 +4,8 @@ $installer = $this;
|
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
-
$installer->run(
|
|
|
8 |
|
9 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_ecommerce360')}` (
|
10 |
`id` int(10) unsigned NOT NULL auto_increment,
|
@@ -17,6 +18,7 @@ $installer->run("
|
|
17 |
KEY `order_increment_id` (`order_increment_id`)
|
18 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
19 |
|
20 |
-
"
|
|
|
21 |
|
22 |
$installer->endSetup();
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
+
$installer->run(
|
8 |
+
"
|
9 |
|
10 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_ecommerce360')}` (
|
11 |
`id` int(10) unsigned NOT NULL auto_increment,
|
18 |
KEY `order_increment_id` (`order_increment_id`)
|
19 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
20 |
|
21 |
+
"
|
22 |
+
);
|
23 |
|
24 |
$installer->endSetup();
|
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-0.0.2-0.0.3.php
CHANGED
@@ -4,7 +4,8 @@ $installer = $this;
|
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
-
$installer->run(
|
|
|
8 |
|
9 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_bulksync_export')}` (
|
10 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
@@ -19,6 +20,7 @@ $installer->run("
|
|
19 |
KEY `status` (`status`)
|
20 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
21 |
|
22 |
-
"
|
|
|
23 |
|
24 |
$installer->endSetup();
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
+
$installer->run(
|
8 |
+
"
|
9 |
|
10 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_bulksync_export')}` (
|
11 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
20 |
KEY `status` (`status`)
|
21 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
22 |
|
23 |
+
"
|
24 |
+
);
|
25 |
|
26 |
$installer->endSetup();
|
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-0.0.3-0.0.4.php
CHANGED
@@ -4,7 +4,8 @@ $installer = $this;
|
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
-
$installer->run(
|
|
|
8 |
|
9 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_bulksync_import')}` (
|
10 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
@@ -20,6 +21,7 @@ $installer->run("
|
|
20 |
KEY `status` (`status`)
|
21 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
22 |
|
23 |
-
"
|
|
|
24 |
|
25 |
$installer->endSetup();
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
+
$installer->run(
|
8 |
+
"
|
9 |
|
10 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_bulksync_import')}` (
|
11 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
21 |
KEY `status` (`status`)
|
22 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
23 |
|
24 |
+
"
|
25 |
+
);
|
26 |
|
27 |
$installer->endSetup();
|
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.1.21-1.1.22.php
CHANGED
@@ -8,13 +8,16 @@ $installer->getConnection()->addColumn(
|
|
8 |
$installer->getTable('magemonkey_ecommerce360'), 'store_id', 'smallint(5)'
|
9 |
);
|
10 |
|
11 |
-
$installer->run(
|
|
|
12 |
UPDATE `{$installer->getTable('magemonkey_ecommerce360')}` A JOIN `{$installer->getTable('sales_flat_order')}` B
|
13 |
ON A.order_id = B.entity_id
|
14 |
SET A.store_id = B.store_id
|
15 |
-
"
|
|
|
16 |
|
17 |
-
$installer->run(
|
|
|
18 |
|
19 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_async_subscribers')}` (
|
20 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
@@ -35,6 +38,7 @@ $installer->run("
|
|
35 |
PRIMARY KEY (`id`)
|
36 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
37 |
|
38 |
-
"
|
|
|
39 |
$installer->endSetup();
|
40 |
|
8 |
$installer->getTable('magemonkey_ecommerce360'), 'store_id', 'smallint(5)'
|
9 |
);
|
10 |
|
11 |
+
$installer->run(
|
12 |
+
"
|
13 |
UPDATE `{$installer->getTable('magemonkey_ecommerce360')}` A JOIN `{$installer->getTable('sales_flat_order')}` B
|
14 |
ON A.order_id = B.entity_id
|
15 |
SET A.store_id = B.store_id
|
16 |
+
"
|
17 |
+
);
|
18 |
|
19 |
+
$installer->run(
|
20 |
+
"
|
21 |
|
22 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_async_subscribers')}` (
|
23 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
38 |
PRIMARY KEY (`id`)
|
39 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
40 |
|
41 |
+
"
|
42 |
+
);
|
43 |
$installer->endSetup();
|
44 |
|
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.1.23-1.1.24.php
CHANGED
@@ -5,12 +5,14 @@ $installer = $this;
|
|
5 |
$installer->startSetup();
|
6 |
|
7 |
try {
|
8 |
-
$installer->run(
|
|
|
9 |
ALTER TABLE `{$this->getTable('magemonkey_async_subscribers')}` CHANGE `proccessed` `processed` INT;
|
10 |
ALTER TABLE `{$this->getTable('magemonkey_async_orders')}` CHANGE `proccessed` `processed` INT;
|
11 |
-
"
|
|
|
|
|
|
|
12 |
}
|
13 |
|
14 |
-
catch(Exception $e){}
|
15 |
-
|
16 |
$installer->endSetup();
|
5 |
$installer->startSetup();
|
6 |
|
7 |
try {
|
8 |
+
$installer->run(
|
9 |
+
"
|
10 |
ALTER TABLE `{$this->getTable('magemonkey_async_subscribers')}` CHANGE `proccessed` `processed` INT;
|
11 |
ALTER TABLE `{$this->getTable('magemonkey_async_orders')}` CHANGE `proccessed` `processed` INT;
|
12 |
+
"
|
13 |
+
);
|
14 |
+
} catch(Exception $e) {
|
15 |
+
Mage::log($e->getMessage());
|
16 |
}
|
17 |
|
|
|
|
|
18 |
$installer->endSetup();
|
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.1.33-1.1.34.php
CHANGED
@@ -4,14 +4,16 @@ $installer = $this;
|
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
-
$installer->run(
|
|
|
8 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_last_order')}` (
|
9 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
10 |
`email` varchar(128),
|
11 |
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
12 |
PRIMARY KEY (`id`)
|
13 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
14 |
-
"
|
|
|
15 |
|
16 |
$installer->getConnection()->addColumn(
|
17 |
$installer->getTable('newsletter_subscriber'), 'subscriber_firstname', 'varchar(50)'
|
4 |
|
5 |
$installer->startSetup();
|
6 |
|
7 |
+
$installer->run(
|
8 |
+
"
|
9 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_last_order')}` (
|
10 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
11 |
`email` varchar(128),
|
12 |
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
13 |
PRIMARY KEY (`id`)
|
14 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
15 |
+
"
|
16 |
+
);
|
17 |
|
18 |
$installer->getConnection()->addColumn(
|
19 |
$installer->getTable('newsletter_subscriber'), 'subscriber_firstname', 'varchar(50)'
|
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.2.4-1.2.5.php
CHANGED
@@ -8,7 +8,8 @@ $installer->getConnection()->addColumn(
|
|
8 |
$installer->getTable('magemonkey_async_subscribers'), 'order_id', 'smallint(5)'
|
9 |
);
|
10 |
|
11 |
-
$installer->run(
|
|
|
12 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_async_webhooks')}` (
|
13 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
14 |
`webhook_type` varchar(24),
|
@@ -16,6 +17,7 @@ $installer->run("
|
|
16 |
`processed` INT(1) NOT NULL default 0,
|
17 |
PRIMARY KEY (`id`)
|
18 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
19 |
-
"
|
|
|
20 |
|
21 |
$installer->endSetup();
|
8 |
$installer->getTable('magemonkey_async_subscribers'), 'order_id', 'smallint(5)'
|
9 |
);
|
10 |
|
11 |
+
$installer->run(
|
12 |
+
"
|
13 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('magemonkey_async_webhooks')}` (
|
14 |
`id` INT(10) unsigned NOT NULL auto_increment,
|
15 |
`webhook_type` varchar(24),
|
17 |
`processed` INT(1) NOT NULL default 0,
|
18 |
PRIMARY KEY (`id`)
|
19 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
20 |
+
"
|
21 |
+
);
|
22 |
|
23 |
$installer->endSetup();
|
app/code/community/Ebizmarts/Mandrill/Block/Adminhtml/Templates/Templates/Grid.php
CHANGED
@@ -57,66 +57,86 @@ class Ebizmarts_Mandrill_Block_Adminhtml_Templates_Templates_Grid extends Mage_A
|
|
57 |
|
58 |
protected function _prepareColumns()
|
59 |
{
|
60 |
-
$this->addColumn(
|
|
|
61 |
'header' => Mage::helper('ebizmarts_mandrill')->__('Email Address'),
|
62 |
'index' => 'address',
|
63 |
'filter' => false,
|
64 |
'sortable' => false
|
65 |
-
|
66 |
-
|
|
|
|
|
67 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of messages sent'),
|
68 |
'index' => 'sent',
|
69 |
'filter' => false,
|
70 |
'sortable' => false
|
71 |
-
|
72 |
-
|
|
|
|
|
73 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of rejected messages'),
|
74 |
'index' => 'rejects',
|
75 |
'filter' => false,
|
76 |
'sortable' => false
|
77 |
-
|
78 |
-
|
|
|
|
|
79 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of spam complaints'),
|
80 |
'index' => 'complaints',
|
81 |
'filter' => false,
|
82 |
'sortable' => false
|
83 |
-
|
84 |
-
|
|
|
|
|
85 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of unsubscribe requests'),
|
86 |
'index' => 'unsubs',
|
87 |
'filter' => false,
|
88 |
'sortable' => false
|
89 |
-
|
90 |
-
|
|
|
|
|
91 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of unique opens'),
|
92 |
'index' => 'opens',
|
93 |
'filter' => false,
|
94 |
'sortable' => false
|
95 |
-
|
96 |
-
|
|
|
|
|
97 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of times unique tracked URLs have been clicked'),
|
98 |
'index' => 'clicks',
|
99 |
'filter' => false,
|
100 |
'sortable' => false
|
101 |
-
|
102 |
-
|
|
|
|
|
103 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of hard bounces'),
|
104 |
'index' => 'hard_bounces',
|
105 |
'filter' => false,
|
106 |
'sortable' => false
|
107 |
-
|
108 |
-
|
|
|
|
|
109 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of soft bounces'),
|
110 |
'index' => 'soft_bounces',
|
111 |
'filter' => false,
|
112 |
'sortable' => false
|
113 |
-
|
114 |
-
|
|
|
|
|
115 |
'header' => Mage::helper('ebizmarts_mandrill')->__('Created At'),
|
116 |
'index' => 'created_at',
|
117 |
'filter' => false,
|
118 |
'sortable' => false
|
119 |
-
|
|
|
120 |
|
121 |
return parent::_prepareColumns();
|
122 |
}
|
57 |
|
58 |
protected function _prepareColumns()
|
59 |
{
|
60 |
+
$this->addColumn(
|
61 |
+
'email', array(
|
62 |
'header' => Mage::helper('ebizmarts_mandrill')->__('Email Address'),
|
63 |
'index' => 'address',
|
64 |
'filter' => false,
|
65 |
'sortable' => false
|
66 |
+
)
|
67 |
+
);
|
68 |
+
$this->addColumn(
|
69 |
+
'sent', array(
|
70 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of messages sent'),
|
71 |
'index' => 'sent',
|
72 |
'filter' => false,
|
73 |
'sortable' => false
|
74 |
+
)
|
75 |
+
);
|
76 |
+
$this->addColumn(
|
77 |
+
'rejects', array(
|
78 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of rejected messages'),
|
79 |
'index' => 'rejects',
|
80 |
'filter' => false,
|
81 |
'sortable' => false
|
82 |
+
)
|
83 |
+
);
|
84 |
+
$this->addColumn(
|
85 |
+
'complaints', array(
|
86 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of spam complaints'),
|
87 |
'index' => 'complaints',
|
88 |
'filter' => false,
|
89 |
'sortable' => false
|
90 |
+
)
|
91 |
+
);
|
92 |
+
$this->addColumn(
|
93 |
+
'unsubs', array(
|
94 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of unsubscribe requests'),
|
95 |
'index' => 'unsubs',
|
96 |
'filter' => false,
|
97 |
'sortable' => false
|
98 |
+
)
|
99 |
+
);
|
100 |
+
$this->addColumn(
|
101 |
+
'opens', array(
|
102 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of unique opens'),
|
103 |
'index' => 'opens',
|
104 |
'filter' => false,
|
105 |
'sortable' => false
|
106 |
+
)
|
107 |
+
);
|
108 |
+
$this->addColumn(
|
109 |
+
'clicks', array(
|
110 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of times unique tracked URLs have been clicked'),
|
111 |
'index' => 'clicks',
|
112 |
'filter' => false,
|
113 |
'sortable' => false
|
114 |
+
)
|
115 |
+
);
|
116 |
+
$this->addColumn(
|
117 |
+
'hard_bounces', array(
|
118 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of hard bounces'),
|
119 |
'index' => 'hard_bounces',
|
120 |
'filter' => false,
|
121 |
'sortable' => false
|
122 |
+
)
|
123 |
+
);
|
124 |
+
$this->addColumn(
|
125 |
+
'soft_bounces', array(
|
126 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of soft bounces'),
|
127 |
'index' => 'soft_bounces',
|
128 |
'filter' => false,
|
129 |
'sortable' => false
|
130 |
+
)
|
131 |
+
);
|
132 |
+
$this->addColumn(
|
133 |
+
'created_at', array(
|
134 |
'header' => Mage::helper('ebizmarts_mandrill')->__('Created At'),
|
135 |
'index' => 'created_at',
|
136 |
'filter' => false,
|
137 |
'sortable' => false
|
138 |
+
)
|
139 |
+
);
|
140 |
|
141 |
return parent::_prepareColumns();
|
142 |
}
|
app/code/community/Ebizmarts/Mandrill/Block/Adminhtml/Users/Senders/Grid.php
CHANGED
@@ -59,66 +59,86 @@ class Ebizmarts_Mandrill_Block_Adminhtml_Users_Senders_Grid extends Mage_Adminht
|
|
59 |
|
60 |
protected function _prepareColumns()
|
61 |
{
|
62 |
-
$this->addColumn(
|
|
|
63 |
'header' => Mage::helper('ebizmarts_mandrill')->__('Email Address'),
|
64 |
'index' => 'address',
|
65 |
'filter' => false,
|
66 |
'sortable' => false
|
67 |
-
|
68 |
-
|
|
|
|
|
69 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of messages sent'),
|
70 |
'index' => 'sent',
|
71 |
'filter' => false,
|
72 |
'sortable' => false
|
73 |
-
|
74 |
-
|
|
|
|
|
75 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of rejected messages'),
|
76 |
'index' => 'rejects',
|
77 |
'filter' => false,
|
78 |
'sortable' => false
|
79 |
-
|
80 |
-
|
|
|
|
|
81 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of spam complaints'),
|
82 |
'index' => 'complaints',
|
83 |
'filter' => false,
|
84 |
'sortable' => false
|
85 |
-
|
86 |
-
|
|
|
|
|
87 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of unsubscribe requests'),
|
88 |
'index' => 'unsubs',
|
89 |
'filter' => false,
|
90 |
'sortable' => false
|
91 |
-
|
92 |
-
|
|
|
|
|
93 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of unique opens'),
|
94 |
'index' => 'opens',
|
95 |
'filter' => false,
|
96 |
'sortable' => false
|
97 |
-
|
98 |
-
|
|
|
|
|
99 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of times unique tracked URLs have been clicked'),
|
100 |
'index' => 'clicks',
|
101 |
'filter' => false,
|
102 |
'sortable' => false
|
103 |
-
|
104 |
-
|
|
|
|
|
105 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of hard bounces'),
|
106 |
'index' => 'hard_bounces',
|
107 |
'filter' => false,
|
108 |
'sortable' => false
|
109 |
-
|
110 |
-
|
|
|
|
|
111 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of soft bounces'),
|
112 |
'index' => 'soft_bounces',
|
113 |
'filter' => false,
|
114 |
'sortable' => false
|
115 |
-
|
116 |
-
|
|
|
|
|
117 |
'header' => Mage::helper('ebizmarts_mandrill')->__('Created At'),
|
118 |
'index' => 'created_at',
|
119 |
'filter' => false,
|
120 |
'sortable' => false
|
121 |
-
|
|
|
122 |
|
123 |
return parent::_prepareColumns();
|
124 |
}
|
59 |
|
60 |
protected function _prepareColumns()
|
61 |
{
|
62 |
+
$this->addColumn(
|
63 |
+
'email', array(
|
64 |
'header' => Mage::helper('ebizmarts_mandrill')->__('Email Address'),
|
65 |
'index' => 'address',
|
66 |
'filter' => false,
|
67 |
'sortable' => false
|
68 |
+
)
|
69 |
+
);
|
70 |
+
$this->addColumn(
|
71 |
+
'sent', array(
|
72 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of messages sent'),
|
73 |
'index' => 'sent',
|
74 |
'filter' => false,
|
75 |
'sortable' => false
|
76 |
+
)
|
77 |
+
);
|
78 |
+
$this->addColumn(
|
79 |
+
'rejects', array(
|
80 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of rejected messages'),
|
81 |
'index' => 'rejects',
|
82 |
'filter' => false,
|
83 |
'sortable' => false
|
84 |
+
)
|
85 |
+
);
|
86 |
+
$this->addColumn(
|
87 |
+
'complaints', array(
|
88 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of spam complaints'),
|
89 |
'index' => 'complaints',
|
90 |
'filter' => false,
|
91 |
'sortable' => false
|
92 |
+
)
|
93 |
+
);
|
94 |
+
$this->addColumn(
|
95 |
+
'unsubs', array(
|
96 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of unsubscribe requests'),
|
97 |
'index' => 'unsubs',
|
98 |
'filter' => false,
|
99 |
'sortable' => false
|
100 |
+
)
|
101 |
+
);
|
102 |
+
$this->addColumn(
|
103 |
+
'opens', array(
|
104 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of unique opens'),
|
105 |
'index' => 'opens',
|
106 |
'filter' => false,
|
107 |
'sortable' => false
|
108 |
+
)
|
109 |
+
);
|
110 |
+
$this->addColumn(
|
111 |
+
'clicks', array(
|
112 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of times unique tracked URLs have been clicked'),
|
113 |
'index' => 'clicks',
|
114 |
'filter' => false,
|
115 |
'sortable' => false
|
116 |
+
)
|
117 |
+
);
|
118 |
+
$this->addColumn(
|
119 |
+
'hard_bounces', array(
|
120 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of hard bounces'),
|
121 |
'index' => 'hard_bounces',
|
122 |
'filter' => false,
|
123 |
'sortable' => false
|
124 |
+
)
|
125 |
+
);
|
126 |
+
$this->addColumn(
|
127 |
+
'soft_bounces', array(
|
128 |
'header' => Mage::helper('ebizmarts_mandrill')->__('# of soft bounces'),
|
129 |
'index' => 'soft_bounces',
|
130 |
'filter' => false,
|
131 |
'sortable' => false
|
132 |
+
)
|
133 |
+
);
|
134 |
+
$this->addColumn(
|
135 |
+
'created_at', array(
|
136 |
'header' => Mage::helper('ebizmarts_mandrill')->__('Created At'),
|
137 |
'index' => 'created_at',
|
138 |
'filter' => false,
|
139 |
'sortable' => false
|
140 |
+
)
|
141 |
+
);
|
142 |
|
143 |
return parent::_prepareColumns();
|
144 |
}
|
app/code/community/Ebizmarts/Mandrill/Model/Email/Queue.php
CHANGED
@@ -75,7 +75,7 @@ class Ebizmarts_Mandrill_Model_Email_Queue extends Mage_Core_Model_Email_Queue
|
|
75 |
unset($mailer);
|
76 |
$message->setProcessedAt(Varien_Date::formatDate(true));
|
77 |
$message->save();
|
78 |
-
}else{
|
79 |
$parameters = new Varien_Object($message->getMessageParameters());
|
80 |
if ($parameters->getReturnPathEmail() !== null) {
|
81 |
$mailTransport = new Zend_Mail_Transport_Sendmail("-f" . $parameters->getReturnPathEmail());
|
@@ -137,12 +137,9 @@ class Ebizmarts_Mandrill_Model_Email_Queue extends Mage_Core_Model_Email_Queue
|
|
137 |
if (!Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::ENABLE, $storeId)) {
|
138 |
return parent::getMail();
|
139 |
}
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
$this->_mail = new Mandrill_Message(Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::APIKEY, $storeId));
|
145 |
-
return $this->_mail;
|
146 |
-
}
|
147 |
}
|
148 |
}
|
75 |
unset($mailer);
|
76 |
$message->setProcessedAt(Varien_Date::formatDate(true));
|
77 |
$message->save();
|
78 |
+
} else {
|
79 |
$parameters = new Varien_Object($message->getMessageParameters());
|
80 |
if ($parameters->getReturnPathEmail() !== null) {
|
81 |
$mailTransport = new Zend_Mail_Transport_Sendmail("-f" . $parameters->getReturnPathEmail());
|
137 |
if (!Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::ENABLE, $storeId)) {
|
138 |
return parent::getMail();
|
139 |
}
|
140 |
+
|
141 |
+
Mage::helper('ebizmarts_mandrill')->log("store: $storeId API: " . Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::APIKEY, $storeId));
|
142 |
+
$this->_mail = new Mandrill_Message(Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::APIKEY, $storeId));
|
143 |
+
return $this->_mail;
|
|
|
|
|
|
|
144 |
}
|
145 |
}
|
app/code/community/Ebizmarts/Mandrill/Model/Email/Template.php
CHANGED
@@ -20,9 +20,8 @@ class Ebizmarts_Mandrill_Model_Email_Template extends Mage_Core_Model_Email_Temp
|
|
20 |
*/
|
21 |
public function send($email, $name = null, array $variables = array())
|
22 |
{
|
23 |
-
|
24 |
-
|
25 |
-
if (!Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::ENABLE)) {
|
26 |
return parent::send($email, $name, $variables);
|
27 |
}
|
28 |
if (!$this->isValidForSend()) {
|
@@ -85,16 +84,12 @@ class Ebizmarts_Mandrill_Model_Email_Template extends Mage_Core_Model_Email_Temp
|
|
85 |
$email['from_email'] = $this->getSenderEmail();
|
86 |
$mandrillSenders = $mail->senders->domains();
|
87 |
$senderExists = false;
|
88 |
-
foreach ($mandrillSenders as $sender)
|
89 |
-
|
90 |
-
$emailAddress = $sender['domain'];
|
91 |
-
if($email['from_email'] == $sender['domain'])
|
92 |
-
{
|
93 |
$senderExists = true;
|
94 |
}
|
95 |
}
|
96 |
-
if(!$senderExists)
|
97 |
-
{
|
98 |
$email['from_email'] = Mage::getStoreConfig('trans_email/ident_general/email');
|
99 |
}
|
100 |
$headers = $mail->getHeaders();
|
@@ -135,18 +130,20 @@ class Ebizmarts_Mandrill_Model_Email_Template extends Mage_Core_Model_Email_Temp
|
|
135 |
if ($this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {
|
136 |
$emailQueue = $this->getQueue();
|
137 |
$emailQueue->setMessageBody($message);
|
138 |
-
$emailQueue->setMessageParameters(
|
|
|
139 |
'subject' => $subject,
|
140 |
'return_path_email' => $returnPathEmail,
|
141 |
'is_plain' => $this->isPlain(),
|
142 |
'from_email' => $this->getSenderEmail(),
|
143 |
'from_name' => $this->getSenderName()
|
144 |
-
|
|
|
145 |
->addRecipients($emails, $names, Mage_Core_Model_Email_Queue::EMAIL_TYPE_TO)
|
146 |
->addRecipients($this->_bccEmails, array(), Mage_Core_Model_Email_Queue::EMAIL_TYPE_BCC);
|
147 |
$emailQueue->addMessageToQueue();
|
148 |
return true;
|
149 |
-
|
150 |
try {
|
151 |
$result = $mail->messages->send($email);
|
152 |
} catch (Exception $e) {
|
20 |
*/
|
21 |
public function send($email, $name = null, array $variables = array())
|
22 |
{
|
23 |
+
$storeId = Mage::app()->getStore()->getId();
|
24 |
+
if (!Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::ENABLE, $storeId)) {
|
|
|
25 |
return parent::send($email, $name, $variables);
|
26 |
}
|
27 |
if (!$this->isValidForSend()) {
|
84 |
$email['from_email'] = $this->getSenderEmail();
|
85 |
$mandrillSenders = $mail->senders->domains();
|
86 |
$senderExists = false;
|
87 |
+
foreach ($mandrillSenders as $sender) {
|
88 |
+
if($email['from_email'] == $sender['domain']) {
|
|
|
|
|
|
|
89 |
$senderExists = true;
|
90 |
}
|
91 |
}
|
92 |
+
if (!$senderExists) {
|
|
|
93 |
$email['from_email'] = Mage::getStoreConfig('trans_email/ident_general/email');
|
94 |
}
|
95 |
$headers = $mail->getHeaders();
|
130 |
if ($this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {
|
131 |
$emailQueue = $this->getQueue();
|
132 |
$emailQueue->setMessageBody($message);
|
133 |
+
$emailQueue->setMessageParameters(
|
134 |
+
array(
|
135 |
'subject' => $subject,
|
136 |
'return_path_email' => $returnPathEmail,
|
137 |
'is_plain' => $this->isPlain(),
|
138 |
'from_email' => $this->getSenderEmail(),
|
139 |
'from_name' => $this->getSenderName()
|
140 |
+
)
|
141 |
+
)
|
142 |
->addRecipients($emails, $names, Mage_Core_Model_Email_Queue::EMAIL_TYPE_TO)
|
143 |
->addRecipients($this->_bccEmails, array(), Mage_Core_Model_Email_Queue::EMAIL_TYPE_BCC);
|
144 |
$emailQueue->addMessageToQueue();
|
145 |
return true;
|
146 |
+
}
|
147 |
try {
|
148 |
$result = $mail->messages->send($email);
|
149 |
} catch (Exception $e) {
|
app/code/community/Ebizmarts/Mandrill/Model/System/Config/Source/Userinfo.php
CHANGED
@@ -16,7 +16,7 @@ class Ebizmarts_Mandrill_Model_System_Config_Source_Userinfo
|
|
16 |
* @access protected
|
17 |
* @var bool|array
|
18 |
*/
|
19 |
-
protected $
|
20 |
|
21 |
/**
|
22 |
* Set AccountDetails on class attribute if not already set
|
@@ -35,12 +35,12 @@ class Ebizmarts_Mandrill_Model_System_Config_Source_Userinfo
|
|
35 |
}
|
36 |
}
|
37 |
}
|
38 |
-
if ((!is_array($this->
|
39 |
$api = new Mandrill_Message(Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::APIKEY, $storeId));
|
40 |
try {
|
41 |
-
$this->
|
42 |
} catch (Exception $e) {
|
43 |
-
$this->
|
44 |
}
|
45 |
}
|
46 |
}
|
@@ -53,22 +53,22 @@ class Ebizmarts_Mandrill_Model_System_Config_Source_Userinfo
|
|
53 |
public function toOptionArray()
|
54 |
{
|
55 |
$helper = Mage::helper('ebizmarts_mandrill');
|
56 |
-
if (is_array($this->
|
57 |
-
if (!isset($this->
|
58 |
return array(
|
59 |
-
array('value' => 0, 'label' => $helper->__("<strong>Username</strong>: %s %s", $this->
|
60 |
|
61 |
-
array('value' => 1, 'label' => $helper->__('<strong>Reputation</strong>: %s %s', $this->
|
62 |
|
63 |
-
array('value' => 2, 'label' => $helper->__('<strong>Hourly Quota</strong>: %s %s', $this->
|
64 |
|
65 |
-
array('value' => 3, 'label' => $helper->__('<strong>Backlog</strong>: %s %s', $this->
|
66 |
);
|
67 |
} else {
|
68 |
return array(array('value' => '', 'label' => $helper->__('--- Invalid API KEY ---')));
|
69 |
}
|
70 |
} else {
|
71 |
-
return array(array('value' => '', 'label' => $helper->__($this->
|
72 |
}
|
73 |
}
|
74 |
|
16 |
* @access protected
|
17 |
* @var bool|array
|
18 |
*/
|
19 |
+
protected $_accountDetails = "--- Enter your API KEY first ---";
|
20 |
|
21 |
/**
|
22 |
* Set AccountDetails on class attribute if not already set
|
35 |
}
|
36 |
}
|
37 |
}
|
38 |
+
if ((!is_array($this->_accountDetails) || isset($this->_accountDetails['status'])) && Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::APIKEY, $storeId)) {
|
39 |
$api = new Mandrill_Message(Mage::getStoreConfig(Ebizmarts_Mandrill_Model_System_Config::APIKEY, $storeId));
|
40 |
try {
|
41 |
+
$this->_accountDetails = $api->users->info();
|
42 |
} catch (Exception $e) {
|
43 |
+
$this->_accountDetails = "--- Invalid API key ---";
|
44 |
}
|
45 |
}
|
46 |
}
|
53 |
public function toOptionArray()
|
54 |
{
|
55 |
$helper = Mage::helper('ebizmarts_mandrill');
|
56 |
+
if (is_array($this->_accountDetails)) {
|
57 |
+
if (!isset($this->_accountDetails['status'])) {
|
58 |
return array(
|
59 |
+
array('value' => 0, 'label' => $helper->__("<strong>Username</strong>: %s %s", $this->_accountDetails["username"], "<small>used for SMTP authentication</small>")),
|
60 |
|
61 |
+
array('value' => 1, 'label' => $helper->__('<strong>Reputation</strong>: %s %s', $this->_accountDetails['reputation'], "<small>scale from 0 to 100, with 75 generally being a \"good\" reputation</small>")),
|
62 |
|
63 |
+
array('value' => 2, 'label' => $helper->__('<strong>Hourly Quota</strong>: %s %s', $this->_accountDetails['hourly_quota'], "<small>the maximum number of emails Mandrill will deliver for this user each hour. Any emails beyond that will be accepted and queued for later delivery. Users with higher reputations will have higher hourly quotas</small>")),
|
64 |
|
65 |
+
array('value' => 3, 'label' => $helper->__('<strong>Backlog</strong>: %s %s', $this->_accountDetails['backlog'], "<small>the number of emails that are queued for delivery due to exceeding your monthly or hourly quotas</small>"))
|
66 |
);
|
67 |
} else {
|
68 |
return array(array('value' => '', 'label' => $helper->__('--- Invalid API KEY ---')));
|
69 |
}
|
70 |
} else {
|
71 |
+
return array(array('value' => '', 'label' => $helper->__($this->_accountDetails)));
|
72 |
}
|
73 |
}
|
74 |
|
app/code/community/Ebizmarts/Mandrill/controllers/Adminhtml/Mandrill/UsersController.php
CHANGED
@@ -35,7 +35,8 @@ class Ebizmarts_Mandrill_Adminhtml_Mandrill_UsersController extends Mage_Adminht
|
|
35 |
$this->renderLayout();
|
36 |
}
|
37 |
|
38 |
-
protected function _isAllowed()
|
|
|
39 |
switch ($this->getRequest()->getActionName()) {
|
40 |
case 'senders':
|
41 |
$acl = 'system/email_template/mandrill/users_senders';
|
35 |
$this->renderLayout();
|
36 |
}
|
37 |
|
38 |
+
protected function _isAllowed()
|
39 |
+
{
|
40 |
switch ($this->getRequest()->getActionName()) {
|
41 |
case 'senders':
|
42 |
$acl = 'system/email_template/mandrill/users_senders';
|
app/code/community/Ebizmarts/Mandrill/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ebizmarts_Mandrill>
|
5 |
-
<version>2.0.
|
6 |
</Ebizmarts_Mandrill>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ebizmarts_Mandrill>
|
5 |
+
<version>2.0.12</version>
|
6 |
</Ebizmarts_Mandrill>
|
7 |
</modules>
|
8 |
<global>
|
app/code/community/Ebizmarts/SweetMonkey/Block/Adminhtml/System/Config/Autovars.php
CHANGED
@@ -44,12 +44,14 @@ class Ebizmarts_SweetMonkey_Block_Adminhtml_System_Config_Autovars extends Mage_
|
|
44 |
{
|
45 |
|
46 |
$originalData = $element->getOriginalData();
|
47 |
-
$this->addData(
|
|
|
48 |
'button_label' => Mage::helper('paypal')->__($originalData['button_label']),
|
49 |
'html_id' => $element->getHtmlId(),
|
50 |
'snd_button_label' => Mage::helper('paypal')->__($originalData['snd_button_label']),
|
51 |
'snd_html_id' => 'sandbox_' . $element->getHtmlId(),
|
52 |
-
|
|
|
53 |
return $this->_toHtml();
|
54 |
}
|
55 |
}
|
44 |
{
|
45 |
|
46 |
$originalData = $element->getOriginalData();
|
47 |
+
$this->addData(
|
48 |
+
array(
|
49 |
'button_label' => Mage::helper('paypal')->__($originalData['button_label']),
|
50 |
'html_id' => $element->getHtmlId(),
|
51 |
'snd_button_label' => Mage::helper('paypal')->__($originalData['snd_button_label']),
|
52 |
'snd_html_id' => 'sandbox_' . $element->getHtmlId(),
|
53 |
+
)
|
54 |
+
);
|
55 |
return $this->_toHtml();
|
56 |
}
|
57 |
}
|
app/code/community/Ebizmarts/SweetMonkey/Block/Adminhtml/System/Config/Form/Field/Mapfields.php
CHANGED
@@ -11,18 +11,21 @@ class Ebizmarts_SweetMonkey_Block_Adminhtml_System_Config_Form_Field_Mapfields e
|
|
11 |
/**
|
12 |
* Set the columns name
|
13 |
*
|
14 |
-
* @return void
|
15 |
*/
|
16 |
public function __construct()
|
17 |
{
|
18 |
-
$this->addColumn(
|
|
|
19 |
'label' => Mage::helper('sweetmonkey')->__('Code'),
|
20 |
'style' => 'width:120px',
|
21 |
-
|
22 |
-
|
|
|
|
|
23 |
'label' => Mage::helper('sweetmonkey')->__('Label'),
|
24 |
'style' => 'width:120px',
|
25 |
-
|
|
|
26 |
$this->_addAfter = false;
|
27 |
$this->_addButtonLabel = Mage::helper('sweetmonkey')->__('Add field');
|
28 |
parent::__construct();
|
11 |
/**
|
12 |
* Set the columns name
|
13 |
*
|
|
|
14 |
*/
|
15 |
public function __construct()
|
16 |
{
|
17 |
+
$this->addColumn(
|
18 |
+
'var_code', array(
|
19 |
'label' => Mage::helper('sweetmonkey')->__('Code'),
|
20 |
'style' => 'width:120px',
|
21 |
+
)
|
22 |
+
);
|
23 |
+
$this->addColumn(
|
24 |
+
'var_label', array(
|
25 |
'label' => Mage::helper('sweetmonkey')->__('Label'),
|
26 |
'style' => 'width:120px',
|
27 |
+
)
|
28 |
+
);
|
29 |
$this->_addAfter = false;
|
30 |
$this->_addButtonLabel = Mage::helper('sweetmonkey')->__('Add field');
|
31 |
parent::__construct();
|
app/code/community/Ebizmarts/SweetMonkey/Model/Observer.php
CHANGED
@@ -129,7 +129,7 @@ class Ebizmarts_SweetMonkey_Model_Observer
|
|
129 |
|
130 |
}
|
131 |
|
132 |
-
$tbtVars = $this->expirationPoints($tbtVars
|
133 |
// //Expiration Points
|
134 |
// if (array_key_exists('PTSEXP', $tbtVars)) {
|
135 |
// $val = Mage::getSingleton('rewards/expiry')
|
129 |
|
130 |
}
|
131 |
|
132 |
+
$tbtVars = $this->expirationPoints($tbtVars, $tbtCustomer);
|
133 |
// //Expiration Points
|
134 |
// if (array_key_exists('PTSEXP', $tbtVars)) {
|
135 |
// $val = Mage::getSingleton('rewards/expiry')
|
app/code/community/Ebizmarts/SweetMonkey/controllers/Adminhtml/MageMonkeyController.php
CHANGED
@@ -37,10 +37,10 @@ class Ebizmarts_SweetMonkey_Adminhtml_MageMonkeyController extends Mage_Adminhtm
|
|
37 |
if ($listId) {
|
38 |
|
39 |
$api = Mage::getModel('monkey/api');
|
40 |
-
$e =explode('&'
|
41 |
$mergeVars = array();
|
42 |
-
foreach($e as $val) {
|
43 |
-
$m = explode('='
|
44 |
$mergeVars[$m[0]]=$m[1];
|
45 |
}
|
46 |
|
@@ -70,7 +70,8 @@ class Ebizmarts_SweetMonkey_Adminhtml_MageMonkeyController extends Mage_Adminhtm
|
|
70 |
$this->getResponse()->setBody(Zend_Json::encode(array()));
|
71 |
}
|
72 |
|
73 |
-
protected function _isAllowed()
|
|
|
74 |
switch ($this->getRequest()->getActionName()) {
|
75 |
case 'varsToList':
|
76 |
case 'varsForList':
|
37 |
if ($listId) {
|
38 |
|
39 |
$api = Mage::getModel('monkey/api');
|
40 |
+
$e =explode('&', $this->getRequest()->getPost('merge_vars'));
|
41 |
$mergeVars = array();
|
42 |
+
foreach ($e as $val) {
|
43 |
+
$m = explode('=', $val);
|
44 |
$mergeVars[$m[0]]=$m[1];
|
45 |
}
|
46 |
|
70 |
$this->getResponse()->setBody(Zend_Json::encode(array()));
|
71 |
}
|
72 |
|
73 |
+
protected function _isAllowed()
|
74 |
+
{
|
75 |
switch ($this->getRequest()->getActionName()) {
|
76 |
case 'varsToList':
|
77 |
case 'varsForList':
|
js/ebizmarts/autoresponders/visitedproducts.js
CHANGED
@@ -6,11 +6,13 @@
|
|
6 |
*/
|
7 |
;(function () {
|
8 |
function markVisited(productID) {
|
9 |
-
new Ajax.Request(
|
|
|
10 |
method: 'get',
|
11 |
onSuccess: function (transport) {
|
12 |
}
|
13 |
-
|
|
|
14 |
}
|
15 |
|
16 |
var cb = function () {
|
@@ -18,14 +20,16 @@
|
|
18 |
productID = '';
|
19 |
if ($product) {
|
20 |
productID = $product.value;
|
21 |
-
new Ajax.Request(
|
|
|
22 |
method: 'get',
|
23 |
onSuccess: function (transport) {
|
24 |
if (transport.responseJSON.time > -1) {
|
25 |
markVisited.delay(transport.responseJSON.time, productID);
|
26 |
}
|
27 |
}
|
28 |
-
|
|
|
29 |
}
|
30 |
}
|
31 |
if (document.loaded) {
|
6 |
*/
|
7 |
;(function () {
|
8 |
function markVisited(productID) {
|
9 |
+
new Ajax.Request(
|
10 |
+
'/ebizautoresponder/autoresponder/markVisitedProducts?product_id=' + productID, {
|
11 |
method: 'get',
|
12 |
onSuccess: function (transport) {
|
13 |
}
|
14 |
+
}
|
15 |
+
);
|
16 |
}
|
17 |
|
18 |
var cb = function () {
|
20 |
productID = '';
|
21 |
if ($product) {
|
22 |
productID = $product.value;
|
23 |
+
new Ajax.Request(
|
24 |
+
'/ebizautoresponder/autoresponder/getVisitedProductsConfig?product_id=' + productID, {
|
25 |
method: 'get',
|
26 |
onSuccess: function (transport) {
|
27 |
if (transport.responseJSON.time > -1) {
|
28 |
markVisited.delay(transport.responseJSON.time, productID);
|
29 |
}
|
30 |
}
|
31 |
+
}
|
32 |
+
);
|
33 |
}
|
34 |
}
|
35 |
if (document.loaded) {
|
js/ebizmarts/autoresponders/visitedproductsstorecodes.js
CHANGED
@@ -17,11 +17,13 @@
|
|
17 |
}
|
18 |
|
19 |
function markVisited(productID) {
|
20 |
-
new Ajax.Request(
|
|
|
21 |
method: 'get',
|
22 |
onSuccess: function (transport) {
|
23 |
}
|
24 |
-
|
|
|
25 |
}
|
26 |
|
27 |
var cb = function () {
|
@@ -29,14 +31,16 @@
|
|
29 |
productID = '';
|
30 |
if ($product) {
|
31 |
productID = $product.value;
|
32 |
-
new Ajax.Request(
|
|
|
33 |
method: 'get',
|
34 |
onSuccess: function (transport) {
|
35 |
if (transport.responseJSON.time > -1) {
|
36 |
markVisited.delay(transport.responseJSON.time, productID);
|
37 |
}
|
38 |
}
|
39 |
-
|
|
|
40 |
}
|
41 |
}
|
42 |
if (document.loaded) {
|
17 |
}
|
18 |
|
19 |
function markVisited(productID) {
|
20 |
+
new Ajax.Request(
|
21 |
+
getUrl() + 'markVisitedProducts?product_id=' + productID, {
|
22 |
method: 'get',
|
23 |
onSuccess: function (transport) {
|
24 |
}
|
25 |
+
}
|
26 |
+
);
|
27 |
}
|
28 |
|
29 |
var cb = function () {
|
31 |
productID = '';
|
32 |
if ($product) {
|
33 |
productID = $product.value;
|
34 |
+
new Ajax.Request(
|
35 |
+
getUrl() + 'getVisitedProductsConfig?product_id=' + productID, {
|
36 |
method: 'get',
|
37 |
onSuccess: function (transport) {
|
38 |
if (transport.responseJSON.time > -1) {
|
39 |
markVisited.delay(transport.responseJSON.time, productID);
|
40 |
}
|
41 |
}
|
42 |
+
}
|
43 |
+
);
|
44 |
}
|
45 |
}
|
46 |
if (document.loaded) {
|
lib/Mandrill/Mandrill.php
CHANGED
@@ -44,7 +44,7 @@ class Mandrill_Mandrill
|
|
44 |
public $root = 'https://mandrillapp.com/api/1.0';
|
45 |
public $debug = false;
|
46 |
|
47 |
-
public static $
|
48 |
"ValidationError" => "Mandrill_ValidationError",
|
49 |
"Invalid_Key" => "Mandrill_Invalid_Key",
|
50 |
"PaymentRequired" => "Mandrill_PaymentRequired",
|
@@ -132,27 +132,27 @@ class Mandrill_Mandrill
|
|
132 |
$start = microtime(true);
|
133 |
$this->log('Call to ' . $this->root . $url . '.json: ' . $params);
|
134 |
if ($this->debug) {
|
135 |
-
$
|
136 |
-
curl_setopt($ch, CURLOPT_STDERR, $
|
137 |
}
|
138 |
|
139 |
-
$
|
140 |
$info = curl_getinfo($ch);
|
141 |
$time = microtime(true) - $start;
|
142 |
if ($this->debug) {
|
143 |
-
rewind($
|
144 |
-
$this->log(stream_get_contents($
|
145 |
-
fclose($
|
146 |
}
|
147 |
$this->log('Completed in ' . number_format($time * 1000, 2) . 'ms');
|
148 |
-
$this->log('Got response: ' . $
|
149 |
|
150 |
if (curl_error($ch)) {
|
151 |
throw new Mandrill_HttpError("API call to $url failed: " . curl_error($ch));
|
152 |
}
|
153 |
|
154 |
-
$result = json_decode($
|
155 |
-
if ($result === null) throw new Mandrill_Error('We were unable to decode the JSON response from the Mandrill API: ' . $
|
156 |
|
157 |
try {
|
158 |
if (floor($info['http_code'] / 100) >= 4) {
|
@@ -181,7 +181,7 @@ class Mandrill_Mandrill
|
|
181 |
{
|
182 |
if ($result['status'] !== 'error' || !$result['name']) throw new Mandrill_Error('We received an unexpected error: ' . json_encode($result));
|
183 |
|
184 |
-
$class = (isset(self::$
|
185 |
return new $class($result['message'], $result['code']);
|
186 |
}
|
187 |
|
44 |
public $root = 'https://mandrillapp.com/api/1.0';
|
45 |
public $debug = false;
|
46 |
|
47 |
+
public static $errorMap = array(
|
48 |
"ValidationError" => "Mandrill_ValidationError",
|
49 |
"Invalid_Key" => "Mandrill_Invalid_Key",
|
50 |
"PaymentRequired" => "Mandrill_PaymentRequired",
|
132 |
$start = microtime(true);
|
133 |
$this->log('Call to ' . $this->root . $url . '.json: ' . $params);
|
134 |
if ($this->debug) {
|
135 |
+
$curlBuffer = fopen('php://memory', 'w+');
|
136 |
+
curl_setopt($ch, CURLOPT_STDERR, $curlBuffer);
|
137 |
}
|
138 |
|
139 |
+
$responseBody = curl_exec($ch);
|
140 |
$info = curl_getinfo($ch);
|
141 |
$time = microtime(true) - $start;
|
142 |
if ($this->debug) {
|
143 |
+
rewind($curlBuffer);
|
144 |
+
$this->log(stream_get_contents($curlBuffer));
|
145 |
+
fclose($curlBuffer);
|
146 |
}
|
147 |
$this->log('Completed in ' . number_format($time * 1000, 2) . 'ms');
|
148 |
+
$this->log('Got response: ' . $responseBody);
|
149 |
|
150 |
if (curl_error($ch)) {
|
151 |
throw new Mandrill_HttpError("API call to $url failed: " . curl_error($ch));
|
152 |
}
|
153 |
|
154 |
+
$result = json_decode($responseBody, true);
|
155 |
+
if ($result === null) throw new Mandrill_Error('We were unable to decode the JSON response from the Mandrill API: ' . $responseBody);
|
156 |
|
157 |
try {
|
158 |
if (floor($info['http_code'] / 100) >= 4) {
|
181 |
{
|
182 |
if ($result['status'] !== 'error' || !$result['name']) throw new Mandrill_Error('We received an unexpected error: ' . json_encode($result));
|
183 |
|
184 |
+
$class = (isset(self::$errorMap[$result['name']])) ? self::$errorMap[$result['name']] : 'Mandrill_Error';
|
185 |
return new $class($result['message'], $result['code']);
|
186 |
}
|
187 |
|
lib/Mandrill/Mandrill/Exports.php
CHANGED
@@ -49,7 +49,7 @@ class Mandrill_Exports
|
|
49 |
* Begins an export of your rejection blacklist. The blacklist will be exported to a zip archive
|
50 |
* containing a single file named rejects.csv that includes the following fields: email,
|
51 |
* reason, detail, created_at, expires_at, last_event_at, expires_at.
|
52 |
-
* @param string $
|
53 |
* @return struct information about the rejects export job that was started
|
54 |
* - id string the unique identifier for this Export. Use this identifier when checking the export job's status
|
55 |
* - created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
@@ -58,9 +58,9 @@ class Mandrill_Exports
|
|
58 |
* - state string the export job's state
|
59 |
* - result_url string the url for the export job's results, if the job is complete
|
60 |
*/
|
61 |
-
public function rejects($
|
62 |
{
|
63 |
-
$_params = array("notify_email" => $
|
64 |
return $this->master->call('exports/rejects', $_params);
|
65 |
}
|
66 |
|
@@ -68,7 +68,7 @@ class Mandrill_Exports
|
|
68 |
* Begins an export of your rejection whitelist. The whitelist will be exported to a zip archive
|
69 |
* containing a single file named whitelist.csv that includes the following fields:
|
70 |
* email, detail, created_at.
|
71 |
-
* @param string $
|
72 |
* @return struct information about the whitelist export job that was started
|
73 |
* - id string the unique identifier for this Export. Use this identifier when checking the export job's status
|
74 |
* - created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
@@ -77,9 +77,9 @@ class Mandrill_Exports
|
|
77 |
* - state string the export job's state
|
78 |
* - result_url string the url for the export job's results, if the job is complete
|
79 |
*/
|
80 |
-
public function whitelist($
|
81 |
{
|
82 |
-
$_params = array("notify_email" => $
|
83 |
return $this->master->call('exports/whitelist', $_params);
|
84 |
}
|
85 |
|
@@ -89,16 +89,16 @@ class Mandrill_Exports
|
|
89 |
* from your account's activity view. It includes the following fields: Date, Email Address,
|
90 |
* Sender, Subject, Status, Tags, Opens, Clicks, Bounce Detail. If you have configured any custom
|
91 |
* metadata fields, they will be included in the exported data.
|
92 |
-
* @param string $
|
93 |
-
* @param string $
|
94 |
-
* @param string $
|
95 |
* @param array $tags an array of tag names to narrow the export to; will match messages that contain ANY of the tags
|
96 |
* - tags[] string a tag name
|
97 |
* @param array $senders an array of senders to narrow the export to
|
98 |
* - senders[] string a sender address
|
99 |
* @param array $states an array of states to narrow the export to; messages with ANY of the states will be included
|
100 |
* - states[] string a message state
|
101 |
-
* @param array $
|
102 |
* - api_keys[] string an API key associated with your account
|
103 |
* @return struct information about the activity export job that was started
|
104 |
* - id string the unique identifier for this Export. Use this identifier when checking the export job's status
|
@@ -108,9 +108,9 @@ class Mandrill_Exports
|
|
108 |
* - state string the export job's state
|
109 |
* - result_url string the url for the export job's results, if the job is complete
|
110 |
*/
|
111 |
-
public function activity($
|
112 |
{
|
113 |
-
$_params = array("notify_email" => $
|
114 |
return $this->master->call('exports/activity', $_params);
|
115 |
}
|
116 |
|
49 |
* Begins an export of your rejection blacklist. The blacklist will be exported to a zip archive
|
50 |
* containing a single file named rejects.csv that includes the following fields: email,
|
51 |
* reason, detail, created_at, expires_at, last_event_at, expires_at.
|
52 |
+
* @param string $notifyEmail an optional email address to notify when the export job has finished.
|
53 |
* @return struct information about the rejects export job that was started
|
54 |
* - id string the unique identifier for this Export. Use this identifier when checking the export job's status
|
55 |
* - created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
58 |
* - state string the export job's state
|
59 |
* - result_url string the url for the export job's results, if the job is complete
|
60 |
*/
|
61 |
+
public function rejects($notifyEmail = null)
|
62 |
{
|
63 |
+
$_params = array("notify_email" => $notifyEmail);
|
64 |
return $this->master->call('exports/rejects', $_params);
|
65 |
}
|
66 |
|
68 |
* Begins an export of your rejection whitelist. The whitelist will be exported to a zip archive
|
69 |
* containing a single file named whitelist.csv that includes the following fields:
|
70 |
* email, detail, created_at.
|
71 |
+
* @param string $notifyEmail an optional email address to notify when the export job has finished.
|
72 |
* @return struct information about the whitelist export job that was started
|
73 |
* - id string the unique identifier for this Export. Use this identifier when checking the export job's status
|
74 |
* - created_at string the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
77 |
* - state string the export job's state
|
78 |
* - result_url string the url for the export job's results, if the job is complete
|
79 |
*/
|
80 |
+
public function whitelist($notifyEmail = null)
|
81 |
{
|
82 |
+
$_params = array("notify_email" => $notifyEmail);
|
83 |
return $this->master->call('exports/whitelist', $_params);
|
84 |
}
|
85 |
|
89 |
* from your account's activity view. It includes the following fields: Date, Email Address,
|
90 |
* Sender, Subject, Status, Tags, Opens, Clicks, Bounce Detail. If you have configured any custom
|
91 |
* metadata fields, they will be included in the exported data.
|
92 |
+
* @param string $notifyEmail an optional email address to notify when the export job has finished
|
93 |
+
* @param string $dateFrom start date as a UTC string in YYYY-MM-DD HH:MM:SS format
|
94 |
+
* @param string $dateTo end date as a UTC string in YYYY-MM-DD HH:MM:SS format
|
95 |
* @param array $tags an array of tag names to narrow the export to; will match messages that contain ANY of the tags
|
96 |
* - tags[] string a tag name
|
97 |
* @param array $senders an array of senders to narrow the export to
|
98 |
* - senders[] string a sender address
|
99 |
* @param array $states an array of states to narrow the export to; messages with ANY of the states will be included
|
100 |
* - states[] string a message state
|
101 |
+
* @param array $apiKeys an array of api keys to narrow the export to; messsagse sent with ANY of the keys will be included
|
102 |
* - api_keys[] string an API key associated with your account
|
103 |
* @return struct information about the activity export job that was started
|
104 |
* - id string the unique identifier for this Export. Use this identifier when checking the export job's status
|
108 |
* - state string the export job's state
|
109 |
* - result_url string the url for the export job's results, if the job is complete
|
110 |
*/
|
111 |
+
public function activity($notifyEmail = null, $dateFrom = null, $dateTo = null, $tags = null, $senders = null, $states = null, $apiKeys = null)
|
112 |
{
|
113 |
+
$_params = array("notify_email" => $notifyEmail, "date_from" => $dateFrom, "date_to" => $dateTo, "tags" => $tags, "senders" => $senders, "states" => $states, "api_keys" => $apiKeys);
|
114 |
return $this->master->call('exports/activity', $_params);
|
115 |
}
|
116 |
|
lib/Mandrill/Mandrill/Inbound.php
CHANGED
@@ -126,21 +126,21 @@ class Mandrill_Inbound
|
|
126 |
|
127 |
/**
|
128 |
* Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP
|
129 |
-
* @param string $
|
130 |
* @param array|null $to optionally define the recipients to receive the message - otherwise we'll use the To, Cc, and Bcc headers provided in the document
|
131 |
* - to[] string the email address of the recipient
|
132 |
-
* @param string $
|
133 |
* @param string $helo the identification provided by the client mta in the MTA state of the SMTP conversation. Required for the SPF check.
|
134 |
-
* @param string $
|
135 |
* @return array an array of the information for each recipient in the message (usually one) that matched an inbound route
|
136 |
* - return[] struct the individual recipient information
|
137 |
* - email string the email address of the matching recipient
|
138 |
* - pattern string the mailbox route pattern that the recipient matched
|
139 |
* - url string the webhook URL that the message was posted to
|
140 |
*/
|
141 |
-
public function sendRaw($
|
142 |
{
|
143 |
-
$_params = array("raw_message" => $
|
144 |
return $this->master->call('inbound/send-raw', $_params);
|
145 |
}
|
146 |
|
126 |
|
127 |
/**
|
128 |
* Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP
|
129 |
+
* @param string $rawMessage the full MIME document of an email message
|
130 |
* @param array|null $to optionally define the recipients to receive the message - otherwise we'll use the To, Cc, and Bcc headers provided in the document
|
131 |
* - to[] string the email address of the recipient
|
132 |
+
* @param string $mailFrom the address specified in the MAIL FROM stage of the SMTP conversation. Required for the SPF check.
|
133 |
* @param string $helo the identification provided by the client mta in the MTA state of the SMTP conversation. Required for the SPF check.
|
134 |
+
* @param string $clientAddress the remote MTA's ip address. Optional; required for the SPF check.
|
135 |
* @return array an array of the information for each recipient in the message (usually one) that matched an inbound route
|
136 |
* - return[] struct the individual recipient information
|
137 |
* - email string the email address of the matching recipient
|
138 |
* - pattern string the mailbox route pattern that the recipient matched
|
139 |
* - url string the webhook URL that the message was posted to
|
140 |
*/
|
141 |
+
public function sendRaw($rawMessage, $to = null, $mailFrom = null, $helo = null, $clientAddress = null)
|
142 |
{
|
143 |
+
$_params = array("raw_message" => $rawMessage, "to" => $to, "mail_from" => $mailFrom, "helo" => $helo, "client_address" => $clientAddress);
|
144 |
return $this->master->call('inbound/send-raw', $_params);
|
145 |
}
|
146 |
|
lib/Mandrill/Mandrill/Ips.php
CHANGED
@@ -121,7 +121,7 @@ class Mandrill_Ips
|
|
121 |
* Moves a dedicated IP to a different pool.
|
122 |
* @param string $ip a dedicated ip address
|
123 |
* @param string $pool the name of the new pool to add the dedicated ip to
|
124 |
-
* @param boolean $
|
125 |
* @return struct Information about the updated state of the dedicated IP
|
126 |
* - ip string the ip address
|
127 |
* - created_at string the date and time that the dedicated IP was created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
@@ -136,9 +136,9 @@ class Mandrill_Ips
|
|
136 |
* - start_at string the start time for the warmup process as a UTC string in YYYY-MM-DD HH:MM:SS format
|
137 |
* - end_at string the end date and time for the warmup process as a UTC string in YYYY-MM-DD HH:MM:SS format
|
138 |
*/
|
139 |
-
public function setPool($ip, $pool, $
|
140 |
{
|
141 |
-
$_params = array("ip" => $ip, "pool" => $pool, "create_pool" => $
|
142 |
return $this->master->call('ips/set-pool', $_params);
|
143 |
}
|
144 |
|
121 |
* Moves a dedicated IP to a different pool.
|
122 |
* @param string $ip a dedicated ip address
|
123 |
* @param string $pool the name of the new pool to add the dedicated ip to
|
124 |
+
* @param boolean $createPool whether to create the pool if it does not exist; if false and the pool does not exist, an Unknown_Pool will be thrown.
|
125 |
* @return struct Information about the updated state of the dedicated IP
|
126 |
* - ip string the ip address
|
127 |
* - created_at string the date and time that the dedicated IP was created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
136 |
* - start_at string the start time for the warmup process as a UTC string in YYYY-MM-DD HH:MM:SS format
|
137 |
* - end_at string the end date and time for the warmup process as a UTC string in YYYY-MM-DD HH:MM:SS format
|
138 |
*/
|
139 |
+
public function setPool($ip, $pool, $createPool = false)
|
140 |
{
|
141 |
+
$_params = array("ip" => $ip, "pool" => $pool, "create_pool" => $createPool);
|
142 |
return $this->master->call('ips/set-pool', $_params);
|
143 |
}
|
144 |
|
lib/Mandrill/Mandrill/Messages.php
CHANGED
@@ -67,8 +67,8 @@ class Mandrill_Messages
|
|
67 |
* - name string the Content ID of the image - use <img src="cid:THIS_VALUE"> to reference the image in your HTML content
|
68 |
* - content string the content of the image as a base64-encoded string
|
69 |
* @param boolean $async enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
|
70 |
-
* @param string $
|
71 |
-
* @param string $
|
72 |
* @return array of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
73 |
* - return[] struct the sending results for a single recipient
|
74 |
* - email string the email address of the recipient
|
@@ -76,16 +76,16 @@ class Mandrill_Messages
|
|
76 |
* - reject_reason string the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
77 |
* - _id string the message's unique id
|
78 |
*/
|
79 |
-
public function send($message, $async = false, $
|
80 |
{
|
81 |
-
$_params = array("message" => $message, "async" => $async, "ip_pool" => $
|
82 |
return $this->master->call('messages/send', $_params);
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
* Send a new transactional message through Mandrill using a template
|
87 |
-
* @param string $
|
88 |
-
* @param array $
|
89 |
* - template_content[] struct the injection of a single piece of content into a single editable region
|
90 |
* - name string the name of the mc:edit editable region to inject into
|
91 |
* - content string the content to inject
|
@@ -147,8 +147,8 @@ class Mandrill_Messages
|
|
147 |
* - name string the Content ID of the image - use <img src="cid:THIS_VALUE"> to reference the image in your HTML content
|
148 |
* - content string the content of the image as a base64-encoded string
|
149 |
* @param boolean $async enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
|
150 |
-
* @param string $
|
151 |
-
* @param string $
|
152 |
* @return array of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
153 |
* - return[] struct the sending results for a single recipient
|
154 |
* - email string the email address of the recipient
|
@@ -156,20 +156,20 @@ class Mandrill_Messages
|
|
156 |
* - reject_reason string the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
157 |
* - _id string the message's unique id
|
158 |
*/
|
159 |
-
public function sendTemplate($
|
160 |
{
|
161 |
-
$_params = array("template_name" => $
|
162 |
return $this->master->call('messages/send-template', $_params);
|
163 |
}
|
164 |
|
165 |
/**
|
166 |
* Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. If no date range is specified, results within the last 7 days are returned. This method may be called up to 20 times per minute. If you need the data more often, you can use <a href="/api/docs/messages.html#method=info">/messages/info.json</a> to get the information for a single message, or <a href="http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks">webhooks</a> to push activity to your own application for querying.
|
167 |
* @param string $query <a href="http://help.mandrill.com/entries/22211902">search terms</a> to find matching messages
|
168 |
-
* @param string $
|
169 |
-
* @param string $
|
170 |
* @param array $tags an array of tag names to narrow the search to, will return messages that contain ANY of the tags
|
171 |
* @param array $senders an array of sender addresses to narrow the search to, will return messages sent by ANY of the senders
|
172 |
-
* @param array $
|
173 |
* @param integer $limit the maximum number of results to return, defaults to 100, 1000 is the maximum
|
174 |
* @return array of structs for each matching message
|
175 |
* - return[] struct the information for a single matching message
|
@@ -204,17 +204,17 @@ class Mandrill_Messages
|
|
204 |
* - type string the message's state as a result of this event
|
205 |
* - diag string the SMTP response from the recipient's server
|
206 |
*/
|
207 |
-
public function search($query = '*', $
|
208 |
{
|
209 |
-
$_params = array("query" => $query, "date_from" => $
|
210 |
return $this->master->call('messages/search', $_params);
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
* Search the content of recently sent messages and return the aggregated hourly stats for matching messages
|
215 |
* @param string $query the search terms to find matching messages for
|
216 |
-
* @param string $
|
217 |
-
* @param string $
|
218 |
* @param array $tags an array of tag names to narrow the search to, will return messages that contain ANY of the tags
|
219 |
* @param array $senders an array of sender addresses to narrow the search to, will return messages sent by ANY of the senders
|
220 |
* @return array the array of history information
|
@@ -231,9 +231,9 @@ class Mandrill_Messages
|
|
231 |
* - clicks integer the number of tracked URLs clicked during the hour
|
232 |
* - unique_clicks integer the number of unique clicks generated by messages sent during the hour
|
233 |
*/
|
234 |
-
public function searchTimeSeries($query = '*', $
|
235 |
{
|
236 |
-
$_params = array("query" => $query, "date_from" => $
|
237 |
return $this->master->call('messages/search-time-series', $_params);
|
238 |
}
|
239 |
|
@@ -309,7 +309,7 @@ class Mandrill_Messages
|
|
309 |
|
310 |
/**
|
311 |
* Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces
|
312 |
-
* @param string $
|
313 |
* @return struct the parsed message
|
314 |
* - subject string the subject of the message
|
315 |
* - from_email string the email address of the sender
|
@@ -333,23 +333,23 @@ class Mandrill_Messages
|
|
333 |
* - type string the MIME type of the image
|
334 |
* - content string the content of the image as a base64 encoded string
|
335 |
*/
|
336 |
-
public function parse($
|
337 |
{
|
338 |
-
$_params = array("raw_message" => $
|
339 |
return $this->master->call('messages/parse', $_params);
|
340 |
}
|
341 |
|
342 |
/**
|
343 |
* Take a raw MIME document for a message, and send it exactly as if it were sent through Mandrill's SMTP servers
|
344 |
-
* @param string $
|
345 |
-
* @param string|null $
|
346 |
-
* @param string|null $
|
347 |
* @param array|null $to optionally define the recipients to receive the message - otherwise we'll use the To, Cc, and Bcc headers provided in the document
|
348 |
* - to[] string the email address of the recipient
|
349 |
* @param boolean $async enable a background sending mode that is optimized for bulk sending. In async mode, messages/sendRaw will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
|
350 |
-
* @param string $
|
351 |
-
* @param string $
|
352 |
-
* @param string $
|
353 |
* @return array of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
354 |
* - return[] struct the sending results for a single recipient
|
355 |
* - email string the email address of the recipient
|
@@ -357,9 +357,9 @@ class Mandrill_Messages
|
|
357 |
* - reject_reason string the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
358 |
* - _id string the message's unique id
|
359 |
*/
|
360 |
-
public function sendRaw($
|
361 |
{
|
362 |
-
$_params = array("raw_message" => $
|
363 |
return $this->master->call('messages/send-raw', $_params);
|
364 |
}
|
365 |
|
@@ -401,7 +401,7 @@ class Mandrill_Messages
|
|
401 |
/**
|
402 |
* Reschedules a scheduled email.
|
403 |
* @param string $id a scheduled email id, as returned by any of the messages/send calls or messages/list-scheduled
|
404 |
-
* @param string $
|
405 |
* @return struct information about the scheduled email that was rescheduled.
|
406 |
* - _id string the scheduled message id
|
407 |
* - created_at string the UTC timestamp when the message was created, in YYYY-MM-DD HH:MM:SS format
|
@@ -410,9 +410,9 @@ class Mandrill_Messages
|
|
410 |
* - to string the email's recipient
|
411 |
* - subject string the email's subject
|
412 |
*/
|
413 |
-
public function reschedule($id, $
|
414 |
{
|
415 |
-
$_params = array("id" => $id, "send_at" => $
|
416 |
return $this->master->call('messages/reschedule', $_params);
|
417 |
}
|
418 |
|
67 |
* - name string the Content ID of the image - use <img src="cid:THIS_VALUE"> to reference the image in your HTML content
|
68 |
* - content string the content of the image as a base64-encoded string
|
69 |
* @param boolean $async enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
|
70 |
+
* @param string $ipPool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
|
71 |
+
* @param string $sendAt when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately. An additional fee applies for scheduled email, and this feature is only available to accounts with a positive balance.
|
72 |
* @return array of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
73 |
* - return[] struct the sending results for a single recipient
|
74 |
* - email string the email address of the recipient
|
76 |
* - reject_reason string the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
77 |
* - _id string the message's unique id
|
78 |
*/
|
79 |
+
public function send($message, $async = false, $ipPool = null, $sendAt = null)
|
80 |
{
|
81 |
+
$_params = array("message" => $message, "async" => $async, "ip_pool" => $ipPool, "send_at" => $sendAt);
|
82 |
return $this->master->call('messages/send', $_params);
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
* Send a new transactional message through Mandrill using a template
|
87 |
+
* @param string $templateName the immutable name or slug of a template that exists in the user's account. For backwards-compatibility, the template name may also be used but the immutable slug is preferred.
|
88 |
+
* @param array $templateContent an array of template content to send. Each item in the array should be a struct with two keys - name: the name of the content block to set the content for, and content: the actual content to put into the block
|
89 |
* - template_content[] struct the injection of a single piece of content into a single editable region
|
90 |
* - name string the name of the mc:edit editable region to inject into
|
91 |
* - content string the content to inject
|
147 |
* - name string the Content ID of the image - use <img src="cid:THIS_VALUE"> to reference the image in your HTML content
|
148 |
* - content string the content of the image as a base64-encoded string
|
149 |
* @param boolean $async enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
|
150 |
+
* @param string $ipPool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
|
151 |
+
* @param string $sendAt when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately. An additional fee applies for scheduled email, and this feature is only available to accounts with a positive balance.
|
152 |
* @return array of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
153 |
* - return[] struct the sending results for a single recipient
|
154 |
* - email string the email address of the recipient
|
156 |
* - reject_reason string the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
157 |
* - _id string the message's unique id
|
158 |
*/
|
159 |
+
public function sendTemplate($templateName, $templateContent, $message, $async = false, $ipPool = null, $sendAt = null)
|
160 |
{
|
161 |
+
$_params = array("template_name" => $templateName, "template_content" => $templateContent, "message" => $message, "async" => $async, "ip_pool" => $ipPool, "send_at" => $sendAt);
|
162 |
return $this->master->call('messages/send-template', $_params);
|
163 |
}
|
164 |
|
165 |
/**
|
166 |
* Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. If no date range is specified, results within the last 7 days are returned. This method may be called up to 20 times per minute. If you need the data more often, you can use <a href="/api/docs/messages.html#method=info">/messages/info.json</a> to get the information for a single message, or <a href="http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks">webhooks</a> to push activity to your own application for querying.
|
167 |
* @param string $query <a href="http://help.mandrill.com/entries/22211902">search terms</a> to find matching messages
|
168 |
+
* @param string $dateFrom start date
|
169 |
+
* @param string $dateTo end date
|
170 |
* @param array $tags an array of tag names to narrow the search to, will return messages that contain ANY of the tags
|
171 |
* @param array $senders an array of sender addresses to narrow the search to, will return messages sent by ANY of the senders
|
172 |
+
* @param array $apiKeys an array of API keys to narrow the search to, will return messages sent by ANY of the keys
|
173 |
* @param integer $limit the maximum number of results to return, defaults to 100, 1000 is the maximum
|
174 |
* @return array of structs for each matching message
|
175 |
* - return[] struct the information for a single matching message
|
204 |
* - type string the message's state as a result of this event
|
205 |
* - diag string the SMTP response from the recipient's server
|
206 |
*/
|
207 |
+
public function search($query = '*', $dateFrom = null, $dateTo = null, $tags = null, $senders = null, $apiKeys = null, $limit = 100)
|
208 |
{
|
209 |
+
$_params = array("query" => $query, "date_from" => $dateFrom, "date_to" => $dateTo, "tags" => $tags, "senders" => $senders, "api_keys" => $apiKeys, "limit" => $limit);
|
210 |
return $this->master->call('messages/search', $_params);
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
* Search the content of recently sent messages and return the aggregated hourly stats for matching messages
|
215 |
* @param string $query the search terms to find matching messages for
|
216 |
+
* @param string $dateFrom start date
|
217 |
+
* @param string $dateTo end date
|
218 |
* @param array $tags an array of tag names to narrow the search to, will return messages that contain ANY of the tags
|
219 |
* @param array $senders an array of sender addresses to narrow the search to, will return messages sent by ANY of the senders
|
220 |
* @return array the array of history information
|
231 |
* - clicks integer the number of tracked URLs clicked during the hour
|
232 |
* - unique_clicks integer the number of unique clicks generated by messages sent during the hour
|
233 |
*/
|
234 |
+
public function searchTimeSeries($query = '*', $dateFrom = null, $dateTo = null, $tags = null, $senders = null)
|
235 |
{
|
236 |
+
$_params = array("query" => $query, "date_from" => $dateFrom, "date_to" => $dateTo, "tags" => $tags, "senders" => $senders);
|
237 |
return $this->master->call('messages/search-time-series', $_params);
|
238 |
}
|
239 |
|
309 |
|
310 |
/**
|
311 |
* Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces
|
312 |
+
* @param string $rawMessage the full MIME document of an email message
|
313 |
* @return struct the parsed message
|
314 |
* - subject string the subject of the message
|
315 |
* - from_email string the email address of the sender
|
333 |
* - type string the MIME type of the image
|
334 |
* - content string the content of the image as a base64 encoded string
|
335 |
*/
|
336 |
+
public function parse($rawMessage)
|
337 |
{
|
338 |
+
$_params = array("raw_message" => $rawMessage);
|
339 |
return $this->master->call('messages/parse', $_params);
|
340 |
}
|
341 |
|
342 |
/**
|
343 |
* Take a raw MIME document for a message, and send it exactly as if it were sent through Mandrill's SMTP servers
|
344 |
+
* @param string $rawMessage the full MIME document of an email message
|
345 |
+
* @param string|null $fromEmail optionally define the sender address - otherwise we'll use the address found in the provided headers
|
346 |
+
* @param string|null $fromName optionally define the sender alias
|
347 |
* @param array|null $to optionally define the recipients to receive the message - otherwise we'll use the To, Cc, and Bcc headers provided in the document
|
348 |
* - to[] string the email address of the recipient
|
349 |
* @param boolean $async enable a background sending mode that is optimized for bulk sending. In async mode, messages/sendRaw will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
|
350 |
+
* @param string $ipPool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
|
351 |
+
* @param string $sendAt when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately.
|
352 |
+
* @param string $returnPathDomain a custom domain to use for the messages's return-path
|
353 |
* @return array of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
354 |
* - return[] struct the sending results for a single recipient
|
355 |
* - email string the email address of the recipient
|
357 |
* - reject_reason string the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
358 |
* - _id string the message's unique id
|
359 |
*/
|
360 |
+
public function sendRaw($rawMessage, $fromEmail = null, $fromName = null, $to = null, $async = false, $ipPool = null, $sendAt = null, $returnPathDomain = null)
|
361 |
{
|
362 |
+
$_params = array("raw_message" => $rawMessage, "from_email" => $fromEmail, "from_name" => $fromName, "to" => $to, "async" => $async, "ip_pool" => $ipPool, "send_at" => $sendAt, "return_path_domain" => $returnPathDomain);
|
363 |
return $this->master->call('messages/send-raw', $_params);
|
364 |
}
|
365 |
|
401 |
/**
|
402 |
* Reschedules a scheduled email.
|
403 |
* @param string $id a scheduled email id, as returned by any of the messages/send calls or messages/list-scheduled
|
404 |
+
* @param string $sendAt the new UTC timestamp when the message should sent. Mandrill can't time travel, so if you specify a time in past the message will be sent immediately
|
405 |
* @return struct information about the scheduled email that was rescheduled.
|
406 |
* - _id string the scheduled message id
|
407 |
* - created_at string the UTC timestamp when the message was created, in YYYY-MM-DD HH:MM:SS format
|
410 |
* - to string the email's recipient
|
411 |
* - subject string the email's subject
|
412 |
*/
|
413 |
+
public function reschedule($id, $sendAt)
|
414 |
{
|
415 |
+
$_params = array("id" => $id, "send_at" => $sendAt);
|
416 |
return $this->master->call('messages/reschedule', $_params);
|
417 |
}
|
418 |
|
lib/Mandrill/Mandrill/Metadata.php
CHANGED
@@ -24,30 +24,30 @@ class Mandrill_Metadata
|
|
24 |
/**
|
25 |
* Add a new custom metadata field to be indexed for the account.
|
26 |
* @param string $name a unique identifier for the metadata field
|
27 |
-
* @param string $
|
28 |
* @return struct the information saved about the new metadata field
|
29 |
* - name string the unique identifier of the metadata field to update
|
30 |
* - state string the current state of the metadata field, one of "active", "delete", or "index"
|
31 |
* - view_template string Mustache template to control how the metadata is rendered in your activity log
|
32 |
*/
|
33 |
-
public function add($name, $
|
34 |
{
|
35 |
-
$_params = array("name" => $name, "view_template" => $
|
36 |
return $this->master->call('metadata/add', $_params);
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
* Update an existing custom metadata field.
|
41 |
* @param string $name the unique identifier of the metadata field to update
|
42 |
-
* @param string $
|
43 |
* @return struct the information for the updated metadata field
|
44 |
* - name string the unique identifier of the metadata field to update
|
45 |
* - state string the current state of the metadata field, one of "active", "delete", or "index"
|
46 |
* - view_template string Mustache template to control how the metadata is rendered in your activity log
|
47 |
*/
|
48 |
-
public function update($name, $
|
49 |
{
|
50 |
-
$_params = array("name" => $name, "view_template" => $
|
51 |
return $this->master->call('metadata/update', $_params);
|
52 |
}
|
53 |
|
24 |
/**
|
25 |
* Add a new custom metadata field to be indexed for the account.
|
26 |
* @param string $name a unique identifier for the metadata field
|
27 |
+
* @param string $viewTemplate optional Mustache template to control how the metadata is rendered in your activity log
|
28 |
* @return struct the information saved about the new metadata field
|
29 |
* - name string the unique identifier of the metadata field to update
|
30 |
* - state string the current state of the metadata field, one of "active", "delete", or "index"
|
31 |
* - view_template string Mustache template to control how the metadata is rendered in your activity log
|
32 |
*/
|
33 |
+
public function add($name, $viewTemplate = null)
|
34 |
{
|
35 |
+
$_params = array("name" => $name, "view_template" => $viewTemplate);
|
36 |
return $this->master->call('metadata/add', $_params);
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
* Update an existing custom metadata field.
|
41 |
* @param string $name the unique identifier of the metadata field to update
|
42 |
+
* @param string $viewTemplate optional Mustache template to control how the metadata is rendered in your activity log
|
43 |
* @return struct the information for the updated metadata field
|
44 |
* - name string the unique identifier of the metadata field to update
|
45 |
* - state string the current state of the metadata field, one of "active", "delete", or "index"
|
46 |
* - view_template string Mustache template to control how the metadata is rendered in your activity log
|
47 |
*/
|
48 |
+
public function update($name, $viewTemplate)
|
49 |
{
|
50 |
+
$_params = array("name" => $name, "view_template" => $viewTemplate);
|
51 |
return $this->master->call('metadata/update', $_params);
|
52 |
}
|
53 |
|
lib/Mandrill/Mandrill/Rejects.php
CHANGED
@@ -31,7 +31,7 @@ class Mandrill_Rejects
|
|
31 |
* entries that have expired are excluded from the results; set
|
32 |
* include_expired to true to include them.
|
33 |
* @param string $email an optional email address to search by
|
34 |
-
* @param boolean $
|
35 |
* @param string $subaccount an optional unique identifier for the subaccount to limit the blacklist
|
36 |
* @return array Up to 1000 rejection entries
|
37 |
* - return[] struct the information for each rejection blacklist entry
|
@@ -57,9 +57,9 @@ class Mandrill_Rejects
|
|
57 |
* - unique_clicks integer the number of unique clicks for emails sent for this sender
|
58 |
* - subaccount string the subaccount that this blacklist entry applies to, or null if none.
|
59 |
*/
|
60 |
-
public function getList($email = null, $
|
61 |
{
|
62 |
-
$_params = array("email" => $email, "include_expired" => $
|
63 |
return $this->master->call('rejects/list', $_params);
|
64 |
}
|
65 |
|
31 |
* entries that have expired are excluded from the results; set
|
32 |
* include_expired to true to include them.
|
33 |
* @param string $email an optional email address to search by
|
34 |
+
* @param boolean $includeExpired whether to include rejections that have already expired.
|
35 |
* @param string $subaccount an optional unique identifier for the subaccount to limit the blacklist
|
36 |
* @return array Up to 1000 rejection entries
|
37 |
* - return[] struct the information for each rejection blacklist entry
|
57 |
* - unique_clicks integer the number of unique clicks for emails sent for this sender
|
58 |
* - subaccount string the subaccount that this blacklist entry applies to, or null if none.
|
59 |
*/
|
60 |
+
public function getList($email = null, $includeExpired = false, $subaccount = null)
|
61 |
{
|
62 |
+
$_params = array("email" => $email, "include_expired" => $includeExpired, "subaccount" => $subaccount);
|
63 |
return $this->master->call('rejects/list', $_params);
|
64 |
}
|
65 |
|
lib/Mandrill/Mandrill/Subaccounts.php
CHANGED
@@ -34,7 +34,7 @@ class Mandrill_Subaccounts
|
|
34 |
* @param string $id a unique identifier for the subaccount to be used in sending calls
|
35 |
* @param string $name an optional display name to further identify the subaccount
|
36 |
* @param string $notes optional extra text to associate with the subaccount
|
37 |
-
* @param integer $
|
38 |
* @return struct the information saved about the new subaccount
|
39 |
* - id string a unique indentifier for the subaccount
|
40 |
* - name string an optional display name for the subaccount
|
@@ -47,9 +47,9 @@ class Mandrill_Subaccounts
|
|
47 |
* - sent_monthly integer the number of emails the subaccount has sent so far this month (months start on midnight of the 1st, UTC)
|
48 |
* - sent_total integer the number of emails the subaccount has sent since it was created
|
49 |
*/
|
50 |
-
public function add($id, $name = null, $notes = null, $
|
51 |
{
|
52 |
-
$_params = array("id" => $id, "name" => $name, "notes" => $notes, "custom_quota" => $
|
53 |
return $this->master->call('subaccounts/add', $_params);
|
54 |
}
|
55 |
|
@@ -93,7 +93,7 @@ class Mandrill_Subaccounts
|
|
93 |
* @param string $id the unique identifier of the subaccount to update
|
94 |
* @param string $name an optional display name to further identify the subaccount
|
95 |
* @param string $notes optional extra text to associate with the subaccount
|
96 |
-
* @param integer $
|
97 |
* @return struct the information for the updated subaccount
|
98 |
* - id string a unique indentifier for the subaccount
|
99 |
* - name string an optional display name for the subaccount
|
@@ -106,9 +106,9 @@ class Mandrill_Subaccounts
|
|
106 |
* - sent_monthly integer the number of emails the subaccount has sent so far this month (months start on midnight of the 1st, UTC)
|
107 |
* - sent_total integer the number of emails the subaccount has sent since it was created
|
108 |
*/
|
109 |
-
public function update($id, $name = null, $notes = null, $
|
110 |
{
|
111 |
-
$_params = array("id" => $id, "name" => $name, "notes" => $notes, "custom_quota" => $
|
112 |
return $this->master->call('subaccounts/update', $_params);
|
113 |
}
|
114 |
|
34 |
* @param string $id a unique identifier for the subaccount to be used in sending calls
|
35 |
* @param string $name an optional display name to further identify the subaccount
|
36 |
* @param string $notes optional extra text to associate with the subaccount
|
37 |
+
* @param integer $customQuota an optional manual hourly quota for the subaccount. If not specified, Mandrill will manage this based on reputation
|
38 |
* @return struct the information saved about the new subaccount
|
39 |
* - id string a unique indentifier for the subaccount
|
40 |
* - name string an optional display name for the subaccount
|
47 |
* - sent_monthly integer the number of emails the subaccount has sent so far this month (months start on midnight of the 1st, UTC)
|
48 |
* - sent_total integer the number of emails the subaccount has sent since it was created
|
49 |
*/
|
50 |
+
public function add($id, $name = null, $notes = null, $customQuota = null)
|
51 |
{
|
52 |
+
$_params = array("id" => $id, "name" => $name, "notes" => $notes, "custom_quota" => $customQuota);
|
53 |
return $this->master->call('subaccounts/add', $_params);
|
54 |
}
|
55 |
|
93 |
* @param string $id the unique identifier of the subaccount to update
|
94 |
* @param string $name an optional display name to further identify the subaccount
|
95 |
* @param string $notes optional extra text to associate with the subaccount
|
96 |
+
* @param integer $customQuota an optional manual hourly quota for the subaccount. If not specified, Mandrill will manage this based on reputation
|
97 |
* @return struct the information for the updated subaccount
|
98 |
* - id string a unique indentifier for the subaccount
|
99 |
* - name string an optional display name for the subaccount
|
106 |
* - sent_monthly integer the number of emails the subaccount has sent so far this month (months start on midnight of the 1st, UTC)
|
107 |
* - sent_total integer the number of emails the subaccount has sent since it was created
|
108 |
*/
|
109 |
+
public function update($id, $name = null, $notes = null, $customQuota = null)
|
110 |
{
|
111 |
+
$_params = array("id" => $id, "name" => $name, "notes" => $notes, "custom_quota" => $customQuota);
|
112 |
return $this->master->call('subaccounts/update', $_params);
|
113 |
}
|
114 |
|
lib/Mandrill/Mandrill/Templates.php
CHANGED
@@ -10,8 +10,8 @@ class Mandrill_Templates
|
|
10 |
/**
|
11 |
* Add a new template
|
12 |
* @param string $name the name for the new template - must be unique
|
13 |
-
* @param string $
|
14 |
-
* @param string $
|
15 |
* @param string $subject a default subject line to be used
|
16 |
* @param string $code the HTML code for the template with mc:edit attributes for the editable elements
|
17 |
* @param string $text a default text part to be used when sending with this template
|
@@ -38,9 +38,9 @@ class Mandrill_Templates
|
|
38 |
* - created_at string the date and time the template was first created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
39 |
* - updated_at string the date and time the template was last modified as a UTC string in YYYY-MM-DD HH:MM:SS format
|
40 |
*/
|
41 |
-
public function add($name, $
|
42 |
{
|
43 |
-
$_params = array("name" => $name, "from_email" => $
|
44 |
return $this->master->call('templates/add', $_params);
|
45 |
}
|
46 |
|
@@ -76,8 +76,8 @@ class Mandrill_Templates
|
|
76 |
/**
|
77 |
* Update the code for an existing template. If null is provided for any fields, the values will remain unchanged.
|
78 |
* @param string $name the immutable name of an existing template
|
79 |
-
* @param string $
|
80 |
-
* @param string $
|
81 |
* @param string $subject the new default subject line
|
82 |
* @param string $code the new code for the template
|
83 |
* @param string $text the new default text part to be used
|
@@ -104,9 +104,9 @@ class Mandrill_Templates
|
|
104 |
* - created_at string the date and time the template was first created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
105 |
* - updated_at string the date and time the template was last modified as a UTC string in YYYY-MM-DD HH:MM:SS format
|
106 |
*/
|
107 |
-
public function update($name, $
|
108 |
{
|
109 |
-
$_params = array("name" => $name, "from_email" => $
|
110 |
return $this->master->call('templates/update', $_params);
|
111 |
}
|
112 |
|
@@ -222,21 +222,21 @@ class Mandrill_Templates
|
|
222 |
|
223 |
/**
|
224 |
* Inject content and optionally merge fields into a template, returning the HTML that results
|
225 |
-
* @param string $
|
226 |
-
* @param array $
|
227 |
* - template_content[] struct the injection of a single piece of content into a single editable region
|
228 |
* - name string the name of the mc:edit editable region to inject into
|
229 |
* - content string the content to inject
|
230 |
-
* @param array $
|
231 |
-
* -
|
232 |
* - name string the merge variable's name. Merge variable names are case-insensitive and may not start with _
|
233 |
* - content string the merge variable's content
|
234 |
* @return struct the result of rendering the given template with the content and merge field values injected
|
235 |
* - html string the rendered HTML as a string
|
236 |
*/
|
237 |
-
public function render($
|
238 |
{
|
239 |
-
$_params = array("template_name" => $
|
240 |
return $this->master->call('templates/render', $_params);
|
241 |
}
|
242 |
|
10 |
/**
|
11 |
* Add a new template
|
12 |
* @param string $name the name for the new template - must be unique
|
13 |
+
* @param string $fromEmail a default sending address for emails sent using this template
|
14 |
+
* @param string $fromName a default from name to be used
|
15 |
* @param string $subject a default subject line to be used
|
16 |
* @param string $code the HTML code for the template with mc:edit attributes for the editable elements
|
17 |
* @param string $text a default text part to be used when sending with this template
|
38 |
* - created_at string the date and time the template was first created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
39 |
* - updated_at string the date and time the template was last modified as a UTC string in YYYY-MM-DD HH:MM:SS format
|
40 |
*/
|
41 |
+
public function add($name, $fromEmail = null, $fromName = null, $subject = null, $code = null, $text = null, $publish = true, $labels = array())
|
42 |
{
|
43 |
+
$_params = array("name" => $name, "from_email" => $fromEmail, "from_name" => $fromName, "subject" => $subject, "code" => $code, "text" => $text, "publish" => $publish, "labels" => $labels);
|
44 |
return $this->master->call('templates/add', $_params);
|
45 |
}
|
46 |
|
76 |
/**
|
77 |
* Update the code for an existing template. If null is provided for any fields, the values will remain unchanged.
|
78 |
* @param string $name the immutable name of an existing template
|
79 |
+
* @param string $fromEmail the new default sending address
|
80 |
+
* @param string $fromName the new default from name
|
81 |
* @param string $subject the new default subject line
|
82 |
* @param string $code the new code for the template
|
83 |
* @param string $text the new default text part to be used
|
104 |
* - created_at string the date and time the template was first created as a UTC string in YYYY-MM-DD HH:MM:SS format
|
105 |
* - updated_at string the date and time the template was last modified as a UTC string in YYYY-MM-DD HH:MM:SS format
|
106 |
*/
|
107 |
+
public function update($name, $fromEmail = null, $fromName = null, $subject = null, $code = null, $text = null, $publish = true, $labels = null)
|
108 |
{
|
109 |
+
$_params = array("name" => $name, "from_email" => $fromEmail, "from_name" => $fromName, "subject" => $subject, "code" => $code, "text" => $text, "publish" => $publish, "labels" => $labels);
|
110 |
return $this->master->call('templates/update', $_params);
|
111 |
}
|
112 |
|
222 |
|
223 |
/**
|
224 |
* Inject content and optionally merge fields into a template, returning the HTML that results
|
225 |
+
* @param string $templateName the immutable name of a template that exists in the user's account
|
226 |
+
* @param array $templateContent an array of template content to render. Each item in the array should be a struct with two keys - name: the name of the content block to set the content for, and content: the actual content to put into the block
|
227 |
* - template_content[] struct the injection of a single piece of content into a single editable region
|
228 |
* - name string the name of the mc:edit editable region to inject into
|
229 |
* - content string the content to inject
|
230 |
+
* @param array $mergeVars optional merge variables to use for injecting merge field content. If this is not provided, no merge fields will be replaced.
|
231 |
+
* - mergeVars[] struct a single merge variable
|
232 |
* - name string the merge variable's name. Merge variable names are case-insensitive and may not start with _
|
233 |
* - content string the merge variable's content
|
234 |
* @return struct the result of rendering the given template with the content and merge field values injected
|
235 |
* - html string the rendered HTML as a string
|
236 |
*/
|
237 |
+
public function render($templateName, $templateContent, $mergeVars = null)
|
238 |
{
|
239 |
+
$_params = array("template_name" => $templateName, "template_content" => $templateContent, "merge_vars" => $mergeVars);
|
240 |
return $this->master->call('templates/render', $_params);
|
241 |
}
|
242 |
|
package.xml
CHANGED
@@ -1,24 +1,22 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ebizmarts_MageMonkey</name>
|
4 |
-
<version>1.2.6</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>MailChimp integration for Magento by Ebizmarts</summary>
|
10 |
<description>Full MailChimp integration, automatic webhooks, multiple lists, interest groups</description>
|
11 |
-
<notes>1.2.6
|
12 |
--------
|
13 |
Bug Fixes:
|
14 |
-
|
15 |
-
|
16 |
-
Enhancements:
|
17 |
-
Add Fooman_EmailAttachments compatibility</notes>
|
18 |
<authors><author><name>Ebizmarts Development Team</name><user>ebizmarts</user><email>info@ebizmarts.com</email></author></authors>
|
19 |
-
<date>2016-09-
|
20 |
-
<time>
|
21 |
-
<contents><target name="magecommunity"><dir name="Ebizmarts"><dir name="MageMonkey"><dir name="Block"><dir name="Adminhtml"><dir name="Bulksync"><dir name="Export"><file name="Form.php" hash="43de22b1bd39304bcd60cd6eebc25d28"/></dir><file name="Export.php" hash="ab839a4011692b69b292fe59eb50100e"/><dir name="Import"><file name="Form.php" hash="8927f46053a203e491e2bc2cb25fea1a"/></dir><file name="Import.php" hash="9c7ba4a566038356e60e9482301d7cb7"/><dir name="Queue"><file name="Grid.php" hash="23b3edec3bc13fae8aee5b7292c4d4d1"/></dir><file name="Queue.php" hash="c3cea1da02e0a09d7876958058ee091e"/><dir name="QueueExport"><file name="Grid.php" hash="68ec401dc23cddf8a1362c53aaab69b2"/></dir><file name="QueueExport.php" hash="69536eee264346535f1c786d61b3cf84"/><dir name="QueueImport"><file name="Grid.php" hash="0e43409930757224fbfcb3734fea9c67"/></dir><file name="QueueImport.php" hash="d9fbc0d22f94df54f71116d0d484d1a3"/></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Memberactivity.php" hash="55fbb4519c6d862948dc4d8bf4416cfb"/></dir></dir></dir><dir name="Ecommerce"><file name="Grid.php" hash="b1ad37ffe9fe0752356d29a6548b0434"/></dir><file name="Ecommerce.php" hash="48c237e8cc1223ad26a88d2409679fec"/><dir name="Ecommerceapi"><file name="Grid.php" hash="ee1be42cb6c893e3c59cac784df67fb3"/><dir name="Renderer"><file name="Items.php" hash="d72cfedf0cafc938becf9bd52801ba3a"/></dir></dir><file name="Ecommerceapi.php" hash="a9f659502d96bcd1a69a88d15fcab4f9"/><dir name="Memberactivity"><file name="Grid.php" hash="2753517318120344d1f7694a6b7a278d"/></dir><dir name="Newsletter"><dir name="Subscriber"><dir name="Renderer"><file name="Firstname.php" hash="e814d3ba07b32e851585363b29e37b3a"/><file name="Lastname.php" hash="9a8b007c2db6add0572cf4012b28f63e"/></dir></dir></dir><dir name="Renderer"><file name="Date.php" hash="6e4e52403ec55df3aa2183fd4b51b095"/><file name="Importypes.php" hash="87c7a222e403781fcd8ee08cf0b489ba"/><file name="Lists.php" hash="2dbd23844a822d3406efae08e89ce0d7"/><file name="Progress.php" hash="31eaaa5a7e99b21a4ed705971fe1001d"/><file name="Yesno.php" hash="c3173a8e8ea2d5f03531e7d996bbd259"/></dir><dir name="System"><dir name="Config"><file name="Account.php" hash="fccf1faac2682d754655631e6451c026"/><file name="Date.php" hash="455120f4f2e8d7801f3c220e231b6789"/><dir name="Fieldset"><file name="Hint.php" hash="31bf492c4e6137312c55bc437bf226cf"/></dir><dir name="Form"><dir name="Field"><file name="Mapfields.php" hash="8f2a10ca1a1d239b3b231ca2cee5f96e"/></dir></dir><file name="OauthWizard.php" hash="bd79f8b43d71137337e732fbeb415ffb"/><file name="ResetLocalEcommerce.php" hash="493126ac056c3585ed2d3020d62c76e1"/><file name="ResetRemoteEcommerce.php" hash="40d54bb2d6e7dd7bf3a91c9346f988bf"/><file name="UpgradeForPatch.php" hash="d641d79e0ce65469e40c1b7eb81a2591"/></dir></dir></dir><dir name="Checkout"><file name="Subscribe.php" hash="14de0075005dafe3363716e3ffd10d20"/></dir><dir name="Customer"><dir name="Account"><file name="Lists.php" hash="64f0e5a8360750f6b19d8b5db0fcac23"/></dir></dir><file name="Lists.php" hash="bea29a7dc4e80337d85427a094af1316"/><file name="Signup.php" hash="93b0e787e63a90a5fb4bacba1e03bd05"/></dir><dir name="Helper"><file name="Cache.php" hash="4e6cd9724c2788056aacacd37f5699cc"/><file name="Data.php" hash="050df5865aa7abfcf9f32f032b0e7ea2"/><file name="Export.php" hash="91f24805e9cbbe124f0c99cb8f1f1272"/><file name="Oauth2.php" hash="684a7b71d97b438081ebf332057ec8ea"/></dir><dir name="Model"><file name="Api.php" hash="ea7c720767bc58cb740d2f70100f699b"/><file name="Asyncorders.php" hash="3f60d1a1c1885268ae7e2ddfb1772feb"/><file name="Asyncsubscribers.php" hash="b79a42df357267205d7e74bb7c220755"/><file name="Asyncwebhooks.php" hash="fc57fee18b5f9cc098318ca1242a082f"/><file name="BulksyncExport.php" hash="71af9a6134b415a324dc9c937a5b2f8e"/><file name="BulksyncImport.php" hash="fb3716e235bc22cf91c4c17edf10ec23"/><file name="Cache.php" hash="89ac2fac903a566e6f6a3c0951bf274d"/><file name="Config.php" hash="b6cccdaa6bab4a5d9ba4d1eafb26318c"/><file name="Cron.php" hash="df4be9915c8cfe3d7bf38435505965a2"/><dir name="Custom"><file name="Collection.php" hash="304d372c1b8bd8d8d09dd743e03cdf66"/></dir><file name="Ecommerce.php" hash="f4581befe128963df3e3d062b1bc4d55"/><file name="Ecommerce360.php" hash="8cd2aea43c32156160ad449ccc1bbaf2"/><dir name="Email"><file name="Template.php" hash="81c9f040cf931dfb9e2a2484d9cc0b09"/></dir><dir name="Feed"><file name="Updates.php" hash="0a0da2a88047303d479584a773a51d26"/></dir><file name="Lastorder.php" hash="f2977e76892b0b1a5e031f8eabf93f18"/><file name="MCAPI.php" hash="1740a57c10a5d54aa4449f698e6dcd73"/><file name="MCEXPORTAPI.php" hash="810b1c7b0f6daf93e11c7fbbc90980a3"/><file name="Monkey.php" hash="ed50cfa8528e149e1a635e691f1cad30"/><dir name="Mysql4"><dir name="Apidebug"><file name="Collection.php" hash="7cc3fe74a46da1a4770b49eb7ac47f97"/></dir><file name="Apidebug.php" hash="2699eec825e8fb88b1d572728c10b7bc"/><dir name="Asyncorders"><file name="Collection.php" hash="e7b17fac028f7116c762e120b0f3f0a8"/></dir><file name="Asyncorders.php" hash="3eb64d883705854ce7899fd891101c63"/><dir name="Asyncsubscribers"><file name="Collection.php" hash="3458134c9a1ced7359db40f7b79a133f"/></dir><file name="Asyncsubscribers.php" hash="a067c1e951ce61558e00f3aa8e5d15ef"/><dir name="Asyncwebhooks"><file name="Collection.php" hash="44170fc7219e1992c6cd0dbad863af4f"/></dir><file name="Asyncwebhooks.php" hash="79de544aaed58102758eeef01467b066"/><dir name="Bulksync"><dir name="Export"><file name="Collection.php" hash="ac64bc652233136189c504f678062374"/></dir><file name="Export.php" hash="eedc5a3549b3815f0d290eca3e0579df"/><dir name="Import"><file name="Collection.php" hash="6cb3e09a817488f9bfa50f877a5c2b0b"/></dir><file name="Import.php" hash="487fc6c0335ebf352081185d9afe3f88"/></dir><dir name="Ecommerce"><file name="Collection.php" hash="80319b6c991c510f1569800c80d384f1"/></dir><file name="Ecommerce.php" hash="b3290a6170c8c8f275dcd4300840ea26"/><dir name="Lastorder"><file name="Collection.php" hash="38d6a7519cfe21caf7f5d22877aa1477"/></dir><file name="Lastorder.php" hash="f3987329cb78c978bcc94ba375d9f998"/></dir><file name="Observer.php" hash="c63d1df9932f92cc77a78598803bf1b9"/><file name="Subscriber.php" hash="26903cf8899d9cf1d2a0548d2a01a287"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Account.php" hash="5bbf12b572234101af3e753ba74bcd41"/><file name="Attributes.php" hash="4ac1c98f3b3b84b2c93ddfcc3df5d817"/><file name="BulksyncDatasource.php" hash="36331ac3ecd034f914666a49e4d75cbc"/><file name="BulksyncStatus.php" hash="658f1f9d1ee7177d5dc094862bce155a"/><file name="Checkoutsubscribe.php" hash="28c8641a8fa4c336487af2227e152136"/><file name="CronProcessLimit.php" hash="3ca3a61f07b7aa84479eddda35efdde4"/><file name="CustomerGroup.php" hash="299b8514de098e02efe5393ebe7bdf65"/><file name="Ecommerce360.php" hash="24906da389cbf6b4a97c3edab5c7f020"/><file name="List.php" hash="acbffbbfe0a11566e745e01fce34ec51"/><file name="OrderProcessLimit.php" hash="bc3add48e125caa904774cb6b669ba0c"/><file name="OrderStatus.php" hash="d3eeeee5d614e8fa83e258ce53cbed79"/><file name="Status.php" hash="e1e5cf6252241f39d0ceaff6f94d3afb"/><file name="TransactionalEmails.php" hash="b2f0d564a59372cba59d3aac7e4fe9e0"/><file name="WebhookDelete.php" hash="c90bbf8b0cf2a546c0f72193f8c605cf"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="BulksyncController.php" hash="1e044f49bb90de5e2a2d9d0ec2feb73f"/><file name="ConfigController.php" hash="c62e1f6f54ac6a4fc33499c85f95948a"/><file name="EcommerceController.php" hash="4db500b32fb676705b4edad7ddb23e59"/></dir><dir name="Customer"><file name="AccountController.php" hash="14479dffeacd3c2421ce5822f7d7f190"/></dir><file name="SignupController.php" hash="e379f52f8ee0191a4c7289cd2afcd19d"/><file name="WebhookController.php" hash="255278ff6da9c4383d1b58cf716eb974"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f203274d5b6522dd00f630a58bc18623"/><file name="config.xml" hash="82de46f21e97c09d6b9f377c55eeaf4c"/><file name="system.xml" hash="c34f4b9f706815154982715ef4e50fb6"/></dir><dir name="sql"><dir name="monkey_setup"><file name="mysql4-install-0.0.1.php" hash="4df34769f4d5a8ceca90fd582500e3a9"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="d81147dab407bc55c59cddb5a764c53e"/><file name="mysql4-upgrade-0.0.2-0.0.3.php" hash="ce1925ff2ab03aa9fd6cbe43283ea37d"/><file name="mysql4-upgrade-0.0.3-0.0.4.php" hash="7f1e38bcf030e6346a9fd8321f1a4362"/><file name="mysql4-upgrade-0.0.4-0.0.5.php" hash="bbe6b895320effca77cc2c23431f043f"/><file name="mysql4-upgrade-0.0.5-0.0.6.php" hash="98b72d9ef4ec8078c09a1f641fc35a39"/><file name="mysql4-upgrade-0.0.6-0.0.7.php" hash="ea15755fc072e7c82b78063589360779"/><file name="mysql4-upgrade-1.0.10-1.0.11.php" hash="b2ec497921eb2bd9a97a318554fd980b"/><file name="mysql4-upgrade-1.1.21-1.1.22.php" hash="738e3d3e33c1a3a02bb101b89743cc5c"/><file name="mysql4-upgrade-1.1.23-1.1.24.php" hash="f3c48989465fc8683203bbbc2517a9e8"/><file name="mysql4-upgrade-1.1.33-1.1.34.php" hash="68f74c77460e76ea6153ebc823d49990"/><file name="mysql4-upgrade-1.1.5-1.1.6.php" hash="14750274ece5816d6c1ab490f7d610ab"/><file name="mysql4-upgrade-1.2.1-1.2.2.php" hash="c622ec016eb8134492d6011007d82149"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="853b7f2c7cc91394c325dc2524893c05"/></dir></dir></dir><dir name="Mandrill"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="6ca5fb9bf9254323e1f2b4447203b562"/></dir><file name="Userinfo.php" hash="7cd34efc0231424c9e2f5e662154c41c"/></dir></dir><dir name="Templates"><dir name="Templates"><file name="Grid.php" hash="1ecdb6b04fbd16043de908f261353b8d"/></dir><file name="Templates.php" hash="1682fe6d39605a9839bf3cdb3c1185b7"/></dir><dir name="Users"><dir name="Senders"><file name="Grid.php" hash="292097a493de241540d3e3aea463241f"/></dir><file name="Senders.php" hash="4a4449652c495a9d4c12966ab007e7a4"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="86fcaa6a66a5a628ded7215172448daf"/></dir><dir name="Model"><file name="Customcollection.php" hash="9b5766c0393a54b4356254725b4d78b2"/><dir name="Email"><file name="Queue.php" hash="1d463900246ed0d37c8d48696346694c"/><file name="Template.php" hash="325764effab3765d61b1e6140b7b747c"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Userinfo.php" hash="12a9c9c27c985efd021a4e6c7fdfcf5e"/></dir></dir><file name="Config.php" hash="2219d951bf6b2553ec0284b65d8d92a2"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Mandrill"><file name="UsersController.php" hash="72cb77b136fafaf5ef98e599ab8d5eb8"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="8ea87cce062596388f7e9507943e8bb5"/><file name="config.xml" hash="6efadc01a67a581a7402ba7c24ed1f4b"/><file name="system.xml" hash="d05b90ca129297b6ffda52a4ba1fd26a"/></dir></dir><dir name="AbandonedCart"><dir name="Block"><dir name="Adminhtml"><dir name="Abandonedmails"><file name="Grid.php" hash="f2813a7ec47e20b78874a0dbb1461b3e"/></dir><file name="Abandonedmails.php" hash="c2714b5a6cb534c91564ebc340fe3f26"/><dir name="Abandonedorder"><file name="Grid.php" hash="5ab9e3884d3306d78e78133f09e22614"/></dir><file name="Abandonedorder.php" hash="1a14da87647612a8773f34f70bc05dea"/><dir name="Dashboard"><file name="Sales.php" hash="b0d6fce3a5f4ef5a891c8578eb36ef97"/><file name="Totals.php" hash="4cd3c1e0d8d357c79ec6e7a2ed98c6a0"/></dir><file name="Dashboard.php" hash="c27d5ec29455176fff7e2fac86fcce21"/><dir name="System"><dir name="Config"><file name="Date.php" hash="323a49af281f06dfa72c1d3512257e04"/><dir name="Fieldset"><file name="Hint.php" hash="6358bc58857011c08dedcbab885b461f"/></dir></dir></dir></dir><dir name="Email"><dir name="Order"><file name="Items.php" hash="08ba504f050dc955c213dc99b61dfddd"/></dir></dir><dir name="Popup"><file name="Emailcatcher.php" hash="1c04a8992ebf40cd2474d0db7ad48516"/></dir></dir><dir name="Helper"><file name="Data.php" hash="3e5a2e3d99b62936b0766313b9e62462"/></dir><dir name="Model"><file name="Abtesting.php" hash="fdf9df78b6656c898fd74fbcb3ec51e1"/><file name="Config.php" hash="36a47f3d4db78d60d8a8f3e0db08aba4"/><file name="Cron.php" hash="83cb0f471f6b27269f4d7401895329c5"/><file name="EventObserver.php" hash="57bb122fbd41fabbfa021d7a6ad96e0a"/><file name="Mailssent.php" hash="e238f4116cb473cdcfb3a909d08adaa4"/><file name="Popup.php" hash="d2a4922acc0c5c3994cbc0b2114658b8"/><dir name="Resource"><dir name="Abtesting"><file name="Collection.php" hash="f96fe4be550bef6daabc5d211c86aca0"/></dir><file name="Abtesting.php" hash="46e70f8507676e157ddec44f66094e59"/><dir name="Mailssent"><file name="Collection.php" hash="dc1e2c44eb53381d57d10a6bc08ad497"/></dir><file name="Mailssent.php" hash="80f0b4e3f29d10951362f07eb45a3ece"/><dir name="Order"><file name="Collection.php" hash="a079410c43e1afbb428b7163d1537482"/></dir><dir name="Popup"><file name="Collection.php" hash="af37502f9802c7574318ab28a8fb1b16"/></dir><file name="Popup.php" hash="446921e9b1da1973c83665e8f749bbbb"/></dir><dir name="System"><dir name="Config"><file name="Automatic.php" hash="a4f5e052810187fb824933e76ea8a1cf"/><file name="Cmspage.php" hash="89bfcbe90a7b2f396a56b3f1fe72dbd2"/><file name="Customergroup.php" hash="74af027c3fb6745d0e45938f83394489"/><file name="Discounttype.php" hash="55c251fafbd10821d6c18c381c307888"/><file name="Maxemails.php" hash="63b860ace056552d159ada056eebfbd7"/><file name="Unit.php" hash="07fa0c25182538e08479cc4f91c7ca16"/><file name="Yesnovariation.php" hash="d24e4bf79afe73e85422c53835de0012"/></dir></dir></dir><dir name="controllers"><file name="AbandonedController.php" hash="87d24cbd4585401c783add69aa9adaaf"/><dir name="Adminhtml"><file name="AbandonedmailsController.php" hash="060e46a386be3365ae23722c951de848"/><file name="AbandonedorderController.php" hash="3b74880847f1e33d06043eb673b6c39a"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="62708e88154b231e694210cca0aa6c97"/><file name="config.xml" hash="252466f28f076fa39ee900ec9f7dc9cf"/><file name="system.xml" hash="a475b2a528b5bbd7b38caf1607b7e733"/></dir><dir name="sql"><dir name="ebizmarts_abandonedcart_setup"><file name="mysql4-install-0.1.0.php" hash="0e1a8c0391654c480773b78a50db5a83"/><file name="mysql4-upgrade-0.1.12-0.1.13.php" hash="4835436b744f8cbff61a66c2e345976f"/><file name="mysql4-upgrade-0.1.18-0.1.19.php" hash="e51b332cb70c81ee472b586fda4e8a7e"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="2e87d09a5008ac2f2432a25e08474c87"/><file name="mysql4-upgrade-0.1.20-0.1.21.php" hash="c461ba10961b4ee4e9385173d4264617"/><file name="mysql4-upgrade-0.1.29-0.1.30.php" hash="e9fdf4551cf19b488ed68ca0dd55ab67"/><file name="mysql4-upgrade-0.1.30-0.1.31.php" hash="2889ca071f7b974f2cd85a6b9405e541"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="60daa0d70a1af929a39d6e20ee52ee9c"/><file name="mysql4-upgrade-1.1.35-1.2.0.php" hash="58589b5e37eeb8069e08863f6b4c06e5"/></dir></dir></dir><dir name="Autoresponder"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backtostock"><dir name="Fieldset"><file name="Hint.php" hash="196c96e0bdfb853c42510d8cef4bf69a"/></dir></dir><dir name="Birthday"><dir name="Fieldset"><file name="Hint.php" hash="bff790a4ecf1f7ed7ac5d966cb8d516f"/></dir></dir><dir name="Fieldset"><file name="Hint.php" hash="eea231bb3f99b0f3708c2d43144e0f44"/></dir><dir name="Review"><dir name="Fieldset"><file name="Hint.php" hash="d9906e111824893ef363926dd2b485eb"/></dir></dir><dir name="Wishlist"><dir name="Fieldset"><file name="Hint.php" hash="75a66f64700f02eebfa391f953bc42d0"/></dir></dir></dir></dir></dir><dir name="Backtostock"><file name="Notice.php" hash="30efc30519a1ecb31d39a5fe59a6ae90"/></dir><dir name="Customer"><dir name="Account"><file name="List.php" hash="755d6d07d113450617bc31e8bc039df0"/></dir></dir><dir name="Email"><dir name="Backtostock"><file name="Item.php" hash="178b97ceae8c488bf49cb44b6f5f5d11"/></dir><dir name="Related"><file name="Items.php" hash="831fda241af415c53d47274ecc395299"/></dir><dir name="Review"><file name="Items.php" hash="de3dd88f0a2399314c746b08cbe4ab82"/></dir><dir name="Wishlist"><file name="Items.php" hash="5c712e43bca1a83bf7592e082acca863"/></dir></dir><dir name="Review"><file name="Form.php" hash="cb10cbe1702bc6261874ed68eec47a00"/></dir><file name="Unsubscribe.php" hash="bb945f9a63f38ca0b6cdd2a0daed5416"/></dir><dir name="Helper"><file name="Data.php" hash="45eec5e986cf0997ff5f97f7148f0ec3"/></dir><dir name="Model"><file name="Backtostock.php" hash="fa62a4685c70474a2ce3da394e68c597"/><file name="Backtostockalert.php" hash="eabe65c559ee1d93bc8b67dc0bb32a40"/><file name="Config.php" hash="75a65035e240a5154b2037feceb4d864"/><file name="Cron.php" hash="75e26e3c53874ca34ef04b7eee78a5ce"/><file name="EventObserver.php" hash="b505ddedbaa6ead64992db00fd587d81"/><dir name="Resource"><dir name="Backtostock"><file name="Collection.php" hash="95a70c48dce1bac7fcb86447bb899057"/></dir><file name="Backtostock.php" hash="85c29c73ba30f2fdf819fc88f5e03098"/><dir name="Backtostockalert"><file name="Collection.php" hash="c0c5d87c559d2e4011697b1a0ccf4846"/></dir><file name="Backtostockalert.php" hash="148ae085ef93a7cf6e52cdd60f1ca9a2"/><dir name="Review"><file name="Collection.php" hash="098061d250555679c9f609d2087ef9d4"/></dir><file name="Review.php" hash="cf78994db6e262e42a589b6538a45a32"/><dir name="Unsubscribe"><file name="Collection.php" hash="11048027437c0a5bc1478e4f2cdcc51d"/></dir><file name="Unsubscribe.php" hash="3b9e4d09dbb7ba483a5d16b6312050e6"/><dir name="Visited"><file name="Collection.php" hash="b09c0ce08ac30cc30f974e5c744eabf1"/></dir><file name="Visited.php" hash="55f2d0c1f90b41e852ecbf964925dc10"/></dir><file name="Review.php" hash="c14806dfb106363262b9911e8d06f628"/><dir name="System"><dir name="Config"><file name="Automatic.php" hash="4de4d5c373fa1ea373751cbd5ed7efbc"/><file name="Couponcounter.php" hash="18049531633e26b8970935e6b9c73823"/><file name="Customergroup.php" hash="aa31f980b1d28248f137fe2a06b3ba2c"/><file name="Discounttype.php" hash="1228055f8abc3bffba6020f4bb4210e0"/><file name="Generaltype.php" hash="463210c06e00794b79df38a61dfa56c2"/><file name="Hours.php" hash="db8c055c1fc0628f5fad84fc15c6d389"/><file name="Newordertrigger.php" hash="757bcc13562d4a5b905d57920906411f"/><file name="Registeredcustomergroup.php" hash="f2f296748fba58d5f78659fa38c0f9a2"/><file name="Time.php" hash="4b491667d8ea9816b07f584e84556556"/></dir></dir><file name="Unsubscribe.php" hash="cb20baf948256b9b70a13ed52ab91bab"/><file name="Visited.php" hash="2e9f119fc630cefc50f5a2a21546ebfc"/></dir><dir name="controllers"><file name="AutoresponderController.php" hash="bd9c5001c6438f5b76e53371f6149798"/><file name="BacktostockController.php" hash="61f07f9bdc3951dbddeaf8161d55023d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="59a240f12b496566f1a2b1de5f053e96"/><file name="config.xml" hash="1e7491909901c389668d4dcc9fb01c04"/><file name="system.xml" hash="e4e5ae3db49d9c0e2f3e618270e3cffe"/></dir><dir name="sql"><dir name="ebizmarts_autoresponder_setup"><file name="mysql4-install-0.1.0.php" hash="d2152df00146562b30910ebe36c9b4e8"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="2ab92d2cf0f5fa7ccf7b61d9ab142a01"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="4b3cace6f889e5d42606140628c26cc4"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="378accc07eb80b16029db84f56bed683"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="53cc6beed11e8631c11a008c5fd78ce1"/><file name="mysql4-upgrade-1.1.14-1.2.0.php" hash="3cd44860cc2b2df0a7c68c6ffbd64628"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="8ffeb3186d48743e6c24134ff6900953"/></dir></dir></dir><dir name="SweetMonkey"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Autovars.php" hash="fc3ebb5ffe5344ef74a294547614c28f"/><dir name="Fieldset"><file name="Hint.php" hash="a1d28320ed21eaa6c20aa98c0b4e3492"/></dir><dir name="Form"><dir name="Field"><file name="Mapfields.php" hash="a0dfcfa3e1e22bdb33005a999cb0867b"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="83c32ef3e5433e701a10ef9cc5370d04"/></dir><dir name="Model"><file name="Observer.php" hash="d293aae1eae63f787b78d310d3364e79"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="MageMonkeyController.php" hash="f7d0e23ca908825800044a19ef68094a"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="8a81e6639cd53c96717a6b993d5fcd93"/><file name="config.xml" hash="0550e8de5d4215aeb945d06514ae6959"/><file name="system.xml" hash="93e8f26427a0df9183f6680441ce23f6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ebizmarts_MageMonkey.xml" hash="951aa15bc51345726e05080bd5fc084b"/><file name="Ebizmarts_Mandrill.xml" hash="ea4b352b5a0233330ecde76a0f9113dd"/><file name="Ebizmarts_AbandonedCart.xml" hash="48c4cfe8246d5a995e2836c43ab38d74"/><file name="Ebizmarts_Autoresponder.xml" hash="97302f94f5893147db18c4034d135256"/><file name="Ebizmarts_SweetMonkey.xml" hash="05d9393c17c76a589fd7681ed668d53f"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magemonkey.xml" hash="8eef43f9d728e252a5f7d7b6cea93a19"/><dir name="ebizmarts"><file name="abandonedcart.xml" hash="14282d8f8739578d51c57def5df1227a"/><file name="autoresponder.xml" hash="d8dfb68cfd7c838cf29e9281a9a76c36"/></dir></dir><dir name="template"><dir name="magemonkey"><dir name="checkout"><file name="subscribe.phtml" hash="6647c5e991170303f99b956dbbddd6c6"/></dir><file name="lists.phtml" hash="8562e11e1d5e60807e7d8d991b8d1fb1"/></dir><dir name="ebizmarts_abandonedcart"><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="c078d029b2065e8b1938c3cfb24e8219"/></dir></dir><file name="items.phtml" hash="87f18755675a13f6e91a56b562bcd0fe"/></dir></dir><dir name="popup"><file name="emailcatcher.phtml" hash="86e370dc654f430029ae5d4037883e59"/></dir></dir><dir name="ebizmarts"><dir name="autoresponder"><dir name="backtostock"><dir name="catalog"><dir name="product"><file name="form.phtml" hash="c04b1aaf96617c47d1530538f2f9f5e0"/><file name="notice.phtml" hash="ba7963278c9ed51066c736cdc0b73978"/></dir></dir><file name="item.phtml" hash="9ff57a2867309f380525ad671a753f9e"/></dir><dir name="customer"><file name="list.phtml" hash="21d2f116e2f509943175c43bc5863582"/></dir><dir name="related"><file name="items.phtml" hash="b2a04397a22c9cdd421fe04b4c107dd7"/></dir><dir name="review"><file name="items.phtml" hash="1bc37dcc7087d375eed0849b76bcec64"/></dir><file name="unsubscribe.phtml" hash="ca8ed1c5810e07f1cdc91edb64420417"/><dir name="wishlist"><file name="items.phtml" hash="1e65bee4638cb557503b36e3224b853c"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="magemonkey.xml" hash="4a2ba63a9d3002774b622e76339e6fbb"/><dir name="ebizmarts"><file name="mandrill.xml" hash="ba93e973a9019841c7d914ecd729983c"/><file name="abandonedcart.xml" hash="9ed91dab216911a13a2669bd81734180"/></dir></dir><dir name="template"><dir name="magemonkey"><dir name="bulksync"><dir name="export"><file name="form.phtml" hash="06a3c582f8469c11c644e688efb4e5a5"/></dir><dir name="import"><file name="form.phtml" hash="06a3c582f8469c11c644e688efb4e5a5"/></dir></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="fb568722b009e63ac13714bd1465a413"/></dir><file name="oauth_wizard.phtml" hash="91b3472b4e9a5bc26851b76bfcea59c5"/><file name="resetlocal360.phtml" hash="3347fad7cfb13e7b4c6647489bed1480"/><file name="resetremote360.phtml" hash="2a67ad95f8ffabdc1e2d1e572c4118ae"/><file name="upgradeforpatch.phtml" hash="6a0ed64653b65b4d0d206f86dcf29a9c"/></dir></dir></dir><dir name="ebizmarts"><dir name="mandrill"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="954efb14abd386cfff5881e15cda9be2"/></dir></dir></dir></dir><dir name="abandonedcart"><dir name="dashboard"><file name="index.phtml" hash="31a02b6aa63614bb2a52044195568f15"/><file name="salebar.phtml" hash="7a8c978ff415853550f9b1a3cbabfd1c"/><file name="totalbar.phtml" hash="95cb90a952f5548481c180004e39b7f1"/></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="ce2c35827f741b243bb366003e8dd412"/></dir></dir></dir></dir><dir name="autoresponder"><dir name="system"><dir name="config"><dir name="backtostock"><dir name="fieldset"><file name="hint.phtml" hash="623380a9c486eae57da00de6bd8b843d"/></dir></dir><dir name="birthday"><dir name="fieldset"><file name="hint.phtml" hash="d7f944a685769a46cb709f89c6e56f3b"/></dir></dir><dir name="fieldset"><file name="hint.phtml" hash="4c3f34e11b35f8d98ba675d6d5643cfb"/></dir><dir name="review"><dir name="fieldset"><file name="hint.phtml" hash="205b3fac2bc9682cdbdc9e3a8ec688df"/></dir></dir><dir name="wishlist"><dir name="fieldset"><file name="hint.phtml" hash="563ece5feca65f3ff728b89929cb2339"/></dir></dir></dir></dir></dir></dir><dir name="sweetmonkey"><dir name="system"><dir name="config"><file name="autovars.phtml" hash="53da8402573546ecdcbe2f5e9b3ab57a"/><dir name="fieldset"><file name="hint.phtml" hash="c3ffcb12d9c132c02dbd22e27a1b4f36"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Ebizmarts_MageMonkey.csv" hash="181e91ed91dfea5fe7dab66af5719af8"/><file name="Ebizmarts_Mandrill.csv" hash="3dac3af57664fd34f5eda8abf4098ee0"/><file name="Ebizmarts_AbandonedCart.csv" hash="214bcd0e8cd6153c48fab236dcfdba1b"/><dir name="template"><dir name="email"><dir name="ebizmarts"><dir name="abandonedcart"><file name="abandoned_cart_mail_1.html" hash="36ceaf0e511ecb2c785fb482c634ed2c"/><file name="abandoned_cart_mail_2.html" hash="ab628f7bf4f82d44d8d9a5b39c838e00"/><file name="abandoned_cart_mail_3.html" hash="c46eef13c346494f26f2e01ff7de9de2"/><file name="abandoned_cart_mail_generic.html" hash="c87513fa9e7fc18035c9b4421c51478e"/><file name="popup_coupon_template.html" hash="7411805f6751997e3de8a4f11196c14e"/></dir><dir name="autoresponder"><file name="backtostock.html" hash="fcccb77375b946faf13cf991b363ec3a"/><file name="birthday.html" hash="81132b642c9c1b8a6988e7e438384b48"/><file name="neworder.html" hash="0262dc0daedee87904ca7be1def4078a"/><file name="noactivity.html" hash="59347130b4bf761c6830397f7a6b817d"/><file name="relatedproducts.html" hash="9cd19f74d0c42967526d54a197453945"/><file name="review.html" hash="0d9d872e4a0d0290cea079ccec3658c5"/><file name="reviewcoupon.html" hash="51915e3ff4ef402093b402ea82ac3182"/><file name="visitedproducts.html" hash="31245a22c3decda3fd93c18f87d58284"/><file name="wishlist.html" hash="2bb0a835b2e0bffd3ac551266d52fb46"/></dir></dir></dir></dir><file name="Ebizmarts_Autoresponder.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Ebizmarts_SweetMonkey.csv" hash="f0cdb51ba2052ce7f7ec1c9885ee5d3c"/></dir><dir name="nl_NL"><dir name="template"><dir name="email"><dir name="ebizmarts"><dir name="abandonedcart"><file name="abandoned_cart_mail_1.html" hash="64df67da5c2759572c80c47677fc4244"/><file name="abandoned_cart_mail_2.html" hash="3e65ab1c4140408422b6fd7e190a2f4b"/><file name="abandoned_cart_mail_3.html" hash="de4cbef63748e20638017e04827d39b9"/><file name="abandoned_cart_mail_generic.html" hash="de90f1d4f52d4603e3c08ebd4c5aa4e5"/><file name="popup_coupon_template.html" hash="8059d68fce7783956033ff0cf27f2c0b"/></dir><dir name="autoresponder"><file name="backtostock.html" hash="d5feeeaaf9f7416dcfb072e1b39844fa"/><file name="birthday.html" hash="b7099ba5f0de5e8c7f56f1aca1ec8779"/><file name="neworder.html" hash="dd016910da8029a2b2266e9a82eac167"/><file name="noactivity.html" hash="6d3b63329f5d664a9f81b2aba55b5588"/><file name="relatedproducts.html" hash="5bb28d77374568fbab07519048edb301"/><file name="review.html" hash="a1116b4a34c72fb94d8945730096ed83"/><file name="reviewcoupon.html" hash="bdd27369d3e76d915489399d95a502fc"/><file name="visitedproducts.html" hash="74941796112fba1158707ab6bdf4b2d4"/><file name="wishlist.html" hash="e456275499caa1cc018d7da1da32d525"/></dir></dir></dir></dir><file name="Ebizmarts_MageMonkey.csv" hash="3e0b1485b10cf7c9f6f64437f870c7fe"/><file name="Ebizmarts_SweetMonkey.csv" hash="063c94afbaa6e2fbe2028580209bc09b"/><file name="Ebizmarts_AbandonedCart.csv" hash="099104a7a9492249c0e24909145abfa3"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="magemonkey"><file name="magemonkey.css" hash="2072357ef844855f7a4607245b1e9a17"/><file name="magemonkey.js" hash="1a515d6697d533ee012754dd20e60345"/><file name="mailchimp-connected-ebizmarts-title.png" hash="c6bcb1aa606ecd3b0a9753bb48ddeb58"/><file name="mailchimp-ico.png" hash="14978ec398cede4060bc9b00365bb6c5"/><file name="mailchimp-section-background.png" hash="d4536261c6a3534fbb855428c0cca62c"/><file name="mailchimp-tab.png" hash="61972b4e063364071e81d8c9e10d8feb"/></dir><dir name="abandonedcart"><file name="abandonedcart.css" hash="bd6049fa8b17a1060e8a63fa29aefd94"/></dir><dir name="ebizmarts"><file name="Logo_Ebizmarts.png" hash="7ab7b13bda23200752897259e910daab"/><file name="ebizmarts-tab.png" hash="6dfa08c5cd4329d1df6e7b71fb1f925a"/><file name="ebizmarts.css" hash="a579734639953c1970ec26f56dda5837"/><dir name="mandrill"><file name="mandrill-tab.png" hash="d7eaf9deef355e4b8b55a96070b90ffe"/><file name="mandrill.css" hash="d93f1f52db38195a4f85d20de519151e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="magemonkey"><file name="magemonkey.css" hash="8f25ca79fc6901215f713f0e048c4a9f"/><file name="monkey.js" hash="5984cd563aee48b7ba648066f733113a"/></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="Mandrill"><dir name="Mandrill"><file name="Exceptions.php" hash="54d952267c004cddeedd8d9be07698c8"/><file name="Exports.php" hash="3ed368771a7174af0e01287e3a3e030f"/><file name="Inbound.php" hash="32378db89f2f47fe158577c256837896"/><file name="Internal.php" hash="fa680d47c780922a111078827cad1505"/><file name="Ips.php" hash="c70c08b34454d2e7aebc31101cfdca81"/><file name="Messages.php" hash="f1f3c20b6c872c72dcc33790d6a3adf4"/><file name="Metadata.php" hash="57820ae2032206334fb6e6d9b12f4df2"/><file name="Rejects.php" hash="f40f9ef016c338c6ae9d161c3112eea6"/><file name="Senders.php" hash="875ddbeff3f920397c73c2c2797f3eea"/><file name="Subaccounts.php" hash="9b6b61a8e0364c9f917952deffe0320c"/><file name="Tags.php" hash="ee2f9e328d4d49aa8b0289978f7375b0"/><file name="Templates.php" hash="9920cf5d10bdcb5416193435c425f123"/><file name="Urls.php" hash="184c17ebb031f1f6e6dad687a4bf767d"/><file name="Users.php" hash="826dac98663eefce2f5ccc4a5b0d38e9"/><file name="Webhooks.php" hash="37ea24a982630aa321444b85392f3397"/><file name="Whitelists.php" hash="d132144d50c3b713c98ad699984e4e38"/></dir><file name="Mandrill.php" hash="ac12db0139d483c2e3cf1da93aff1c96"/><file name="Message.php" hash="784920e095d8d9f0269b46f00071fcc9"/></dir></dir><dir name="js"><dir name="ebizmarts"><dir name="abandonedcart"><file name="popup.css" hash="2bf9fef85964298cc44143ef0fc78d21"/><file name="xmark.png" hash="6f14c834def36c1185347c49021030a4"/></dir><dir name="autoresponders"><file name="visitedproducts.js" hash="638a84c18b961879bc6d2196674661e0"/><file name="visitedproductsstorecodes.js" hash="a89a5b02ba597adb612d32dad74103dd"/></dir><dir name="magemonkey"><file name="campaignCatcher.js" hash="c4b8d3bae426f22f0edf92fa95c5d747"/></dir></dir></dir></target></contents>
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ebizmarts_MageMonkey</name>
|
4 |
+
<version>1.2.6.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>MailChimp integration for Magento by Ebizmarts</summary>
|
10 |
<description>Full MailChimp integration, automatic webhooks, multiple lists, interest groups</description>
|
11 |
+
<notes>1.2.6.1
|
12 |
--------
|
13 |
Bug Fixes:
|
14 |
+
Problem with mixed emails sent when made simultaneously on checkout solved.
|
15 |
+
Problem with re-subscription breaking the checkout solved.</notes>
|
|
|
|
|
16 |
<authors><author><name>Ebizmarts Development Team</name><user>ebizmarts</user><email>info@ebizmarts.com</email></author></authors>
|
17 |
+
<date>2016-09-13</date>
|
18 |
+
<time>16:39:58</time>
|
19 |
+
<contents><target name="magecommunity"><dir name="Ebizmarts"><dir name="MageMonkey"><dir name="Block"><dir name="Adminhtml"><dir name="Bulksync"><dir name="Export"><file name="Form.php" hash="3ce4974c74b5a2989754f5224663b6f0"/></dir><file name="Export.php" hash="ab839a4011692b69b292fe59eb50100e"/><dir name="Import"><file name="Form.php" hash="8f8ba669442a0a773d0dd60f8b25aac7"/></dir><file name="Import.php" hash="9c7ba4a566038356e60e9482301d7cb7"/><dir name="Queue"><file name="Grid.php" hash="d9bbc66e07c30ec7230d4132ac5076e8"/></dir><file name="Queue.php" hash="c3cea1da02e0a09d7876958058ee091e"/><dir name="QueueExport"><file name="Grid.php" hash="fcd5a7b47475d675def6b8b6de419b27"/></dir><file name="QueueExport.php" hash="5d389b15db1c01f8824f8d3dbddce963"/><dir name="QueueImport"><file name="Grid.php" hash="be7385740c85b1aede3a8769abf7233b"/></dir><file name="QueueImport.php" hash="a105aff1abe7e4da99fb5890a5202042"/></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Memberactivity.php" hash="55fbb4519c6d862948dc4d8bf4416cfb"/></dir></dir></dir><dir name="Ecommerce"><file name="Grid.php" hash="084f90df148d03ad835b21e407c85695"/></dir><file name="Ecommerce.php" hash="48c237e8cc1223ad26a88d2409679fec"/><dir name="Ecommerceapi"><file name="Grid.php" hash="83e8fd2c69ece5398a021fb190cd88e3"/><dir name="Renderer"><file name="Items.php" hash="d72cfedf0cafc938becf9bd52801ba3a"/></dir></dir><file name="Ecommerceapi.php" hash="a9f659502d96bcd1a69a88d15fcab4f9"/><dir name="Memberactivity"><file name="Grid.php" hash="9638c3879c010e19cddb02b5b514d0a1"/></dir><dir name="Newsletter"><dir name="Subscriber"><dir name="Renderer"><file name="Firstname.php" hash="ac50d0bb77f39d0c31f0502eb38ecac7"/><file name="Lastname.php" hash="83d539c8573663710e89b31d7f6279e9"/></dir></dir></dir><dir name="Renderer"><file name="Date.php" hash="6e4e52403ec55df3aa2183fd4b51b095"/><file name="Importypes.php" hash="87c7a222e403781fcd8ee08cf0b489ba"/><file name="Lists.php" hash="2dbd23844a822d3406efae08e89ce0d7"/><file name="Progress.php" hash="31eaaa5a7e99b21a4ed705971fe1001d"/><file name="Yesno.php" hash="c3173a8e8ea2d5f03531e7d996bbd259"/></dir><dir name="System"><dir name="Config"><file name="Account.php" hash="fccf1faac2682d754655631e6451c026"/><file name="Date.php" hash="455120f4f2e8d7801f3c220e231b6789"/><dir name="Fieldset"><file name="Hint.php" hash="31bf492c4e6137312c55bc437bf226cf"/></dir><dir name="Form"><dir name="Field"><file name="Mapfields.php" hash="2ce2b207eee07b7faf4fcfa8d743f4cb"/></dir></dir><file name="OauthWizard.php" hash="3817a6f4c8c5c89385f9cb3a0a379579"/><file name="ResetLocalEcommerce.php" hash="e104c012fc920c0f71a02815b53ffa47"/><file name="ResetRemoteEcommerce.php" hash="f3d14a262cbb5ccdd67a7340dc0bb615"/><file name="UpgradeForPatch.php" hash="af2a9e07b33c70f3b3748579ef3472d0"/></dir></dir></dir><dir name="Checkout"><file name="Subscribe.php" hash="823bb840da85ae6919dd6f6f5e747c94"/></dir><dir name="Customer"><dir name="Account"><file name="Lists.php" hash="64f0e5a8360750f6b19d8b5db0fcac23"/></dir></dir><file name="Lists.php" hash="95249d8fe61365dbf26e83bf866644dc"/><file name="Signup.php" hash="93b0e787e63a90a5fb4bacba1e03bd05"/></dir><dir name="Helper"><file name="Cache.php" hash="4e6cd9724c2788056aacacd37f5699cc"/><file name="Data.php" hash="8e538dffa833f1f5bb76d80f01222a80"/><file name="Export.php" hash="91f24805e9cbbe124f0c99cb8f1f1272"/><file name="Oauth2.php" hash="684a7b71d97b438081ebf332057ec8ea"/></dir><dir name="Model"><file name="Api.php" hash="ea7c720767bc58cb740d2f70100f699b"/><file name="Asyncorders.php" hash="3f60d1a1c1885268ae7e2ddfb1772feb"/><file name="Asyncsubscribers.php" hash="b79a42df357267205d7e74bb7c220755"/><file name="Asyncwebhooks.php" hash="fc57fee18b5f9cc098318ca1242a082f"/><file name="BulksyncExport.php" hash="71af9a6134b415a324dc9c937a5b2f8e"/><file name="BulksyncImport.php" hash="fb3716e235bc22cf91c4c17edf10ec23"/><file name="Cache.php" hash="89ac2fac903a566e6f6a3c0951bf274d"/><file name="Config.php" hash="b6cccdaa6bab4a5d9ba4d1eafb26318c"/><file name="Cron.php" hash="22e8fe391681954a0f19379a99a2ff80"/><dir name="Custom"><file name="Collection.php" hash="304d372c1b8bd8d8d09dd743e03cdf66"/></dir><file name="Ecommerce.php" hash="f4581befe128963df3e3d062b1bc4d55"/><file name="Ecommerce360.php" hash="d8c897d93bf09480f980a8bc3d7d69f2"/><dir name="Email"><file name="Template.php" hash="81c9f040cf931dfb9e2a2484d9cc0b09"/></dir><dir name="Feed"><file name="Updates.php" hash="16e3d78ea15dbf71d0291945d28d6a42"/></dir><file name="Lastorder.php" hash="f2977e76892b0b1a5e031f8eabf93f18"/><file name="MCAPI.php" hash="b95b1faee6c18505213a6d9ee75f9168"/><file name="MCEXPORTAPI.php" hash="810b1c7b0f6daf93e11c7fbbc90980a3"/><file name="Monkey.php" hash="ed50cfa8528e149e1a635e691f1cad30"/><dir name="Mysql4"><dir name="Apidebug"><file name="Collection.php" hash="7cc3fe74a46da1a4770b49eb7ac47f97"/></dir><file name="Apidebug.php" hash="2699eec825e8fb88b1d572728c10b7bc"/><dir name="Asyncorders"><file name="Collection.php" hash="e7b17fac028f7116c762e120b0f3f0a8"/></dir><file name="Asyncorders.php" hash="3eb64d883705854ce7899fd891101c63"/><dir name="Asyncsubscribers"><file name="Collection.php" hash="3458134c9a1ced7359db40f7b79a133f"/></dir><file name="Asyncsubscribers.php" hash="a067c1e951ce61558e00f3aa8e5d15ef"/><dir name="Asyncwebhooks"><file name="Collection.php" hash="44170fc7219e1992c6cd0dbad863af4f"/></dir><file name="Asyncwebhooks.php" hash="79de544aaed58102758eeef01467b066"/><dir name="Bulksync"><dir name="Export"><file name="Collection.php" hash="ac64bc652233136189c504f678062374"/></dir><file name="Export.php" hash="eedc5a3549b3815f0d290eca3e0579df"/><dir name="Import"><file name="Collection.php" hash="6cb3e09a817488f9bfa50f877a5c2b0b"/></dir><file name="Import.php" hash="487fc6c0335ebf352081185d9afe3f88"/></dir><dir name="Ecommerce"><file name="Collection.php" hash="80319b6c991c510f1569800c80d384f1"/></dir><file name="Ecommerce.php" hash="b3290a6170c8c8f275dcd4300840ea26"/><dir name="Lastorder"><file name="Collection.php" hash="38d6a7519cfe21caf7f5d22877aa1477"/></dir><file name="Lastorder.php" hash="f3987329cb78c978bcc94ba375d9f998"/></dir><file name="Observer.php" hash="2f2a1230efed1d9936daa492d42509b3"/><file name="Subscriber.php" hash="cce616f3b027dc59f50cde2d8be9f06d"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Account.php" hash="3bb41cc678707e978e06754e3b64a0db"/><file name="Attributes.php" hash="4ac1c98f3b3b84b2c93ddfcc3df5d817"/><file name="BulksyncDatasource.php" hash="36331ac3ecd034f914666a49e4d75cbc"/><file name="BulksyncStatus.php" hash="658f1f9d1ee7177d5dc094862bce155a"/><file name="Checkoutsubscribe.php" hash="28c8641a8fa4c336487af2227e152136"/><file name="CronProcessLimit.php" hash="3ca3a61f07b7aa84479eddda35efdde4"/><file name="CustomerGroup.php" hash="7b58091d697dae1829cd2244eb405a90"/><file name="Ecommerce360.php" hash="24906da389cbf6b4a97c3edab5c7f020"/><file name="List.php" hash="acbffbbfe0a11566e745e01fce34ec51"/><file name="OrderProcessLimit.php" hash="bc3add48e125caa904774cb6b669ba0c"/><file name="OrderStatus.php" hash="d3eeeee5d614e8fa83e258ce53cbed79"/><file name="Status.php" hash="e1e5cf6252241f39d0ceaff6f94d3afb"/><file name="TransactionalEmails.php" hash="b2f0d564a59372cba59d3aac7e4fe9e0"/><file name="WebhookDelete.php" hash="c90bbf8b0cf2a546c0f72193f8c605cf"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="BulksyncController.php" hash="8b688f333a192f121615f12024d38d0e"/><file name="ConfigController.php" hash="805444a2f60413a24cce094c56327d95"/><file name="EcommerceController.php" hash="424f9fdd7ac7be4310cb83e911f6cc8f"/></dir><dir name="Customer"><file name="AccountController.php" hash="14479dffeacd3c2421ce5822f7d7f190"/></dir><file name="SignupController.php" hash="e379f52f8ee0191a4c7289cd2afcd19d"/><file name="WebhookController.php" hash="255278ff6da9c4383d1b58cf716eb974"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f203274d5b6522dd00f630a58bc18623"/><file name="config.xml" hash="785a1185739ab818954fcf54b2922dff"/><file name="system.xml" hash="c34f4b9f706815154982715ef4e50fb6"/></dir><dir name="sql"><dir name="monkey_setup"><file name="mysql4-install-0.0.1.php" hash="52d34e66c63b9382830a8a4018fda871"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="a0af4b1dc5867a79c8f8dc5db81bedd4"/><file name="mysql4-upgrade-0.0.2-0.0.3.php" hash="59e4b29b2230d2beeb48eda241c5f14a"/><file name="mysql4-upgrade-0.0.3-0.0.4.php" hash="fd3d921c965f9983dc53f78c4c613704"/><file name="mysql4-upgrade-0.0.4-0.0.5.php" hash="bbe6b895320effca77cc2c23431f043f"/><file name="mysql4-upgrade-0.0.5-0.0.6.php" hash="98b72d9ef4ec8078c09a1f641fc35a39"/><file name="mysql4-upgrade-0.0.6-0.0.7.php" hash="ea15755fc072e7c82b78063589360779"/><file name="mysql4-upgrade-1.0.10-1.0.11.php" hash="b2ec497921eb2bd9a97a318554fd980b"/><file name="mysql4-upgrade-1.1.21-1.1.22.php" hash="a42e904240209791fb4be7ab49faff60"/><file name="mysql4-upgrade-1.1.23-1.1.24.php" hash="ee987d88cb3b5bbd4d273214359360ca"/><file name="mysql4-upgrade-1.1.33-1.1.34.php" hash="0dbd8c7ed4d508db89e6f18c66f61a8f"/><file name="mysql4-upgrade-1.1.5-1.1.6.php" hash="14750274ece5816d6c1ab490f7d610ab"/><file name="mysql4-upgrade-1.2.1-1.2.2.php" hash="c622ec016eb8134492d6011007d82149"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="84f13828afcba137c57da9b39baf5b8f"/></dir></dir></dir><dir name="Mandrill"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="6ca5fb9bf9254323e1f2b4447203b562"/></dir><file name="Userinfo.php" hash="7cd34efc0231424c9e2f5e662154c41c"/></dir></dir><dir name="Templates"><dir name="Templates"><file name="Grid.php" hash="a67b366bf40d808740516b1af668eba6"/></dir><file name="Templates.php" hash="1682fe6d39605a9839bf3cdb3c1185b7"/></dir><dir name="Users"><dir name="Senders"><file name="Grid.php" hash="f06ff10d84a8f38aaf8b6edf3508014b"/></dir><file name="Senders.php" hash="4a4449652c495a9d4c12966ab007e7a4"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="86fcaa6a66a5a628ded7215172448daf"/></dir><dir name="Model"><file name="Customcollection.php" hash="9b5766c0393a54b4356254725b4d78b2"/><dir name="Email"><file name="Queue.php" hash="4909872969524b9e4e19dc4ee3854b6b"/><file name="Template.php" hash="0e7abaa1bc71cd1d9e26afd26c4fb34e"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Userinfo.php" hash="3b4c0d612cdd9f0ca08a93ebe89d3fe4"/></dir></dir><file name="Config.php" hash="2219d951bf6b2553ec0284b65d8d92a2"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Mandrill"><file name="UsersController.php" hash="6ffb1b993cac9c7c5e76341c68de0ad4"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="8ea87cce062596388f7e9507943e8bb5"/><file name="config.xml" hash="4e846175a3362b3f57bcbd3a566949ff"/><file name="system.xml" hash="d05b90ca129297b6ffda52a4ba1fd26a"/></dir></dir><dir name="AbandonedCart"><dir name="Block"><dir name="Adminhtml"><dir name="Abandonedmails"><file name="Grid.php" hash="cacc96f2eec230c27b90a799a8d058ab"/></dir><file name="Abandonedmails.php" hash="c2714b5a6cb534c91564ebc340fe3f26"/><dir name="Abandonedorder"><file name="Grid.php" hash="9bd11db18a11d29a4acfba5d1c7e234e"/></dir><file name="Abandonedorder.php" hash="1a14da87647612a8773f34f70bc05dea"/><dir name="Dashboard"><file name="Sales.php" hash="b0d6fce3a5f4ef5a891c8578eb36ef97"/><file name="Totals.php" hash="a1f1e16a5846fac473a83a3df037c76c"/></dir><file name="Dashboard.php" hash="d45cf2734e5b7e18d5f13753d4393143"/><dir name="System"><dir name="Config"><file name="Date.php" hash="323a49af281f06dfa72c1d3512257e04"/><dir name="Fieldset"><file name="Hint.php" hash="6358bc58857011c08dedcbab885b461f"/></dir></dir></dir></dir><dir name="Email"><dir name="Order"><file name="Items.php" hash="69d7d7eaded2071555a4e8cd4a5bfc92"/></dir></dir><dir name="Popup"><file name="Emailcatcher.php" hash="0a88cf2ae484cadadb8665c6be692e55"/></dir></dir><dir name="Helper"><file name="Data.php" hash="3e5a2e3d99b62936b0766313b9e62462"/></dir><dir name="Model"><file name="Abtesting.php" hash="fdf9df78b6656c898fd74fbcb3ec51e1"/><file name="Config.php" hash="36a47f3d4db78d60d8a8f3e0db08aba4"/><file name="Cron.php" hash="e18b5d1ff214fe42ab1629b889b32072"/><file name="EventObserver.php" hash="8e0cac12462945dd87000dd630bc0005"/><file name="Mailssent.php" hash="e238f4116cb473cdcfb3a909d08adaa4"/><file name="Popup.php" hash="d2a4922acc0c5c3994cbc0b2114658b8"/><dir name="Resource"><dir name="Abtesting"><file name="Collection.php" hash="f96fe4be550bef6daabc5d211c86aca0"/></dir><file name="Abtesting.php" hash="46e70f8507676e157ddec44f66094e59"/><dir name="Mailssent"><file name="Collection.php" hash="dc1e2c44eb53381d57d10a6bc08ad497"/></dir><file name="Mailssent.php" hash="80f0b4e3f29d10951362f07eb45a3ece"/><dir name="Order"><file name="Collection.php" hash="46d0b77d0786485b576fdc3bb91f868d"/></dir><dir name="Popup"><file name="Collection.php" hash="af37502f9802c7574318ab28a8fb1b16"/></dir><file name="Popup.php" hash="446921e9b1da1973c83665e8f749bbbb"/></dir><dir name="System"><dir name="Config"><file name="Automatic.php" hash="a4f5e052810187fb824933e76ea8a1cf"/><file name="Cmspage.php" hash="89bfcbe90a7b2f396a56b3f1fe72dbd2"/><file name="Customergroup.php" hash="74af027c3fb6745d0e45938f83394489"/><file name="Discounttype.php" hash="55c251fafbd10821d6c18c381c307888"/><file name="Maxemails.php" hash="63b860ace056552d159ada056eebfbd7"/><file name="Unit.php" hash="07fa0c25182538e08479cc4f91c7ca16"/><file name="Yesnovariation.php" hash="d24e4bf79afe73e85422c53835de0012"/></dir></dir></dir><dir name="controllers"><file name="AbandonedController.php" hash="a4104d88dba1783314256cd8972afd6f"/><dir name="Adminhtml"><file name="AbandonedmailsController.php" hash="0c0c4c29e1400adc87bb2bfce7beb335"/><file name="AbandonedorderController.php" hash="cc1a121821d90ef49aa0b382492c7c9c"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="62708e88154b231e694210cca0aa6c97"/><file name="config.xml" hash="252466f28f076fa39ee900ec9f7dc9cf"/><file name="system.xml" hash="a475b2a528b5bbd7b38caf1607b7e733"/></dir><dir name="sql"><dir name="ebizmarts_abandonedcart_setup"><file name="mysql4-install-0.1.0.php" hash="0e1a8c0391654c480773b78a50db5a83"/><file name="mysql4-upgrade-0.1.12-0.1.13.php" hash="401a70cac4b711e374e03f94ec38c8bd"/><file name="mysql4-upgrade-0.1.18-0.1.19.php" hash="ac4d268c0a77196d0211144e4e72406f"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="2e87d09a5008ac2f2432a25e08474c87"/><file name="mysql4-upgrade-0.1.20-0.1.21.php" hash="c461ba10961b4ee4e9385173d4264617"/><file name="mysql4-upgrade-0.1.29-0.1.30.php" hash="2201180f761aa3ca68ef451246fdfe0c"/><file name="mysql4-upgrade-0.1.30-0.1.31.php" hash="6b55997a2fcdaf25bed9fe852a56125a"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="60daa0d70a1af929a39d6e20ee52ee9c"/><file name="mysql4-upgrade-1.1.35-1.2.0.php" hash="6db4903a37aa2879925a1b74439772e0"/></dir></dir></dir><dir name="Autoresponder"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backtostock"><dir name="Fieldset"><file name="Hint.php" hash="196c96e0bdfb853c42510d8cef4bf69a"/></dir></dir><dir name="Birthday"><dir name="Fieldset"><file name="Hint.php" hash="bff790a4ecf1f7ed7ac5d966cb8d516f"/></dir></dir><dir name="Fieldset"><file name="Hint.php" hash="eea231bb3f99b0f3708c2d43144e0f44"/></dir><dir name="Review"><dir name="Fieldset"><file name="Hint.php" hash="d9906e111824893ef363926dd2b485eb"/></dir></dir><dir name="Wishlist"><dir name="Fieldset"><file name="Hint.php" hash="75a66f64700f02eebfa391f953bc42d0"/></dir></dir></dir></dir></dir><dir name="Backtostock"><file name="Notice.php" hash="30efc30519a1ecb31d39a5fe59a6ae90"/></dir><dir name="Customer"><dir name="Account"><file name="List.php" hash="755d6d07d113450617bc31e8bc039df0"/></dir></dir><dir name="Email"><dir name="Backtostock"><file name="Item.php" hash="178b97ceae8c488bf49cb44b6f5f5d11"/></dir><dir name="Related"><file name="Items.php" hash="831fda241af415c53d47274ecc395299"/></dir><dir name="Review"><file name="Items.php" hash="de3dd88f0a2399314c746b08cbe4ab82"/></dir><dir name="Wishlist"><file name="Items.php" hash="5c712e43bca1a83bf7592e082acca863"/></dir></dir><dir name="Review"><file name="Form.php" hash="cb10cbe1702bc6261874ed68eec47a00"/></dir><file name="Unsubscribe.php" hash="bb945f9a63f38ca0b6cdd2a0daed5416"/></dir><dir name="Helper"><file name="Data.php" hash="45eec5e986cf0997ff5f97f7148f0ec3"/></dir><dir name="Model"><file name="Backtostock.php" hash="fa62a4685c70474a2ce3da394e68c597"/><file name="Backtostockalert.php" hash="eabe65c559ee1d93bc8b67dc0bb32a40"/><file name="Config.php" hash="75a65035e240a5154b2037feceb4d864"/><file name="Cron.php" hash="1a91f6d26fae3295fae3e3b5525b99c2"/><file name="EventObserver.php" hash="302607caf7e1e258d2bd20318d7c1fcc"/><dir name="Resource"><dir name="Backtostock"><file name="Collection.php" hash="95a70c48dce1bac7fcb86447bb899057"/></dir><file name="Backtostock.php" hash="85c29c73ba30f2fdf819fc88f5e03098"/><dir name="Backtostockalert"><file name="Collection.php" hash="c0c5d87c559d2e4011697b1a0ccf4846"/></dir><file name="Backtostockalert.php" hash="148ae085ef93a7cf6e52cdd60f1ca9a2"/><dir name="Review"><file name="Collection.php" hash="098061d250555679c9f609d2087ef9d4"/></dir><file name="Review.php" hash="def28f2df3fad1aab4a67f274bf8c49c"/><dir name="Unsubscribe"><file name="Collection.php" hash="11048027437c0a5bc1478e4f2cdcc51d"/></dir><file name="Unsubscribe.php" hash="3b9e4d09dbb7ba483a5d16b6312050e6"/><dir name="Visited"><file name="Collection.php" hash="b09c0ce08ac30cc30f974e5c744eabf1"/></dir><file name="Visited.php" hash="f92ff7341cef12c7978154ccd558cb07"/></dir><file name="Review.php" hash="c14806dfb106363262b9911e8d06f628"/><dir name="System"><dir name="Config"><file name="Automatic.php" hash="4de4d5c373fa1ea373751cbd5ed7efbc"/><file name="Couponcounter.php" hash="18049531633e26b8970935e6b9c73823"/><file name="Customergroup.php" hash="aa31f980b1d28248f137fe2a06b3ba2c"/><file name="Discounttype.php" hash="1228055f8abc3bffba6020f4bb4210e0"/><file name="Generaltype.php" hash="463210c06e00794b79df38a61dfa56c2"/><file name="Hours.php" hash="db8c055c1fc0628f5fad84fc15c6d389"/><file name="Newordertrigger.php" hash="757bcc13562d4a5b905d57920906411f"/><file name="Registeredcustomergroup.php" hash="f2f296748fba58d5f78659fa38c0f9a2"/><file name="Time.php" hash="4b491667d8ea9816b07f584e84556556"/></dir></dir><file name="Unsubscribe.php" hash="cb20baf948256b9b70a13ed52ab91bab"/><file name="Visited.php" hash="2e9f119fc630cefc50f5a2a21546ebfc"/></dir><dir name="controllers"><file name="AutoresponderController.php" hash="c85f997b44d46f043c0e0b7e795078fa"/><file name="BacktostockController.php" hash="61f07f9bdc3951dbddeaf8161d55023d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="59a240f12b496566f1a2b1de5f053e96"/><file name="config.xml" hash="1e7491909901c389668d4dcc9fb01c04"/><file name="system.xml" hash="e4e5ae3db49d9c0e2f3e618270e3cffe"/></dir><dir name="sql"><dir name="ebizmarts_autoresponder_setup"><file name="mysql4-install-0.1.0.php" hash="359071e3ba91e10cb82a7fda5298d223"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="8ff0b9bcb8cf7a56ec20be7bb9a2ed1a"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="14a2bba4bc7151978058c6d86a1ad1a4"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="2b58c316322a942587b09f53f4123f8c"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="53cc6beed11e8631c11a008c5fd78ce1"/><file name="mysql4-upgrade-1.1.14-1.2.0.php" hash="858407c0999fde1fc6a419a91b91ed1f"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="8e9c3c4d9b834efe749f5c5eaedfe8b5"/></dir></dir></dir><dir name="SweetMonkey"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Autovars.php" hash="c3f656a47154d66c1efc155923ed42e9"/><dir name="Fieldset"><file name="Hint.php" hash="a1d28320ed21eaa6c20aa98c0b4e3492"/></dir><dir name="Form"><dir name="Field"><file name="Mapfields.php" hash="71cedb6e1763ac9778a5c0cfdc364a8a"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="83c32ef3e5433e701a10ef9cc5370d04"/></dir><dir name="Model"><file name="Observer.php" hash="4477a7479de954637b6c176765d5c2e0"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="MageMonkeyController.php" hash="3f090a75f7385e587489c914dde45c53"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="8a81e6639cd53c96717a6b993d5fcd93"/><file name="config.xml" hash="0550e8de5d4215aeb945d06514ae6959"/><file name="system.xml" hash="93e8f26427a0df9183f6680441ce23f6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ebizmarts_MageMonkey.xml" hash="951aa15bc51345726e05080bd5fc084b"/><file name="Ebizmarts_Mandrill.xml" hash="ea4b352b5a0233330ecde76a0f9113dd"/><file name="Ebizmarts_AbandonedCart.xml" hash="48c4cfe8246d5a995e2836c43ab38d74"/><file name="Ebizmarts_Autoresponder.xml" hash="97302f94f5893147db18c4034d135256"/><file name="Ebizmarts_SweetMonkey.xml" hash="05d9393c17c76a589fd7681ed668d53f"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magemonkey.xml" hash="8eef43f9d728e252a5f7d7b6cea93a19"/><dir name="ebizmarts"><file name="abandonedcart.xml" hash="14282d8f8739578d51c57def5df1227a"/><file name="autoresponder.xml" hash="d8dfb68cfd7c838cf29e9281a9a76c36"/></dir></dir><dir name="template"><dir name="magemonkey"><dir name="checkout"><file name="subscribe.phtml" hash="6647c5e991170303f99b956dbbddd6c6"/></dir><file name="lists.phtml" hash="8562e11e1d5e60807e7d8d991b8d1fb1"/></dir><dir name="ebizmarts_abandonedcart"><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="c078d029b2065e8b1938c3cfb24e8219"/></dir></dir><file name="items.phtml" hash="87f18755675a13f6e91a56b562bcd0fe"/></dir></dir><dir name="popup"><file name="emailcatcher.phtml" hash="86e370dc654f430029ae5d4037883e59"/></dir></dir><dir name="ebizmarts"><dir name="autoresponder"><dir name="backtostock"><dir name="catalog"><dir name="product"><file name="form.phtml" hash="c04b1aaf96617c47d1530538f2f9f5e0"/><file name="notice.phtml" hash="ba7963278c9ed51066c736cdc0b73978"/></dir></dir><file name="item.phtml" hash="9ff57a2867309f380525ad671a753f9e"/></dir><dir name="customer"><file name="list.phtml" hash="21d2f116e2f509943175c43bc5863582"/></dir><dir name="related"><file name="items.phtml" hash="b2a04397a22c9cdd421fe04b4c107dd7"/></dir><dir name="review"><file name="items.phtml" hash="1bc37dcc7087d375eed0849b76bcec64"/></dir><file name="unsubscribe.phtml" hash="ca8ed1c5810e07f1cdc91edb64420417"/><dir name="wishlist"><file name="items.phtml" hash="1e65bee4638cb557503b36e3224b853c"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="magemonkey.xml" hash="4a2ba63a9d3002774b622e76339e6fbb"/><dir name="ebizmarts"><file name="mandrill.xml" hash="ba93e973a9019841c7d914ecd729983c"/><file name="abandonedcart.xml" hash="9ed91dab216911a13a2669bd81734180"/></dir></dir><dir name="template"><dir name="magemonkey"><dir name="bulksync"><dir name="export"><file name="form.phtml" hash="06a3c582f8469c11c644e688efb4e5a5"/></dir><dir name="import"><file name="form.phtml" hash="06a3c582f8469c11c644e688efb4e5a5"/></dir></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="fb568722b009e63ac13714bd1465a413"/></dir><file name="oauth_wizard.phtml" hash="91b3472b4e9a5bc26851b76bfcea59c5"/><file name="resetlocal360.phtml" hash="3347fad7cfb13e7b4c6647489bed1480"/><file name="resetremote360.phtml" hash="2a67ad95f8ffabdc1e2d1e572c4118ae"/><file name="upgradeforpatch.phtml" hash="6a0ed64653b65b4d0d206f86dcf29a9c"/></dir></dir></dir><dir name="ebizmarts"><dir name="mandrill"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="954efb14abd386cfff5881e15cda9be2"/></dir></dir></dir></dir><dir name="abandonedcart"><dir name="dashboard"><file name="index.phtml" hash="31a02b6aa63614bb2a52044195568f15"/><file name="salebar.phtml" hash="7a8c978ff415853550f9b1a3cbabfd1c"/><file name="totalbar.phtml" hash="95cb90a952f5548481c180004e39b7f1"/></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="ce2c35827f741b243bb366003e8dd412"/></dir></dir></dir></dir><dir name="autoresponder"><dir name="system"><dir name="config"><dir name="backtostock"><dir name="fieldset"><file name="hint.phtml" hash="623380a9c486eae57da00de6bd8b843d"/></dir></dir><dir name="birthday"><dir name="fieldset"><file name="hint.phtml" hash="d7f944a685769a46cb709f89c6e56f3b"/></dir></dir><dir name="fieldset"><file name="hint.phtml" hash="4c3f34e11b35f8d98ba675d6d5643cfb"/></dir><dir name="review"><dir name="fieldset"><file name="hint.phtml" hash="205b3fac2bc9682cdbdc9e3a8ec688df"/></dir></dir><dir name="wishlist"><dir name="fieldset"><file name="hint.phtml" hash="563ece5feca65f3ff728b89929cb2339"/></dir></dir></dir></dir></dir></dir><dir name="sweetmonkey"><dir name="system"><dir name="config"><file name="autovars.phtml" hash="53da8402573546ecdcbe2f5e9b3ab57a"/><dir name="fieldset"><file name="hint.phtml" hash="c3ffcb12d9c132c02dbd22e27a1b4f36"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Ebizmarts_MageMonkey.csv" hash="181e91ed91dfea5fe7dab66af5719af8"/><file name="Ebizmarts_Mandrill.csv" hash="3dac3af57664fd34f5eda8abf4098ee0"/><file name="Ebizmarts_AbandonedCart.csv" hash="214bcd0e8cd6153c48fab236dcfdba1b"/><dir name="template"><dir name="email"><dir name="ebizmarts"><dir name="abandonedcart"><file name="abandoned_cart_mail_1.html" hash="36ceaf0e511ecb2c785fb482c634ed2c"/><file name="abandoned_cart_mail_2.html" hash="ab628f7bf4f82d44d8d9a5b39c838e00"/><file name="abandoned_cart_mail_3.html" hash="c46eef13c346494f26f2e01ff7de9de2"/><file name="abandoned_cart_mail_generic.html" hash="c87513fa9e7fc18035c9b4421c51478e"/><file name="popup_coupon_template.html" hash="7411805f6751997e3de8a4f11196c14e"/></dir><dir name="autoresponder"><file name="backtostock.html" hash="fcccb77375b946faf13cf991b363ec3a"/><file name="birthday.html" hash="81132b642c9c1b8a6988e7e438384b48"/><file name="neworder.html" hash="0262dc0daedee87904ca7be1def4078a"/><file name="noactivity.html" hash="59347130b4bf761c6830397f7a6b817d"/><file name="relatedproducts.html" hash="9cd19f74d0c42967526d54a197453945"/><file name="review.html" hash="0d9d872e4a0d0290cea079ccec3658c5"/><file name="reviewcoupon.html" hash="51915e3ff4ef402093b402ea82ac3182"/><file name="visitedproducts.html" hash="31245a22c3decda3fd93c18f87d58284"/><file name="wishlist.html" hash="2bb0a835b2e0bffd3ac551266d52fb46"/></dir></dir></dir></dir><file name="Ebizmarts_Autoresponder.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Ebizmarts_SweetMonkey.csv" hash="f0cdb51ba2052ce7f7ec1c9885ee5d3c"/></dir><dir name="nl_NL"><dir name="template"><dir name="email"><dir name="ebizmarts"><dir name="abandonedcart"><file name="abandoned_cart_mail_1.html" hash="64df67da5c2759572c80c47677fc4244"/><file name="abandoned_cart_mail_2.html" hash="3e65ab1c4140408422b6fd7e190a2f4b"/><file name="abandoned_cart_mail_3.html" hash="de4cbef63748e20638017e04827d39b9"/><file name="abandoned_cart_mail_generic.html" hash="de90f1d4f52d4603e3c08ebd4c5aa4e5"/><file name="popup_coupon_template.html" hash="8059d68fce7783956033ff0cf27f2c0b"/></dir><dir name="autoresponder"><file name="backtostock.html" hash="d5feeeaaf9f7416dcfb072e1b39844fa"/><file name="birthday.html" hash="b7099ba5f0de5e8c7f56f1aca1ec8779"/><file name="neworder.html" hash="dd016910da8029a2b2266e9a82eac167"/><file name="noactivity.html" hash="6d3b63329f5d664a9f81b2aba55b5588"/><file name="relatedproducts.html" hash="5bb28d77374568fbab07519048edb301"/><file name="review.html" hash="a1116b4a34c72fb94d8945730096ed83"/><file name="reviewcoupon.html" hash="bdd27369d3e76d915489399d95a502fc"/><file name="visitedproducts.html" hash="74941796112fba1158707ab6bdf4b2d4"/><file name="wishlist.html" hash="e456275499caa1cc018d7da1da32d525"/></dir></dir></dir></dir><file name="Ebizmarts_MageMonkey.csv" hash="3e0b1485b10cf7c9f6f64437f870c7fe"/><file name="Ebizmarts_SweetMonkey.csv" hash="063c94afbaa6e2fbe2028580209bc09b"/><file name="Ebizmarts_AbandonedCart.csv" hash="099104a7a9492249c0e24909145abfa3"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="magemonkey"><file name="magemonkey.css" hash="2072357ef844855f7a4607245b1e9a17"/><file name="magemonkey.js" hash="da526f54eff51cd903f082395717fe31"/><file name="mailchimp-connected-ebizmarts-title.png" hash="c6bcb1aa606ecd3b0a9753bb48ddeb58"/><file name="mailchimp-ico.png" hash="14978ec398cede4060bc9b00365bb6c5"/><file name="mailchimp-section-background.png" hash="d4536261c6a3534fbb855428c0cca62c"/><file name="mailchimp-tab.png" hash="61972b4e063364071e81d8c9e10d8feb"/></dir><dir name="abandonedcart"><file name="abandonedcart.css" hash="bd6049fa8b17a1060e8a63fa29aefd94"/></dir><dir name="ebizmarts"><file name="Logo_Ebizmarts.png" hash="7ab7b13bda23200752897259e910daab"/><file name="ebizmarts-tab.png" hash="6dfa08c5cd4329d1df6e7b71fb1f925a"/><file name="ebizmarts.css" hash="a579734639953c1970ec26f56dda5837"/><dir name="mandrill"><file name="mandrill-tab.png" hash="d7eaf9deef355e4b8b55a96070b90ffe"/><file name="mandrill.css" hash="d93f1f52db38195a4f85d20de519151e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="magemonkey"><file name="magemonkey.css" hash="8f25ca79fc6901215f713f0e048c4a9f"/><file name="monkey.js" hash="0e8737a98720a49bdfd5d1494a548416"/></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="Mandrill"><dir name="Mandrill"><file name="Exceptions.php" hash="54d952267c004cddeedd8d9be07698c8"/><file name="Exports.php" hash="913582d277f98c8fcadad861abefb50a"/><file name="Inbound.php" hash="6ffadbba23e10cc338be144e06cb2c10"/><file name="Internal.php" hash="fa680d47c780922a111078827cad1505"/><file name="Ips.php" hash="644d1037d58e2b19757e503aa76e5679"/><file name="Messages.php" hash="8e344f6b3771711ee2e91771e988ae2e"/><file name="Metadata.php" hash="25eb150c69697389a6f780f4460cbe85"/><file name="Rejects.php" hash="97414f03a0b9cb96c1949a4cc29a934e"/><file name="Senders.php" hash="875ddbeff3f920397c73c2c2797f3eea"/><file name="Subaccounts.php" hash="ae09174af8fea96458e4a5820390ff43"/><file name="Tags.php" hash="ee2f9e328d4d49aa8b0289978f7375b0"/><file name="Templates.php" hash="67d118c42cc6a95f2513c15936ac77f1"/><file name="Urls.php" hash="184c17ebb031f1f6e6dad687a4bf767d"/><file name="Users.php" hash="826dac98663eefce2f5ccc4a5b0d38e9"/><file name="Webhooks.php" hash="37ea24a982630aa321444b85392f3397"/><file name="Whitelists.php" hash="d132144d50c3b713c98ad699984e4e38"/></dir><file name="Mandrill.php" hash="563f44c23be47259c8da58a168cd5bd9"/><file name="Message.php" hash="784920e095d8d9f0269b46f00071fcc9"/></dir></dir><dir name="js"><dir name="ebizmarts"><dir name="abandonedcart"><file name="popup.css" hash="2bf9fef85964298cc44143ef0fc78d21"/><file name="xmark.png" hash="6f14c834def36c1185347c49021030a4"/></dir><dir name="autoresponders"><file name="visitedproducts.js" hash="82955e7a3845c77b4dc14a526163ba65"/><file name="visitedproductsstorecodes.js" hash="e0a0accd7d6f0e2bf8828d6e45c9b653"/></dir><dir name="magemonkey"><file name="campaignCatcher.js" hash="c4b8d3bae426f22f0edf92fa95c5d747"/></dir></dir></dir></target></contents>
|
20 |
<compatible/>
|
21 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
22 |
</package>
|
skin/adminhtml/default/default/magemonkey/magemonkey.js
CHANGED
@@ -13,7 +13,8 @@ var transactionalEmailOptionsHandler = function (evt) {
|
|
13 |
}
|
14 |
}
|
15 |
|
16 |
-
document.observe(
|
|
|
17 |
|
18 |
if ($('monkey_general_transactional_emails')) {
|
19 |
if ($('monkey_general_transactional_emails').getValue().toString() != 'mandrill') {
|
@@ -23,4 +24,5 @@ document.observe("dom:loaded", function () {
|
|
23 |
Element.observe('monkey_general_transactional_emails', 'change', transactionalEmailOptionsHandler);
|
24 |
}
|
25 |
|
26 |
-
}
|
|
13 |
}
|
14 |
}
|
15 |
|
16 |
+
document.observe(
|
17 |
+
"dom:loaded", function () {
|
18 |
|
19 |
if ($('monkey_general_transactional_emails')) {
|
20 |
if ($('monkey_general_transactional_emails').getValue().toString() != 'mandrill') {
|
24 |
Element.observe('monkey_general_transactional_emails', 'change', transactionalEmailOptionsHandler);
|
25 |
}
|
26 |
|
27 |
+
}
|
28 |
+
);
|
skin/frontend/base/default/magemonkey/monkey.js
CHANGED
@@ -5,7 +5,8 @@ removeManageNewsletter = function () {
|
|
5 |
}
|
6 |
}
|
7 |
|
8 |
-
document.observe(
|
|
|
9 |
|
10 |
var monkeyEnabled = $$('div.block-content ul li a[href*="monkey/customer_account/index"]');
|
11 |
|
@@ -19,4 +20,5 @@ document.observe("dom:loaded", function () {
|
|
19 |
}
|
20 |
}
|
21 |
|
22 |
-
}
|
|
5 |
}
|
6 |
}
|
7 |
|
8 |
+
document.observe(
|
9 |
+
"dom:loaded", function () {
|
10 |
|
11 |
var monkeyEnabled = $$('div.block-content ul li a[href*="monkey/customer_account/index"]');
|
12 |
|
20 |
}
|
21 |
}
|
22 |
|
23 |
+
}
|
24 |
+
);
|