Ebizmarts_MageMonkey - Version 1.1.26

Version Notes

1.1.26
--------
Popup window added to catch email when customer access site for the first time

Magento newsletter working with latest Mandrill version.

Visited products for new Magento display fixed.

Cron send_subscribers_async uses listBatchSubscribe.

Added Abandoned Cart Dashboards to ACL.

Subscriber status working okay when create account confirmation enabled.

Orders exported by cron process now shown on Magento sent orders properly.

Autoresponder and Abandoned Cart only create coupon if don't exist for that email.

Visited products when max items per mail is 0 working okay.

Abandoned cart check stock products for configurable and bundle okay.

Autoclean for old coupons in Autoresponder and Abandoned Cart

Traduction for abandoned cart item list.

Checkout cache lists showing correspondent for each store.

Showing message when updated newsletter info.

Download this release

Release Info

Developer Magento Core Team
Extension Ebizmarts_MageMonkey
Version 1.1.26
Comparing to
See all releases


Code changes from version 1.1.25 to 1.1.26

Files changed (32) hide show
  1. app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Abandonedorder/Grid.php +1 -1
  2. app/code/community/Ebizmarts/AbandonedCart/Block/Popup/Emailcatcher.php +33 -0
  3. app/code/community/Ebizmarts/AbandonedCart/Model/Config.php +7 -0
  4. app/code/community/Ebizmarts/AbandonedCart/Model/Cron.php +146 -89
  5. app/code/community/Ebizmarts/AbandonedCart/Model/EventObserver.php +20 -2
  6. app/code/community/Ebizmarts/AbandonedCart/etc/adminhtml.xml +9 -0
  7. app/code/community/Ebizmarts/AbandonedCart/etc/config.xml +24 -1
  8. app/code/community/Ebizmarts/AbandonedCart/etc/system.xml +100 -2
  9. app/code/community/Ebizmarts/Autoresponder/Model/Cron.php +78 -51
  10. app/code/community/Ebizmarts/Autoresponder/Model/EventObserver.php +1 -0
  11. app/code/community/Ebizmarts/Autoresponder/controllers/AutoresponderController.php +2 -0
  12. app/code/community/Ebizmarts/Autoresponder/etc/config.xml +1 -19
  13. app/code/community/Ebizmarts/MageMonkey/Block/Checkout/Subscribe.php +1 -0
  14. app/code/community/Ebizmarts/MageMonkey/Helper/Data.php +126 -100
  15. app/code/community/Ebizmarts/MageMonkey/Model/Cron.php +31 -5
  16. app/code/community/Ebizmarts/MageMonkey/Model/Ecommerce360.php +87 -25
  17. app/code/community/Ebizmarts/MageMonkey/Model/Observer.php +73 -63
  18. app/code/community/Ebizmarts/MageMonkey/Model/System/Config/Source/WebhookDelete.php +1 -1
  19. app/code/community/Ebizmarts/MageMonkey/controllers/SignupController.php +1 -4
  20. app/code/community/Ebizmarts/MageMonkey/controllers/WebhookController.php +0 -1
  21. app/code/community/Ebizmarts/MageMonkey/etc/config.xml +1 -6
  22. app/code/community/Ebizmarts/MageMonkey/etc/system.xml +2 -2
  23. app/code/community/Ebizmarts/Mandrill/Model/Email/Template.php +6 -2
  24. app/code/community/Ebizmarts/Mandrill/etc/config.xml +1 -1
  25. app/design/adminhtml/default/default/template/magemonkey/system/config/resetlocal360.phtml +1 -1
  26. app/design/frontend/base/default/layout/ebizmarts/abandonedcart.xml +12 -0
  27. app/design/frontend/base/default/template/ebizmarts_abandonedcart/popup/emailcatcher.phtml +115 -0
  28. app/design/frontend/base/default/template/magemonkey/lists.phtml +13 -0
  29. js/ebizmarts/abandonedcart/popup.css +30 -0
  30. js/ebizmarts/autoresponders/visitedproducts.js +1 -1
  31. js/ebizmarts/autoresponders/visitedproductsstorecodes.js +1 -1
  32. package.xml +33 -9
app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Abandonedorder/Grid.php CHANGED
@@ -104,7 +104,7 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Abandonedorder_Grid extends Mage_A
104
 
105
  $this->addColumn('status', array(
106
  'header' => Mage::helper('sales')->__('Status'),
107
- 'index' => 'status',
108
  'type' => 'options',
109
  'width' => '70px',
110
  'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
104
 
105
  $this->addColumn('status', array(
106
  'header' => Mage::helper('sales')->__('Status'),
107
+ 'index' => 'main_table.status',
108
  'type' => 'options',
109
  'width' => '70px',
110
  'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
app/code/community/Ebizmarts/AbandonedCart/Block/Popup/Emailcatcher.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: santisp
5
+ * Date: 23/10/14
6
+ * Time: 02:28 PM
7
+ */
8
+ class Ebizmarts_AbandonedCart_Block_Popup_Emailcatcher extends Mage_Adminhtml_Block_Widget_Form {
9
+
10
+ protected function _canCancel(){
11
+ $storeId = Mage::app()->getStore()->getId();
12
+ return Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::ENABLE_POPUP, $storeId) && Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_CAN_CANCEL, $storeId);
13
+ }
14
+
15
+ protected function _popupHeading(){
16
+ $storeId = Mage::app()->getStore()->getId();
17
+ return Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_HEADING, $storeId);
18
+ }
19
+
20
+ protected function _popupMessage(){
21
+ $storeId = Mage::app()->getStore()->getId();
22
+ return Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_TEXT, $storeId);
23
+ }
24
+
25
+ protected function _modalSubscribe(){
26
+ $storeId = Mage::app()->getStore()->getId();
27
+ return Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_SUBSCRIPTION, $storeId);
28
+ }
29
+
30
+ protected function _getStoreId(){
31
+ return Mage::app()->getStore()->getId();
32
+ }
33
+ }
app/code/community/Ebizmarts/AbandonedCart/Model/Config.php CHANGED
@@ -49,4 +49,11 @@ class Ebizmarts_AbandonedCart_Model_Config
49
  const IN_DAYS = 0;
50
  const IN_HOURS = 1;
51
  const PAGE = 'ebizmarts_abandonedcart/general/page';
 
 
 
 
 
 
 
52
  }
49
  const IN_DAYS = 0;
50
  const IN_HOURS = 1;
51
  const PAGE = 'ebizmarts_abandonedcart/general/page';
52
+ const ENABLE_POPUP = 'ebizmarts_abandonedcart/catchpopup/popup_general';
53
+ const POPUP_CAN_CANCEL = 'ebizmarts_abandonedcart/catchpopup/popup_cancel';
54
+ const POPUP_TEXT = 'ebizmarts_abandonedcart/catchpopup/popup_text';
55
+ const POPUP_HEADING = 'ebizmarts_abandonedcart/catchpopup/popup_heading';
56
+ const POPUP_SUBSCRIPTION = 'ebizmarts_abandonedcart/catchpopup/popup_subscription';
57
+ const POPUP_WIDTH = 'ebizmarts_abandonedcart/catchpopup/popup_width';
58
+ const POPUP_COOKIE_TIME = 'ebizmarts_abandonedcart/catchpopup/popup_cookie_time';
59
  }
app/code/community/Ebizmarts/AbandonedCart/Model/Cron.php CHANGED
@@ -27,6 +27,15 @@ class Ebizmarts_AbandonedCart_Model_Cron
27
  }
28
  }
29
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * @param $store
32
  */
@@ -90,50 +99,77 @@ class Ebizmarts_AbandonedCart_Model_Cron
90
  if(count($customergroups)) {
91
  $collection->addFieldToFilter('main_table.customer_group_id', array('in', $customergroups));
92
  }
93
- //is this necessary?
94
- // Mage::helper('ebizmarts_abandonedcart')->log((string)$collection->getSelect());
95
 
96
  // for each cart of the current run
97
- foreach($collection as $quote)
98
- {
99
- foreach($quote->getAllVisibleItems() as $item) {
100
  $removeFromQuote = false;
101
  $product = Mage::getModel('catalog/product')->load($item->getProductId());
102
- if(!$product || $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED)
103
  {
104
  Mage::log('AbandonedCart; ' . $product->getSku() .' is no longer present or enabled; remove from quote ' . $quote->getId() . ' for email',null,'Ebizmarts_AbandonedCart.log');
105
  $removeFromQuote = true;
106
  }
107
- $stock = $product->getStockItem();
108
- if(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  (
110
  $stock->getManageStock() ||
111
  ($stock->getUseConfigManageStock() && Mage::getStoreConfig('cataloginventory/item_options/manage_stock', $quote->getStoreId()))
112
  )
113
- && $stock->getQty() < $item->getQty())
114
  {
115
  Mage::log('AbandonedCart; ' . $product->getSku() .' is no longer in stock; remove from quote ' . $quote->getId() . ' for email',null,'Ebizmarts_AbandonedCart.log');
116
  $removeFromQuote = true;
117
  }
118
- if($removeFromQuote)
119
  {
120
  $quote->removeItem($item->getId());
121
  }
122
  }
123
- if(count($quote->getAllVisibleItems()) < 1)
124
- {
125
  $quote2 = Mage::getModel('sales/quote')->loadByIdWithoutStore($quote->getId());
126
- $quote2->setEbizmartsAbandonedcartCounter($quote2->getEbizmartsAbandonedcartCounter()+1);
127
  $quote2->save();
128
  continue;
129
  }
130
  // check if they are any order from the customer with date >=
131
  $collection2 = Mage::getResourceModel('reports/quote_collection');
132
  $collection2->addFieldToFilter('main_table.is_active', '0')
133
- ->addFieldToFilter('main_table.reserved_order_id',array('neq' => 'NULL' ))
134
- ->addFieldToFilter('main_table.customer_email',array('eq' => $quote->getCustomerEmail()))
135
- ->addFieldToFilter('main_table.updated_at',array('from'=>$quote->getUpdatedAt()));
136
- if($collection2->getSize()) {
137
  continue;
138
  }
139
  //
@@ -151,50 +187,48 @@ class Ebizmarts_AbandonedCart_Model_Cron
151
  $email = $quote->getCustomerEmail();
152
 
153
  if($this->_isSubscribed($email,'abandonedcart',$store)) {
154
- $name = $quote->getCustomerFirstname().' '.$quote->getCustomerLastname();
155
  $quote2 = Mage::getModel('sales/quote')->loadByIdWithoutStore($quote->getId());
156
- $unsubscribeUrl = Mage::getModel('core/url')->setStore($store)->getUrl().'ebizautoresponder/autoresponder/unsubscribe?list=abandonedcart&email='.$email.'&store='.$store;
157
  $couponcode = '';
158
 
159
  //if hour is set for first run calculates hours since cart was created else calculates days
160
  $today = idate('U', strtotime(now()));
161
  $updatedAt = idate('U', strtotime($quote2->getUpdatedAt()));
162
- $updatedAtDiff = ($today-$updatedAt)/60/60/24;
163
- if($unit == Ebizmarts_AbandonedCart_Model_Config::IN_HOURS && $run == 0){
164
- $updatedAtDiff = ($today-$updatedAt)/60/60;
165
- }
166
 
167
  // if days have passed proceed to send mail
168
- if($updatedAtDiff >= $diff){
169
 
170
  $mailsubject = $this->_getMailSubject($run, $store);
171
  $templateId = $this->_getTemplateId($run, $store);
172
- if($sendcoupon && $run+1 == $sendcoupondays)
173
- {
174
  //$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
175
  // create a new coupon
176
- if(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_AUTOMATIC)==2) {
177
- list($couponcode,$discount,$toDate) = $this->_createNewCoupon($store,$email);
178
- $vars = array('quote'=>$quote,'url'=>$url, 'couponcode'=>$couponcode,'discount' => $discount,
179
- 'todate' => $toDate, 'name' => $name,'tags'=>array($mandrillTag),'unsubscribeurl'=>$unsubscribeUrl);
180
- }
181
- else {
182
  $couponcode = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_CODE);
183
- $vars = array('quote'=>$quote,'url'=>$url, 'couponcode'=>$couponcode, 'name' => $name,'tags'=>array($mandrillTag),'unsubscribeurl'=>$unsubscribeUrl);
184
  }
185
- }
186
- else {
187
  //$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
188
- $vars = array('quote'=>$quote,'url'=>$url,'unsubscribeurl'=>$unsubscribeUrl,'tags'=>array($mandrillTag));
189
 
190
  }
 
191
  $translate = Mage::getSingleton('core/translate');
192
- $mail = Mage::getModel('core/email_template')->setTemplateSubject($mailsubject)->sendTransactional($templateId,$sender,$email,$name,$vars,$store);
193
  $translate->setTranslateInLine(true);
194
- $quote2->setEbizmartsAbandonedcartCounter($quote2->getEbizmartsAbandonedcartCounter()+1);
195
  $quote2->setEbizmartsAbandonedcartToken($token);
196
  $quote2->save();
197
- Mage::helper('ebizmarts_abandonedcart')->saveMail('abandoned cart',$email,$name,$couponcode,$store);
198
  }
199
  }
200
  }
@@ -208,57 +242,68 @@ class Ebizmarts_AbandonedCart_Model_Cron
208
  */
209
  protected function _createNewCoupon($store,$email)
210
  {
211
- $couponamount = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_AMOUNT, $store);
212
- $couponexpiredays = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_EXPIRE, $store);
213
- $coupontype = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_TYPE, $store);
214
- $couponlength = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_LENGTH, $store);
215
- $couponlabel = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_LABEL, $store);
216
- $websiteid = Mage::getModel('core/store')->load($store)->getWebsiteId();
217
-
218
- $fromDate = date("Y-m-d");
219
- $toDate = date('Y-m-d', strtotime($fromDate. " + $couponexpiredays day"));
220
- if($coupontype == 1) {
221
- $action = 'cart_fixed';
222
- $discount = Mage::app()->getStore($store)->getCurrentCurrencyCode()."$couponamount";
223
- }
224
- elseif($coupontype == 2) {
225
- $action = 'by_percent';
226
- $discount = "$couponamount%";
227
- }
228
- $customer_group = new Mage_Customer_Model_Group();
229
- $allGroups = $customer_group->getCollection()->toOptionHash();
230
- $groups = array();
231
- foreach($allGroups as $groupid=>$name) {
232
- $groups[] = $groupid;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  }
234
- $coupon_rule = Mage::getModel('salesrule/rule');
235
- $coupon_rule->setName("Abandoned coupon $email")
236
- ->setDescription("Abandoned coupon $email")
237
- ->setStopRulesProcessing(0)
238
- ->setFromDate($fromDate)
239
- ->setToDate($toDate)
240
- ->setIsActive(1)
241
- ->setCouponType(2)
242
- ->setUsesPerCoupon(1)
243
- ->setUsesPerCustomer(1)
244
- ->setCustomerGroupIds($groups)
245
- ->setProductIds('')
246
- ->setLengthMin($couponlength)
247
- ->setLengthMax($couponlength)
248
- ->setSortOrder(0)
249
- ->setStoreLabels(array($couponlabel))
250
- ->setSimpleAction($action)
251
- ->setDiscountAmount($couponamount)
252
- ->setDiscountQty(0)
253
- ->setDiscountStep('0')
254
- ->setSimpleFreeShipping('0')
255
- ->setApplyToShipping('0')
256
- ->setIsRss(0)
257
- ->setWebsiteIds($websiteid);
258
- $uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $couponlength))->generateCode();
259
- $coupon_rule->setCouponCode($uniqueId);
260
- $coupon_rule->save();
261
- return array($uniqueId,$discount,$toDate);
262
  }
263
 
264
  /**
@@ -343,4 +388,16 @@ class Ebizmarts_AbandonedCart_Model_Cron
343
  return $ret;
344
 
345
  }
 
 
 
 
 
 
 
 
 
 
 
 
346
  }
27
  }
28
  }
29
 
30
+ public function cleanAbandonedCartExpiredCoupons(){
31
+ $allStores = Mage::app()->getStores();
32
+ foreach($allStores as $storeid => $val){
33
+ if(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::ACTIVE,$storeid)) {
34
+ $this->_cleanCoupons($storeid);
35
+ }
36
+ }
37
+ }
38
+
39
  /**
40
  * @param $store
41
  */
99
  if(count($customergroups)) {
100
  $collection->addFieldToFilter('main_table.customer_group_id', array('in', $customergroups));
101
  }
 
 
102
 
103
  // for each cart of the current run
104
+ foreach($collection as $quote) {
105
+ foreach ($quote->getAllVisibleItems() as $item) {
 
106
  $removeFromQuote = false;
107
  $product = Mage::getModel('catalog/product')->load($item->getProductId());
108
+ if (!$product || $product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED)
109
  {
110
  Mage::log('AbandonedCart; ' . $product->getSku() .' is no longer present or enabled; remove from quote ' . $quote->getId() . ' for email',null,'Ebizmarts_AbandonedCart.log');
111
  $removeFromQuote = true;
112
  }
113
+
114
+ if ($product->getTypeId() == 'configurable') {
115
+ $simpleProductId = Mage::getModel('catalog/product')->getIdBySku($item->getSku());
116
+ $simpleProduct = Mage::getModel('catalog/product')->load($simpleProductId);
117
+ $stock = $simpleProduct->getStockItem();
118
+ $stockQty = $stock->getQty();
119
+ } elseif ($product->getTypeId() == 'bundle') {
120
+ $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
121
+ $bundled_product = new Mage_Catalog_Model_Product();
122
+ $bundled_product->load($product->getId());
123
+ $selectionCollection = $bundled_product->getTypeInstance(true)->getSelectionsCollection(
124
+ $bundled_product->getTypeInstance(true)->getOptionsIds($bundled_product), $bundled_product
125
+ );
126
+ $stockQty = -1;
127
+ foreach ($selectionCollection as $option) {
128
+ foreach ($options['bundle_options'] as $bundle) {
129
+ if ($bundle['value'][0]['title'] == $option->getName()) {
130
+ $label = $bundle['label'];
131
+ $qty = $bundle['value'][0]['qty'];
132
+ if ($stockQty == -1 || $stockQty > $qty) {
133
+ $stockQty = $qty;
134
+ }
135
+ }
136
+ }
137
+ }
138
+
139
+ } else {
140
+ $stock = $product->getStockItem();
141
+ $stockQty = $stock->getQty();
142
+ }
143
+
144
+ if (
145
  (
146
  $stock->getManageStock() ||
147
  ($stock->getUseConfigManageStock() && Mage::getStoreConfig('cataloginventory/item_options/manage_stock', $quote->getStoreId()))
148
  )
149
+ && $stockQty < $item->getQty())
150
  {
151
  Mage::log('AbandonedCart; ' . $product->getSku() .' is no longer in stock; remove from quote ' . $quote->getId() . ' for email',null,'Ebizmarts_AbandonedCart.log');
152
  $removeFromQuote = true;
153
  }
154
+ if ($removeFromQuote)
155
  {
156
  $quote->removeItem($item->getId());
157
  }
158
  }
159
+
160
+ if (count($quote->getAllVisibleItems()) < 1) {
161
  $quote2 = Mage::getModel('sales/quote')->loadByIdWithoutStore($quote->getId());
162
+ $quote2->setEbizmartsAbandonedcartCounter($quote2->getEbizmartsAbandonedcartCounter() + 1);
163
  $quote2->save();
164
  continue;
165
  }
166
  // check if they are any order from the customer with date >=
167
  $collection2 = Mage::getResourceModel('reports/quote_collection');
168
  $collection2->addFieldToFilter('main_table.is_active', '0')
169
+ ->addFieldToFilter('main_table.reserved_order_id', array('neq' => 'NULL'))
170
+ ->addFieldToFilter('main_table.customer_email', array('eq' => $quote->getCustomerEmail()))
171
+ ->addFieldToFilter('main_table.updated_at', array('from' => $quote->getUpdatedAt()));
172
+ if ($collection2->getSize()) {
173
  continue;
174
  }
175
  //
187
  $email = $quote->getCustomerEmail();
188
 
189
  if($this->_isSubscribed($email,'abandonedcart',$store)) {
190
+ $name = $quote->getCustomerFirstname() . ' ' . $quote->getCustomerLastname();
191
  $quote2 = Mage::getModel('sales/quote')->loadByIdWithoutStore($quote->getId());
192
+ $unsubscribeUrl = Mage::getModel('core/url')->setStore($store)->getUrl() . 'ebizautoresponder/autoresponder/unsubscribe?list=abandonedcart&email=' . $email . '&store=' . $store;
193
  $couponcode = '';
194
 
195
  //if hour is set for first run calculates hours since cart was created else calculates days
196
  $today = idate('U', strtotime(now()));
197
  $updatedAt = idate('U', strtotime($quote2->getUpdatedAt()));
198
+ $updatedAtDiff = ($today - $updatedAt) / 60 / 60 / 24;
199
+ if ($unit == Ebizmarts_AbandonedCart_Model_Config::IN_HOURS && $run == 0) {
200
+ $updatedAtDiff = ($today - $updatedAt) / 60 / 60;
201
+ }
202
 
203
  // if days have passed proceed to send mail
204
+ if ($updatedAtDiff >= $diff) {
205
 
206
  $mailsubject = $this->_getMailSubject($run, $store);
207
  $templateId = $this->_getTemplateId($run, $store);
208
+ if ($sendcoupon && $run + 1 == $sendcoupondays) {
 
209
  //$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
210
  // create a new coupon
211
+ if (Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_AUTOMATIC) == 2) {
212
+ list($couponcode, $discount, $toDate) = $this->_createNewCoupon($store, $email);
213
+ $vars = array('quote' => $quote, 'url' => $url, 'couponcode' => $couponcode, 'discount' => $discount,
214
+ 'todate' => $toDate, 'name' => $name, 'tags' => array($mandrillTag), 'unsubscribeurl' => $unsubscribeUrl);
215
+ } else {
 
216
  $couponcode = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_CODE);
217
+ $vars = array('quote' => $quote, 'url' => $url, 'couponcode' => $couponcode, 'name' => $name, 'tags' => array($mandrillTag), 'unsubscribeurl' => $unsubscribeUrl);
218
  }
219
+ } else {
 
220
  //$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
221
+ $vars = array('quote' => $quote, 'url' => $url, 'unsubscribeurl' => $unsubscribeUrl, 'tags' => array($mandrillTag));
222
 
223
  }
224
+ Mage::app()->getTranslator()->init('frontend', true);
225
  $translate = Mage::getSingleton('core/translate');
226
+ $mail = Mage::getModel('core/email_template')->setTemplateSubject($mailsubject)->sendTransactional($templateId, $sender, $email, $name, $vars, $store);
227
  $translate->setTranslateInLine(true);
228
+ $quote2->setEbizmartsAbandonedcartCounter($quote2->getEbizmartsAbandonedcartCounter() + 1);
229
  $quote2->setEbizmartsAbandonedcartToken($token);
230
  $quote2->save();
231
+ Mage::helper('ebizmarts_abandonedcart')->saveMail('abandoned cart', $email, $name, $couponcode, $store);
232
  }
233
  }
234
  }
242
  */
243
  protected function _createNewCoupon($store,$email)
244
  {
245
+ $collection = Mage::getModel('salesrule/rule')->getCollection()
246
+ ->addFieldToFilter('name', array('like'=>'Abandoned coupon ' . $email));
247
+ if (!count($collection)) {
248
+ $couponamount = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_AMOUNT, $store);
249
+ $couponexpiredays = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_EXPIRE, $store);
250
+ $coupontype = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_TYPE, $store);
251
+ $couponlength = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_LENGTH, $store);
252
+ $couponlabel = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::COUPON_LABEL, $store);
253
+ $websiteid = Mage::getModel('core/store')->load($store)->getWebsiteId();
254
+
255
+ $fromDate = date("Y-m-d");
256
+ $toDate = date('Y-m-d', strtotime($fromDate . " + $couponexpiredays day"));
257
+ if ($coupontype == 1) {
258
+ $action = 'cart_fixed';
259
+ $discount = Mage::app()->getStore($store)->getCurrentCurrencyCode() . "$couponamount";
260
+ } elseif ($coupontype == 2) {
261
+ $action = 'by_percent';
262
+ $discount = "$couponamount%";
263
+ }
264
+ $customer_group = new Mage_Customer_Model_Group();
265
+ $allGroups = $customer_group->getCollection()->toOptionHash();
266
+ $groups = array();
267
+ foreach ($allGroups as $groupid => $name) {
268
+ $groups[] = $groupid;
269
+ }
270
+ $coupon_rule = Mage::getModel('salesrule/rule');
271
+ $coupon_rule->setName("Abandoned coupon $email")
272
+ ->setDescription("Abandoned coupon $email")
273
+ ->setStopRulesProcessing(0)
274
+ ->setFromDate($fromDate)
275
+ ->setToDate($toDate)
276
+ ->setIsActive(1)
277
+ ->setCouponType(2)
278
+ ->setUsesPerCoupon(1)
279
+ ->setUsesPerCustomer(1)
280
+ ->setCustomerGroupIds($groups)
281
+ ->setProductIds('')
282
+ ->setLengthMin($couponlength)
283
+ ->setLengthMax($couponlength)
284
+ ->setSortOrder(0)
285
+ ->setStoreLabels(array($couponlabel))
286
+ ->setSimpleAction($action)
287
+ ->setDiscountAmount($couponamount)
288
+ ->setDiscountQty(0)
289
+ ->setDiscountStep('0')
290
+ ->setSimpleFreeShipping('0')
291
+ ->setApplyToShipping('0')
292
+ ->setIsRss(0)
293
+ ->setWebsiteIds($websiteid);
294
+ $uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $couponlength))->generateCode();
295
+ $coupon_rule->setCouponCode($uniqueId);
296
+ $coupon_rule->save();
297
+ return array($uniqueId, $discount, $toDate);
298
+ }else{
299
+ $coupon = $collection->getFirstItem();
300
+ if ($coupon->getSimpleAction() == 'cart_fixed') {
301
+ $discount = Mage::app()->getStore($store)->getCurrentCurrencyCode() . $coupon->getDiscountAmount();
302
+ } else{
303
+ $discount = $coupon->getDiscountAmount();
304
+ }
305
+ return array($coupon->getCode(), $discount, $coupon->getToDate());
306
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  }
308
 
309
  /**
388
  return $ret;
389
 
390
  }
391
+
392
+ protected function _cleanCoupons($store){
393
+ $today = date('Y-m-d');
394
+ $collection = Mage::getModel('salesrule/rule')->getCollection()
395
+ ->addFieldToFilter('name', array('like'=>'Abandoned coupon%'))
396
+ ->addFieldToFilter('to_date', array('lt'=> $today));
397
+
398
+ foreach ($collection as $toDelete) {
399
+ $toDelete->delete();
400
+ }
401
+
402
+ }
403
  }
app/code/community/Ebizmarts/AbandonedCart/Model/EventObserver.php CHANGED
@@ -10,7 +10,7 @@
10
 
11
  class Ebizmarts_AbandonedCart_Model_EventObserver
12
  {
13
- public function saveConfig(Varien_Event_Observer $o)
14
  {
15
  if(Mage::app()->getRequest()->getParam('store')) {
16
  $scope = 'store';
@@ -22,12 +22,30 @@ class Ebizmarts_AbandonedCart_Model_EventObserver
22
  $scope = 'default';
23
  }
24
 
25
- $store = is_null($o->getEvent()->getStore()) ? Mage::app()->getDefaultStoreView()->getCode(): $o->getEvent()->getStore();
26
  if(!Mage::helper('ebizmarts_mandrill')->useTransactionalService()) {
27
  $config = new Mage_Core_Model_Config();
28
  $config->saveConfig(Ebizmarts_AbandonedCart_Model_Config::ACTIVE,false,$scope,$store);
 
29
  Mage::getConfig()->cleanCache();
30
  }
31
 
32
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
10
 
11
  class Ebizmarts_AbandonedCart_Model_EventObserver
12
  {
13
+ public function saveConfig(Varien_Event_Observer $observer)
14
  {
15
  if(Mage::app()->getRequest()->getParam('store')) {
16
  $scope = 'store';
22
  $scope = 'default';
23
  }
24
 
25
+ $store = is_null($observer->getEvent()->getStore()) ? Mage::app()->getDefaultStoreView()->getCode(): $observer->getEvent()->getStore();
26
  if(!Mage::helper('ebizmarts_mandrill')->useTransactionalService()) {
27
  $config = new Mage_Core_Model_Config();
28
  $config->saveConfig(Ebizmarts_AbandonedCart_Model_Config::ACTIVE,false,$scope,$store);
29
+ $config->saveConfig(Ebizmarts_AbandonedCart_Model_Config::ENABLE_POPUP,false,$scope,$store);
30
  Mage::getConfig()->cleanCache();
31
  }
32
 
33
  }
34
+
35
+ public function loadCustomer(Varien_Event_Observer $observer){
36
+ if(!Mage::getSingleton('customer/session')->isLoggedIn()) {
37
+ $quote = $observer->getEvent()->getQuote();
38
+ $action = Mage::app()->getRequest()->getActionName();
39
+ $onCheckout = $action == 'saveOrder' || $action == 'savePayment' || $action == 'saveShippingMethod' || $action == 'saveBilling';
40
+ if (isset($_COOKIE['email']) && $_COOKIE['email'] != 'none' && !$onCheckout) {
41
+ $email = str_replace(' ', '+', $_COOKIE['email']);
42
+ if($quote->getCustomerEmail() != $email){
43
+ $quote->setCustomerEmail($email);
44
+ $quote->save();
45
+ }
46
+ }
47
+ }
48
+ return $observer;
49
+ }
50
+
51
  }
app/code/community/Ebizmarts/AbandonedCart/etc/adminhtml.xml CHANGED
@@ -40,6 +40,15 @@
40
  <resources>
41
  <admin>
42
  <children>
 
 
 
 
 
 
 
 
 
43
  <system>
44
  <children>
45
  <config>
40
  <resources>
41
  <admin>
42
  <children>
43
+ <dashboard>
44
+ <children>
45
+ <ebizmarts_abandonedcart translate="title" module="ebizmarts_abandonedcart">
46
+ <title>Abandoned Cart Dashboard</title>
47
+ <sort_order>800</sort_order>
48
+ <action>adminhtml/abandonedorder/dashboard</action>
49
+ </ebizmarts_abandonedcart>
50
+ </children>
51
+ </dashboard>
52
  <system>
53
  <children>
54
  <config>
app/code/community/Ebizmarts/AbandonedCart/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Ebizmarts_AbandonedCart>
13
- <version>0.1.28</version>
14
  </Ebizmarts_AbandonedCart>
15
  </modules>
16
  <global>
@@ -104,6 +104,16 @@
104
  </ebizmarts_abandonedcart_flag>
105
  </sales_convert_quote>
106
  </fieldsets>
 
 
 
 
 
 
 
 
 
 
107
  </global>
108
 
109
  <admin>
@@ -175,6 +185,10 @@
175
  <model>ebizmarts_abandonedcart/cron::abandoned</model>
176
  </run>
177
  </ebizmarts_abandoned_cart>
 
 
 
 
178
  </jobs>
179
  </crontab>
180
  <default>
@@ -193,6 +207,15 @@
193
  <autologin>0</autologin>
194
  <page>checkout/cart</page>
195
  </general>
 
 
 
 
 
 
 
 
 
196
  </ebizmarts_abandonedcart>
197
  </default>
198
  </config>
10
  <config>
11
  <modules>
12
  <Ebizmarts_AbandonedCart>
13
+ <version>0.1.29</version>
14
  </Ebizmarts_AbandonedCart>
15
  </modules>
16
  <global>
104
  </ebizmarts_abandonedcart_flag>
105
  </sales_convert_quote>
106
  </fieldsets>
107
+ <events>
108
+ <sales_quote_save_after>
109
+ <observers>
110
+ <ebizmarts_abandoned_quote_init>
111
+ <class>ebizmarts_abandonedcart/eventObserver</class>
112
+ <method>loadCustomer</method>
113
+ </ebizmarts_abandoned_quote_init>
114
+ </observers>
115
+ </sales_quote_save_after>
116
+ </events>
117
  </global>
118
 
119
  <admin>
185
  <model>ebizmarts_abandonedcart/cron::abandoned</model>
186
  </run>
187
  </ebizmarts_abandoned_cart>
188
+ <ebizmarts_abandoned_cart_clean_expiredcoupons>
189
+ <schedule><cron_expr>0 0 1 * *</cron_expr></schedule>
190
+ <run><model>ebizmarts_abandonedcart/cron::cleanAbandonedCartExpiredCoupons</model></run>
191
+ </ebizmarts_abandoned_cart_clean_expiredcoupons>
192
  </jobs>
193
  </crontab>
194
  <default>
207
  <autologin>0</autologin>
208
  <page>checkout/cart</page>
209
  </general>
210
+ <catchpopup>
211
+ <popup_general>1</popup_general>
212
+ <popup_cancel>1</popup_cancel>
213
+ <popup_subscription>1</popup_subscription>
214
+ <popup_heading>Send us your email!</popup_heading>
215
+ <popup_text>Put your email here for us to get to know you and personalize your service.</popup_text>
216
+ <popup_width>410</popup_width>
217
+ <popup_cookie_time>1</popup_cookie_time>
218
+ </catchpopup>
219
  </ebizmarts_abandonedcart>
220
  </default>
221
  </config>
app/code/community/Ebizmarts/AbandonedCart/etc/system.xml CHANGED
@@ -347,7 +347,7 @@
347
  <label>Customer Groups</label>
348
  <frontend_type>multiselect</frontend_type>
349
  <source_model>ebizmarts_abandonedcart/system_config_customergroup</source_model>
350
- <sort_order>55</sort_order>
351
  <show_in_default>1</show_in_default>
352
  <show_in_website>1</show_in_website>
353
  <show_in_store>1</show_in_store>
@@ -361,7 +361,7 @@
361
  <label>Auto Login link</label>
362
  <frontend_type>select</frontend_type>
363
  <source_model>adminhtml/system_config_source_yesno</source_model>
364
- <sort_order>60</sort_order>
365
  <show_in_default>1</show_in_default>
366
  <show_in_website>1</show_in_website>
367
  <show_in_store>1</show_in_store>
@@ -373,6 +373,104 @@
373
 
374
  </fields>
375
  </general>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
  <coupon>
377
  <label>Coupon</label>
378
  <sort_order>99</sort_order>
347
  <label>Customer Groups</label>
348
  <frontend_type>multiselect</frontend_type>
349
  <source_model>ebizmarts_abandonedcart/system_config_customergroup</source_model>
350
+ <sort_order>70</sort_order>
351
  <show_in_default>1</show_in_default>
352
  <show_in_website>1</show_in_website>
353
  <show_in_store>1</show_in_store>
361
  <label>Auto Login link</label>
362
  <frontend_type>select</frontend_type>
363
  <source_model>adminhtml/system_config_source_yesno</source_model>
364
+ <sort_order>80</sort_order>
365
  <show_in_default>1</show_in_default>
366
  <show_in_website>1</show_in_website>
367
  <show_in_store>1</show_in_store>
373
 
374
  </fields>
375
  </general>
376
+ <catchpopup>
377
+ <label>Catch email</label>
378
+ <sort_order>50</sort_order>
379
+ <frontend_type>text</frontend_type>
380
+ <show_in_default>1</show_in_default>
381
+ <show_in_website>1</show_in_website>
382
+ <show_in_store>1</show_in_store>
383
+ <fields>
384
+ <popup_general translate="label comment">
385
+ <label>Catch Email On Home Page Popup</label>
386
+ <frontend_type>select</frontend_type>
387
+ <source_model>adminhtml/system_config_source_yesno</source_model>
388
+ <sort_order>55</sort_order>
389
+ <show_in_default>1</show_in_default>
390
+ <show_in_website>1</show_in_website>
391
+ <show_in_store>1</show_in_store>
392
+ <comment><![CDATA[Create popup on hompage asking for customer email to use later on Abandoned Cart mailing.]]></comment>
393
+ </popup_general>
394
+ <popup_cancel translate="label comment">
395
+ <label>Customer can close Popup</label>
396
+ <frontend_type>select</frontend_type>
397
+ <source_model>adminhtml/system_config_source_yesno</source_model>
398
+ <sort_order>60</sort_order>
399
+ <show_in_default>1</show_in_default>
400
+ <show_in_website>1</show_in_website>
401
+ <show_in_store>1</show_in_store>
402
+ <comment><![CDATA[Popup can be closed without giving an email.]]></comment>
403
+ <depends>
404
+ <popup_general separator=",">1</popup_general>
405
+ </depends>
406
+ </popup_cancel>
407
+ <popup_heading translate="label comment">
408
+ <label>Popup Heading</label>
409
+ <frontend_type>text</frontend_type>
410
+ <sort_order>65</sort_order>
411
+ <show_in_default>1</show_in_default>
412
+ <show_in_website>1</show_in_website>
413
+ <show_in_store>1</show_in_store>
414
+ <can_be_empty>1</can_be_empty>
415
+ <comment><![CDATA[This field can be empty.]]></comment>
416
+ <depends>
417
+ <popup_general separator=",">1</popup_general>
418
+ </depends>
419
+ </popup_heading>
420
+ <popup_text translate="label comment">
421
+ <label>Popup Message</label>
422
+ <frontend_type>textarea</frontend_type>
423
+ <sort_order>66</sort_order>
424
+ <show_in_default>1</show_in_default>
425
+ <show_in_website>1</show_in_website>
426
+ <show_in_store>1</show_in_store>
427
+ <can_be_empty>1</can_be_empty>
428
+ <comment><![CDATA[This field can be empty.]]></comment>
429
+ <depends>
430
+ <popup_general separator=",">1</popup_general>
431
+ </depends>
432
+ </popup_text>
433
+ <popup_width translate="label comment">
434
+ <label>Popup Width</label>
435
+ <frontend_type>text</frontend_type>
436
+ <sort_order>67</sort_order>
437
+ <show_in_default>1</show_in_default>
438
+ <show_in_website>1</show_in_website>
439
+ <show_in_store>1</show_in_store>
440
+ <can_be_empty>1</can_be_empty>
441
+ <comment><![CDATA[The width is in pixels.]]></comment>
442
+ <depends>
443
+ <popup_general separator=",">1</popup_general>
444
+ </depends>
445
+ </popup_width>
446
+ <popup_subscription translate="label comment">
447
+ <label>Subscribe customer</label>
448
+ <frontend_type>select</frontend_type>
449
+ <source_model>adminhtml/system_config_source_yesno</source_model>
450
+ <sort_order>68</sort_order>
451
+ <show_in_default>1</show_in_default>
452
+ <show_in_website>1</show_in_website>
453
+ <show_in_store>1</show_in_store>
454
+ <comment><![CDATA[When email confirmed on popup subscribe customer to newsletter.]]></comment>
455
+ <depends>
456
+ <popup_general separator=",">1</popup_general>
457
+ </depends>
458
+ </popup_subscription>
459
+ <popup_cookie_time translate="label comment">
460
+ <label>When popup cancelled show again after</label>
461
+ <frontend_type>text</frontend_type>
462
+ <sort_order>69</sort_order>
463
+ <show_in_default>1</show_in_default>
464
+ <show_in_website>1</show_in_website>
465
+ <show_in_store>1</show_in_store>
466
+ <comment><![CDATA[This field is in days.]]></comment>
467
+ <depends>
468
+ <popup_general separator=",">1</popup_general>
469
+ <popup_cancel separator=",">1</popup_cancel>
470
+ </depends>
471
+ </popup_cookie_time>
472
+ </fields>
473
+ </catchpopup>
474
  <coupon>
475
  <label>Coupon</label>
476
  <sort_order>99</sort_order>
app/code/community/Ebizmarts/Autoresponder/Model/Cron.php CHANGED
@@ -58,6 +58,7 @@ class Ebizmarts_Autoresponder_Model_Cron
58
  if(Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BACKTOSTOCK_ACTIVE,$storeId)){
59
  $this->_processBackToStock($storeId);
60
  }
 
61
  }
62
  protected function _processNewOrders($storeId)
63
  {
@@ -420,7 +421,7 @@ class Ebizmarts_Autoresponder_Model_Cron
420
  $customer = Mage::getModel('customer/customer')->load($item->getCustomerId());
421
  $customerIdPrev = $item->getCustomerId();
422
  }
423
- if(count($products) > $max||!in_array($customer->getGroupId(),$customerGroups)) {
424
  continue;
425
  }
426
  $itemscollection = Mage::getModel('sales/order_item')->getCollection();
@@ -673,56 +674,68 @@ class Ebizmarts_Autoresponder_Model_Cron
673
 
674
  protected function _createNewCoupon($store,$email)
675
  {
676
- $couponamount = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_DISCOUNT, $store);
677
- $couponexpiredays = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_EXPIRE, $store);
678
- $coupontype = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_DISCOUNT_TYPE, $store);
679
- $couponlength = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_LENGTH, $store);
680
- $couponlabel = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_COUPON_LABEL, $store);
681
- $websiteid = Mage::getModel('core/store')->load($store)->getWebsiteId();
682
-
683
- $fromDate = date("Y-m-d");
684
- $toDate = date('Y-m-d', strtotime($fromDate. " + $couponexpiredays day"));
685
- if($coupontype == 1) {
686
- $action = 'cart_fixed';
687
- $discount = Mage::app()->getStore($store)->getCurrentCurrencyCode()."$couponamount";
688
- }
689
- elseif($coupontype == 2) {
690
- $action = 'by_percent';
691
- $discount = "$couponamount%";
692
- }
693
- $customer_group = new Mage_Customer_Model_Group();
694
- $allGroups = $customer_group->getCollection()->toOptionHash();
695
- $groups = array();
696
- foreach($allGroups as $groupid=>$name) {
697
- $groups[] = $groupid;
698
- }
699
- $coupon_rule = Mage::getModel('salesrule/rule');
700
- $coupon_rule->setName("Birthday coupon $email")
701
- ->setDescription("Birthday coupon $email")
702
- ->setFromDate($fromDate)
703
- ->setToDate($toDate)
704
- ->setIsActive(1)
705
- ->setCouponType(2)
706
- ->setUsesPerCoupon(1)
707
- ->setUsesPerCustomer(1)
708
- ->setCustomerGroupIds($groups)
709
- ->setProductIds('')
710
- ->setLengthMin($couponlength)
711
- ->setLengthMax($couponlength)
712
- ->setSortOrder(0)
713
- ->setStoreLabels(array($couponlabel))
714
- ->setSimpleAction($action)
715
- ->setDiscountAmount($couponamount)
716
- ->setDiscountQty(0)
717
- ->setDiscountStep('0')
718
- ->setSimpleFreeShipping('0')
719
- ->setApplyToShipping('0')
720
- ->setIsRss(0)
721
- ->setWebsiteIds($websiteid);
722
- $uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $couponlength))->generateCode();
723
- $coupon_rule->setCouponCode($uniqueId);
724
- $coupon_rule->save();
725
- return array($uniqueId,$discount,$toDate);
 
 
 
 
 
 
 
 
 
 
 
 
726
  }
727
 
728
  function _getIntervalUnitSql($interval, $unit)
@@ -738,4 +751,18 @@ class Ebizmarts_Autoresponder_Model_Cron
738
  return $collection->getSize() == 0;
739
 
740
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
741
  }
58
  if(Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BACKTOSTOCK_ACTIVE,$storeId)){
59
  $this->_processBackToStock($storeId);
60
  }
61
+ $this->_cleanAutoresponderExpiredCoupons();
62
  }
63
  protected function _processNewOrders($storeId)
64
  {
421
  $customer = Mage::getModel('customer/customer')->load($item->getCustomerId());
422
  $customerIdPrev = $item->getCustomerId();
423
  }
424
+ if(count($products) > $max && $max != 0 || !in_array($customer->getGroupId(),$customerGroups)) {
425
  continue;
426
  }
427
  $itemscollection = Mage::getModel('sales/order_item')->getCollection();
674
 
675
  protected function _createNewCoupon($store,$email)
676
  {
677
+ $collection = Mage::getModel('salesrule/rule')->getCollection()
678
+ ->addFieldToFilter('name', array('like'=>'Birthday coupon ' . $email));
679
+ if (!count($collection)) {
680
+ $couponamount = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_DISCOUNT, $store);
681
+ $couponexpiredays = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_EXPIRE, $store);
682
+ $coupontype = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_DISCOUNT_TYPE, $store);
683
+ $couponlength = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_LENGTH, $store);
684
+ $couponlabel = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_COUPON_LABEL, $store);
685
+ $websiteid = Mage::getModel('core/store')->load($store)->getWebsiteId();
686
+
687
+ $fromDate = date("Y-m-d");
688
+ $toDate = date('Y-m-d', strtotime($fromDate. " + $couponexpiredays day"));
689
+ if($coupontype == 1) {
690
+ $action = 'cart_fixed';
691
+ $discount = Mage::app()->getStore($store)->getCurrentCurrencyCode()."$couponamount";
692
+ }
693
+ elseif($coupontype == 2) {
694
+ $action = 'by_percent';
695
+ $discount = "$couponamount%";
696
+ }
697
+ $customer_group = new Mage_Customer_Model_Group();
698
+ $allGroups = $customer_group->getCollection()->toOptionHash();
699
+ $groups = array();
700
+ foreach($allGroups as $groupid=>$name) {
701
+ $groups[] = $groupid;
702
+ }
703
+ $coupon_rule = Mage::getModel('salesrule/rule');
704
+ $coupon_rule->setName("Birthday coupon $email")
705
+ ->setDescription("Birthday coupon $email")
706
+ ->setFromDate($fromDate)
707
+ ->setToDate($toDate)
708
+ ->setIsActive(1)
709
+ ->setCouponType(2)
710
+ ->setUsesPerCoupon(1)
711
+ ->setUsesPerCustomer(1)
712
+ ->setCustomerGroupIds($groups)
713
+ ->setProductIds('')
714
+ ->setLengthMin($couponlength)
715
+ ->setLengthMax($couponlength)
716
+ ->setSortOrder(0)
717
+ ->setStoreLabels(array($couponlabel))
718
+ ->setSimpleAction($action)
719
+ ->setDiscountAmount($couponamount)
720
+ ->setDiscountQty(0)
721
+ ->setDiscountStep('0')
722
+ ->setSimpleFreeShipping('0')
723
+ ->setApplyToShipping('0')
724
+ ->setIsRss(0)
725
+ ->setWebsiteIds($websiteid);
726
+ $uniqueId = Mage::getSingleton('salesrule/coupon_codegenerator', array('length' => $couponlength))->generateCode();
727
+ $coupon_rule->setCouponCode($uniqueId);
728
+ $coupon_rule->save();
729
+ return array($uniqueId,$discount,$toDate);
730
+ }else{
731
+ $coupon = $collection->getFirstItem();
732
+ if ($coupon->getSimpleAction() == 'cart_fixed') {
733
+ $discount = Mage::app()->getStore($store)->getCurrentCurrencyCode() . $coupon->getDiscountAmount();
734
+ } else{
735
+ $discount = $coupon->getDiscountAmount();
736
+ }
737
+ return array($coupon->getCode(), $discount, $coupon->getToDate());
738
+ }
739
  }
740
 
741
  function _getIntervalUnitSql($interval, $unit)
751
  return $collection->getSize() == 0;
752
 
753
  }
754
+
755
+ protected function _cleanAutoresponderExpiredCoupons(){
756
+ $today = date('Y-m-d');
757
+ $reviewCouponFilter = array('like'=>'Review coupon%');
758
+ $birthdayCouponFilter = array('like'=>'Birthday coupon%');
759
+
760
+ $collection = Mage::getModel('salesrule/rule')->getCollection()
761
+ ->addFieldToFilter('name', array($reviewCouponFilter,$birthdayCouponFilter))
762
+ ->addFieldToFilter('to_date', array('lt'=> $today));
763
+
764
+ foreach ($collection as $toDelete) {
765
+ $toDelete->delete();
766
+ }
767
+ }
768
  }
app/code/community/Ebizmarts/Autoresponder/Model/EventObserver.php CHANGED
@@ -33,6 +33,7 @@ class Ebizmarts_Autoresponder_Model_EventObserver
33
  if(!Mage::helper('ebizmarts_mandrill')->useTransactionalService()) {
34
  $config = new Mage_Core_Model_Config();
35
  $config->saveConfig(Ebizmarts_AbandonedCart_Model_Config::ACTIVE,false,$scope,$store);
 
36
  Mage::getConfig()->cleanCache();
37
  }
38
  if(!Mage::getStoreConfig('customer/address/dob_show')) {
33
  if(!Mage::helper('ebizmarts_mandrill')->useTransactionalService()) {
34
  $config = new Mage_Core_Model_Config();
35
  $config->saveConfig(Ebizmarts_AbandonedCart_Model_Config::ACTIVE,false,$scope,$store);
36
+ $config->saveConfig(Ebizmarts_AbandonedCart_Model_Config::ENABLE_POPUP,false,$scope,$store);
37
  Mage::getConfig()->cleanCache();
38
  }
39
  if(!Mage::getStoreConfig('customer/address/dob_show')) {
app/code/community/Ebizmarts/Autoresponder/controllers/AutoresponderController.php CHANGED
@@ -86,6 +86,8 @@ class Ebizmarts_Autoresponder_AutoresponderController extends Mage_Core_Controll
86
  $storeId = Mage::app()->getStore()->getStoreId();
87
  if(isset($params['product_id'])) {
88
  $product = Mage::getModel('catalog/product')->load($params['product_id']);
 
 
89
  $mark = $product->getEbizmartsMarkVisited();
90
  if($mark == 1) {
91
  $resp['time'] = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::VISITED_TIME,$storeId);
86
  $storeId = Mage::app()->getStore()->getStoreId();
87
  if(isset($params['product_id'])) {
88
  $product = Mage::getModel('catalog/product')->load($params['product_id']);
89
+ $collection = Mage::getModel('catalog/product')->getCollection()
90
+ ->addFieldToFilter('entity_id', $params['product_id']);
91
  $mark = $product->getEbizmartsMarkVisited();
92
  if($mark == 1) {
93
  $resp['time'] = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::VISITED_TIME,$storeId);
app/code/community/Ebizmarts/Autoresponder/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Ebizmarts_Autoresponder>
13
- <version>0.1.8</version>
14
  </Ebizmarts_Autoresponder>
15
  </modules>
16
  <global>
@@ -95,24 +95,6 @@
95
  </ebizmarts_autoresponder_birthday_template>
96
  </email>
97
  </template>
98
- <template>
99
- <email>
100
- <ebizmarts_autoresponder_registration_template translate="label" module="ebizmarts_autoresponder">
101
- <label>Registration Email</label>
102
- <file>ebizmarts/autoresponder/registration.html</file>
103
- <type>html</type>
104
- </ebizmarts_autoresponder_registration_template>
105
- </email>
106
- </template>
107
- <template>
108
- <email>
109
- <ebizmarts_autoresponder_newsletter_template translate="label" module="ebizmarts_autoresponder">
110
- <label>Newsletter Registration Email</label>
111
- <file>ebizmarts/autoresponder/newsletter.html</file>
112
- <type>html</type>
113
- </ebizmarts_autoresponder_newsletter_template>
114
- </email>
115
- </template>
116
  <template>
117
  <email>
118
  <ebizmarts_autoresponder_noactivity_template translate="label" module="ebizmarts_autoresponder">
10
  <config>
11
  <modules>
12
  <Ebizmarts_Autoresponder>
13
+ <version>0.1.9</version>
14
  </Ebizmarts_Autoresponder>
15
  </modules>
16
  <global>
95
  </ebizmarts_autoresponder_birthday_template>
96
  </email>
97
  </template>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  <template>
99
  <email>
100
  <ebizmarts_autoresponder_noactivity_template translate="label" module="ebizmarts_autoresponder">
app/code/community/Ebizmarts/MageMonkey/Block/Checkout/Subscribe.php CHANGED
@@ -17,6 +17,7 @@ class Ebizmarts_MageMonkey_Block_Checkout_Subscribe extends Ebizmarts_MageMonkey
17
 
18
  $key = array(
19
  'EbizMageMonkeyCheckoutSubscribe',
 
20
  (int)Mage::app()->getStore()->isCurrentlySecure(),
21
  Mage::getSingleton('customer/session')->isLoggedIn(),
22
  $this->getQuote()->getCustomer()->getId()
17
 
18
  $key = array(
19
  'EbizMageMonkeyCheckoutSubscribe',
20
+ (int)Mage::app()->getStore()->getStoreId(),
21
  (int)Mage::app()->getStore()->isCurrentlySecure(),
22
  Mage::getSingleton('customer/session')->isLoggedIn(),
23
  $this->getQuote()->getCustomer()->getId()
app/code/community/Ebizmarts/MageMonkey/Helper/Data.php CHANGED
@@ -50,7 +50,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
50
  * @param string $listId Optional listid to retrieve store code from it
51
  * @return string
52
  */
53
- public function getWebhooksKey($store, $listId = null)
54
  {
55
  if( !is_null($listId) ){
56
  $store = $this->getStoreByList($listId, TRUE);
@@ -60,7 +60,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
60
  $key = substr($crypt, 0, (strlen($crypt)/2));
61
 
62
  // Prevent most cases to attach default in webhook url
63
- if($store == 'default') $store = '';
64
 
65
  return ($key . $store);
66
  }
@@ -597,7 +597,6 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
597
  */
598
  public function mergeVars($object = NULL, $includeEmail = FALSE, $currentList = NULL)
599
  {
600
-
601
  //Initialize as GUEST customer
602
  $customer = new Varien_Object;
603
 
@@ -641,8 +640,9 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
641
  //if post exists && is not admin backend subscription && not footer subscription
642
  $adminSubscription = $request->getActionName() == 'save' && $request->getControllerName() == 'customer' && $request->getModuleName() == (string)Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName');
643
  $footerSubscription = $request->getActionName() == 'new' && $request->getControllerName() == 'subscriber' && $request->getModuleName() == 'newsletter';
644
- $customerSubscription = $request->getActionName() == 'createpost' && $request->getControllerName() == 'account' && $request->getModuleName() == 'customer';
645
- if($post && !$adminSubscription && !$footerSubscription && !$customerSubscription || Mage::getSingleton('core/session')->getIsOneStepCheckout()){
 
646
  $defaultList = Mage::helper('monkey')->config('list');
647
  //if can change customer set the groups set by customer else set the groups on MailChimp config
648
  $canChangeGroups = Mage::getStoreConfig('monkey/general/changecustomergroup', $object->getStoreId());
@@ -699,12 +699,12 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
699
  }
700
  }elseif(Mage::getSingleton('core/session')->getIsOneStepCheckout()){
701
  $post2 = $request->getPost();
702
- if(isset($post['subscribe_newsletter']) || isset($post2['subscribe_newsletter']) || Mage::getSingleton('core/session')->getIsHandleSubscriber()) {
703
  $mergeVars[$map] = "Yes";
704
  }elseif(Mage::helper('monkey')->config('checkout_subscribe') > 2){
705
  $mergeVars[$map] = "No";
706
  }
707
- }elseif($request->getActionName() == 'saveOrder' && $request->getControllerModule() == 'onepage' && $request->getModuleName() == 'checkout') {
708
  $mergeVars[$map] = "No";
709
  }
710
  }else{
@@ -869,129 +869,149 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
869
  return $errors;
870
  }
871
 
872
- // /**
873
- // * Handle additional lists subscription on form posts like Customer Create Account
874
- // *
875
- // * @param Mage_Customer_Model_Customer $customer
876
- // */
877
- // public function additionalListsSubscription($customer, $post = null)
878
- // {
879
- // $request = Mage::app()->getRequest();
880
- //
881
- // if( !$request->isPost() && is_null($post) ){
882
- // return false;
883
- // }
884
- //
885
- // $allowedPost = array('/customer/account/createpost/');
886
- // $requestString = $request->getRequestString();
887
- //
888
- // if( in_array($requestString, $allowedPost) OR !is_null($post) ){
889
- // if(!is_null($post)){
890
- // $request->setPost($post);
891
- // }
892
- // $this->handlePost($request, $customer->getEmail());
893
- // }
894
- //
895
- // }
896
-
897
  /**
898
- * Add lists from post to database magemonkey_async_subscribers
899
  *
900
- * @param $object (can be subscriber or customer)
901
- * @param null $post
902
  */
903
- public function listsSubscription($subscriber, $post = null, $db = 0)
904
- {
 
 
 
 
905
  $defaultList = Mage::helper('monkey')->config('list');
906
- //post subscription
907
  if (isset($post['magemonkey_force'])) {
908
  foreach ($post['list'] as $list) {
909
  $listId = $list['subscribed'];
910
- if($listId == $defaultList){
911
- $subscriber->subscribe($subscriber->getSubscriberEmail());
912
- }else {
913
- $this->_subscribeToList($subscriber, $listId, $db);
914
- }
915
  }
916
  } elseif (isset($post['magemonkey_subscribe'])) {
917
  $lists = explode(',', $post['magemonkey_subscribe']);
918
  foreach ($lists as $listId) {
919
- if($listId == $defaultList){
920
- $subscriber->subscribe($subscriber->getSubscriberEmail());
921
- }else {
922
- $this->_subscribeToList($subscriber, $listId, $db);
923
- }
924
  }
925
- //Subscription for One Step Checkout with force subscription
926
  }elseif(Mage::getSingleton('core/session')->getIsOneStepCheckout() && Mage::helper('monkey')->config('checkout_subscribe') > 2 && !Mage::getSingleton('core/session')->getIsUpdateCustomer()){
927
- $subscriber->subscribe($subscriber->getSubscriberEmail());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
928
  }
929
- }
930
 
931
- public function subscribeToMainList($subscriber, $db = 0)
932
- {
933
- $defaultList = Mage::helper('monkey')->config('list');
934
- $this->_subscribeToList($subscriber, $defaultList, $db);
935
  }
936
 
937
  /**
938
- * Subscribe the list to database magemonkey_async_subscribers if $db==1 else subscribe to MailChimp directly
939
  *
940
  * @param $object
941
- * @param $listId
942
- * @param int $db
943
  */
944
- protected function _subscribeToList($subscriber, $listId, $db = 0){
945
-
946
- $email = $subscriber->getSubscriberEmail();
947
-
948
- $alreadyOnList = Mage::getSingleton('monkey/asyncsubscribers')->getCollection()
949
- ->addFieldToFilter('lists', $listId)
950
- ->addFieldToFilter('email', $email)
951
- ->addFieldToFilter('processed', 0);
952
- //if not in magemonkey_async_subscribers with processed 0 add list
953
- if(count($alreadyOnList) == 0){
954
- $isConfirmNeed = FALSE;
955
- if( !Mage::helper('monkey')->isAdmin() &&
956
- (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $subscriber->getStoreId()) == 1) ){
957
- $isConfirmNeed = TRUE;
958
- }
959
 
960
- $isOnMailChimp = Mage::helper('monkey')->subscribedToList($email, $listId);
961
- //if( TRUE === $subscriber->getIsStatusChanged() ){
962
- if($isOnMailChimp == 1){
963
- return false;
 
 
 
 
964
  }
 
 
965
 
966
- if($isConfirmNeed) {
967
- $subscriber->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNCONFIRMED);
968
- if($db){
969
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('monkey')->__('Confirmation request will be sent soon.'));
970
- }else{
971
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('monkey')->__('Confirmation request has been sent.'));
 
 
 
 
 
 
 
 
 
972
  }
973
- }
974
 
975
- $mergeVars = Mage::helper('monkey')->mergeVars($subscriber, FALSE, $listId);
976
- if($db)
977
- {
978
- $subs = Mage::getModel('monkey/asyncsubscribers');
979
- $subs->setMapfields(serialize($mergeVars))
980
- ->setEmail($email)
981
- ->setLists($listId)
982
- ->setConfirm($isConfirmNeed)
983
- ->setProcessed(0)
984
- ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
985
- ->save();
986
- }else{
987
- Mage::getSingleton('monkey/api')->listSubscribe($listId, $email, $mergeVars, 'html', $isConfirmNeed);
988
  }
 
989
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
990
  }
991
  }
992
 
993
- /**
994
- * Handle subscription posts, (additional lists)
995
  *
996
  * @param Mage_Core_Controller_Request_Http $request
997
  * @param string $guestEmail
@@ -1043,8 +1063,12 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
1043
  $toDelete = Mage::getModel('monkey/asyncsubscribers')->load($listToDelete->getId());
1044
  $toDelete->delete();
1045
  }
 
 
1046
  }else {
1047
  $api->listUnsubscribe($listId, $email);
 
 
1048
  }
1049
 
1050
  }else{
@@ -1068,6 +1092,8 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
1068
 
1069
  //Handle groups update
1070
  $api->listUpdateMember($listId, $email, $mergeVars);
 
 
1071
 
1072
  }
1073
 
@@ -1099,7 +1125,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
1099
  $subscriber = Mage::getModel('newsletter/subscriber')
1100
  ->setImportMode(TRUE)
1101
  ->setSubscriberEmail($email);
1102
- $this->_subscribeToList($subscriber, $listId, 0);
1103
 
1104
  }
1105
  }
50
  * @param string $listId Optional listid to retrieve store code from it
51
  * @return string
52
  */
53
+ public function getWebhooksKey($store = null, $listId = null)
54
  {
55
  if( !is_null($listId) ){
56
  $store = $this->getStoreByList($listId, TRUE);
60
  $key = substr($crypt, 0, (strlen($crypt)/2));
61
 
62
  // Prevent most cases to attach default in webhook url
63
+ if(!$store || $store == 'default') $store = '';
64
 
65
  return ($key . $store);
66
  }
597
  */
598
  public function mergeVars($object = NULL, $includeEmail = FALSE, $currentList = NULL)
599
  {
 
600
  //Initialize as GUEST customer
601
  $customer = new Varien_Object;
602
 
640
  //if post exists && is not admin backend subscription && not footer subscription
641
  $adminSubscription = $request->getActionName() == 'save' && $request->getControllerName() == 'customer' && $request->getModuleName() == (string)Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName');
642
  $footerSubscription = $request->getActionName() == 'new' && $request->getControllerName() == 'subscriber' && $request->getModuleName() == 'newsletter';
643
+ $customerSubscription = $request->getActionName() == 'saveadditional';
644
+ $customerCreateAccountSubscription = $request->getActionName() == 'createpost';
645
+ if($post && !$adminSubscription && !$footerSubscription && !$customerSubscription && !$customerCreateAccountSubscription || Mage::getSingleton('core/session')->getIsOneStepCheckout()){
646
  $defaultList = Mage::helper('monkey')->config('list');
647
  //if can change customer set the groups set by customer else set the groups on MailChimp config
648
  $canChangeGroups = Mage::getStoreConfig('monkey/general/changecustomergroup', $object->getStoreId());
699
  }
700
  }elseif(Mage::getSingleton('core/session')->getIsOneStepCheckout()){
701
  $post2 = $request->getPost();
702
+ if(isset($post['subscribe_newsletter']) || isset($post2['subscribe_newsletter'])) {
703
  $mergeVars[$map] = "Yes";
704
  }elseif(Mage::helper('monkey')->config('checkout_subscribe') > 2){
705
  $mergeVars[$map] = "No";
706
  }
707
+ }elseif($request->getModuleName() == 'checkout') {
708
  $mergeVars[$map] = "No";
709
  }
710
  }else{
869
  return $errors;
870
  }
871
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
872
  /**
873
+ * handles subscription to any list on post
874
  *
875
+ * @param $object
876
+ * @param $db
877
  */
878
+ public function listsSubscription($object, $db){
879
+ $monkeyPost = Mage::getSingleton('core/session')->getMonkeyPost();
880
+ $post = unserialize($monkeyPost);
881
+ if(!$post){
882
+ $post = Mage::app()->getRequest()->getPost();
883
+ }
884
  $defaultList = Mage::helper('monkey')->config('list');
 
885
  if (isset($post['magemonkey_force'])) {
886
  foreach ($post['list'] as $list) {
887
  $listId = $list['subscribed'];
888
+ $this->subscribeToList($object, $db, $listId);
 
 
 
 
889
  }
890
  } elseif (isset($post['magemonkey_subscribe'])) {
891
  $lists = explode(',', $post['magemonkey_subscribe']);
892
  foreach ($lists as $listId) {
893
+ $this->subscribeToList($object, $db, $listId);
 
 
 
 
894
  }
895
+ //Subscription for One Step Checkout with force subscription
896
  }elseif(Mage::getSingleton('core/session')->getIsOneStepCheckout() && Mage::helper('monkey')->config('checkout_subscribe') > 2 && !Mage::getSingleton('core/session')->getIsUpdateCustomer()){
897
+ // //Initialize as GUEST customer
898
+ // $customer = new Varien_Object;
899
+ //
900
+ // $regCustomer = Mage::registry('current_customer');
901
+ // $guestCustomer = Mage::registry('mc_guest_customer');
902
+ //
903
+ // if (Mage::helper('customer')->isLoggedIn()) {
904
+ // $customer = Mage::helper('customer')->getCustomer();
905
+ // } elseif ($regCustomer) {
906
+ // $customer = $regCustomer;
907
+ // } elseif ($guestCustomer) {
908
+ // $customer = $guestCustomer;
909
+ // } else {
910
+ // if (is_null($object)) {
911
+ // $customer->setEmail($object->getSubscriberEmail())
912
+ // ->setStoreId($object->getStoreId());
913
+ // } else {
914
+ // $customer = $object;
915
+ // }
916
+ //
917
+ // }
918
+ $this->subscribeToList($object, $db, $defaultList);
919
  }
 
920
 
 
 
 
 
921
  }
922
 
923
  /**
924
+ * Subscribe to list by listId
925
  *
926
  * @param $object
927
+ * @param $db
928
+ * @param null $listId
929
  */
930
+ public function subscribeToList($object, $db, $listId = NULL){
931
+ if(!$listId){
932
+ $listId = Mage::helper('monkey')->config('list');
933
+ }
934
+ $email = $object->getEmail();
 
 
 
 
 
 
 
 
 
 
935
 
936
+ if($object instanceof Mage_Customer_Model_Customer){
937
+ $subscriber = Mage::getModel('newsletter/subscriber')
938
+ ->setImportMode(TRUE)
939
+ ->setSubscriberEmail($email);
940
+ }else{
941
+ $customer = Mage::getSingleton('customer/customer')->load($email);
942
+ if($customer->getId()){
943
+ $object = $customer;
944
  }
945
+ $subscriber = $object;
946
+ }
947
 
948
+ $defaultList = Mage::helper('monkey')->config('list');
949
+ if($listId == $defaultList && !Mage::getSingleton('core/session')->getIsHandleSubscriber()){
950
+ $subscriber->subscribe($email);
951
+ }else{
952
+
953
+ $alreadyOnList = Mage::getSingleton('monkey/asyncsubscribers')->getCollection()
954
+ ->addFieldToFilter('lists', $listId)
955
+ ->addFieldToFilter('email', $email)
956
+ ->addFieldToFilter('processed', 0);
957
+ //if not in magemonkey_async_subscribers with processed 0 add list
958
+ if(count($alreadyOnList) == 0){
959
+ $isConfirmNeed = FALSE;
960
+ if( !Mage::helper('monkey')->isAdmin() &&
961
+ (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $object->getStoreId()) == 1) ){
962
+ $isConfirmNeed = TRUE;
963
  }
 
964
 
965
+ $isOnMailChimp = Mage::helper('monkey')->subscribedToList($email, $listId);
966
+ //if( TRUE === $subscriber->getIsStatusChanged() ){
967
+ if($isOnMailChimp == 1){
968
+ return false;
969
+ }
970
+
971
+ if($isConfirmNeed) {
972
+ $subscriber->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNCONFIRMED);
973
+ }
974
+
975
+ $mergeVars = Mage::helper('monkey')->mergeVars($object, FALSE, $listId);
976
+ $this->_subscribe($listId, $email, $mergeVars, $isConfirmNeed, $db);
 
977
  }
978
+ }
979
 
980
+ }
981
+
982
+ /**
983
+ * Subscribe to list only on MailChimp side
984
+ *
985
+ * @param $listId
986
+ * @param $email
987
+ * @param $mergeVars
988
+ * @param $isConfirmNeed
989
+ * @param $db
990
+ */
991
+ public function _subscribe($listId, $email, $mergeVars, $isConfirmNeed, $db){
992
+ if($db)
993
+ {
994
+ if($isConfirmNeed){
995
+ Mage::getSingleton('core/session')->addSuccess(Mage::helper('monkey')->__('Confirmation request will be sent soon.'));
996
+ }
997
+ $subs = Mage::getModel('monkey/asyncsubscribers');
998
+ $subs->setMapfields(serialize($mergeVars))
999
+ ->setEmail($email)
1000
+ ->setLists($listId)
1001
+ ->setConfirm($isConfirmNeed)
1002
+ ->setProcessed(0)
1003
+ ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
1004
+ ->save();
1005
+ }else{
1006
+ if($isConfirmNeed){
1007
+ Mage::getSingleton('core/session')->addSuccess(Mage::helper('monkey')->__('Confirmation request has been sent.'));
1008
+ }
1009
+ Mage::getSingleton('monkey/api')->listSubscribe($listId, $email, $mergeVars, 'html', $isConfirmNeed, TRUE);
1010
  }
1011
  }
1012
 
1013
+ /**
1014
+ * Handle subscription on customer account
1015
  *
1016
  * @param Mage_Core_Controller_Request_Http $request
1017
  * @param string $guestEmail
1063
  $toDelete = Mage::getModel('monkey/asyncsubscribers')->load($listToDelete->getId());
1064
  $toDelete->delete();
1065
  }
1066
+ Mage::getSingleton('core/session')
1067
+ ->addSuccess($this->__('You have been removed from Newsletter.'));
1068
  }else {
1069
  $api->listUnsubscribe($listId, $email);
1070
+ Mage::getSingleton('core/session')
1071
+ ->addSuccess($this->__('You have been removed from Newsletter.'));
1072
  }
1073
 
1074
  }else{
1092
 
1093
  //Handle groups update
1094
  $api->listUpdateMember($listId, $email, $mergeVars);
1095
+ Mage::getSingleton('core/session')
1096
+ ->addSuccess($this->__('Your profile has been updated!'));
1097
 
1098
  }
1099
 
1125
  $subscriber = Mage::getModel('newsletter/subscriber')
1126
  ->setImportMode(TRUE)
1127
  ->setSubscriberEmail($email);
1128
+ $this->subscribeToList($subscriber, 0, $listId);
1129
 
1130
  }
1131
  }
app/code/community/Ebizmarts/MageMonkey/Model/Cron.php CHANGED
@@ -445,6 +445,12 @@ class Ebizmarts_MageMonkey_Model_Cron
445
  foreach($collection as $item)
446
  {
447
  $info = (array)unserialize($item->getInfo());
 
 
 
 
 
 
448
  $orderId = $info['order_id'];
449
  unset($info['order_id']);
450
  if($storeId!=$info['store_id']) {
@@ -482,15 +488,35 @@ class Ebizmarts_MageMonkey_Model_Cron
482
  public function sendSubscribersAsync()
483
  {
484
  $collection = Mage::getModel('monkey/asyncsubscribers')->getCollection();
485
- $collection->addFieldToFilter('processed',array('eq'=>0));
 
 
 
 
486
  foreach($collection as $item)
487
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
488
  $mergeVars = unserialize($item->getMapfields());
489
- $listId = $item->getLists();
490
- $email = $item->getEmail();
491
- $isConfirmNeed = $item->getConfirm();
492
- Mage::getSingleton('monkey/api')->listSubscribe($listId, $email, $mergeVars, 'html', $isConfirmNeed);
493
  $item->setProcessed(1)->save();
 
 
 
494
  }
495
 
496
  }
445
  foreach($collection as $item)
446
  {
447
  $info = (array)unserialize($item->getInfo());
448
+ $collection2 = Mage::getmodel('monkey/asyncsubscribers')->getCollection()
449
+ ->addFieldToFilter('processed',array('eq'=>1))
450
+ ->addFieldToFilter('email', array('eq'=>$info['email']));
451
+ if(count($collection2) == 0){
452
+ continue;
453
+ }
454
  $orderId = $info['order_id'];
455
  unset($info['order_id']);
456
  if($storeId!=$info['store_id']) {
488
  public function sendSubscribersAsync()
489
  {
490
  $collection = Mage::getModel('monkey/asyncsubscribers')->getCollection();
491
+ $collection->addFieldToFilter('processed',array('eq'=>0))
492
+ ->setOrder('lists', 'desc');
493
+ $batch = array();
494
+ $oldList = '';
495
+ $isConfirmNeed = FALSE;
496
  foreach($collection as $item)
497
  {
498
+ $newList = $item->getLists();
499
+ $eachIsConfirmNeed = $item->getConfirm();
500
+
501
+ if($oldList == ''){
502
+ $oldList = $newList;
503
+ }
504
+ if($newList != $oldList || $eachIsConfirmNeed != $isConfirmNeed){
505
+ Mage::getSingleton('monkey/api')->listBatchSubscribe($oldList, $batch, $isConfirmNeed, TRUE, FALSE);
506
+ $isConfirmNeed = $eachIsConfirmNeed;
507
+ $oldList = $newList;
508
+ $batch = array();
509
+ }
510
+
511
  $mergeVars = unserialize($item->getMapfields());
512
+ $mergeVars['EMAIL'] = $item->getEmail();
513
+ $batch[] = $mergeVars;
514
+ //$email = $item->getEmail();
515
+ //Mage::getSingleton('monkey/api')->listSubscribe($listId, $email, $mergeVars, 'html', $isConfirmNeed);
516
  $item->setProcessed(1)->save();
517
+ if($item->getId() == $collection->getLastItem()->getId()){
518
+ Mage::getSingleton('monkey/api')->listBatchSubscribe($oldList, $batch, $isConfirmNeed, TRUE, FALSE);
519
+ }
520
  }
521
 
522
  }
app/code/community/Ebizmarts/MageMonkey/Model/Ecommerce360.php CHANGED
@@ -143,33 +143,56 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
143
  $this->_info ['email_id']= $emailCookie;
144
  $this->_info ['campaign_id']= $campaignCookie;
145
  if(Mage::getStoreConfig('monkey/general/checkout_async')) {
146
- $sync = Mage::getModel('monkey/asyncorders');
147
- $this->_info['order_id'] = $this->_order->getId();
148
- $sync->setInfo(serialize($this->_info))
149
- ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
150
- ->setProcessed(0)
151
- ->save();
152
- $rs = true;
 
 
 
 
 
 
 
 
 
 
 
 
153
  }
154
  else {
155
  //Send order to MailChimp
156
  $rs = $api->campaignEcommOrderAdd($this->_info);
157
  }
158
  }else{
159
- $this->_info ['email']= $this->_order->getCustomerEmail();
160
- if(Mage::getStoreConfig('monkey/general/checkout_async')) {
161
- $sync = Mage::getModel('monkey/asyncorders');
162
- $this->_info['order_id'] = $this->_order->getId();
163
- $sync->setInfo(serialize($this->_info))
164
- ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
165
- ->setProcessed(0)
166
- ->save();
167
- $rs = true;
168
- }
169
- else {
170
- $rs = $api->ecommOrderAdd($this->_info);
 
 
 
 
 
 
 
 
 
 
 
171
  }
172
- }
173
 
174
  if ( $rs === TRUE ){
175
  $this->_logCall();
@@ -292,6 +315,15 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
292
  foreach ($orders as $order) {
293
 
294
  $this->_order = $order;
 
 
 
 
 
 
 
 
 
295
  $api = Mage::getSingleton('monkey/api', array('store' => $this->_order->getStoreId()));
296
  if (!$api) {
297
  return false;
@@ -318,19 +350,49 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
318
  $email = $this->_order->getCustomerEmail();
319
  $campaign = $this->_order->getEbizmartsMagemonkeyCampaignId();
320
  $this->setItemstoSend();
321
-
322
  if ($email && $campaign) {
323
  $this->_info ['email_id'] = $email;
324
  $this->_info ['campaign_id'] = $campaign;
325
 
326
- //Send order to MailChimp
327
- $rs = $api->campaignEcommOrderAdd($this->_info);
 
 
 
 
 
 
 
 
 
 
328
  } else {
329
  $this->_info ['email'] = $email;
330
- $rs = $api->ecommOrderAdd($this->_info);
 
 
 
 
 
 
 
 
 
 
331
  }
332
  if (isset($rs['complete']) && $rs['complete'] == TRUE) {
333
- $this->_logCall();
 
 
 
 
 
 
 
 
 
 
334
  }
335
  }
336
  }
143
  $this->_info ['email_id']= $emailCookie;
144
  $this->_info ['campaign_id']= $campaignCookie;
145
  if(Mage::getStoreConfig('monkey/general/checkout_async')) {
146
+ $collection = Mage::getModel('monkey/asyncorders')->getCollection();
147
+ $alreadyOnDb = false;
148
+ foreach ($collection as $order){
149
+ $info = unserialize($order->getInfo());
150
+ if($info['order_id'] == $this->_order->getId()){
151
+ $alreadyOnDb = true;
152
+ }
153
+ }
154
+ if(!$alreadyOnDb) {
155
+ $sync = Mage::getModel('monkey/asyncorders');
156
+ $this->_info['order_id'] = $this->_order->getId();
157
+ $sync->setInfo(serialize($this->_info))
158
+ ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
159
+ ->setProcessed(0)
160
+ ->save();
161
+ $rs = true;
162
+ }else{
163
+ $rs = 'Order already sent or ready to get sent soon';
164
+ }
165
  }
166
  else {
167
  //Send order to MailChimp
168
  $rs = $api->campaignEcommOrderAdd($this->_info);
169
  }
170
  }else{
171
+ $this->_info ['email'] = $this->_order->getCustomerEmail();
172
+ if (Mage::getStoreConfig('monkey/general/checkout_async')) {
173
+ $collection = Mage::getModel('monkey/asyncorders')->getCollection();
174
+ $alreadyOnDb = false;
175
+ foreach ($collection as $order){
176
+ $info = unserialize($order->getInfo());
177
+ if($info['order_id'] == $this->_order->getId()){
178
+ $alreadyOnDb = true;
179
+ }
180
+ }
181
+ if(!$alreadyOnDb) {
182
+ $sync = Mage::getModel('monkey/asyncorders');
183
+ $this->_info['order_id'] = $this->_order->getId();
184
+ $sync->setInfo(serialize($this->_info))
185
+ ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
186
+ ->setProcessed(0)
187
+ ->save();
188
+ $rs = true;
189
+ }else{
190
+ $rs = 'Order already sent or ready to get sent soon';
191
+ }
192
+ } else {
193
+ $rs = $api->ecommOrderAdd($this->_info);
194
  }
195
+ }
196
 
197
  if ( $rs === TRUE ){
198
  $this->_logCall();
315
  foreach ($orders as $order) {
316
 
317
  $this->_order = $order;
318
+ $ordersToSend = Mage::getModel('monkey/asyncorders')->getCollection()
319
+ ->addFieldToFilter('processed', array('eq' => 0));
320
+ foreach($ordersToSend as $orderToSend){
321
+ $info = (array)unserialize($orderToSend->getInfo());
322
+ if($this->_order->getIncrementId() == $info['id']){
323
+ continue;
324
+ }
325
+ }
326
+
327
  $api = Mage::getSingleton('monkey/api', array('store' => $this->_order->getStoreId()));
328
  if (!$api) {
329
  return false;
350
  $email = $this->_order->getCustomerEmail();
351
  $campaign = $this->_order->getEbizmartsMagemonkeyCampaignId();
352
  $this->setItemstoSend();
353
+ $rs = false;
354
  if ($email && $campaign) {
355
  $this->_info ['email_id'] = $email;
356
  $this->_info ['campaign_id'] = $campaign;
357
 
358
+ if(Mage::getStoreConfig('monkey/general/checkout_async', Mage::app()->getStore()->getId())) {
359
+ $sync = Mage::getModel('monkey/asyncorders');
360
+ $this->_info['order_id'] = $this->_order->getId();
361
+ $sync->setInfo(serialize($this->_info))
362
+ ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
363
+ ->setProcessed(0)
364
+ ->save();
365
+ $rs['complete'] = true;
366
+ } else {
367
+ //Send order to MailChimp
368
+ $rs = $api->campaignEcommOrderAdd($this->_info);
369
+ }
370
  } else {
371
  $this->_info ['email'] = $email;
372
+ if(Mage::getStoreConfig('monkey/general/checkout_async', Mage::app()->getStore()->getId())) {
373
+ $sync = Mage::getModel('monkey/asyncorders');
374
+ $this->_info['order_id'] = $this->_order->getId();
375
+ $sync->setInfo(serialize($this->_info))
376
+ ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
377
+ ->setProcessed(0)
378
+ ->save();
379
+ $rs['complete'] = true;
380
+ } else {
381
+ $rs = $api->ecommOrderAdd($this->_info);
382
+ }
383
  }
384
  if (isset($rs['complete']) && $rs['complete'] == TRUE) {
385
+ $order = Mage::getModel('monkey/ecommerce')
386
+ ->setOrderIncrementId($this->_info['id'])
387
+ ->setOrderId($this->_info['order_id'])
388
+ ->setMcEmailId($this->_info ['email'])
389
+ ->setCreatedAt( Mage::getModel('core/date')->gmtDate() )
390
+ ->setStoreId($this->_info['store_id']);
391
+ if(isset($this->_info['campaign_id']) && $this->_info['campaign_id']){
392
+ $order->setMcCampaignId($this->_info['campaign_id']);
393
+ }
394
+ $order->save();
395
+ //$this->_logCall();
396
  }
397
  }
398
  }
app/code/community/Ebizmarts/MageMonkey/Model/Observer.php CHANGED
@@ -27,23 +27,29 @@ class Ebizmarts_MageMonkey_Model_Observer
27
  return $observer;
28
  }
29
 
30
- $subscriber = $observer->getEvent()->getSubscriber();
 
 
 
 
31
 
32
  if( $subscriber->getBulksync() ){
33
  return $observer;
34
  }
35
 
 
 
 
 
36
  if( TRUE === $subscriber->getIsStatusChanged() ) {
37
  Mage::getSingleton('core/session')->setIsHandleSubscriber(TRUE);
38
  if (Mage::getSingleton('core/session')->getIsOneStepCheckout() || Mage::getSingleton('core/session')->getMonkeyCheckout() || Mage::getSingleton('core/session')->getIsUpdateCustomer()) {
39
  $saveOnDb = Mage::helper('monkey')->config('checkout_async');
40
- Mage::helper('monkey')->subscribeToMainList($subscriber, $saveOnDb);
41
  } else {
42
- Mage::helper('monkey')->subscribeToMainList($subscriber, 0);
43
  }
44
 
45
- Mage::getSingleton('core/session')->getMonkeyPost(TRUE);
46
-
47
  Mage::getSingleton('core/session')->setIsHandleSubscriber(FALSE);
48
  }
49
  return $observer;
@@ -77,7 +83,7 @@ class Ebizmarts_MageMonkey_Model_Observer
77
  $listId = Mage::helper('monkey')->getDefaultList($subscriber->getStoreId());
78
 
79
  Mage::getSingleton('monkey/api', array('store' => $subscriber->getStoreId()))
80
- ->listUnsubscribe($listId, $subscriber->getSubscriberEmail(), TRUE);
81
 
82
  }
83
 
@@ -174,7 +180,7 @@ class Ebizmarts_MageMonkey_Model_Observer
174
  $selectedLists = array_merge($selectedLists, $additionalLists);
175
  }
176
 
177
- $webhooksKey = Mage::helper('monkey')->getWebhooksKey($scope);
178
 
179
  //Generating Webhooks URL
180
  $hookUrl = '';
@@ -279,51 +285,58 @@ class Ebizmarts_MageMonkey_Model_Observer
279
 
280
  $customer = $observer->getEvent()->getCustomer();
281
 
 
 
 
 
 
 
282
  $oldEmail = $customer->getOrigData('email');
 
 
 
 
 
 
 
283
  if(!$oldEmail){
284
- return $observer;
285
- }
286
-
287
- $subscriber = Mage::getModel('newsletter/subscriber')
288
- ->setImportMode(TRUE)
289
- ->setSubscriberEmail($oldEmail);
290
-
291
- $request = Mage::app()->getRequest();
292
- $post = Mage::app()->getRequest()->getPost();
293
- $saveOnDb = Mage::getStoreConfig('monkey/general/checkout_async', $customer->getStoreId());
294
-
295
- Mage::getSingleton('core/session')->setIsUpdateCustomer(TRUE);
296
- //subscribe to MailChimp newsletter
297
- Mage::helper('monkey')->listsSubscription($subscriber, $post, $saveOnDb);
298
- $api = Mage::getSingleton('monkey/api', array('store' => $customer->getStoreId()));
299
- $lists = $api->listsForEmail($oldEmail);
300
- if(is_array($lists)){
301
- foreach($lists as $listId){
302
- $mergeVars = Mage::helper('monkey')->mergeVars($customer, TRUE, $listId);
303
- $api->listUpdateMember($listId, $oldEmail, $mergeVars);
304
- }
305
- }
 
306
 
307
- //subscribe to MailChimp when customer subscribed from admin
308
- //unsubscribe from Magento when customer unsubscribed from admin
309
- if ($request->getActionName() == 'save' && $request->getControllerName() == 'customer' && $request->getModuleName() == (string)Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName')) {
310
- if(isset($post['subscription'])) {
311
- $defaultList = Mage::helper('monkey')->config('list');
312
- $mergeVars = Mage::helper('monkey')->mergeVars($customer, TRUE, $defaultList);
313
- $isConfirmNeed = FALSE;
314
- if( !Mage::helper('monkey')->isAdmin() &&
315
- (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $subscriber->getStoreId()) == 1) ){
316
- $isConfirmNeed = TRUE;
317
- }
318
- $api->listSubscribe($defaultList, $subscriber->getSubscriberEmail(), $mergeVars, $isConfirmNeed);
319
- }else{
320
- $subscriber = Mage::getModel('newsletter/subscriber')
321
- ->loadByEmail($customer->getEmail());
322
- $subscriber->setImportMode(TRUE)->unsubscribe();
323
- }
324
  }
325
- Mage::getSingleton('core/session')->setIsUpdateCustomer(FALSE);
326
-
327
  return $observer;
328
  }
329
 
@@ -365,9 +378,11 @@ class Ebizmarts_MageMonkey_Model_Observer
365
  */
366
  public function registerCheckoutSuccess(Varien_Event_Observer $observer)
367
  {
 
368
  if(!Mage::helper('monkey')->canMonkey()){
369
  Mage::getSingleton('core/session')->setMonkeyCheckout(FALSE);
370
  Mage::getSingleton('core/session')->setMonkeyPost(NULL);
 
371
  return $observer;
372
  }
373
 
@@ -391,28 +406,23 @@ class Ebizmarts_MageMonkey_Model_Observer
391
  Mage::helper('monkey')->registerGuestCustomer($order);
392
  }
393
  }
 
 
 
394
 
395
- //Multiple lists on checkout
396
- $monkeyPost = Mage::getSingleton('core/session')->getMonkeyPost();
397
- if($monkeyPost) {
398
- $post = unserialize($monkeyPost);
399
- }else {
400
- $post = null;
401
- }
402
- if($monkeyPost || Mage::getSingleton('core/session')->getIsOneStepCheckout() && Mage::helper('monkey')->config('checkout_subscribe') > 2){
403
-
404
- $subscriber = Mage::getModel('newsletter/subscriber')
405
  ->setImportMode(TRUE)
406
- ->setSubscriberEmail($order->getCustomerEmail());
 
407
 
408
- $saveInDb = Mage::getStoreConfig('monkey/general/checkout_async', $order->getStoreId());
409
- Mage::helper('monkey')->listsSubscription($subscriber, $post, $saveInDb);
410
- }
411
 
412
  }
413
  Mage::getSingleton('core/session')->setMonkeyCheckout(FALSE);
414
  Mage::getSingleton('core/session')->setMonkeyPost(NULL);
415
  Mage::getSingleton('core/session')->setIsOneStepCheckout(FALSE);
 
416
  return $observer;
417
  }
418
 
@@ -421,7 +431,7 @@ class Ebizmarts_MageMonkey_Model_Observer
421
  * @param Varien_Event_Observer $observer
422
  * @return void
423
  */
424
- public function massActionOption($observer)
425
  {
426
  if(!Mage::helper('monkey')->canMonkey()){
427
  return $observer;
27
  return $observer;
28
  }
29
 
30
+ $subscriber = $observer->getEvent()->getSubscriber();
31
+ if( !Mage::helper('monkey')->isAdmin() &&
32
+ (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $subscriber->getStoreId()) == 1) ){
33
+ $subscriber->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNCONFIRMED);
34
+ }
35
 
36
  if( $subscriber->getBulksync() ){
37
  return $observer;
38
  }
39
 
40
+ if(Mage::getSingleton('core/session')->getIsOneStepCheckout() && !Mage::getSingleton('core/session')->getRegisterCheckoutSuccess()){
41
+ return $observer;
42
+ }
43
+
44
  if( TRUE === $subscriber->getIsStatusChanged() ) {
45
  Mage::getSingleton('core/session')->setIsHandleSubscriber(TRUE);
46
  if (Mage::getSingleton('core/session')->getIsOneStepCheckout() || Mage::getSingleton('core/session')->getMonkeyCheckout() || Mage::getSingleton('core/session')->getIsUpdateCustomer()) {
47
  $saveOnDb = Mage::helper('monkey')->config('checkout_async');
48
+ Mage::helper('monkey')->subscribeToList($subscriber, $saveOnDb);
49
  } else {
50
+ Mage::helper('monkey')->subscribeToList($subscriber, 0);
51
  }
52
 
 
 
53
  Mage::getSingleton('core/session')->setIsHandleSubscriber(FALSE);
54
  }
55
  return $observer;
83
  $listId = Mage::helper('monkey')->getDefaultList($subscriber->getStoreId());
84
 
85
  Mage::getSingleton('monkey/api', array('store' => $subscriber->getStoreId()))
86
+ ->listUnsubscribe($listId, $subscriber->getSubscriberEmail());
87
 
88
  }
89
 
180
  $selectedLists = array_merge($selectedLists, $additionalLists);
181
  }
182
 
183
+ $webhooksKey = Mage::helper('monkey')->getWebhooksKey();
184
 
185
  //Generating Webhooks URL
186
  $hookUrl = '';
285
 
286
  $customer = $observer->getEvent()->getCustomer();
287
 
288
+ $isConfirmNeed = FALSE;
289
+ if( !Mage::helper('monkey')->isAdmin() &&
290
+ (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $customer->getStoreId()) == 1) ){
291
+ $isConfirmNeed = TRUE;
292
+ }
293
+
294
  $oldEmail = $customer->getOrigData('email');
295
+ $email = $customer->getEmail();
296
+ if(Mage::getSingleton('core/session')->getMonkeyCheckout()) {
297
+ $saveOnDb = Mage::helper('monkey')->config('checkout_async');
298
+ }else{
299
+ $saveOnDb = 0;
300
+ }
301
+ $defaultList = Mage::helper('monkey')->config('list');
302
  if(!$oldEmail){
303
+ $isSubscribed = Mage::getSingleton('newsletter/subscriber')->loadByEmail($email);
304
+ $monkeyPost = unserialize(Mage::getSingleton('core/session')->getMonkeyPost());
305
+ if($isSubscribed->getEmail() && !Mage::helper('monkey')->subscribedToList($email, $defaultList) || $monkeyPost){
306
+ Mage::helper('monkey')->subscribeToList($customer, $saveOnDb);
307
+ //$api->listSubscribe($defaultList, $customer->getEmail(), $mergeVars, $isConfirmNeed);
308
+ }
309
+ }else {
310
+
311
+ $request = Mage::app()->getRequest();
312
+
313
+
314
+ Mage::getSingleton('core/session')->setIsUpdateCustomer(TRUE);
315
+ //subscribe to MailChimp newsletter
316
+ $api = Mage::getSingleton('monkey/api', array('store' => $customer->getStoreId()));
317
+ $post = Mage::app()->getRequest()->getPost();
318
+ Mage::helper('monkey')->listsSubscription($customer, $post, $saveOnDb);
319
+ $lists = $api->listsForEmail($oldEmail);
320
+ if (is_array($lists)) {
321
+ foreach ($lists as $listId) {
322
+ $mergeVars = Mage::helper('monkey')->mergeVars($customer, TRUE, $listId);
323
+ $api->listUpdateMember($listId, $oldEmail, $mergeVars, '', false);
324
+ }
325
+ }
326
 
327
+ //subscribe to MailChimp when customer subscribed from admin
328
+ //unsubscribe from Magento when customer unsubscribed from admin
329
+ if ($request->getActionName() == 'save' && $request->getControllerName() == 'customer' && $request->getModuleName() == (string)Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName')) {
330
+ if (isset($post['subscription'])) {
331
+ $api->listSubscribe($defaultList, $customer->getEmail(), $mergeVars, $isConfirmNeed);
332
+ } else {
333
+ $subscriber = Mage::getModel('newsletter/subscriber')
334
+ ->loadByEmail($customer->getEmail());
335
+ $subscriber->setImportMode(TRUE)->unsubscribe();
336
+ }
337
+ }
338
+ Mage::getSingleton('core/session')->setIsUpdateCustomer(FALSE);
 
 
 
 
 
339
  }
 
 
340
  return $observer;
341
  }
342
 
378
  */
379
  public function registerCheckoutSuccess(Varien_Event_Observer $observer)
380
  {
381
+ Mage::getSingleton('core/session')->setRegisterCheckoutSuccess(TRUE);
382
  if(!Mage::helper('monkey')->canMonkey()){
383
  Mage::getSingleton('core/session')->setMonkeyCheckout(FALSE);
384
  Mage::getSingleton('core/session')->setMonkeyPost(NULL);
385
+ Mage::getSingleton('core/session')->setIsOneStepCheckout(FALSE);
386
  return $observer;
387
  }
388
 
406
  Mage::helper('monkey')->registerGuestCustomer($order);
407
  }
408
  }
409
+ $customer = Mage::getSingleton('customer/customer')->load($order->getCustomerId());
410
+ $saveOnDb = Mage::helper('monkey')->config('checkout_async');
411
+ $toSubscribe = $customer;
412
 
413
+ if(!$toSubscribe->getEmail()){
414
+ $toSubscribe = Mage::getModel('newsletter/subscriber')
 
 
 
 
 
 
 
 
415
  ->setImportMode(TRUE)
416
+ ->setEmail($order->getCustomerEmail());
417
+ }
418
 
419
+ Mage::helper('monkey')->listsSubscription($toSubscribe, $saveOnDb);
 
 
420
 
421
  }
422
  Mage::getSingleton('core/session')->setMonkeyCheckout(FALSE);
423
  Mage::getSingleton('core/session')->setMonkeyPost(NULL);
424
  Mage::getSingleton('core/session')->setIsOneStepCheckout(FALSE);
425
+ Mage::getSingleton('core/session')->setRegisterCheckoutSuccess(FALSE);
426
  return $observer;
427
  }
428
 
431
  * @param Varien_Event_Observer $observer
432
  * @return void
433
  */
434
+ public function massActionOption(Varien_Event_Observer $observer)
435
  {
436
  if(!Mage::helper('monkey')->canMonkey()){
437
  return $observer;
app/code/community/Ebizmarts/MageMonkey/Model/System/Config/Source/WebhookDelete.php CHANGED
@@ -19,7 +19,7 @@ class Ebizmarts_MageMonkey_Model_System_Config_Source_WebhookDelete
19
  public function toOptionArray()
20
  {
21
  return array(
22
- array('value' => 0, 'label' => Mage::helper('monkey')->__('Unsuscribe customers')),
23
  array('value' => 1, 'label' => Mage::helper('monkey')->__('Delete customer account'))
24
  );
25
  }
19
  public function toOptionArray()
20
  {
21
  return array(
22
+ array('value' => 0, 'label' => Mage::helper('monkey')->__('Unsubscribe customers')),
23
  array('value' => 1, 'label' => Mage::helper('monkey')->__('Delete customer account'))
24
  );
25
  }
app/code/community/Ebizmarts/MageMonkey/controllers/SignupController.php CHANGED
@@ -28,10 +28,7 @@ class Ebizmarts_MageMonkey_SignupController extends Mage_Core_Controller_Front_A
28
  return;
29
  }
30
  Mage::helper('monkey')->handlePost($this->getRequest(), $guestEmail);
31
- if(!$loggedIn){
32
- Mage::getSingleton('core/session')
33
- ->addSuccess($this->__('Thanks for your subscription!'));
34
- }
35
  }
36
 
37
  $this->_redirect($this->_getRedirectPath());
28
  return;
29
  }
30
  Mage::helper('monkey')->handlePost($this->getRequest(), $guestEmail);
31
+
 
 
 
32
  }
33
 
34
  $this->_redirect($this->_getRedirectPath());
app/code/community/Ebizmarts/MageMonkey/controllers/WebhookController.php CHANGED
@@ -17,7 +17,6 @@ class Ebizmarts_MageMonkey_WebhookController extends Mage_Core_Controller_Front_
17
  */
18
  public function indexAction()
19
  {
20
-
21
  $requestKey = $this->getRequest()->getParam('wkey');
22
 
23
  //Checking if "wkey" para is present on request, we cannot check for !isPost()
17
  */
18
  public function indexAction()
19
  {
 
20
  $requestKey = $this->getRequest()->getParam('wkey');
21
 
22
  //Checking if "wkey" para is present on request, we cannot check for !isPost()
app/code/community/Ebizmarts/MageMonkey/etc/config.xml CHANGED
@@ -10,16 +10,11 @@
10
  <config>
11
  <modules>
12
  <Ebizmarts_MageMonkey>
13
- <version>1.1.25</version>
14
  </Ebizmarts_MageMonkey>
15
  </modules>
16
  <global>
17
  <events>
18
- <newsletter_subscription_un_email_template>
19
- <label>Newsletter unsubscription success</label>
20
- <file>newsletter_unsub_success.html</file>
21
- <type>html</type>
22
- </newsletter_subscription_un_email_template>
23
  <newsletter_subscriber_save_before>
24
  <observers>
25
  <monkey_subscribe_observer>
10
  <config>
11
  <modules>
12
  <Ebizmarts_MageMonkey>
13
+ <version>1.1.26</version>
14
  </Ebizmarts_MageMonkey>
15
  </modules>
16
  <global>
17
  <events>
 
 
 
 
 
18
  <newsletter_subscriber_save_before>
19
  <observers>
20
  <monkey_subscribe_observer>
app/code/community/Ebizmarts/MageMonkey/etc/system.xml CHANGED
@@ -96,7 +96,7 @@
96
  <show_in_default>1</show_in_default>
97
  <show_in_website>0</show_in_website>
98
  <show_in_store>1</show_in_store>
99
- <comment><![CDATA[Keep in mind, all your orders in Malchimp will be removed.<br>Select carefully the correct scope]]></comment>
100
  </reset_remoteecommerce360>
101
  <maxlistsamount translate="label comment">
102
  <label>Max amount of lists to show</label>
@@ -119,7 +119,7 @@
119
  <comment>Synchronize Magento's General Subscription List with this MailChimp list</comment>
120
  </list>
121
  <cutomergroup translate="label comment">
122
- <label>Customer Group</label>
123
  <frontend_type>multiselect</frontend_type>
124
  <source_model>monkey/system_config_source_customerGroup</source_model>
125
  <sort_order>33</sort_order>
96
  <show_in_default>1</show_in_default>
97
  <show_in_website>0</show_in_website>
98
  <show_in_store>1</show_in_store>
99
+ <comment><![CDATA[Keep in mind, all your orders in Mailchimp will be removed.<br>Select carefully the correct scope]]></comment>
100
  </reset_remoteecommerce360>
101
  <maxlistsamount translate="label comment">
102
  <label>Max amount of lists to show</label>
119
  <comment>Synchronize Magento's General Subscription List with this MailChimp list</comment>
120
  </list>
121
  <cutomergroup translate="label comment">
122
+ <label>Subscriber Group</label>
123
  <frontend_type>multiselect</frontend_type>
124
  <source_model>monkey/system_config_source_customerGroup</source_model>
125
  <sort_order>33</sort_order>
app/code/community/Ebizmarts/Mandrill/Model/Email/Template.php CHANGED
@@ -81,13 +81,17 @@ class Ebizmarts_Mandrill_Model_Email_Template extends Mage_Core_Model_Email_Temp
81
  else {
82
  $templateId = (string)$this->getId();
83
  $templates = parent::getDefaultTemplates();
84
- if (isset($templates[$templateId])) {
85
  $email ['tags'] = array(substr($templates[$templateId]['label'], 0, 50));
86
  } else {
87
  if($this->getTemplateCode()){
88
  $email ['tags'] = array(substr($this->getTemplateCode(), 0, 50));
89
  } else {
90
- $email ['tags'] = array(substr($templateId, 0, 50));
 
 
 
 
91
  }
92
  }
93
  }
81
  else {
82
  $templateId = (string)$this->getId();
83
  $templates = parent::getDefaultTemplates();
84
+ if (isset($templates[$templateId]) && isset($templates[$templateId]['label'])) {
85
  $email ['tags'] = array(substr($templates[$templateId]['label'], 0, 50));
86
  } else {
87
  if($this->getTemplateCode()){
88
  $email ['tags'] = array(substr($this->getTemplateCode(), 0, 50));
89
  } else {
90
+ if($templateId){
91
+ $email ['tags'] = array(substr($templateId, 0, 50));
92
+ }else{
93
+ $email['tags'] = array('default_tag');
94
+ }
95
  }
96
  }
97
  }
app/code/community/Ebizmarts/Mandrill/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ebizmarts_Mandrill>
5
- <version>2.0.2</version>
6
  </Ebizmarts_Mandrill>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Ebizmarts_Mandrill>
5
+ <version>2.0.3</version>
6
  </Ebizmarts_Mandrill>
7
  </modules>
8
  <global>
app/design/adminhtml/default/default/template/magemonkey/system/config/resetlocal360.phtml CHANGED
@@ -16,7 +16,7 @@
16
  }
17
  function reloadGroups(evt) {
18
  var $list = $('monkey_general_list').getValue();
19
- $url = "<?php echo Mage::helper('adminhtml')->getUrl('monkey/adminhtml_config/getGroups') ?>"+"list/"+$list;
20
  new Ajax.Request($url, {
21
  method: 'get',
22
  onSuccess: function (transport) {
16
  }
17
  function reloadGroups(evt) {
18
  var $list = $('monkey_general_list').getValue();
19
+ var $url = "<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/config/getGroups'); ?>"+"list/"+$list;
20
  new Ajax.Request($url, {
21
  method: 'get',
22
  onSuccess: function (transport) {
app/design/frontend/base/default/layout/ebizmarts/abandonedcart.xml CHANGED
@@ -8,4 +8,16 @@
8
  </block>
9
  <block type="core/text_list" name="additional.product.info" />
10
  </ebizmarts_abandonedcart_email_order_items>
 
 
 
 
 
 
 
 
 
 
 
 
11
  </layout>
8
  </block>
9
  <block type="core/text_list" name="additional.product.info" />
10
  </ebizmarts_abandonedcart_email_order_items>
11
+
12
+ <default>
13
+ <reference name="head">
14
+ <action method="addJs" ifconfig="ebizmarts_abandonedcart/general/popup_general"><script>prototype/window.js</script></action>
15
+ <action method="addJs" ifconfig="ebizmarts_abandonedcart/general/popup_general"><script>scriptaculous/scriptaculous.js</script></action>
16
+ <action method="addItem" ifconfig="ebizmarts_abandonedcart/general/popup_general"><type>js_css</type><script>prototype/windows/themes/default.css</script></action>
17
+ <action method="addItem" ifconfig="ebizmarts_abandonedcart/general/popup_general"><type>js_css</type><script>ebizmarts/abandonedcart/popup.css</script></action>
18
+ </reference>
19
+ <reference name="content">
20
+ <block type="ebizmarts_abandonedcart/popup_emailcatcher" name="emailcatcher" template="ebizmarts_abandonedcart/popup/emailcatcher.phtml"></block>
21
+ </reference>
22
+ </default>
23
  </layout>
app/design/frontend/base/default/template/ebizmarts_abandonedcart/popup/emailcatcher.phtml ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::ACTIVE, $this->_getStoreId()) && Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::ENABLE_POPUP, $this->_getStoreId())): ?>
2
+ <div id="email" style="text-align:center; display:none">
3
+ <p><span id='email_error_msg' class="email_error" style="display:none">&nbsp;</span></p>
4
+ <div style="clear:both; margin-bottom:10px"><h2 style="color:rgb(36,131,199)"><?php echo $this->_popupHeading(); ?></h2><p><?php echo $this->_popupMessage(); ?></p></div>
5
+ <p><span class="email_label" style="margin-right: 5px">Email:</span><span class="email_input"><input type="text"/></span></p>
6
+ <div style="text-align:left; clear:both; margin-top:10px">
7
+ </div>
8
+ </div>
9
+
10
+ <script type="text/javascript">
11
+ <?php if(!Mage::getSingleton('customer/session')->isLoggedIn()): ?>
12
+ if (navigator.cookieEnabled) {
13
+ <?php if(isset($_COOKIE['email'])):
14
+ if($_COOKIE['email'] != 'none'):
15
+ $email = str_replace(' ', '+', $_COOKIE['email']);
16
+ if(isset($_COOKIE['subscribe'])):
17
+ $subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
18
+ if(!$subscriber->getId()):
19
+ Mage::getModel('newsletter/subscriber')->subscribe($email); ?>
20
+ document.cookie = 'subscribe=; expires=Thu, 01 Jan 1970 00:00:01 GMT';
21
+ location.reload();
22
+ <?php endif; ?>
23
+ <?php endif; ?>
24
+ <?php endif; ?>
25
+ <?php elseif($this->_canCancel()): ?>
26
+ document.observe('keydown', function(evt){
27
+ if(evt.keyCode == 27) {
28
+ createCookie('email=none', <?php echo Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_COOKIE_TIME, $this->_getStoreId()); ?>);
29
+ }
30
+ });
31
+ <?php endif; ?>
32
+ document.observe('keydown', function(evt){
33
+ if(evt.keyCode == 13) {
34
+ win.okCallback();
35
+ }
36
+ });
37
+
38
+ var cookieStored = emailCookieExists();
39
+ if (!cookieStored) {
40
+ var win = Dialog.confirm($('email').innerHTML, {
41
+ className: "popup",
42
+ id: "popupDialog",
43
+ width: <?php Print(json_decode(Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_WIDTH, $this->_getStoreId()))); ?>,
44
+ zIndex: 200,
45
+ okLabel: 'Confirm',
46
+ <?php if(!$this->_canCancel()): ?>closeOnEsc: false,
47
+ <?php else: ?>
48
+ cancelLabel: 'Close',
49
+ onCancel: function (win) {
50
+ createCookie('email=none', <?php echo Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_COOKIE_TIME, $this->_getStoreId()); ?>);
51
+ },
52
+ <?php endif; ?>
53
+ onOk: function (win) {
54
+ var inputField = $$('.email_input input[type=text]').first();
55
+ var email = inputField.value;
56
+ if (validateEmail(email)) {
57
+ var cookie = 'email=' + email;
58
+ createCookie(cookie, 365);
59
+ <?php if($this->_modalSubscribe()): ?>
60
+ createCookie('subscribe=true', 365);
61
+ location.reload();
62
+ <?php else: ?>
63
+ win.close();
64
+ <?php endif ?>
65
+ } else {
66
+ $('email_error_msg').innerHTML = 'Not a valid e-mail address';
67
+ $('email_error_msg').setStyle({color: '#F00'});
68
+ $('email_error_msg').show();
69
+ Windows.focusedWindow.updateHeight();
70
+ new Effect.Shake(Windows.focusedWindow.getId());
71
+ }
72
+ }
73
+ });
74
+
75
+ <?php if(!$this->_canCancel()): ?>
76
+ $$('.cancel_button').each(function (element) {
77
+ element.remove();
78
+ });
79
+ <?php else: ?>
80
+ Event.observe(window, 'load', function () {
81
+ $('overlay_modal').observe('click', function(){
82
+ createCookie('email=none', <?php echo Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::POPUP_COOKIE_TIME, $this->_getStoreId()); ?>);
83
+ win.close();
84
+ });
85
+
86
+ });
87
+ <?php endif; ?>
88
+
89
+ }
90
+ }
91
+ <?php endif; ?>
92
+ function validateEmail(email) {
93
+ var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
94
+ return re.test(email);
95
+ }
96
+
97
+ function emailCookieExists(){
98
+ var cookie = document.cookie;
99
+ var cookieArr = cookie.split(';');
100
+ var cookieStored = false;
101
+ for(var i=0;i<cookieArr.length;i++){
102
+ if(cookieArr[i].indexOf('email=') > -1){
103
+ cookieStored = true;
104
+ }
105
+ }
106
+ return cookieStored;
107
+ }
108
+
109
+ function createCookie(cookie, expirationInDays){
110
+ var now = new Date();
111
+ var expire = new Date(now.getTime() + (expirationInDays * 24 * 60) * 60000);//[(1 * 365 * 24 * 60) * 60000] == 1 year -- (Years * Days * Hours * Minutes) * 60000
112
+ document.cookie = cookie + '; expires=' + expire + '; path=/';
113
+ }
114
+ </script>
115
+ <?php endif; ?>
app/design/frontend/base/default/template/magemonkey/lists.phtml CHANGED
@@ -115,6 +115,19 @@ $canmodify = $this->getCanModify();
115
  });
116
  });
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  //Load viewstate on hidden field for later process
119
  $('form-state').writeAttribute('value', $('mailchimp-additional').serialize());
120
 
115
  });
116
  });
117
 
118
+ $$('.mailchimp_extra_field').each(function(field){
119
+ field.observe('change', function(){
120
+ if(!$(field.name) && field.value != "") {
121
+ var inputer = new Element('input', {
122
+ id: field.name,
123
+ value: field.value,
124
+ type: "hidden"
125
+ });
126
+ $('form-state').appendChild(inputer);
127
+ }
128
+ });
129
+ });
130
+
131
  //Load viewstate on hidden field for later process
132
  $('form-state').writeAttribute('value', $('mailchimp-additional').serialize());
133
 
js/ebizmarts/abandonedcart/popup.css ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .overlay_popup{
2
+ background-color: #85BBEF;
3
+ filter:alpha(opacity=60);
4
+ -moz-opacity: 0.6;
5
+ opacity: 0.6;
6
+ }
7
+
8
+ .popup_content {
9
+ overflow:auto;
10
+ color: #000;
11
+ font-family: Tahoma, Arial, sans-serif;
12
+ font: 12px arial;
13
+ background:#FDFDFD;
14
+ border-radius: 10px;
15
+ margin: 10px 5px 5px 5px;
16
+ }
17
+
18
+ .popup_message {
19
+ font: 12px arial;
20
+ text-align:center;
21
+ width:100%;
22
+ padding-bottom:10px;
23
+ }
24
+
25
+ .popup_buttons {
26
+ text-align:center;
27
+ width:100%;
28
+ }
29
+
30
+
js/ebizmarts/autoresponders/visitedproducts.js CHANGED
@@ -14,7 +14,7 @@
14
  }
15
 
16
  var cb = function () {
17
- var $product = $$('input[name^=product]').first(),
18
  productID = '';
19
  if ($product) {
20
  productID = $product.value;
14
  }
15
 
16
  var cb = function () {
17
+ var $product = $$('#product_addtocart_form input[name^=product]').first(),
18
  productID = '';
19
  if ($product) {
20
  productID = $product.value;
js/ebizmarts/autoresponders/visitedproductsstorecodes.js CHANGED
@@ -25,7 +25,7 @@
25
  }
26
 
27
  var cb = function () {
28
- var $product = $$('input[name^=product]').first(),
29
  productID = '';
30
  if ($product) {
31
  productID = $product.value;
25
  }
26
 
27
  var cb = function () {
28
+ var $product = $$('#product_addtocart_form input[name^=product]').first(),
29
  productID = '';
30
  if ($product) {
31
  productID = $product.value;
package.xml CHANGED
@@ -1,26 +1,50 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ebizmarts_MageMonkey</name>
4
- <version>1.1.25</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.1.25&#xD;
12
  --------&#xD;
13
- Fixed compatibility with before versions of PHP 5.4.&#xD;
14
  &#xD;
15
- Send orders to MailChimp only if related customer is already there.&#xD;
16
  &#xD;
17
- Fixed Mandrill headers when not defined.&#xD;
18
  &#xD;
19
- Fixed database error when table prefix enabled.</notes>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  <authors><author><name>Ebizmarts Development Team</name><user>auto-converted</user><email>info@ebizmarts.com</email></author></authors>
21
- <date>2014-10-29</date>
22
- <time>14:21:52</time>
23
- <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="3128fdbf1d272d661ddcd35589f6fd58"/></dir><dir name="Import"><file name="Form.php" hash="88dfb149d89a293f2e161cc994a6d66d"/></dir><dir name="Queue"><file name="Grid.php" hash="66bad4f57dada919cb46b4422aa353ec"/></dir><dir name="QueueExport"><file name="Grid.php" hash="35e1ec26f0860c35d63132d09b22b9e0"/></dir><dir name="QueueImport"><file name="Grid.php" hash="2291c0025c67441a667ee85c849b938c"/></dir><file name="Export.php" hash="8bad2b20c02e6f46bebcf632ca1a47bb"/><file name="Import.php" hash="25f84fabb2e3ec99281bcdd8fa2f36da"/><file name="Queue.php" hash="59ad9d88015d45a8b6874a1946cbb79b"/><file name="QueueExport.php" hash="47358e2366a683b99d974f3c88fea9b9"/><file name="QueueImport.php" hash="3674342fcbe1aa23499bdf5bcb16da54"/></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Memberactivity.php" hash="480c555fdfd348a830af84cc1b2ec749"/></dir></dir></dir><dir name="Ecommerce"><file name="Grid.php" hash="c328363a48a54819727153270664ccf0"/></dir><dir name="Ecommerceapi"><dir name="Renderer"><file name="Items.php" hash="b7da6bfbfb676c8bcd812b34ee84b7bc"/></dir><file name="Grid.php" hash="1d94069e2fe5c5ca96cabbce0ec6b398"/></dir><dir name="Memberactivity"><file name="Grid.php" hash="0dd76b6f10e87bcc8e5516f823a53d77"/></dir><dir name="Renderer"><file name="Date.php" hash="057956ab3107ff1ab1bb63580960db00"/><file name="Importypes.php" hash="db0727a05feebbf5cb6aa4193c7aa5a2"/><file name="Lists.php" hash="d7358169a3fbbaf7422e96eb73642786"/><file name="Progress.php" hash="6476d05d169196791fca792fcc2787c5"/><file name="Yesno.php" hash="9b8689c9c2bc5e51d57d5b8a37345188"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="c68500d47c69ad31858b0e7e8f80e1af"/></dir><dir name="Form"><dir name="Field"><file name="Mapfields.php" hash="f12afdd267131675bc65c9da4e98a27d"/></dir></dir><file name="Account.php" hash="e667fd667ab5b5f98aaf6aa59482b155"/><file name="Date.php" hash="c7aa6aa77b9ba59119a753a6e217f0ab"/><file name="OauthWizard.php" hash="4426268d1c895cc75282788f9c3c57fe"/><file name="ResetLocalEcommerce.php" hash="e42a097caf3af8a1927748ff0ed36509"/><file name="ResetRemoteEcommerce.php" hash="089df8bdccfdf919f9188393554d1fc8"/></dir></dir><dir name="Transactionalemail"><dir name="Mandrill"><file name="Grid.php" hash="16f4ddfb22908829211549cd67910ed5"/></dir><dir name="Newemail"><file name="Form.php" hash="6b1d604005694896751ea448bf5d4fbb"/></dir><dir name="Sts"><file name="Grid.php" hash="125845125287b0756e1d436c590db7a1"/></dir><file name="Mandrill.php" hash="20c99e8d4451e5e6948f1869fcf09fad"/><file name="Newemail.php" hash="f3f816f536a0ff164e5c9b32de07991f"/><file name="Sts.php" hash="c94b5e2a3d4aa977dd1b505ae9dd0733"/></dir><file name="Ecommerce.php" hash="218f3f43ab85966c56a51b612dc0d19f"/><file name="Ecommerceapi.php" hash="35fab157ffd89365f58d3f6a7d215af8"/></dir><dir name="Checkout"><file name="Subscribe.php" hash="a455450dad6e612cb8c1c53130e62c52"/></dir><dir name="Customer"><dir name="Account"><file name="Lists.php" hash="63d14c898f9399f711b6225e83659908"/></dir></dir><file name="Lists.php" hash="dae58712a1f4bd4375fbb026b7f6dc96"/><file name="Signup.php" hash="222115a830f5fe9d35a7d15d811936bd"/></dir><dir name="Helper"><file name="Cache.php" hash="67e65a10f74e15e46e198ff938614d46"/><file name="Data.php" hash="391ab3046f8a2e3521b2201a247da110"/><file name="Export.php" hash="e38bc4a6a62e1d421b56b33d951b50f3"/><file name="Oauth2.php" hash="5dde916a8a3683c792d4253a80305371"/></dir><dir name="Model"><dir name="Custom"><file name="Collection.php" hash="5cf9b979cb7d3863d1db58e4f575e8d0"/></dir><dir name="Email"><file name="Template.php" hash="e1c1a054a2a99ea4341ce6c63370a589"/></dir><dir name="Feed"><file name="Updates.php" hash="f376504e208008cf935f5e84c363982d"/></dir><dir name="Mysql4"><dir name="Apidebug"><file name="Collection.php" hash="9f75f1d9dd0f108657ac23607eff50da"/></dir><dir name="Asyncorders"><file name="Collection.php" hash="c3ef445b7524a374c725e8872347e627"/></dir><dir name="Asyncsubscribers"><file name="Collection.php" hash="766012d25d0b1edd1550a80a046e56c9"/></dir><dir name="Bulksync"><dir name="Export"><file name="Collection.php" hash="44d269eed50f52146033ff89ed7a2891"/></dir><dir name="Import"><file name="Collection.php" hash="7e6be7ba8998b9e173b5be61b2a5f02b"/></dir><file name="Export.php" hash="4ae1ac47449cccb7ce25157f7d9d2f11"/><file name="Import.php" hash="422523ecbf7248e9340ed5e18486b68b"/></dir><dir name="Ecommerce"><file name="Collection.php" hash="24a35bd64c38d18e3abb2ab9dcea8f34"/></dir><file name="Apidebug.php" hash="6fbad3a26c6608e84ef0a4d86314af0b"/><file name="Asyncorders.php" hash="63fe2090cc9421409669d1b1acdc2bee"/><file name="Asyncsubscribers.php" hash="42c900ee0d457187631208a9d1201fd2"/><file name="Ecommerce.php" hash="71a3b94d770649dd40e9eabf4a9191ca"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Account.php" hash="5fdee829d7167aac52f2daf91f8c4b64"/><file name="BulksyncDatasource.php" hash="bb42813d2227fecc62476ff819e6bfa0"/><file name="BulksyncStatus.php" hash="745e4a9a98c4d74e82184403de7606b8"/><file name="Checkoutsubscribe.php" hash="b2db54b9fb5c3cec5d64dc3bacb437cc"/><file name="CronProcessLimit.php" hash="201fb2c0d26a121b5b902fff9ba49f88"/><file name="CustomerGroup.php" hash="fdd4a2532a7e67dc5206a0cd67c4b859"/><file name="Ecommerce360.php" hash="14a8bc7fd552ec7f35bacaca2c326def"/><file name="List.php" hash="5ebc6ce8f7ab369ba58fe06c8b766769"/><file name="OrderProcessLimit.php" hash="54358f98da63c7c3c6eef0002ee5364b"/><file name="OrderStatus.php" hash="0be73f31140b5b713dcf5fc141052a5c"/><file name="Status.php" hash="4ef26d94a5a1645477c8b1aced56cf01"/><file name="TransactionalEmails.php" hash="406a0998c5d518c0cb177f8c853acb6d"/><file name="WebhookDelete.php" hash="d3628cea58b71611a9b38f3e140ecd5f"/></dir></dir></dir><dir name="TransactionalEmail"><file name="Adapter.php" hash="22d05169667a6be152a898bb2c9fb129"/><file name="MANDRILL.php" hash="b84f4f27564f68ef5a3a35a1d3bf2902"/><file name="STS.php" hash="e49a76aa693d12778dd69a4fbbd613bb"/></dir><file name="Api.php" hash="84fbce714b98a7a1cba24d9a7f0ed443"/><file name="Asyncorders.php" hash="1b738740a19ea53869e3e19e531ddd03"/><file name="Asyncsubscribers.php" hash="502567bfcb6ab39bd310e670b590eeb3"/><file name="BulksyncExport.php" hash="5963222008697fe79772d7520e91705c"/><file name="BulksyncImport.php" hash="f55ae237b2a1e633a26020d646a78e33"/><file name="Cache.php" hash="64aaa1feca20ee3bbe606076d82034c7"/><file name="Cron.php" hash="658c63033a314f4f6b8eff1cd80bf94e"/><file name="Ecommerce.php" hash="d74ca44e23d32d22f5f64898028d784f"/><file name="Ecommerce360.php" hash="5f539611e1c6b174feecf2bc9798130f"/><file name="MCAPI.php" hash="8c1eafa5e16e3993fa2bbe7804669315"/><file name="MCEXPORTAPI.php" hash="c8f16211692cf33992fbd785019c01f7"/><file name="Monkey.php" hash="1844ef9dc05ad41b49ef55d991f35717"/><file name="Observer.php" hash="de859e2455f889a8fbc42e2bd0d192d5"/><file name="Subscriber.php" hash="18d42e657528da462df8246bbcc0eb22"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BulksyncController.php" hash="14e771adfcbe3395d5624e3f3ca6e8a2"/><file name="ConfigController.php" hash="c27726c53849dbfe7ddf89059f71d73c"/><file name="EcommerceController.php" hash="97d7b13c988d2f276560a4a2fb523a5e"/><file name="TransactionalemailController.php" hash="0b1288af0ab97e26d2a07da425378249"/></dir><dir name="Customer"><file name="AccountController.php" hash="149184229b87fa5c2365992784d560ed"/></dir><file name="SignupController.php" hash="dfc6efd9bc78d4fb41bea0a7a4e7bf90"/><file name="WebhookController.php" hash="68bd5a1e9dd5261e8ba139ae04ef6748"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2cd1bef6c2144cfbdcd68da1647e100c"/><file name="config.xml" hash="cb1bfdccf3d74bcfe5d737398d210b74"/><file name="system.xml" hash="93b9d6e3b71dd840be151fda91163874"/></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="5a1bfdc8014edbc8b8c728954405a9f5"/><file name="mysql4-upgrade-1.1.5-1.1.6.php" hash="14750274ece5816d6c1ab490f7d610ab"/></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="fb729d3c111d1626577017d5bd88b693"/></dir><file name="Userinfo.php" hash="fc19ad47dda8547fe66d4fc13821ef66"/></dir></dir><dir name="Templates"><dir name="Templates"><file name="Grid.php" hash="2bd56817ffdf97181552fb461006956c"/></dir><file name="Templates.php" hash="b11427fda30f8e0f51a35fcfbd4e2cff"/></dir><dir name="Users"><dir name="Senders"><file name="Grid.php" hash="97927a2897f543a6b0603c8f3705c2e0"/></dir><file name="Senders.php" hash="d2f5c303467c2ffc08414394c30e94b0"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="265550db051e8ee3bc81e9a8bcec0731"/></dir><dir name="Model"><dir name="Email"><file name="Template.php" hash="6803e5ed59cba43442859d0f492bf905"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Userinfo.php" hash="9f1ab317f449b1a1ef6c240470c5059f"/></dir></dir><file name="Config.php" hash="070947579c992a16e7a335c521684ffd"/></dir><file name="Customcollection.php" hash="f024ab2663565eeca20a0d071e0cffbc"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Mandrill"><file name="UsersController.php" hash="22458a083848a119e36edad0fba44972"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="8c0b7fda27820f53b3064f18a524c930"/><file name="config.xml" hash="84417b9f4ffc4fc7ba8b7e728bfadf09"/><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="1d6aa7470345b86ebc544865b1d5988b"/></dir><dir name="Abandonedorder"><file name="Grid.php" hash="abdca6b6f4eb45a73eb55b5d553ef4cd"/></dir><dir name="Dashboard"><file name="Sales.php" hash="0242b35fd7d779e997c9d583d2067200"/><file name="Totals.php" hash="6fab1bc9886d3a5c0de6609e0f842076"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="7421b2285cbf14f737f197647c444e13"/></dir><file name="Date.php" hash="c2c968c7e44e4512afcf1d280b596b12"/></dir></dir><file name="Abandonedmails.php" hash="1602122456b4a710638e049e87135a57"/><file name="Abandonedorder.php" hash="eb6b272bf9da062c0d922f733fd5684d"/><file name="Dashboard.php" hash="b308fe4aa4339bb980f911ddaf244bf1"/></dir><dir name="Email"><dir name="Order"><file name="Items.php" hash="898f46053e5d6dc70e8ea84306069905"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="3e1fa681e66943898a0ee4e5c7330814"/></dir><dir name="Model"><dir name="Resource"><dir name="Mailssent"><file name="Collection.php" hash="32a7f66ed04d2774708608e93673eb60"/></dir><dir name="Order"><file name="Collection.php" hash="23e2093bc0d909c30190ac5ff76b2a4b"/></dir><file name="Mailssent.php" hash="587b8c706766b178be80dc6539e4172b"/></dir><dir name="System"><dir name="Config"><file name="Automatic.php" hash="4796f50ff325b34bb7478ae19da5f455"/><file name="Cmspage.php" hash="97fb52c0878ba73934fc54bd23a00284"/><file name="Customergroup.php" hash="56192685ca9110ae95431fc63c494e25"/><file name="Discounttype.php" hash="680ae0d05305ea8ead09bd176914935d"/><file name="Maxemails.php" hash="d3e4eb78c3496a7e3f1dafb66c765407"/><file name="Unit.php" hash="a20bb2f70dbff61ad99b12e169116a68"/></dir></dir><file name="Config.php" hash="5227e21f99c5f77f0fc628e1597fabf7"/><file name="Cron.php" hash="fa352ce6323fdc9e1004cbc9ddfd1a44"/><file name="EventObserver.php" hash="9ef907a467920256f28d564e08059f7f"/><file name="Mailssent.php" hash="c4bb348f7df03d057b6e71793a35099f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AbandonedmailsController.php" hash="53e508bee05b83175bf940e8e569e5c5"/><file name="AbandonedorderController.php" hash="fa050d8ecfe1d665178375c677a83c38"/></dir><file name="AbandonedController.php" hash="c5d4146adaaa34ca06cc444299c13bd1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c2a82d9e46d715f3d10a5ae40f457c89"/><file name="config.xml" hash="d37a824d46b07c9fa290cd0cad4fc05b"/><file name="system.xml" hash="2a44e4c642dcb454622af0219514e04c"/></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.6-0.1.7.php" hash="60daa0d70a1af929a39d6e20ee52ee9c"/></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="2ce3d676335024c283c8cb7004f2fd70"/></dir></dir><dir name="Birthday"><dir name="Fieldset"><file name="Hint.php" hash="b90407590390af8a3b7a5f28fe30fc1d"/></dir></dir><dir name="Fieldset"><file name="Hint.php" hash="6512f3966ad7a5805b37ec347fe3f45d"/></dir><dir name="Review"><dir name="Fieldset"><file name="Hint.php" hash="3a30e310d54d553551645b4ba65d3a97"/></dir></dir><dir name="Wishlist"><dir name="Fieldset"><file name="Hint.php" hash="d958534a50e224778b4f21ab91965c93"/></dir></dir></dir></dir></dir><dir name="Backtostock"><file name="Notice.php" hash="a0ed5dc687baa5eff1c5582fe3d1d7b8"/></dir><dir name="Customer"><dir name="Account"><file name="List.php" hash="12114dfff4daa3fb66ec67886ecd65ce"/></dir></dir><dir name="Email"><dir name="Backtostock"><file name="Item.php" hash="52fdf4d6b9e46af278e845af141babaf"/></dir><dir name="Related"><file name="Items.php" hash="a307ecd59fa183dfd631f3e852d5b0b4"/></dir><dir name="Review"><file name="Items.php" hash="58310c2423a7844e4876adf0fee8d1f8"/></dir><dir name="Wishlist"><file name="Items.php" hash="ea252dac50f360125f964a493db00252"/></dir></dir><dir name="Review"><file name="Form.php" hash="36b468ca8507f5880e792cf2ca144084"/></dir><file name="Unsubscribe.php" hash="3320837d5f53290bea5911184f2f8e89"/></dir><dir name="Helper"><file name="Data.php" hash="31e26e122f134859f93a6ab0797ac2e5"/></dir><dir name="Model"><dir name="Resource"><dir name="Backtostock"><file name="Collection.php" hash="ed8d4e1356ee483a17c916f3caf5e004"/></dir><dir name="Backtostockalert"><file name="Collection.php" hash="0c8888bcd7f10ee01c40ffb1be379b29"/></dir><dir name="Review"><file name="Collection.php" hash="f6d6fea1af97d22c763ca066f35b60c1"/></dir><dir name="Unsubscribe"><file name="Collection.php" hash="ce69c3e9a94270d56586d98b9848c40e"/></dir><dir name="Visited"><file name="Collection.php" hash="bd6f6853caf49b5cc775853982d080a4"/></dir><file name="Backtostock.php" hash="f843a3a2c8784ebf5844dd24851152b5"/><file name="Backtostockalert.php" hash="667c31247de8122c896f7056f76d69e4"/><file name="Review.php" hash="c452559a7e879c3c1744d0fe2a8d3c44"/><file name="Unsubscribe.php" hash="52d3a3276a4ffc9dac8969a9f71ab7fe"/><file name="Visited.php" hash="2c1255d46620bd32976ec62a74ea8ee5"/></dir><dir name="System"><dir name="Config"><file name="Automatic.php" hash="a13826aaa72aa13d783e9b8032255d11"/><file name="Couponcounter.php" hash="6a5667391ba4ec58490fef07c4b0c20b"/><file name="Customergroup.php" hash="9dacae8f22f927f63fffa065698436b0"/><file name="Discounttype.php" hash="f0434d0bd53e7a18a2a7377b9e08fe5f"/><file name="Generaltype.php" hash="871b01315f4bdcef6fe4317d0ee421fd"/><file name="Time.php" hash="3bb74c6af5f1d2d0920e290f5ff4978a"/></dir></dir><file name="Backtostock.php" hash="bbe12c4e362b4a6b3ff289c4cfad1c1d"/><file name="Backtostockalert.php" hash="7c13e74e80769ce9ec5348dff3146ed7"/><file name="Config.php" hash="c3d0f8a39bd9c4704cd5ef161420e345"/><file name="Cron.php" hash="ef64540663b1cd8cff946775c6f7c7ac"/><file name="EventObserver.php" hash="7b2b9de9366cc9e9e70e6f8b10cc2b41"/><file name="Review.php" hash="3972ef6776b94ccecf6e05b2aa1972db"/><file name="Unsubscribe.php" hash="60b3692fd5f2e29c711954fd0ca91141"/><file name="Visited.php" hash="36850b4973097fd7dfe4d05c45b8dbdd"/></dir><dir name="controllers"><file name="AutoresponderController.php" hash="ed63d47651efc1b0edb5c6fcc8e2308e"/><file name="BacktostockController.php" hash="0a7f9280f87c7a663f06529e3811cfc1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="59a240f12b496566f1a2b1de5f053e96"/><file name="config.xml" hash="b6c77a13c601dc9e8f6662c1b4147bfe"/><file name="system.xml" hash="e46216b7e0f5b0dc36566c2a77e432e3"/></dir><dir name="sql"><dir name="ebizmarts_autoresponder_setup"><file name="mysql4-install-0.1.0.php" hash="791af0eec35753144d506294bb4c03ad"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="78438ac4a76091f713815249b89a0fb8"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="b2b4f343d16d99c1396987452fba1039"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="378accc07eb80b16029db84f56bed683"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ebizmarts_MageMonkey.xml" hash="9a4b1c469b4652442c7a5f945dd12cac"/><file name="Ebizmarts_Mandrill.xml" hash="c80aa6f98ccc3890303bb4c278f8ad95"/><file name="Ebizmarts_AbandonedCart.xml" hash="48c4cfe8246d5a995e2836c43ab38d74"/><file name="Ebizmarts_Autoresponder.xml" hash="97302f94f5893147db18c4034d135256"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="ebizmarts"><file name="abandonedcart.xml" hash="72945454a4d24ef8d1718bf177272ffe"/><file name="autoresponder.xml" hash="f9f60b531984dafdb813f52cdf805734"/></dir><file name="magemonkey.xml" hash="f86c4a1e77468bf497bbc31f00d379c9"/></dir><dir name="template"><dir name="magemonkey"><dir name="checkout"><file name="subscribe.phtml" hash="21ba47c3131d5e7fb5ce9cfc4a2700f4"/></dir><file name="lists.phtml" hash="aadf73e8b69c769d8b349b00ad8b9f34"/></dir><dir name="ebizmarts_abandonedcart"><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="5ff74635419e7ffb4d3660c306ad6590"/></dir></dir><file name="items.phtml" hash="28f65bf1836a33234bff58edda857532"/></dir></dir></dir><dir name="ebizmarts"><dir name="autoresponder"><dir name="backtostock"><dir name="catalog"><dir name="product"><file name="form.phtml" hash="da27e44f5421a35357bdb1ad832b5edd"/><file name="notice.phtml" hash="f008e3519220e874e629dce5ec833025"/></dir></dir><file name="item.phtml" hash="f21ac40fa3279b8765012de283206e71"/></dir><dir name="customer"><file name="list.phtml" hash="be9cd36a644a39e3569c9ae0ded2087d"/></dir><dir name="related"><file name="items.phtml" hash="b05bfbbe1bdf48324d2e3e2df7d7ae97"/></dir><dir name="review"><file name="items.phtml" hash="a1fdcb739b6032b607e67047fd3b65f9"/></dir><dir name="wishlist"><file name="items.phtml" hash="217b12ebbabd46d14c2a95b57aa9dad0"/></dir><file name="unsubscribe.phtml" hash="2635dae225a8a4536d58a87c4de9054d"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="ebizmarts"><file name="mandrill.xml" hash="a1fa45084bc7b71260f92dbf62f98a93"/><file name="abandonedcart.xml" hash="56b2ca552b73a976207cd33afbcfb299"/></dir><file name="magemonkey.xml" hash="613e5cd38048dedadb96434b9c3cc704"/></dir><dir name="template"><dir name="magemonkey"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="f4bbe778592be65a6b452002dfc84c24"/></dir><file name="oauth_wizard.phtml" hash="226d42be1f41838bb80da0e2c3567d71"/><file name="resetlocal360.phtml" hash="c8cb46479188be0fc221e5f30d71e4b3"/><file name="resetremote360.phtml" hash="6d5caaf7fa0e823b1ee22e1a9776f7eb"/></dir></dir></dir><dir name="ebizmarts"><dir name="mandrill"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="d4025820e90c8e20bc8c6664984a78a1"/></dir></dir></dir></dir><dir name="abandonedcart"><dir name="dashboard"><file name="index.phtml" hash="180d73784745e0c1d5b37b0d435a2cc0"/><file name="salebar.phtml" hash="50a0c2645e2f651da9ba72fd875986cb"/><file name="totalbar.phtml" hash="ff53860a369cbf2e2c067607147afe83"/></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="ffde58e7c920e022c949601fb5533820"/></dir></dir></dir></dir><dir name="autoresponder"><dir name="system"><dir name="config"><dir name="backtostock"><dir name="fieldset"><file name="hint.phtml" hash="f02d4d7e5e45bc45b20cf8d531017c61"/></dir></dir><dir name="birthday"><dir name="fieldset"><file name="hint.phtml" hash="577162540f6f45b822d7784463c31456"/></dir></dir><dir name="fieldset"><file name="hint.phtml" hash="03ca0e64ef7648018ea459fc18ee2b4a"/></dir><dir name="review"><dir name="fieldset"><file name="hint.phtml" hash="a3e506441b757f5372337fa59de1d64f"/></dir></dir><dir name="wishlist"><dir name="fieldset"><file name="hint.phtml" hash="8f4427235da3afa30d271745f040c767"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="ebizmarts"><dir name="abandonedcart"><file name="abandoned_cart_mail_1.html" hash="7cdd7e280cf62ecc901e44486348cb42"/><file name="abandoned_cart_mail_2.html" hash="a80a49564d4bf2f1d2e218436bd5b3c2"/><file name="abandoned_cart_mail_3.html" hash="040178e0d03339613f7874982d666517"/><file name="abandoned_cart_mail_generic.html" hash="73f8caed42f738e3bffe5da4d8a882a4"/></dir><dir name="autoresponder"><file name="backtostock.html" hash="873a69e2975f86203e0459410154c11f"/><file name="birthday.html" hash="6c4b7fc9c04c63a010637430c542398c"/><file name="neworder.html" hash="0bf363484cf971b52b2b2b6ac466e743"/><file name="noactivity.html" hash="050ed39458f9a4b182f3a047c07ea6ba"/><file name="relatedproducts.html" hash="9c4993edce3474c7b063cfbb4a4cb849"/><file name="review.html" hash="c6349dcd4be0b3c73473a45849a261ac"/><file name="reviewcoupon.html" hash="8b8262acb1d67c315a582f6a70330c49"/><file name="visitedproducts.html" hash="1bfe817dcccc9b1eeba23b439b68da5e"/><file name="wishlist.html" hash="f2f55a5740d653cdddecb359f18c5325"/></dir></dir></dir></dir><file name="Ebizmarts_MageMonkey.csv" hash="181e91ed91dfea5fe7dab66af5719af8"/><file name="Ebizmarts_Mandrill.csv" hash="3dac3af57664fd34f5eda8abf4098ee0"/><file name="Ebizmarts_AbandonedCart.csv" hash="29ee25f32946e687917cf542aaa66941"/><file name="Ebizmarts_Autoresponder.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="magemonkey"><file name="magemonkey.css" hash="00f0b145e9f9cc99eb46cf97faba3f65"/><file name="magemonkey.js" hash="e40717a83ef300776cc79ad9f8191005"/><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="0d29bc510ac4af6ae38b89c62019f797"/></dir><dir name="ebizmarts"><dir name="mandrill"><file name="mandrill-tab.png" hash="d7eaf9deef355e4b8b55a96070b90ffe"/><file name="mandrill.css" hash="37a538f63b82a486c364b337420ca8ad"/></dir><file name="ebizmarts-tab.png" hash="6dfa08c5cd4329d1df6e7b71fb1f925a"/><file name="ebizmarts.css" hash="10afb44e9b6b09378da6f7adccf1a711"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="magemonkey"><file name="magemonkey.css" hash="d4eac40764271596a3edc30d1014887f"/><file name="monkey.js" hash="d7d2e3f137d97202214fe29551695739"/></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="Mandrill"><dir name="Mandrill"><file name="Exceptions.php" hash="c1b76471b87d66b9118cfacf42b309a2"/><file name="Exports.php" hash="89ab0610609c675b873d7f17db7e384d"/><file name="Inbound.php" hash="194af722064b87ec08fb08196d0b112e"/><file name="Internal.php" hash="26470edbb8134ff0b03f110f2cdc3bf8"/><file name="Ips.php" hash="37c362fec92e6e1a122cfa1c9363b426"/><file name="Messages.php" hash="0c846d38f80303b0a403258b00bcbe46"/><file name="Metadata.php" hash="f513ee87966aa29738f4f9d95f852da1"/><file name="Rejects.php" hash="562aae94138d2fd6cb44cd48058ed25f"/><file name="Senders.php" hash="30c01ced259070fd170b2447dd0053a1"/><file name="Subaccounts.php" hash="43f762b6cab8b0dc54eceff42402c386"/><file name="Tags.php" hash="92760c835fa7312a1ce9c401c3116f9b"/><file name="Templates.php" hash="b212c80d72590920e169a0850c43355b"/><file name="Urls.php" hash="8438b47d6f283ebb5a9821b7997d972f"/><file name="Users.php" hash="ac0fc5f8b264b8436ad8e98aa7ce214d"/><file name="Webhooks.php" hash="51ec40806b2cf3966557389143143f58"/><file name="Whitelists.php" hash="14e150230d31880b7fa0a56802b2fa7c"/></dir><file name="Mandrill.php" hash="de81f00e82e4bcae611c6b167955b907"/><file name="Message.php" hash="3cf78c00c80a8cf6524d91abe7526049"/></dir></dir><dir name="js"><dir name="ebizmarts"><dir name="autoresponders"><file name="visitedproducts.js" hash="cbc036a3134e6a026a5716491ebb8eb2"/><file name="visitedproductsstorecodes.js" hash="8fcd3c5664ef75f02b6ff1c645f51a9d"/></dir></dir></dir></target></contents>
24
  <compatible/>
25
  <dependencies/>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ebizmarts_MageMonkey</name>
4
+ <version>1.1.26</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.1.26&#xD;
12
  --------&#xD;
13
+ Popup window added to catch email when customer access site for the first time&#xD;
14
  &#xD;
15
+ Magento newsletter working with latest Mandrill version.&#xD;
16
  &#xD;
17
+ Visited products for new Magento display fixed.&#xD;
18
  &#xD;
19
+ Cron send_subscribers_async uses listBatchSubscribe.&#xD;
20
+ &#xD;
21
+ Added Abandoned Cart Dashboards to ACL.&#xD;
22
+ &#xD;
23
+ Subscriber status working okay when create account confirmation enabled.&#xD;
24
+ &#xD;
25
+ Orders exported by cron process now shown on Magento sent orders properly.&#xD;
26
+ &#xD;
27
+ Autoresponder and Abandoned Cart only create coupon if don't exist for that email.&#xD;
28
+ &#xD;
29
+ Visited products when max items per mail is 0 working okay.&#xD;
30
+ &#xD;
31
+ Abandoned cart check stock products for configurable and bundle okay.&#xD;
32
+ &#xD;
33
+ &#xD;
34
+ Autoclean for old coupons in Autoresponder and Abandoned Cart&#xD;
35
+ &#xD;
36
+ &#xD;
37
+ Traduction for abandoned cart item list.&#xD;
38
+ &#xD;
39
+ &#xD;
40
+ Checkout cache lists showing correspondent for each store.&#xD;
41
+ &#xD;
42
+ &#xD;
43
+ Showing message when updated newsletter info.</notes>
44
  <authors><author><name>Ebizmarts Development Team</name><user>auto-converted</user><email>info@ebizmarts.com</email></author></authors>
45
+ <date>2014-12-09</date>
46
+ <time>17:15:28</time>
47
+ <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="3128fdbf1d272d661ddcd35589f6fd58"/></dir><dir name="Import"><file name="Form.php" hash="88dfb149d89a293f2e161cc994a6d66d"/></dir><dir name="Queue"><file name="Grid.php" hash="66bad4f57dada919cb46b4422aa353ec"/></dir><dir name="QueueExport"><file name="Grid.php" hash="35e1ec26f0860c35d63132d09b22b9e0"/></dir><dir name="QueueImport"><file name="Grid.php" hash="2291c0025c67441a667ee85c849b938c"/></dir><file name="Export.php" hash="8bad2b20c02e6f46bebcf632ca1a47bb"/><file name="Import.php" hash="25f84fabb2e3ec99281bcdd8fa2f36da"/><file name="Queue.php" hash="59ad9d88015d45a8b6874a1946cbb79b"/><file name="QueueExport.php" hash="47358e2366a683b99d974f3c88fea9b9"/><file name="QueueImport.php" hash="3674342fcbe1aa23499bdf5bcb16da54"/></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Memberactivity.php" hash="480c555fdfd348a830af84cc1b2ec749"/></dir></dir></dir><dir name="Ecommerce"><file name="Grid.php" hash="c328363a48a54819727153270664ccf0"/></dir><dir name="Ecommerceapi"><dir name="Renderer"><file name="Items.php" hash="b7da6bfbfb676c8bcd812b34ee84b7bc"/></dir><file name="Grid.php" hash="1d94069e2fe5c5ca96cabbce0ec6b398"/></dir><dir name="Memberactivity"><file name="Grid.php" hash="0dd76b6f10e87bcc8e5516f823a53d77"/></dir><dir name="Renderer"><file name="Date.php" hash="057956ab3107ff1ab1bb63580960db00"/><file name="Importypes.php" hash="db0727a05feebbf5cb6aa4193c7aa5a2"/><file name="Lists.php" hash="d7358169a3fbbaf7422e96eb73642786"/><file name="Progress.php" hash="6476d05d169196791fca792fcc2787c5"/><file name="Yesno.php" hash="9b8689c9c2bc5e51d57d5b8a37345188"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="c68500d47c69ad31858b0e7e8f80e1af"/></dir><dir name="Form"><dir name="Field"><file name="Mapfields.php" hash="f12afdd267131675bc65c9da4e98a27d"/></dir></dir><file name="Account.php" hash="e667fd667ab5b5f98aaf6aa59482b155"/><file name="Date.php" hash="c7aa6aa77b9ba59119a753a6e217f0ab"/><file name="OauthWizard.php" hash="4426268d1c895cc75282788f9c3c57fe"/><file name="ResetLocalEcommerce.php" hash="e42a097caf3af8a1927748ff0ed36509"/><file name="ResetRemoteEcommerce.php" hash="089df8bdccfdf919f9188393554d1fc8"/></dir></dir><dir name="Transactionalemail"><dir name="Mandrill"><file name="Grid.php" hash="16f4ddfb22908829211549cd67910ed5"/></dir><dir name="Newemail"><file name="Form.php" hash="6b1d604005694896751ea448bf5d4fbb"/></dir><dir name="Sts"><file name="Grid.php" hash="125845125287b0756e1d436c590db7a1"/></dir><file name="Mandrill.php" hash="20c99e8d4451e5e6948f1869fcf09fad"/><file name="Newemail.php" hash="f3f816f536a0ff164e5c9b32de07991f"/><file name="Sts.php" hash="c94b5e2a3d4aa977dd1b505ae9dd0733"/></dir><file name="Ecommerce.php" hash="218f3f43ab85966c56a51b612dc0d19f"/><file name="Ecommerceapi.php" hash="35fab157ffd89365f58d3f6a7d215af8"/></dir><dir name="Checkout"><file name="Subscribe.php" hash="20e898bde5d1256ac346a7e65b666157"/></dir><dir name="Customer"><dir name="Account"><file name="Lists.php" hash="63d14c898f9399f711b6225e83659908"/></dir></dir><file name="Lists.php" hash="dae58712a1f4bd4375fbb026b7f6dc96"/><file name="Signup.php" hash="222115a830f5fe9d35a7d15d811936bd"/></dir><dir name="Helper"><file name="Cache.php" hash="67e65a10f74e15e46e198ff938614d46"/><file name="Data.php" hash="fdb2454d4ab59f131b82462aa7a800fb"/><file name="Export.php" hash="e38bc4a6a62e1d421b56b33d951b50f3"/><file name="Oauth2.php" hash="5dde916a8a3683c792d4253a80305371"/></dir><dir name="Model"><dir name="Custom"><file name="Collection.php" hash="5cf9b979cb7d3863d1db58e4f575e8d0"/></dir><dir name="Email"><file name="Template.php" hash="e1c1a054a2a99ea4341ce6c63370a589"/></dir><dir name="Feed"><file name="Updates.php" hash="f376504e208008cf935f5e84c363982d"/></dir><dir name="Mysql4"><dir name="Apidebug"><file name="Collection.php" hash="9f75f1d9dd0f108657ac23607eff50da"/></dir><dir name="Asyncorders"><file name="Collection.php" hash="c3ef445b7524a374c725e8872347e627"/></dir><dir name="Asyncsubscribers"><file name="Collection.php" hash="766012d25d0b1edd1550a80a046e56c9"/></dir><dir name="Bulksync"><dir name="Export"><file name="Collection.php" hash="44d269eed50f52146033ff89ed7a2891"/></dir><dir name="Import"><file name="Collection.php" hash="7e6be7ba8998b9e173b5be61b2a5f02b"/></dir><file name="Export.php" hash="4ae1ac47449cccb7ce25157f7d9d2f11"/><file name="Import.php" hash="422523ecbf7248e9340ed5e18486b68b"/></dir><dir name="Ecommerce"><file name="Collection.php" hash="24a35bd64c38d18e3abb2ab9dcea8f34"/></dir><file name="Apidebug.php" hash="6fbad3a26c6608e84ef0a4d86314af0b"/><file name="Asyncorders.php" hash="63fe2090cc9421409669d1b1acdc2bee"/><file name="Asyncsubscribers.php" hash="42c900ee0d457187631208a9d1201fd2"/><file name="Ecommerce.php" hash="71a3b94d770649dd40e9eabf4a9191ca"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Account.php" hash="5fdee829d7167aac52f2daf91f8c4b64"/><file name="BulksyncDatasource.php" hash="bb42813d2227fecc62476ff819e6bfa0"/><file name="BulksyncStatus.php" hash="745e4a9a98c4d74e82184403de7606b8"/><file name="Checkoutsubscribe.php" hash="b2db54b9fb5c3cec5d64dc3bacb437cc"/><file name="CronProcessLimit.php" hash="201fb2c0d26a121b5b902fff9ba49f88"/><file name="CustomerGroup.php" hash="fdd4a2532a7e67dc5206a0cd67c4b859"/><file name="Ecommerce360.php" hash="14a8bc7fd552ec7f35bacaca2c326def"/><file name="List.php" hash="5ebc6ce8f7ab369ba58fe06c8b766769"/><file name="OrderProcessLimit.php" hash="54358f98da63c7c3c6eef0002ee5364b"/><file name="OrderStatus.php" hash="0be73f31140b5b713dcf5fc141052a5c"/><file name="Status.php" hash="4ef26d94a5a1645477c8b1aced56cf01"/><file name="TransactionalEmails.php" hash="406a0998c5d518c0cb177f8c853acb6d"/><file name="WebhookDelete.php" hash="689f8801344fcb9d08f1c77fa79ae6f1"/></dir></dir></dir><dir name="TransactionalEmail"><file name="Adapter.php" hash="22d05169667a6be152a898bb2c9fb129"/><file name="MANDRILL.php" hash="b84f4f27564f68ef5a3a35a1d3bf2902"/><file name="STS.php" hash="e49a76aa693d12778dd69a4fbbd613bb"/></dir><file name="Api.php" hash="84fbce714b98a7a1cba24d9a7f0ed443"/><file name="Asyncorders.php" hash="1b738740a19ea53869e3e19e531ddd03"/><file name="Asyncsubscribers.php" hash="502567bfcb6ab39bd310e670b590eeb3"/><file name="BulksyncExport.php" hash="5963222008697fe79772d7520e91705c"/><file name="BulksyncImport.php" hash="f55ae237b2a1e633a26020d646a78e33"/><file name="Cache.php" hash="64aaa1feca20ee3bbe606076d82034c7"/><file name="Cron.php" hash="2c511664eaed3f629c2abcde834c0142"/><file name="Ecommerce.php" hash="d74ca44e23d32d22f5f64898028d784f"/><file name="Ecommerce360.php" hash="26313ca9fe9e650c596c019b21b81f28"/><file name="MCAPI.php" hash="8c1eafa5e16e3993fa2bbe7804669315"/><file name="MCEXPORTAPI.php" hash="c8f16211692cf33992fbd785019c01f7"/><file name="Monkey.php" hash="1844ef9dc05ad41b49ef55d991f35717"/><file name="Observer.php" hash="9162738d347d916594121d8e3f994ba0"/><file name="Subscriber.php" hash="18d42e657528da462df8246bbcc0eb22"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BulksyncController.php" hash="14e771adfcbe3395d5624e3f3ca6e8a2"/><file name="ConfigController.php" hash="c27726c53849dbfe7ddf89059f71d73c"/><file name="EcommerceController.php" hash="97d7b13c988d2f276560a4a2fb523a5e"/><file name="TransactionalemailController.php" hash="0b1288af0ab97e26d2a07da425378249"/></dir><dir name="Customer"><file name="AccountController.php" hash="149184229b87fa5c2365992784d560ed"/></dir><file name="SignupController.php" hash="e2d90169b430679cf4a0a87b742b7b43"/><file name="WebhookController.php" hash="211e4cf7c030a8b80cadebd49c2b932d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2cd1bef6c2144cfbdcd68da1647e100c"/><file name="config.xml" hash="d6d93fa497fea8012a5386cb933981cd"/><file name="system.xml" hash="d6ed5fce70d3ccb6f3374bd749c06802"/></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="5a1bfdc8014edbc8b8c728954405a9f5"/><file name="mysql4-upgrade-1.1.5-1.1.6.php" hash="14750274ece5816d6c1ab490f7d610ab"/></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="fb729d3c111d1626577017d5bd88b693"/></dir><file name="Userinfo.php" hash="fc19ad47dda8547fe66d4fc13821ef66"/></dir></dir><dir name="Templates"><dir name="Templates"><file name="Grid.php" hash="2bd56817ffdf97181552fb461006956c"/></dir><file name="Templates.php" hash="b11427fda30f8e0f51a35fcfbd4e2cff"/></dir><dir name="Users"><dir name="Senders"><file name="Grid.php" hash="97927a2897f543a6b0603c8f3705c2e0"/></dir><file name="Senders.php" hash="d2f5c303467c2ffc08414394c30e94b0"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="265550db051e8ee3bc81e9a8bcec0731"/></dir><dir name="Model"><dir name="Email"><file name="Template.php" hash="42df539ce010e7c823ac1496a0831e28"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Userinfo.php" hash="9f1ab317f449b1a1ef6c240470c5059f"/></dir></dir><file name="Config.php" hash="070947579c992a16e7a335c521684ffd"/></dir><file name="Customcollection.php" hash="f024ab2663565eeca20a0d071e0cffbc"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Mandrill"><file name="UsersController.php" hash="22458a083848a119e36edad0fba44972"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="8c0b7fda27820f53b3064f18a524c930"/><file name="config.xml" hash="97bb82b823927c1c1c14b499ffae550a"/><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="1d6aa7470345b86ebc544865b1d5988b"/></dir><dir name="Abandonedorder"><file name="Grid.php" hash="2ea8fd100532c94ad46280befe350e12"/></dir><dir name="Dashboard"><file name="Sales.php" hash="0242b35fd7d779e997c9d583d2067200"/><file name="Totals.php" hash="6fab1bc9886d3a5c0de6609e0f842076"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="7421b2285cbf14f737f197647c444e13"/></dir><file name="Date.php" hash="c2c968c7e44e4512afcf1d280b596b12"/></dir></dir><file name="Abandonedmails.php" hash="1602122456b4a710638e049e87135a57"/><file name="Abandonedorder.php" hash="eb6b272bf9da062c0d922f733fd5684d"/><file name="Dashboard.php" hash="b308fe4aa4339bb980f911ddaf244bf1"/></dir><dir name="Email"><dir name="Order"><file name="Items.php" hash="898f46053e5d6dc70e8ea84306069905"/></dir></dir><dir name="Popup"><file name="Emailcatcher.php" hash="672a41d201c68826f7275e0e8e1ac773"/></dir></dir><dir name="Helper"><file name="Data.php" hash="3e1fa681e66943898a0ee4e5c7330814"/></dir><dir name="Model"><dir name="Resource"><dir name="Mailssent"><file name="Collection.php" hash="32a7f66ed04d2774708608e93673eb60"/></dir><dir name="Order"><file name="Collection.php" hash="23e2093bc0d909c30190ac5ff76b2a4b"/></dir><file name="Mailssent.php" hash="587b8c706766b178be80dc6539e4172b"/></dir><dir name="System"><dir name="Config"><file name="Automatic.php" hash="4796f50ff325b34bb7478ae19da5f455"/><file name="Cmspage.php" hash="97fb52c0878ba73934fc54bd23a00284"/><file name="Customergroup.php" hash="56192685ca9110ae95431fc63c494e25"/><file name="Discounttype.php" hash="680ae0d05305ea8ead09bd176914935d"/><file name="Maxemails.php" hash="d3e4eb78c3496a7e3f1dafb66c765407"/><file name="Unit.php" hash="a20bb2f70dbff61ad99b12e169116a68"/></dir></dir><file name="Config.php" hash="a293419dd1054bf328fecf6ceda5a603"/><file name="Cron.php" hash="963f9dec08cfa459dad3136b4d729e17"/><file name="EventObserver.php" hash="c76f550516b706e1597c396be9406e78"/><file name="Mailssent.php" hash="c4bb348f7df03d057b6e71793a35099f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AbandonedmailsController.php" hash="53e508bee05b83175bf940e8e569e5c5"/><file name="AbandonedorderController.php" hash="fa050d8ecfe1d665178375c677a83c38"/></dir><file name="AbandonedController.php" hash="c5d4146adaaa34ca06cc444299c13bd1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f32961dcb3c682b24d6e3b5cc5413450"/><file name="config.xml" hash="2db5973bd96faa36f47e697b8c9d2c1f"/><file name="system.xml" hash="8fe6d9f33b115086d952f24f32c27554"/></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.6-0.1.7.php" hash="60daa0d70a1af929a39d6e20ee52ee9c"/></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="2ce3d676335024c283c8cb7004f2fd70"/></dir></dir><dir name="Birthday"><dir name="Fieldset"><file name="Hint.php" hash="b90407590390af8a3b7a5f28fe30fc1d"/></dir></dir><dir name="Fieldset"><file name="Hint.php" hash="6512f3966ad7a5805b37ec347fe3f45d"/></dir><dir name="Review"><dir name="Fieldset"><file name="Hint.php" hash="3a30e310d54d553551645b4ba65d3a97"/></dir></dir><dir name="Wishlist"><dir name="Fieldset"><file name="Hint.php" hash="d958534a50e224778b4f21ab91965c93"/></dir></dir></dir></dir></dir><dir name="Backtostock"><file name="Notice.php" hash="a0ed5dc687baa5eff1c5582fe3d1d7b8"/></dir><dir name="Customer"><dir name="Account"><file name="List.php" hash="12114dfff4daa3fb66ec67886ecd65ce"/></dir></dir><dir name="Email"><dir name="Backtostock"><file name="Item.php" hash="52fdf4d6b9e46af278e845af141babaf"/></dir><dir name="Related"><file name="Items.php" hash="a307ecd59fa183dfd631f3e852d5b0b4"/></dir><dir name="Review"><file name="Items.php" hash="58310c2423a7844e4876adf0fee8d1f8"/></dir><dir name="Wishlist"><file name="Items.php" hash="ea252dac50f360125f964a493db00252"/></dir></dir><dir name="Review"><file name="Form.php" hash="36b468ca8507f5880e792cf2ca144084"/></dir><file name="Unsubscribe.php" hash="3320837d5f53290bea5911184f2f8e89"/></dir><dir name="Helper"><file name="Data.php" hash="31e26e122f134859f93a6ab0797ac2e5"/></dir><dir name="Model"><dir name="Resource"><dir name="Backtostock"><file name="Collection.php" hash="ed8d4e1356ee483a17c916f3caf5e004"/></dir><dir name="Backtostockalert"><file name="Collection.php" hash="0c8888bcd7f10ee01c40ffb1be379b29"/></dir><dir name="Review"><file name="Collection.php" hash="f6d6fea1af97d22c763ca066f35b60c1"/></dir><dir name="Unsubscribe"><file name="Collection.php" hash="ce69c3e9a94270d56586d98b9848c40e"/></dir><dir name="Visited"><file name="Collection.php" hash="bd6f6853caf49b5cc775853982d080a4"/></dir><file name="Backtostock.php" hash="f843a3a2c8784ebf5844dd24851152b5"/><file name="Backtostockalert.php" hash="667c31247de8122c896f7056f76d69e4"/><file name="Review.php" hash="c452559a7e879c3c1744d0fe2a8d3c44"/><file name="Unsubscribe.php" hash="52d3a3276a4ffc9dac8969a9f71ab7fe"/><file name="Visited.php" hash="2c1255d46620bd32976ec62a74ea8ee5"/></dir><dir name="System"><dir name="Config"><file name="Automatic.php" hash="a13826aaa72aa13d783e9b8032255d11"/><file name="Couponcounter.php" hash="6a5667391ba4ec58490fef07c4b0c20b"/><file name="Customergroup.php" hash="9dacae8f22f927f63fffa065698436b0"/><file name="Discounttype.php" hash="f0434d0bd53e7a18a2a7377b9e08fe5f"/><file name="Generaltype.php" hash="871b01315f4bdcef6fe4317d0ee421fd"/><file name="Time.php" hash="3bb74c6af5f1d2d0920e290f5ff4978a"/></dir></dir><file name="Backtostock.php" hash="bbe12c4e362b4a6b3ff289c4cfad1c1d"/><file name="Backtostockalert.php" hash="7c13e74e80769ce9ec5348dff3146ed7"/><file name="Config.php" hash="c3d0f8a39bd9c4704cd5ef161420e345"/><file name="Cron.php" hash="cd53c2b02e4a84633c5d3f6bd8c78e3a"/><file name="EventObserver.php" hash="ab2610016bf209bd1572069df803721a"/><file name="Review.php" hash="3972ef6776b94ccecf6e05b2aa1972db"/><file name="Unsubscribe.php" hash="60b3692fd5f2e29c711954fd0ca91141"/><file name="Visited.php" hash="36850b4973097fd7dfe4d05c45b8dbdd"/></dir><dir name="controllers"><file name="AutoresponderController.php" hash="6e50588149df1b98ec80c701769a37e1"/><file name="BacktostockController.php" hash="0a7f9280f87c7a663f06529e3811cfc1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="59a240f12b496566f1a2b1de5f053e96"/><file name="config.xml" hash="0401b37124514dea48fcea79aa3f46e8"/><file name="system.xml" hash="e46216b7e0f5b0dc36566c2a77e432e3"/></dir><dir name="sql"><dir name="ebizmarts_autoresponder_setup"><file name="mysql4-install-0.1.0.php" hash="791af0eec35753144d506294bb4c03ad"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="78438ac4a76091f713815249b89a0fb8"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="b2b4f343d16d99c1396987452fba1039"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="378accc07eb80b16029db84f56bed683"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ebizmarts_MageMonkey.xml" hash="9a4b1c469b4652442c7a5f945dd12cac"/><file name="Ebizmarts_Mandrill.xml" hash="c80aa6f98ccc3890303bb4c278f8ad95"/><file name="Ebizmarts_AbandonedCart.xml" hash="48c4cfe8246d5a995e2836c43ab38d74"/><file name="Ebizmarts_Autoresponder.xml" hash="97302f94f5893147db18c4034d135256"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="ebizmarts"><file name="abandonedcart.xml" hash="ea8b5013e8af67de1ab9c56a1844cc60"/><file name="autoresponder.xml" hash="f9f60b531984dafdb813f52cdf805734"/></dir><file name="magemonkey.xml" hash="f86c4a1e77468bf497bbc31f00d379c9"/></dir><dir name="template"><dir name="magemonkey"><dir name="checkout"><file name="subscribe.phtml" hash="21ba47c3131d5e7fb5ce9cfc4a2700f4"/></dir><file name="lists.phtml" hash="040b3b8c589f8ae4e8ad2c2bfb3b157b"/></dir><dir name="ebizmarts_abandonedcart"><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="5ff74635419e7ffb4d3660c306ad6590"/></dir></dir><file name="items.phtml" hash="28f65bf1836a33234bff58edda857532"/></dir></dir><dir name="popup"><file name="emailcatcher.phtml" hash="09a20c26b83c81a512f9c3d395f2ab39"/></dir></dir><dir name="ebizmarts"><dir name="autoresponder"><dir name="backtostock"><dir name="catalog"><dir name="product"><file name="form.phtml" hash="da27e44f5421a35357bdb1ad832b5edd"/><file name="notice.phtml" hash="f008e3519220e874e629dce5ec833025"/></dir></dir><file name="item.phtml" hash="f21ac40fa3279b8765012de283206e71"/></dir><dir name="customer"><file name="list.phtml" hash="be9cd36a644a39e3569c9ae0ded2087d"/></dir><dir name="related"><file name="items.phtml" hash="b05bfbbe1bdf48324d2e3e2df7d7ae97"/></dir><dir name="review"><file name="items.phtml" hash="a1fdcb739b6032b607e67047fd3b65f9"/></dir><dir name="wishlist"><file name="items.phtml" hash="217b12ebbabd46d14c2a95b57aa9dad0"/></dir><file name="unsubscribe.phtml" hash="2635dae225a8a4536d58a87c4de9054d"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="ebizmarts"><file name="mandrill.xml" hash="a1fa45084bc7b71260f92dbf62f98a93"/><file name="abandonedcart.xml" hash="56b2ca552b73a976207cd33afbcfb299"/></dir><file name="magemonkey.xml" hash="613e5cd38048dedadb96434b9c3cc704"/></dir><dir name="template"><dir name="magemonkey"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="f4bbe778592be65a6b452002dfc84c24"/></dir><file name="oauth_wizard.phtml" hash="226d42be1f41838bb80da0e2c3567d71"/><file name="resetlocal360.phtml" hash="f88fc0a058fcca8e8d30c22712242a6f"/><file name="resetremote360.phtml" hash="6d5caaf7fa0e823b1ee22e1a9776f7eb"/></dir></dir></dir><dir name="ebizmarts"><dir name="mandrill"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="d4025820e90c8e20bc8c6664984a78a1"/></dir></dir></dir></dir><dir name="abandonedcart"><dir name="dashboard"><file name="index.phtml" hash="180d73784745e0c1d5b37b0d435a2cc0"/><file name="salebar.phtml" hash="50a0c2645e2f651da9ba72fd875986cb"/><file name="totalbar.phtml" hash="ff53860a369cbf2e2c067607147afe83"/></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="ffde58e7c920e022c949601fb5533820"/></dir></dir></dir></dir><dir name="autoresponder"><dir name="system"><dir name="config"><dir name="backtostock"><dir name="fieldset"><file name="hint.phtml" hash="f02d4d7e5e45bc45b20cf8d531017c61"/></dir></dir><dir name="birthday"><dir name="fieldset"><file name="hint.phtml" hash="577162540f6f45b822d7784463c31456"/></dir></dir><dir name="fieldset"><file name="hint.phtml" hash="03ca0e64ef7648018ea459fc18ee2b4a"/></dir><dir name="review"><dir name="fieldset"><file name="hint.phtml" hash="a3e506441b757f5372337fa59de1d64f"/></dir></dir><dir name="wishlist"><dir name="fieldset"><file name="hint.phtml" hash="8f4427235da3afa30d271745f040c767"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="ebizmarts"><dir name="abandonedcart"><file name="abandoned_cart_mail_1.html" hash="7cdd7e280cf62ecc901e44486348cb42"/><file name="abandoned_cart_mail_2.html" hash="a80a49564d4bf2f1d2e218436bd5b3c2"/><file name="abandoned_cart_mail_3.html" hash="040178e0d03339613f7874982d666517"/><file name="abandoned_cart_mail_generic.html" hash="73f8caed42f738e3bffe5da4d8a882a4"/></dir><dir name="autoresponder"><file name="backtostock.html" hash="873a69e2975f86203e0459410154c11f"/><file name="birthday.html" hash="6c4b7fc9c04c63a010637430c542398c"/><file name="neworder.html" hash="0bf363484cf971b52b2b2b6ac466e743"/><file name="noactivity.html" hash="050ed39458f9a4b182f3a047c07ea6ba"/><file name="relatedproducts.html" hash="9c4993edce3474c7b063cfbb4a4cb849"/><file name="review.html" hash="c6349dcd4be0b3c73473a45849a261ac"/><file name="reviewcoupon.html" hash="8b8262acb1d67c315a582f6a70330c49"/><file name="visitedproducts.html" hash="1bfe817dcccc9b1eeba23b439b68da5e"/><file name="wishlist.html" hash="f2f55a5740d653cdddecb359f18c5325"/></dir></dir></dir></dir><file name="Ebizmarts_MageMonkey.csv" hash="181e91ed91dfea5fe7dab66af5719af8"/><file name="Ebizmarts_Mandrill.csv" hash="3dac3af57664fd34f5eda8abf4098ee0"/><file name="Ebizmarts_AbandonedCart.csv" hash="29ee25f32946e687917cf542aaa66941"/><file name="Ebizmarts_Autoresponder.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="magemonkey"><file name="magemonkey.css" hash="00f0b145e9f9cc99eb46cf97faba3f65"/><file name="magemonkey.js" hash="e40717a83ef300776cc79ad9f8191005"/><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="0d29bc510ac4af6ae38b89c62019f797"/></dir><dir name="ebizmarts"><dir name="mandrill"><file name="mandrill-tab.png" hash="d7eaf9deef355e4b8b55a96070b90ffe"/><file name="mandrill.css" hash="37a538f63b82a486c364b337420ca8ad"/></dir><file name="ebizmarts-tab.png" hash="6dfa08c5cd4329d1df6e7b71fb1f925a"/><file name="ebizmarts.css" hash="10afb44e9b6b09378da6f7adccf1a711"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="magemonkey"><file name="magemonkey.css" hash="d4eac40764271596a3edc30d1014887f"/><file name="monkey.js" hash="d7d2e3f137d97202214fe29551695739"/></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="Mandrill"><dir name="Mandrill"><file name="Exceptions.php" hash="c1b76471b87d66b9118cfacf42b309a2"/><file name="Exports.php" hash="89ab0610609c675b873d7f17db7e384d"/><file name="Inbound.php" hash="194af722064b87ec08fb08196d0b112e"/><file name="Internal.php" hash="26470edbb8134ff0b03f110f2cdc3bf8"/><file name="Ips.php" hash="37c362fec92e6e1a122cfa1c9363b426"/><file name="Messages.php" hash="0c846d38f80303b0a403258b00bcbe46"/><file name="Metadata.php" hash="f513ee87966aa29738f4f9d95f852da1"/><file name="Rejects.php" hash="562aae94138d2fd6cb44cd48058ed25f"/><file name="Senders.php" hash="30c01ced259070fd170b2447dd0053a1"/><file name="Subaccounts.php" hash="43f762b6cab8b0dc54eceff42402c386"/><file name="Tags.php" hash="92760c835fa7312a1ce9c401c3116f9b"/><file name="Templates.php" hash="b212c80d72590920e169a0850c43355b"/><file name="Urls.php" hash="8438b47d6f283ebb5a9821b7997d972f"/><file name="Users.php" hash="ac0fc5f8b264b8436ad8e98aa7ce214d"/><file name="Webhooks.php" hash="51ec40806b2cf3966557389143143f58"/><file name="Whitelists.php" hash="14e150230d31880b7fa0a56802b2fa7c"/></dir><file name="Mandrill.php" hash="de81f00e82e4bcae611c6b167955b907"/><file name="Message.php" hash="3cf78c00c80a8cf6524d91abe7526049"/></dir></dir><dir name="js"><dir name="ebizmarts"><dir name="abandonedcart"><file name="popup.css" hash="5e09017943db1f47a0b49b580cd0dac2"/></dir><dir name="autoresponders"><file name="visitedproducts.js" hash="61ef8d19642d349a19a43d018888f205"/><file name="visitedproductsstorecodes.js" hash="08aad89b4f1f8239818ebd0a6b72c3b5"/></dir></dir></dir></target></contents>
48
  <compatible/>
49
  <dependencies/>
50
  </package>