Ebizmarts_MageMonkey - Version 1.1.23

Version Notes

1.1.23
--------
Fixed subscriber synchronization with MailChimp bug.
http://ebizmarts.com/forums/topics/view/13298

Fixed abandoned cart dashboard when no abandoned cart email sent.
http://ebizmarts.com/forums/topics/view/13268
http://ebizmarts.com/forums/topics/view/13668

Fixed to send birthday autoresponder emails the set days before the birthday instead of after.
http://ebizmarts.com/forums/topics/view/13637

Show MailChimp lists as subscribed on customer account if in magemonkey database.

Added checkout asymc subscription compatibility with one step checkout.

Fixed visited products autoresponder when store codes enabled.

Only render form when backtostock autoresponder is active.
(mikeymike)

Fixed abandoned cart dashboard for Magento versions under 1.6.
(fysiomike)

Order by on export process.
(rissip and diglin)

Download this release

Release Info

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


Code changes from version 1.1.22 to 1.1.23

Files changed (39) hide show
  1. app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Dashboard/Totals.php +15 -7
  2. app/code/community/Ebizmarts/AbandonedCart/Model/Cron.php +7 -7
  3. app/code/community/Ebizmarts/AbandonedCart/Model/Resource/Order/Collection.php +10 -0
  4. app/code/community/Ebizmarts/AbandonedCart/etc/config.xml +1 -1
  5. app/code/community/Ebizmarts/Autoresponder/Helper/Data.php +14 -1
  6. app/code/community/Ebizmarts/Autoresponder/Model/Cron.php +3 -9
  7. app/code/community/Ebizmarts/Autoresponder/Model/EventObserver.php +2 -0
  8. app/code/community/Ebizmarts/Autoresponder/controllers/AutoresponderController.php +9 -13
  9. app/code/community/Ebizmarts/Autoresponder/etc/config.xml +2 -2
  10. app/code/community/Ebizmarts/MageMonkey/Block/Lists.php +120 -41
  11. app/code/community/Ebizmarts/MageMonkey/Helper/Data.php +307 -70
  12. app/code/community/Ebizmarts/MageMonkey/Model/Cron.php +38 -35
  13. app/code/community/Ebizmarts/MageMonkey/Model/Ecommerce360.php +62 -62
  14. app/code/community/Ebizmarts/MageMonkey/Model/MCAPI.php +0 -1
  15. app/code/community/Ebizmarts/MageMonkey/Model/Monkey.php +26 -26
  16. app/code/community/Ebizmarts/MageMonkey/Model/Observer.php +75 -216
  17. app/code/community/Ebizmarts/MageMonkey/Model/Subscriber.php +37 -0
  18. app/code/community/Ebizmarts/MageMonkey/Model/System/Config/Source/List.php +5 -1
  19. app/code/community/Ebizmarts/MageMonkey/controllers/Adminhtml/ConfigController.php +1 -1
  20. app/code/community/Ebizmarts/MageMonkey/controllers/SignupController.php +0 -2
  21. app/code/community/Ebizmarts/MageMonkey/controllers/WebhookController.php +0 -1
  22. app/code/community/Ebizmarts/MageMonkey/etc/config.xml +15 -4
  23. app/code/community/Ebizmarts/MageMonkey/etc/system.xml +9 -0
  24. app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.1.21-1.1.22.php +2 -2
  25. app/code/community/Ebizmarts/Mandrill/Model/Email/Template.php +1 -0
  26. app/code/community/Ebizmarts/Mandrill/Model/System/Config/Source/Userinfo.php +9 -0
  27. app/code/community/Ebizmarts/Mandrill/etc/config.xml +1 -1
  28. app/design/adminhtml/default/default/template/magemonkey/system/config/resetlocal360.phtml +1 -1
  29. app/design/adminhtml/default/default/template/magemonkey/system/config/resetremote360.phtml +1 -1
  30. app/design/frontend/base/default/layout/ebizmarts/autoresponder.xml +8 -3
  31. app/design/frontend/base/default/template/ebizmarts/autoresponder/backtostock/catalog/product/form.phtml +1 -1
  32. app/design/frontend/base/default/template/ebizmarts/autoresponder/backtostock/catalog/product/notice.phtml +1 -1
  33. app/design/frontend/base/default/template/magemonkey/checkout/subscribe.phtml +74 -66
  34. app/design/frontend/base/default/template/magemonkey/lists.phtml +2 -2
  35. js/ebizmarts/autoresponders/visitedproducts.js +1 -1
  36. js/ebizmarts/autoresponders/visitedproductsstorecodes.js +47 -0
  37. lib/Mandrill/Mandrill.php +44 -19
  38. lib/Mandrill/Message.php +42 -2
  39. package.xml +29 -14
app/code/community/Ebizmarts/AbandonedCart/Block/Adminhtml/Dashboard/Totals.php CHANGED
@@ -95,22 +95,27 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Dashboard_Totals extends Mage_Admi
95
  if(Mage::helper('core')->isModuleEnabled('Ebizmarts_Mandrill')
96
  && (version_compare(Mage::getConfig()->getNode()->modules->Ebizmarts_Mandrill->version, '1.0.4', '>'))
97
  && Mage::helper('ebizmarts_mandrill')->useTransactionalService()) {
 
98
  if(!$isFilter) {
99
  $stores = Mage::app()->getStores();
100
- $__particular = array('sent' => 0, 'soft_bounces' => 0,'hard_bounces'=>0,'unique_opens'=>0,'unique_clicks'=>0);
101
  foreach($stores as $__store => $val) {
102
  $storeid = Mage::app()->getStore($__store)->getId();
103
  $aux = $this->__getMandrillStatistics($period,$storeid);
104
- $__particular['sent'] += $aux['sent'];
105
- $__particular['soft_bounces'] += $aux['soft_bounces'];
106
- $__particular['hard_bounces'] += $aux['hard_bounces'];
107
- $__particular['unique_opens'] += $aux['unique_opens'];
108
- $__particular['unique_clicks'] += $aux['unique_clicks'];
 
 
109
  }
110
  $particular = $__particular;
111
  }
112
  else {
113
- $particular = $this->__getMandrillStatistics($period,$this->getRequest()->getParam('store'));
 
 
114
  }
115
  // add totals for emails
116
  if($particular) {
@@ -191,6 +196,9 @@ class Ebizmarts_AbandonedCart_Block_Adminhtml_Dashboard_Totals extends Mage_Admi
191
  return $general;
192
 
193
  }
 
 
 
194
  $stats = (array)$general['stats'];
195
  $particular = (array)$stats[$index];
196
  return $particular;
95
  if(Mage::helper('core')->isModuleEnabled('Ebizmarts_Mandrill')
96
  && (version_compare(Mage::getConfig()->getNode()->modules->Ebizmarts_Mandrill->version, '1.0.4', '>'))
97
  && Mage::helper('ebizmarts_mandrill')->useTransactionalService()) {
98
+ $particular = array('sent' => 0, 'soft_bounces' => 0,'hard_bounces'=>0,'unique_opens'=>0,'unique_clicks'=>0);
99
  if(!$isFilter) {
100
  $stores = Mage::app()->getStores();
101
+ $__particular = $particular;
102
  foreach($stores as $__store => $val) {
103
  $storeid = Mage::app()->getStore($__store)->getId();
104
  $aux = $this->__getMandrillStatistics($period,$storeid);
105
+ if($aux && !isset($aux['status'])) {
106
+ $__particular['sent'] += $aux['sent'];
107
+ $__particular['soft_bounces'] += $aux['soft_bounces'];
108
+ $__particular['hard_bounces'] += $aux['hard_bounces'];
109
+ $__particular['unique_opens'] += $aux['unique_opens'];
110
+ $__particular['unique_clicks'] += $aux['unique_clicks'];
111
+ }
112
  }
113
  $particular = $__particular;
114
  }
115
  else {
116
+ if(!isset($this->__getMandrillStatistics($period,$this->getRequest()->getParam('store'))['status'])){
117
+ $particular = $this->__getMandrillStatistics($period,$this->getRequest()->getParam('store'));
118
+ }
119
  }
120
  // add totals for emails
121
  if($particular) {
196
  return $general;
197
 
198
  }
199
+ if(!isset($general['stats'])){
200
+ return false;
201
+ }
202
  $stats = (array)$general['stats'];
203
  $particular = (array)$stats[$index];
204
  return $particular;
app/code/community/Ebizmarts/AbandonedCart/Model/Cron.php CHANGED
@@ -168,7 +168,7 @@ class Ebizmarts_AbandonedCart_Model_Cron
168
  if($updatedAtDiff >= $diff){
169
 
170
  $mailsubject = $this->_getMailSubject($run, $store);
171
- $templateId = $this->_getTemplateId($run);
172
  if($sendcoupon && $run+1 == $sendcoupondays)
173
  {
174
  //$templateId = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::EMAIL_TEMPLATE_XML_PATH);
@@ -320,24 +320,24 @@ class Ebizmarts_AbandonedCart_Model_Cron
320
  * @param $currentCount
321
  * @return mixed
322
  */
323
- protected function _getTemplateId($currentCount){
324
 
325
  $ret = NULL;
326
  switch($currentCount){
327
  case 0:
328
- $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::FIRST_EMAIL_TEMPLATE_XML_PATH);
329
  break;
330
  case 1:
331
- $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::SECOND_EMAIL_TEMPLATE_XML_PATH);
332
  break;
333
  case 2:
334
- $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::THIRD_EMAIL_TEMPLATE_XML_PATH);
335
  break;
336
  case 3:
337
- $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::FOURTH_EMAIL_TEMPLATE_XML_PATH);
338
  break;
339
  case 4:
340
- $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::FIFTH_EMAIL_TEMPLATE_XML_PATH);
341
  break;
342
  }
343
  return $ret;
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);
320
  * @param $currentCount
321
  * @return mixed
322
  */
323
+ protected function _getTemplateId($currentCount, $store){
324
 
325
  $ret = NULL;
326
  switch($currentCount){
327
  case 0:
328
+ $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::FIRST_EMAIL_TEMPLATE_XML_PATH, $store);
329
  break;
330
  case 1:
331
+ $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::SECOND_EMAIL_TEMPLATE_XML_PATH, $store);
332
  break;
333
  case 2:
334
+ $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::THIRD_EMAIL_TEMPLATE_XML_PATH, $store);
335
  break;
336
  case 3:
337
+ $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::FOURTH_EMAIL_TEMPLATE_XML_PATH, $store);
338
  break;
339
  case 4:
340
+ $ret = Mage::getStoreConfig(Ebizmarts_AbandonedCart_Model_Config::FIFTH_EMAIL_TEMPLATE_XML_PATH, $store);
341
  break;
342
  }
343
  return $ret;
app/code/community/Ebizmarts/AbandonedCart/Model/Resource/Order/Collection.php CHANGED
@@ -79,6 +79,16 @@ class Ebizmarts_AbandonedCart_Model_Resource_Order_Collection extends Mage_Repor
79
  . ' - IFNULL(main_table.base_subtotal_canceled, 0) - ABS(IFNULL(main_table.base_discount_amount, 0))'
80
  . ' + IFNULL(main_table.base_discount_refunded, 0)';
81
  }
 
 
 
 
 
 
 
 
 
 
82
  else {
83
  $expr = sprintf('%s - %s - %s - (%s - %s - %s)',
84
  $adapter->getIfNullSql('main_table.base_total_invoiced', 0),
79
  . ' - IFNULL(main_table.base_subtotal_canceled, 0) - ABS(IFNULL(main_table.base_discount_amount, 0))'
80
  . ' + IFNULL(main_table.base_discount_refunded, 0)';
81
  }
82
+ else if(version_compare(Mage::getVersion(), '1.6.0.0', '<')) {
83
+ $expr = sprintf('%s - %s - %s - (%s - %s - %s)',
84
+ "IFNULL('main_table.base_total_invoiced', 0)",
85
+ "IFNULL('main_table.base_tax_invoiced', 0)",
86
+ "IFNULL('main_table.base_shipping_invoiced', 0)",
87
+ "IFNULL('main_table.base_total_refunded', 0)",
88
+ "IFNULL('main_table.base_tax_refunded', 0)",
89
+ "IFNULL('main_table.base_shipping_refunded', 0)"
90
+ );
91
+ }
92
  else {
93
  $expr = sprintf('%s - %s - %s - (%s - %s - %s)',
94
  $adapter->getIfNullSql('main_table.base_total_invoiced', 0),
app/code/community/Ebizmarts/AbandonedCart/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Ebizmarts_AbandonedCart>
13
- <version>0.1.27</version>
14
  </Ebizmarts_AbandonedCart>
15
  </modules>
16
  <global>
10
  <config>
11
  <modules>
12
  <Ebizmarts_AbandonedCart>
13
+ <version>0.1.28</version>
14
  </Ebizmarts_AbandonedCart>
15
  </modules>
16
  <global>
app/code/community/Ebizmarts/Autoresponder/Helper/Data.php CHANGED
@@ -48,7 +48,7 @@ class Ebizmarts_Autoresponder_Helper_Data extends Mage_Core_Helper_Abstract {
48
  $types = array();
49
  $storeId = Mage::app()->getStore()->getStoreId();
50
  $lists = Mage::getConfig()->getNode('default/ebizmarts_autoresponder')->asArray();
51
- $lists['abandonedcart'] = array('listname'=>'Abandoned Carts List');
52
  foreach ($lists as $key =>$data) {
53
  if(isset($data['listname'])) {
54
  if(Mage::getStoreConfig("ebizmarts_autoresponder/$key/active",$storeId)||($key=='abandonedcart'&&Mage::getStoreConfig("ebizmarts_abandonedcart/general/active",$storeId))) {
@@ -82,4 +82,17 @@ class Ebizmarts_Autoresponder_Helper_Data extends Mage_Core_Helper_Abstract {
82
  return $allowGuests;
83
  }
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
48
  $types = array();
49
  $storeId = Mage::app()->getStore()->getStoreId();
50
  $lists = Mage::getConfig()->getNode('default/ebizmarts_autoresponder')->asArray();
51
+ $lists['abandonedcart'] = array('listname'=> Mage::helper('ebizmarts_abandonedcart')->__('Abandoned Carts List'));
52
  foreach ($lists as $key =>$data) {
53
  if(isset($data['listname'])) {
54
  if(Mage::getStoreConfig("ebizmarts_autoresponder/$key/active",$storeId)||($key=='abandonedcart'&&Mage::getStoreConfig("ebizmarts_abandonedcart/general/active",$storeId))) {
82
  return $allowGuests;
83
  }
84
 
85
+ public function getCanShowJs(){
86
+ $storeId = Mage::app()->getStore()->getStoreId();
87
+ if(Mage::getStoreConfig('ebizmarts_autoresponder/general/active', $storeId) && Mage::getStoreConfig('ebizmarts_autoresponder/visitedproducts/active', $storeId)) {
88
+ if(Mage::getStoreConfig('web/url/use_store', $storeId)){
89
+ return 'ebizmarts/autoresponders/visitedproductsstorecodes.js';
90
+ }else{
91
+ return 'ebizmarts/autoresponders/visitedproducts.js';
92
+ }
93
+
94
+ }
95
+
96
+ }
97
+
98
  }
app/code/community/Ebizmarts/Autoresponder/Model/Cron.php CHANGED
@@ -13,7 +13,7 @@ class Ebizmarts_Autoresponder_Model_Cron
13
  /**
14
  *
15
  */
16
- public function process()
17
  {
18
  $allStores = Mage::app()->getStores();
19
  foreach($allStores as $storeId => $val)
@@ -107,14 +107,8 @@ class Ebizmarts_Autoresponder_Model_Cron
107
  $customerGroupsCoupon = explode(",",Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_CUSTOMER_COUPON, $storeId));
108
 
109
 
110
- $adapter = Mage::getSingleton('core/resource')->getConnection('sales_read');
111
- $expr = sprintf('DATE_SUB(%s, %s)', $adapter->quote(now()), $this->_getIntervalUnitSql($days, 'DAY'));
112
- $from = new Zend_Db_Expr($expr);
113
- $expr = sprintf('DATE_SUB(%s, %s)', $adapter->quote(now()), $this->_getIntervalUnitSql($days-1, 'DAY'));
114
- $to = new Zend_Db_Expr($expr);
115
  $collection = Mage::getModel('customer/customer')->getCollection();
116
- $date = date("Y-m-d H:i:s");
117
- $date2 = date("Y-m-d H:i:s",strtotime(" - $days days"));
118
  $month = date("m",strtotime($date2));
119
  $day = date("d",strtotime($date2));
120
  $moreselect = "MONTH(at_dob.value) = $month AND DAY(at_dob.value) = $day";
@@ -529,7 +523,7 @@ class Ebizmarts_Autoresponder_Model_Cron
529
 
530
  //@TODO check if this next two validations can be replaced with isSaleable()
531
  // Validate if Product has Stock
532
- if(!$_stock->getData('is_in_stock')) {
533
  Mage::helper('ebizmarts_autoresponder')->log('SKIPPED - Product ID '. $_product->getId() .' is not in stock yet.');
534
  continue;
535
  }
13
  /**
14
  *
15
  */
16
+ public function autoresponder()
17
  {
18
  $allStores = Mage::app()->getStores();
19
  foreach($allStores as $storeId => $val)
107
  $customerGroupsCoupon = explode(",",Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::BIRTHDAY_CUSTOMER_COUPON, $storeId));
108
 
109
 
 
 
 
 
 
110
  $collection = Mage::getModel('customer/customer')->getCollection();
111
+ $date2 = date("Y-m-d H:i:s",strtotime(" + $days days"));
 
112
  $month = date("m",strtotime($date2));
113
  $day = date("d",strtotime($date2));
114
  $moreselect = "MONTH(at_dob.value) = $month AND DAY(at_dob.value) = $day";
523
 
524
  //@TODO check if this next two validations can be replaced with isSaleable()
525
  // Validate if Product has Stock
526
+ if(!$_stock->getData('is_in_stock') || $_stock->getData('qty') == 0) {
527
  Mage::helper('ebizmarts_autoresponder')->log('SKIPPED - Product ID '. $_product->getId() .' is not in stock yet.');
528
  continue;
529
  }
app/code/community/Ebizmarts/Autoresponder/Model/EventObserver.php CHANGED
@@ -61,6 +61,7 @@ class Ebizmarts_Autoresponder_Model_EventObserver
61
  if($o->getEvent()->getControllerAction()->getFullActionName() == 'review_product_post') {
62
  Mage::dispatchEvent("review_product_post_after", array('request' => $o->getControllerAction()->getRequest()));
63
  }
 
64
  }
65
  public function reviewProductPostAfter(Varien_Event_Observer $o)
66
  {
@@ -97,6 +98,7 @@ class Ebizmarts_Autoresponder_Model_EventObserver
97
  }
98
  }
99
  }
 
100
  }
101
 
102
  protected function _generateReviewCoupon($reviewData)
61
  if($o->getEvent()->getControllerAction()->getFullActionName() == 'review_product_post') {
62
  Mage::dispatchEvent("review_product_post_after", array('request' => $o->getControllerAction()->getRequest()));
63
  }
64
+ return $o;
65
  }
66
  public function reviewProductPostAfter(Varien_Event_Observer $o)
67
  {
98
  }
99
  }
100
  }
101
+ return $o;
102
  }
103
 
104
  protected function _generateReviewCoupon($reviewData)
app/code/community/Ebizmarts/Autoresponder/controllers/AutoresponderController.php CHANGED
@@ -84,21 +84,17 @@ class Ebizmarts_Autoresponder_AutoresponderController extends Mage_Core_Controll
84
  {
85
  $params = $this->getRequest()->getParams();
86
  $storeId = Mage::app()->getStore()->getStoreId();
87
- if(Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::VISITED_ACTIVE,$storeId)&&Mage::getSingleton('customer/session')->isLoggedIn()) {
88
- if(isset($params['product_id'])) {
89
- $product = Mage::getModel('catalog/product')->load($params['product_id']);
90
- $mark = $product->getAttributeText('ebizmarts_mark_visited');
91
- if($mark == 'Yes') {
92
- $resp['time'] = Mage::getStoreConfig(Ebizmarts_Autoresponder_Model_Config::VISITED_TIME,$storeId);
93
- }
94
- else {
95
- $resp['time'] = -1;
96
- }
97
  }
98
  }
99
- else {
100
- $resp['time'] = -1;
101
- }
102
  $this->getResponse()->setHeader('Content-type', 'application/json');
103
  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($resp));
104
  return;
84
  {
85
  $params = $this->getRequest()->getParams();
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);
92
+ }
93
+ else {
94
+ $resp['time'] = -1;
 
 
95
  }
96
  }
97
+
 
 
98
  $this->getResponse()->setHeader('Content-type', 'application/json');
99
  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($resp));
100
  return;
app/code/community/Ebizmarts/Autoresponder/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Ebizmarts_Autoresponder>
13
- <version>0.1.7</version>
14
  </Ebizmarts_Autoresponder>
15
  </modules>
16
  <global>
@@ -241,7 +241,7 @@
241
  <cron_expr>0 1 * * *</cron_expr>
242
  </schedule>
243
  <run>
244
- <model>ebizmarts_autoresponder/cron::process</model>
245
  </run>
246
  </ebizmarts_autoresponder>
247
  <ebizmarts_autoresponder_backtostock_cleanup>
10
  <config>
11
  <modules>
12
  <Ebizmarts_Autoresponder>
13
+ <version>0.1.8</version>
14
  </Ebizmarts_Autoresponder>
15
  </modules>
16
  <global>
241
  <cron_expr>0 1 * * *</cron_expr>
242
  </schedule>
243
  <run>
244
+ <model>ebizmarts_autoresponder/cron::autoresponder</model>
245
  </run>
246
  </ebizmarts_autoresponder>
247
  <ebizmarts_autoresponder_backtostock_cleanup>
app/code/community/Ebizmarts/MageMonkey/Block/Lists.php CHANGED
@@ -223,64 +223,83 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
223
  * @param array $list List data from MC
224
  * @return string HTML code
225
  */
226
- public function renderGroup($group, $list)
227
  {
228
-
229
  $fieldType = $group['form_field'];
230
 
231
- if($this->_getEmail()){
 
232
  $memberInfo = $this->_memberInfo($list['id']);
233
  } else {
234
  $memberInfo['success'] = 0;
235
  }
236
 
237
  $myGroups = array();
238
- if($memberInfo['success'] == 1){
239
- $groupings = $memberInfo['data'][0]['merges']['GROUPINGS'];
240
-
241
- foreach($groupings as $_group){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
 
243
- if(!empty($_group['groups'])){
244
- if($fieldType == 'checkboxes'){
245
 
246
- $currentGroup = str_replace('\\,','%C%',$_group['groups']);
247
- $currentGroupArray = explode(', ', $currentGroup);
248
 
249
- $myGroups[$_group['id']] = str_replace('%C%',',', $currentGroupArray);
250
 
251
- }elseif($fieldType == 'radio'){
 
 
 
252
 
253
- if(strpos($_group['groups'], ',')) {
254
- $currentGroup = str_replace('\\,','%C%',$_group['groups']);
255
- $currentGroupArray = explode(', ', $currentGroup);
256
- $collapsed = str_replace('%C%',',', $currentGroupArray);
 
 
 
 
257
 
258
- if(is_array($collapsed) && isset($collapsed[0])) {
259
- $myGroups[$_group['id']] = array($collapsed[0]);
260
  } else {
261
- $myGroups[$_group['id']] = array($collapsed);
262
- }
263
- } else {
264
- $myGroups[$_group['id']] = array($_group['groups']);
265
- }
266
-
267
- }else{
268
- if(strpos($_group['groups'], ',')) {
269
- $currentGroup = str_replace('\\,','%C%',$_group['groups']);
270
- $currentGroupArray = explode(', ', $currentGroup);
271
- $collapsed = str_replace('%C%',',', $currentGroupArray);
 
 
272
 
273
- if(is_array($collapsed) && isset($collapsed[0])) {
274
- $myGroups[$_group['id']] = array($collapsed[0]);
275
- } else {
276
- $myGroups[$_group['id']] = array($collapsed);
277
  }
278
- } else {
279
- $myGroups[$_group['id']] = array($_group['groups']);
280
- }
281
 
 
282
  }
283
-
284
  }
285
  }
286
  }
@@ -307,7 +326,7 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
307
  $object->setForm($this->getForm());
308
 
309
  //Check/select values
310
- if(isset($myGroups[$group['id']])){
311
  $object->setValue($myGroups[$group['id']]);
312
  }else{
313
  $object->setValue(array());
@@ -322,7 +341,13 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
322
  }
323
 
324
  foreach($group['groups'] as $g){
325
- $options [$g['name']] = $g['name'];
 
 
 
 
 
 
326
  }
327
 
328
  if(method_exists('Varien_Data_Form_Element_Checkboxes', 'addElementValues')){
@@ -340,7 +365,13 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
340
 
341
  $options = array();
342
  foreach($group['groups'] as $g){
343
- $options [] = new Varien_Object(array('value' => $g['name'], 'label' => $g['name']));
 
 
 
 
 
 
344
  }
345
 
346
  $object->setName($this->_htmlGroupName($list, $group));
@@ -363,6 +394,45 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
363
 
364
  }
365
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  /**
367
  * Retrieve email from Customer object in session
368
  *
@@ -383,6 +453,15 @@ class Ebizmarts_MageMonkey_Block_Lists extends Mage_Core_Block_Template
383
  {
384
  $myLists = $this->getSubscribedLists();
385
 
 
 
 
 
 
 
 
 
 
386
  $checkbox = new Varien_Data_Form_Element_Checkbox;
387
  $checkbox->setForm($this->getForm());
388
  $checkbox->setHtmlId('list-' . $list['id']);
223
  * @param array $list List data from MC
224
  * @return string HTML code
225
  */
226
+ public function renderGroup($group, $list, $checked = -1)
227
  {
 
228
  $fieldType = $group['form_field'];
229
 
230
+ $email = $this->_getEmail();
231
+ if($email){
232
  $memberInfo = $this->_memberInfo($list['id']);
233
  } else {
234
  $memberInfo['success'] = 0;
235
  }
236
 
237
  $myGroups = array();
238
+ //if checked = 1 all groups checked elseif checked == -1 registered groups checked elseif checked == 0 none checked
239
+ if($checked == 1){
240
+ foreach($group['groups'] as $g){
241
+ $myGroups[$group['id']][] = $g['name'];
242
+ }
243
+ }elseif($checked == -1) {
244
+ if($memberInfo['success'] == 1){
245
+ if(isset($memberInfo['data'][0]['merges']['GROUPINGS'])) {
246
+ $groupings = $memberInfo['data'][0]['merges']['GROUPINGS'];
247
+ }
248
+ $alreadyOnDb = Mage::getSingleton('monkey/asyncsubscribers')->getCollection()
249
+ ->addFieldToFilter('lists', $list['id'])
250
+ ->addFieldToFilter('email', $email)
251
+ ->addFieldToFilter('processed', 0);
252
+ if(count($alreadyOnDb) > 0){
253
+ foreach($alreadyOnDb as $listToAdd) {
254
+ $mapFields = unserialize($listToAdd->getMapfields());
255
+ $groupings = $mapFields['GROUPINGS'];
256
+ }
257
+ }
258
+ if(isset($groupings)) {
259
+ foreach ($groupings as $_group) {
260
+ if (!empty($_group['groups'])) {
261
+ if ($fieldType == 'checkboxes') {
262
 
263
+ $currentGroup = str_replace('\\,', '%C%', $_group['groups']);
264
+ $currentGroupArray = explode(', ', $currentGroup);
265
 
266
+ $myGroups[$_group['id']] = str_replace('%C%', ',', $currentGroupArray);
 
267
 
268
+ } elseif ($fieldType == 'radio') {
269
 
270
+ if (strpos($_group['groups'], ',')) {
271
+ $currentGroup = str_replace('\\,', '%C%', $_group['groups']);
272
+ $currentGroupArray = explode(', ', $currentGroup);
273
+ $collapsed = str_replace('%C%', ',', $currentGroupArray);
274
 
275
+ if (is_array($collapsed) && isset($collapsed[0])) {
276
+ $myGroups[$_group['id']] = array($collapsed[0]);
277
+ } else {
278
+ $myGroups[$_group['id']] = array($collapsed);
279
+ }
280
+ } else {
281
+ $myGroups[$_group['id']] = array($_group['groups']);
282
+ }
283
 
 
 
284
  } else {
285
+ if (strpos($_group['groups'], ',')) {
286
+ $currentGroup = str_replace('\\,', '%C%', $_group['groups']);
287
+ $currentGroupArray = explode(', ', $currentGroup);
288
+ $collapsed = str_replace('%C%', ',', $currentGroupArray);
289
+
290
+ if (is_array($collapsed) && isset($collapsed[0])) {
291
+ $myGroups[$_group['id']] = array($collapsed[0]);
292
+ } else {
293
+ $myGroups[$_group['id']] = array($collapsed);
294
+ }
295
+ } else {
296
+ $myGroups[$_group['id']] = array($_group['groups']);
297
+ }
298
 
 
 
 
 
299
  }
 
 
 
300
 
301
+ }
302
  }
 
303
  }
304
  }
305
  }
326
  $object->setForm($this->getForm());
327
 
328
  //Check/select values
329
+ if(isset($myGroups[$group['id']]) && !$checked == 0 || $checked == 1){
330
  $object->setValue($myGroups[$group['id']]);
331
  }else{
332
  $object->setValue(array());
341
  }
342
 
343
  foreach($group['groups'] as $g){
344
+ if($this->helper('monkey')->config('list') == $list['id']){
345
+ if($this->_groupAllowed($g['name'])){
346
+ $options [$g['name']] = $g['name'];
347
+ }
348
+ }else{
349
+ $options [$g['name']] = $g['name'];
350
+ }
351
  }
352
 
353
  if(method_exists('Varien_Data_Form_Element_Checkboxes', 'addElementValues')){
365
 
366
  $options = array();
367
  foreach($group['groups'] as $g){
368
+ if($this->helper('monkey')->config('list') == $list['id']) {
369
+ if ($this->_groupAllowed($g['name'])) {
370
+ $options [] = new Varien_Object(array('value' => $g['name'], 'label' => $g['name']));
371
+ }
372
+ }else{
373
+ $options [] = new Varien_Object(array('value' => $g['name'], 'label' => $g['name']));
374
+ }
375
  }
376
 
377
  $object->setName($this->_htmlGroupName($list, $group));
394
 
395
  }
396
 
397
+ /**
398
+ * Return element id for group to be added to the post on checkout
399
+ *
400
+ * @param $group
401
+ * @param bool $default
402
+ * @return null|string
403
+ */
404
+ public function getGroupId($group, $default = FALSE){
405
+ $ret = "interest-group_".$group['name'];
406
+ if($default){
407
+ if(!$this->_groupAllowed($group['name'])){
408
+ $ret = null;
409
+ }
410
+ }
411
+ return $ret;
412
+ }
413
+
414
+ /**
415
+ * Return if group is selected in MailChimp configuration.
416
+ *
417
+ * @param $groupName
418
+ * @return bool
419
+ */
420
+ protected function _groupAllowed($groupName)
421
+ {
422
+ $allowedGroups = $this->helper('monkey')->config('cutomergroup');
423
+ $allowedGroups = explode(',',$allowedGroups);
424
+ $ret = false;
425
+ if(isset($allowedGroups)) {
426
+ foreach ($allowedGroups as $group) {
427
+ $group = explode('_', $group);
428
+ if (isset($group[1]) && $group[1] == $groupName) {
429
+ $ret = true;
430
+ }
431
+ }
432
+ }
433
+ return $ret;
434
+ }
435
+
436
  /**
437
  * Retrieve email from Customer object in session
438
  *
453
  {
454
  $myLists = $this->getSubscribedLists();
455
 
456
+ //if is on database it gets checked
457
+ $alreadyOnList = Mage::getSingleton('monkey/asyncsubscribers')->getCollection()
458
+ ->addFieldToFilter('lists', $list['id'])
459
+ ->addFieldToFilter('email', $this->_getEmail())
460
+ ->addFieldToFilter('processed', 0);
461
+ if(count($alreadyOnList) > 0){
462
+ $myLists[] = $list['id'];
463
+ }
464
+
465
  $checkbox = new Varien_Data_Form_Element_Checkbox;
466
  $checkbox->setForm($this->getForm());
467
  $checkbox->setHtmlId('list-' . $list['id']);
app/code/community/Ebizmarts/MageMonkey/Helper/Data.php CHANGED
@@ -197,8 +197,12 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
197
  $store = is_null($store) ? Mage::app()->getStore() : $store;
198
 
199
  $configscope = Mage::app()->getRequest()->getParam('store');
200
- if( $configscope && ($configscope !== 'undefined') ){
201
- $store = $configscope;
 
 
 
 
202
  }
203
 
204
  return Mage::getStoreConfig("monkey/general/$value", $store);
@@ -471,7 +475,7 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
471
  ->setPageSize(1)
472
  ->getFirstItem();
473
  if ( $last_order->getId() ){
474
- $merge_vars[$key] = Mage::helper('core')->formatDate($last_order->getCreatedAt());
475
  }
476
 
477
  break;
@@ -584,6 +588,132 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
584
  return $merge_vars;
585
  }
586
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587
  /**
588
  * Register on Magento's registry GUEST customer data for MergeVars for on checkout subscribe
589
  *
@@ -738,30 +868,126 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
738
  return $errors;
739
  }
740
 
741
- /**
742
- * Handle additional lists subscription on form posts like Customer Create Account
743
- *
744
- * @param Mage_Customer_Model_Customer $customer
745
- */
746
- public function additionalListsSubscription($customer = null, $post = null)
747
- {
748
- $request = Mage::app()->getRequest();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
749
 
750
- if( !$request->isPost() && is_null($post) ){
751
- return false;
752
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
753
 
754
- $allowedPost = array('/customer/account/createpost/');
755
- $requestString = $request->getRequestString();
 
 
 
756
 
757
- if( in_array($requestString, $allowedPost) OR !is_null($post) ){
758
- if(!is_null($post)){
759
- $request = $post;
760
- }
761
- $this->handlePost($request, $customer->getEmail());
762
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
763
 
764
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
765
 
766
  /**
767
  * Handle subscription posts, (additional lists)
@@ -775,13 +1001,12 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
775
  //<state> param is an html serialized field containing the default form state
776
  //before submission, we need to parse it as a request in order to save it to $odata and process it
777
  parse_str($request->getPost('state'), $odata);
778
- $isConfirmNeed = FALSE;
779
  $curlists = (TRUE === array_key_exists('list', $odata)) ? $odata['list'] : array();
780
  $lists = $request->getPost('list', array());
781
 
782
  $defaultList = $this->getDefaultList(Mage::app()->getStore());
783
 
784
- $api = Mage::getSingleton('monkey/api');
785
  $loggedIn = Mage::helper('customer')->isLoggedIn();
786
  if($loggedIn){
787
  $customer = Mage::helper('customer')->getCustomer();
@@ -790,28 +1015,37 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
790
  }
791
  $email = $guestEmail ? $guestEmail : $customer->getEmail();
792
  if( !empty($curlists) ){
793
-
794
  //Handle Unsubscribe and groups update actions
795
  foreach($curlists as $listId => $list){
796
 
797
  if(FALSE === array_key_exists($listId, $lists)){
798
 
799
  //Unsubscribe Email
800
- if($defaultList == $listId){
801
-
802
- $item = Mage::getModel('monkey/monkey')->loadByEmail($email);
803
- if(!$item->getId()){
804
- $item = Mage::getModel('newsletter/subscriber')
805
- ->loadByEmail($email);
806
- }
807
- if($item->getSubscriberEmail()){
808
- $item->unsubscribe();
809
- }
810
 
811
- //Unsubscribe Email
812
- $api->listUnsubscribe($listId, $email);
 
 
 
 
 
813
  }
814
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
815
  }else{
816
 
817
  $groupings = $lists[$listId];
@@ -840,42 +1074,45 @@ class Ebizmarts_MageMonkey_Helper_Data extends Mage_Core_Helper_Abstract
840
 
841
  }
842
 
843
- //Subscribe to new lists
844
- if (is_array($lists) && is_array($curlists)) {
845
- $subscribe = array_diff_key($lists, $curlists);
846
- if (!empty($subscribe)) {
847
-
848
- foreach ($subscribe as $listId => $slist) {
849
-
850
- if (!isset($slist['subscribed'])) {
851
- continue;
852
- }
853
-
854
- $groupings = $lists[$listId];
855
- unset($groupings['subscribed']);
856
- if (!Mage::helper('monkey')->isAdmin() && (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, Mage::app()->getStore()->getId()) == 1)) {
857
- $isConfirmNeed = TRUE;
858
- }
859
- if ($defaultList == $listId) {
860
- $subscriber = Mage::getModel('newsletter/subscriber');
861
- $subscriber->setListGroups($groupings);
862
- $subscriber->setMcListId($listId);
863
- $subscriber->setMcStoreId(Mage::app()->getStore()->getId());
864
- $subscriber->setImportMode(TRUE);
865
- $subscriber->subscribe($email);
866
- } else {
867
- $customer->setListGroups($groupings);
868
- $customer->setMcListId($listId);
869
- $mergeVars = Mage::helper('monkey')->getMergeVars($customer);
870
- if(!Mage::getSingleton('core/session')->getMonkeyCheckout(TRUE) || Mage::getStoreConfig('monkey/general/checkout_async') != 1) {
871
- $api->listSubscribe($listId, $email, $mergeVars, 'html', $isConfirmNeed);
872
- }
873
 
874
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
875
 
876
  }
877
-
878
  }
879
  }
 
880
  }
 
 
 
 
 
 
 
 
 
 
881
  }
197
  $store = is_null($store) ? Mage::app()->getStore() : $store;
198
 
199
  $configscope = Mage::app()->getRequest()->getParam('store');
200
+ if( $configscope && ($configscope !== 'undefined') && !is_array($configscope) ){
201
+ if (is_array($configscope) && isset($configscope['code'])) {
202
+ $store = $configscope['code'];
203
+ } else {
204
+ $store = $configscope;
205
+ }
206
  }
207
 
208
  return Mage::getStoreConfig("monkey/general/$value", $store);
475
  ->setPageSize(1)
476
  ->getFirstItem();
477
  if ( $last_order->getId() ){
478
+ $merge_vars[$key] = date('m/d/Y', strtotime($last_order->getCreatedAt()));
479
  }
480
 
481
  break;
588
  return $merge_vars;
589
  }
590
 
591
+ /**
592
+ * Get Mergevars
593
+ *
594
+ * @param null|Mage_Customer_Model_Customer $object
595
+ * @param bool $includeEmail
596
+ * @return array
597
+ */
598
+ public function mergeVars($object = NULL, $includeEmail = FALSE, $currentList = NULL)
599
+ {
600
+
601
+ //Initialize as GUEST customer
602
+ $customer = new Varien_Object;
603
+
604
+ $regCustomer = Mage::registry('current_customer');
605
+ $guestCustomer = Mage::registry('mc_guest_customer');
606
+
607
+ if (Mage::helper('customer')->isLoggedIn()) {
608
+ $customer = Mage::helper('customer')->getCustomer();
609
+ } elseif ($regCustomer) {
610
+ $customer = $regCustomer;
611
+ } elseif ($guestCustomer) {
612
+ $customer = $guestCustomer;
613
+ } else {
614
+ if (is_null($object)) {
615
+ $customer->setEmail($object->getSubscriberEmail())
616
+ ->setStoreId($object->getStoreId());
617
+ } else {
618
+ $customer = $object;
619
+ }
620
+
621
+ }
622
+
623
+ if (is_object($object)) {
624
+ if ($object->getListGroups()) {
625
+ $customer->setListGroups($object->getListGroups());
626
+ }
627
+
628
+ if ($object->getMcListId()) {
629
+ $customer->setMcListId($object->getMcListId());
630
+ }
631
+ }
632
+
633
+ $mergeVars = Mage::helper('monkey')->getMergeVars($customer, $includeEmail);
634
+ // add groups
635
+ $monkeyPost = Mage::getSingleton('core/session')->getMonkeyPost();
636
+ $request = Mage::app()->getRequest();
637
+ $post = $request->getPost();
638
+ if ($monkeyPost) {
639
+ $post = unserialize($monkeyPost);
640
+ }
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());
649
+ if ($currentList && ($currentList != $defaultList || $canChangeGroups) && isset($post['list'][$currentList])) {
650
+ $subscribeGroups = array(0 => array());
651
+ foreach ($post['list'][$currentList] as $toGroups => $value) {
652
+ if (is_numeric($toGroups)) {
653
+ $subscribeGroups[0]['id'] = $toGroups;
654
+ $subscribeGroups[0]['groups'] = implode(', ', array_unique($post['list'][$currentList][$subscribeGroups[0]['id']]));
655
+ }
656
+ }
657
+ $groups = NULL;
658
+ } elseif($currentList == $defaultList) {
659
+ $groups = Mage::getStoreConfig('monkey/general/cutomergroup', $object->getStoreId());
660
+ $groups = explode(",", $groups);
661
+ if (isset($groups[0]) && $groups[0]) {
662
+ $subscribeGroups = array();
663
+ $_prevGroup = null;
664
+ $checkboxes = array();
665
+ foreach ($groups as $group) {
666
+ $item = explode("_", $group);
667
+ if($item[0]) {
668
+ $currentGroup = $item[0];
669
+ if ($currentGroup == $_prevGroup || $_prevGroup == null) {
670
+ $checkboxes[] = $item[1];
671
+ $_prevGroup = $currentGroup;
672
+ } else {
673
+ $subscribeGroups[] = array('id' => $_prevGroup, "groups" => str_replace('%C%', '\\,', implode(', ', $checkboxes)));
674
+ $checkboxes = array();
675
+ $_prevGroup = $currentGroup;
676
+ $checkboxes[] = $item[1];
677
+ }
678
+ }
679
+ }
680
+ if($currentGroup) {
681
+ $subscribeGroups[] = array('id' => $currentGroup, "groups" => str_replace('%C%', '\\,', implode(', ', $checkboxes)));
682
+ }
683
+
684
+ }
685
+ }
686
+ if (isset($subscribeGroups[0]['id']) && $subscribeGroups[0]['id'] != -1) {
687
+ $mergeVars["GROUPINGS"] = $subscribeGroups;
688
+ }
689
+
690
+ $force = Mage::getStoreConfig('monkey/general/checkout_subscribe', $object->getStoreId());
691
+ $map = Mage::getStoreConfig('monkey/general/markfield', $object->getStoreId());
692
+ if (isset($post['magemonkey_subscribe']) && $map != "") {
693
+ $listsChecked = explode(',', $post['magemonkey_subscribe']);
694
+ $hasClicked = in_array($currentList, $listsChecked);
695
+ if ($hasClicked && $force != 3) {
696
+ $mergeVars[$map] = "Yes";
697
+ } else {
698
+ $mergeVars[$map] = "No";
699
+ }
700
+ }elseif(Mage::getSingleton('core/session')->getIsOneStepCheckout()){
701
+ if(isset($post['subscribe_newsletter']) || isset($request->getPost()['subscribe_newsletter']) || Mage::getSingleton('core/session')->getIsHandleSubscriber()) {
702
+ $mergeVars[$map] = "Yes";
703
+ }elseif(Mage::helper('monkey')->config('checkout_subscribe') > 2){
704
+ $mergeVars[$map] = "No";
705
+ }
706
+ }elseif($request->getActionName() == 'saveOrder' && $request->getControllerModule() == 'onepage' && $request->getModuleName() == 'checkout') {
707
+ $mergeVars[$map] = "No";
708
+ }
709
+ }else{
710
+ $map = Mage::getStoreConfig('monkey/general/markfield', $object->getStoreId());
711
+ $mergeVars[$map] = "Yes";
712
+ }
713
+
714
+ return $mergeVars;
715
+ }
716
+
717
  /**
718
  * Register on Magento's registry GUEST customer data for MergeVars for on checkout subscribe
719
  *
868
  return $errors;
869
  }
870
 
871
+ // /**
872
+ // * Handle additional lists subscription on form posts like Customer Create Account
873
+ // *
874
+ // * @param Mage_Customer_Model_Customer $customer
875
+ // */
876
+ // public function additionalListsSubscription($customer, $post = null)
877
+ // {
878
+ // $request = Mage::app()->getRequest();
879
+ //
880
+ // if( !$request->isPost() && is_null($post) ){
881
+ // return false;
882
+ // }
883
+ //
884
+ // $allowedPost = array('/customer/account/createpost/');
885
+ // $requestString = $request->getRequestString();
886
+ //
887
+ // if( in_array($requestString, $allowedPost) OR !is_null($post) ){
888
+ // if(!is_null($post)){
889
+ // $request->setPost($post);
890
+ // }
891
+ // $this->handlePost($request, $customer->getEmail());
892
+ // }
893
+ //
894
+ // }
895
 
896
+ /**
897
+ * Add lists from post to database magemonkey_async_subscribers
898
+ *
899
+ * @param $object (can be subscriber or customer)
900
+ * @param null $post
901
+ */
902
+ public function listsSubscription($subscriber, $post = null, $db = 0)
903
+ {
904
+ $defaultList = Mage::helper('monkey')->config('list');
905
+ //post subscription
906
+ if (isset($post['magemonkey_force'])) {
907
+ foreach ($post['list'] as $list) {
908
+ $listId = $list['subscribed'];
909
+ if($listId == $defaultList){
910
+ $subscriber->subscribe($subscriber->getSubscriberEmail());
911
+ }else {
912
+ $this->_subscribeToList($subscriber, $listId, $db);
913
+ }
914
+ }
915
+ } elseif (isset($post['magemonkey_subscribe'])) {
916
+ $lists = explode(',', $post['magemonkey_subscribe']);
917
+ foreach ($lists as $listId) {
918
+ if($listId == $defaultList){
919
+ $subscriber->subscribe($subscriber->getSubscriberEmail());
920
+ }else {
921
+ $this->_subscribeToList($subscriber, $listId, $db);
922
+ }
923
+ }
924
+ //Subscription for One Step Checkout with force subscription
925
+ }elseif(Mage::getSingleton('core/session')->getIsOneStepCheckout() && Mage::helper('monkey')->config('checkout_subscribe') > 2 && !Mage::getSingleton('core/session')->getIsUpdateCustomer()){
926
+ $subscriber->subscribe($subscriber->getSubscriberEmail());
927
+ }
928
+ }
929
 
930
+ public function subscribeToMainList($subscriber, $db = 0)
931
+ {
932
+ $defaultList = Mage::helper('monkey')->config('list');
933
+ $this->_subscribeToList($subscriber, $defaultList, $db);
934
+ }
935
 
936
+ /**
937
+ * Subscribe the list to database magemonkey_async_subscribers if $db==1 else subscribe to MailChimp directly
938
+ *
939
+ * @param $object
940
+ * @param $listId
941
+ * @param int $db
942
+ */
943
+ protected function _subscribeToList($subscriber, $listId, $db = 0){
944
+
945
+ $email = $subscriber->getSubscriberEmail();
946
+
947
+ $alreadyOnList = Mage::getSingleton('monkey/asyncsubscribers')->getCollection()
948
+ ->addFieldToFilter('lists', $listId)
949
+ ->addFieldToFilter('email', $email)
950
+ ->addFieldToFilter('processed', 0);
951
+ //if not in magemonkey_async_subscribers with processed 0 add list
952
+ if(count($alreadyOnList) == 0){
953
+ $isConfirmNeed = FALSE;
954
+ if( !Mage::helper('monkey')->isAdmin() &&
955
+ (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $subscriber->getStoreId()) == 1) ){
956
+ $isConfirmNeed = TRUE;
957
+ }
958
 
959
+ $isOnMailChimp = Mage::helper('monkey')->subscribedToList($email, $listId);
960
+ //if( TRUE === $subscriber->getIsStatusChanged() ){
961
+ if($isOnMailChimp == 1){
962
+ return false;
963
+ }
964
+
965
+ if($isConfirmNeed) {
966
+ $subscriber->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNCONFIRMED);
967
+ if($db){
968
+ Mage::getSingleton('core/session')->addSuccess(Mage::helper('monkey')->__('Confirmation request will be sent soon.'));
969
+ }else{
970
+ Mage::getSingleton('core/session')->addSuccess(Mage::helper('monkey')->__('Confirmation request has been sent.'));
971
+ }
972
+ }
973
+
974
+ $mergeVars = Mage::helper('monkey')->mergeVars($subscriber, FALSE, $listId);
975
+ if($db)
976
+ {
977
+ $subs = Mage::getModel('monkey/asyncsubscribers');
978
+ $subs->setMapfields(serialize($mergeVars))
979
+ ->setEmail($email)
980
+ ->setLists($listId)
981
+ ->setConfirm($isConfirmNeed)
982
+ ->setProcessed(0)
983
+ ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
984
+ ->save();
985
+ }else{
986
+ Mage::getSingleton('monkey/api')->listSubscribe($listId, $email, $mergeVars, 'html', $isConfirmNeed);
987
+ }
988
+
989
+ }
990
+ }
991
 
992
  /**
993
  * Handle subscription posts, (additional lists)
1001
  //<state> param is an html serialized field containing the default form state
1002
  //before submission, we need to parse it as a request in order to save it to $odata and process it
1003
  parse_str($request->getPost('state'), $odata);
 
1004
  $curlists = (TRUE === array_key_exists('list', $odata)) ? $odata['list'] : array();
1005
  $lists = $request->getPost('list', array());
1006
 
1007
  $defaultList = $this->getDefaultList(Mage::app()->getStore());
1008
 
1009
+ $api = Mage::getSingleton('monkey/api');
1010
  $loggedIn = Mage::helper('customer')->isLoggedIn();
1011
  if($loggedIn){
1012
  $customer = Mage::helper('customer')->getCustomer();
1015
  }
1016
  $email = $guestEmail ? $guestEmail : $customer->getEmail();
1017
  if( !empty($curlists) ){
 
1018
  //Handle Unsubscribe and groups update actions
1019
  foreach($curlists as $listId => $list){
1020
 
1021
  if(FALSE === array_key_exists($listId, $lists)){
1022
 
1023
  //Unsubscribe Email
 
 
 
 
 
 
 
 
 
 
1024
 
1025
+ $item = Mage::getModel('monkey/monkey')->loadByEmail($email);
1026
+ if(!$item->getId()){
1027
+ $item = Mage::getModel('newsletter/subscriber')
1028
+ ->loadByEmail($email);
1029
+ }
1030
+ if($item->getSubscriberEmail()){
1031
+ $item->unsubscribe();
1032
  }
1033
 
1034
+ //Unsubscribe Email
1035
+ $alreadyOnDb = Mage::getSingleton('monkey/asyncsubscribers')->getCollection()
1036
+ ->addFieldToFilter('lists', $listId)
1037
+ ->addFieldToFilter('email', $email)
1038
+ ->addFieldToFilter('processed', 0);
1039
+
1040
+ if(count($alreadyOnDb) > 0){
1041
+ foreach ($alreadyOnDb as $listToDelete) {
1042
+ $toDelete = Mage::getModel('monkey/asyncsubscribers')->load($listToDelete->getId());
1043
+ $toDelete->delete();
1044
+ }
1045
+ }else {
1046
+ $api->listUnsubscribe($listId, $email);
1047
+ }
1048
+
1049
  }else{
1050
 
1051
  $groupings = $lists[$listId];
1074
 
1075
  }
1076
 
1077
+ //Subscribe to new lists
1078
+ if (is_array($lists) && is_array($curlists)) {
1079
+ $subscribe = array_diff_key($lists, $curlists);
1080
+ if (!empty($subscribe)) {
1081
+ foreach ($subscribe as $listId => $slist) {
1082
+ if (!isset($slist['subscribed'])) {
1083
+ continue;
1084
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1085
 
1086
+ $groupings = $lists[$listId];
1087
+ unset($groupings['subscribed']);
1088
+ if ($defaultList == $listId) {
1089
+ $subscriber = Mage::getModel('newsletter/subscriber');
1090
+ $subscriber->setListGroups($groupings);
1091
+ $subscriber->setMcListId($listId);
1092
+ $subscriber->setMcStoreId(Mage::app()->getStore()->getId());
1093
+ $subscriber->setImportMode(TRUE);
1094
+ $subscriber->subscribe($email);
1095
+ } else {
1096
+ $customer->setListGroups($groupings);
1097
+ $customer->setMcListId($listId);
1098
+ $subscriber = Mage::getModel('newsletter/subscriber')
1099
+ ->setImportMode(TRUE)
1100
+ ->setSubscriberEmail($email);
1101
+ $this->_subscribeToList($subscriber, $listId, 0);
1102
 
1103
  }
 
1104
  }
1105
  }
1106
+ }
1107
  }
1108
+
1109
+ public function getThisStore(){
1110
+ $store = Mage::app()->getStore();
1111
+
1112
+ $configscope = Mage::app()->getRequest()->getParam('store');
1113
+ if( $configscope && ($configscope !== 'undefined') ){
1114
+ $store = $configscope;
1115
+ }
1116
+ return $store;
1117
+ }
1118
  }
app/code/community/Ebizmarts/MageMonkey/Model/Cron.php CHANGED
@@ -32,7 +32,7 @@ class Ebizmarts_MageMonkey_Model_Cron
32
  *
33
  * @return void
34
  */
35
- public function processImportJobs()
36
  {
37
  $job = $this->_getJob('Import');
38
  if(is_null($job)){
@@ -214,36 +214,43 @@ class Ebizmarts_MageMonkey_Model_Cron
214
  *
215
  * @return Ebizmarts_MageMonkey_Model_Cron
216
  */
217
- public function processExportJobs()
218
- {
219
- $this->_limit = (int)Mage::getStoreConfig("monkey/general/cron_export");
220
- $job = $this->_getJob('Export');
221
- if(is_null($job)){
222
- return $this;
223
- }
224
 
225
- $collection = $this->_getEntityModel($job->getDataSourceEntity());
226
 
227
- if(!$job->getStartedAt()){
228
- $job->setStartedAt(Mage::getModel('core/date')->gmtDate())->save();
229
- }
230
 
231
- $collection->setPageSize($this->_limit);
232
 
233
- //Condition for chunk batch
234
- if($job->getLastProcessedId()){
235
- $collection->addFieldToFilter($this->_getId($job->getDataSourceEntity()), array('gt' => (int)$job->getLastProcessedId()));
236
- }
237
 
238
  //Filter by STORE
239
  $jobStoreId = (int)$job->getStoreId();
240
- if($jobStoreId){
241
- $collection->addFieldToFilter('store_id', $jobStoreId);
242
- }
243
 
244
- if($job->getDataSourceEntity() == 'newsletter_subscriber'):
245
- $collection->addFieldToFilter('subscriber_status', Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED);
246
- endif;
 
 
 
 
 
 
 
247
 
248
  $collection->load();
249
 
@@ -278,10 +285,6 @@ class Ebizmarts_MageMonkey_Model_Cron
278
  $job->setLastProcessedId($lastId);
279
  $job->setProcessedCount( ( $processedCount+$job->getProcessedCount() ));
280
 
281
- /*if( $processedCount < $this->_limit ){
282
- $job->setStatus('finished');
283
- }*/
284
-
285
  $job
286
  ->setUpdatedAt($this->_dbDate())
287
  ->save();
@@ -415,7 +418,7 @@ class Ebizmarts_MageMonkey_Model_Cron
415
  *
416
  *
417
  */
418
- public function processAutoExportJobs()
419
  {
420
  $allStores = Mage::app()->getStores();
421
  foreach($allStores as $storeId => $val) {
@@ -437,7 +440,7 @@ class Ebizmarts_MageMonkey_Model_Cron
437
  public function sendordersAsync()
438
  {
439
  $collection = Mage::getModel('monkey/asyncorders')->getCollection();
440
- $collection->addFieldToFilter('proccessed',array('eq'=>0));
441
  $storeId = null;
442
  foreach($collection as $item)
443
  {
@@ -455,7 +458,7 @@ class Ebizmarts_MageMonkey_Model_Cron
455
  $api->ecommOrderAdd($info);
456
  $info['campaign_id'] = null;
457
  }
458
- $item->setProccessed(1)->save();
459
 
460
  Mage::getModel('monkey/ecommerce')
461
  ->setOrderIncrementId($info['id'])
@@ -470,7 +473,7 @@ class Ebizmarts_MageMonkey_Model_Cron
470
  public function cleanordersAsync()
471
  {
472
  $collection = Mage::getModel('monkey/asyncorders')->getCollection();
473
- $collection->addFieldToFilter('proccessed',array('eq'=>1));
474
  foreach($collection as $item)
475
  {
476
  $item->delete();
@@ -479,7 +482,7 @@ class Ebizmarts_MageMonkey_Model_Cron
479
  public function sendSubscribersAsync()
480
  {
481
  $collection = Mage::getModel('monkey/asyncsubscribers')->getCollection();
482
- $collection->addFieldToFilter('proccessed',array('eq'=>0));
483
  foreach($collection as $item)
484
  {
485
  $mergeVars = unserialize($item->getMapfields());
@@ -487,14 +490,14 @@ class Ebizmarts_MageMonkey_Model_Cron
487
  $email = $item->getEmail();
488
  $isConfirmNeed = $item->getConfirm();
489
  Mage::getSingleton('monkey/api')->listSubscribe($listId, $email, $mergeVars, 'html', $isConfirmNeed);
490
- $item->setProccessed(1)->save();
491
  }
492
 
493
  }
494
  public function cleanSubscribersAsync()
495
  {
496
- $collection = Mage::getModel('nmonkey/asyncsubscribers')->getCollection();
497
- $collection->addFieldToFilter('proccessed',array('eq'=>1));
498
  foreach($collection as $item)
499
  {
500
  $item->delete();
32
  *
33
  * @return void
34
  */
35
+ public function bulksyncImportSubscribers()
36
  {
37
  $job = $this->_getJob('Import');
38
  if(is_null($job)){
214
  *
215
  * @return Ebizmarts_MageMonkey_Model_Cron
216
  */
217
+ public function bulksyncExportSubscribers()
218
+ {
219
+ $this->_limit = (int)Mage::getStoreConfig("monkey/general/cron_export");
220
+ $job = $this->_getJob('Export');
221
+ if (is_null($job)) {
222
+ return $this;
223
+ }
224
 
225
+ $collection = $this->_getEntityModel($job->getDataSourceEntity());
226
 
227
+ if (!$job->getStartedAt()) {
228
+ $job->setStartedAt(Mage::getModel('core/date')->gmtDate())->save();
229
+ }
230
 
231
+ $collection->setPageSize($this->_limit);
232
 
233
+ //Condition for chunk batch
234
+ if ($job->getLastProcessedId()) {
235
+ $collection->addFieldToFilter($this->_getId($job->getDataSourceEntity()), array('gt' => (int)$job->getLastProcessedId()));
236
+ }
237
 
238
  //Filter by STORE
239
  $jobStoreId = (int)$job->getStoreId();
240
+ if ($jobStoreId) {
241
+ $collection->addFieldToFilter('store_id', $jobStoreId);
242
+ }
243
 
244
+ if ($job->getDataSourceEntity() == 'newsletter_subscriber') {
245
+ $collection->addFieldToFilter('subscriber_status', Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED);
246
+ $orderBy = 'subscriber_id';
247
+ }elseif($job->getDataSourceEntity() == 'customer'){
248
+ $orderBy = 'entity_id';
249
+ }
250
+
251
+ if($orderBy){
252
+ $collection->addOrder($orderBy, 'ASC');
253
+ }
254
 
255
  $collection->load();
256
 
285
  $job->setLastProcessedId($lastId);
286
  $job->setProcessedCount( ( $processedCount+$job->getProcessedCount() ));
287
 
 
 
 
 
288
  $job
289
  ->setUpdatedAt($this->_dbDate())
290
  ->save();
418
  *
419
  *
420
  */
421
+ public function autoExportSubscribers()
422
  {
423
  $allStores = Mage::app()->getStores();
424
  foreach($allStores as $storeId => $val) {
440
  public function sendordersAsync()
441
  {
442
  $collection = Mage::getModel('monkey/asyncorders')->getCollection();
443
+ $collection->addFieldToFilter('processed',array('eq'=>0));
444
  $storeId = null;
445
  foreach($collection as $item)
446
  {
458
  $api->ecommOrderAdd($info);
459
  $info['campaign_id'] = null;
460
  }
461
+ $item->setProcessed(1)->save();
462
 
463
  Mage::getModel('monkey/ecommerce')
464
  ->setOrderIncrementId($info['id'])
473
  public function cleanordersAsync()
474
  {
475
  $collection = Mage::getModel('monkey/asyncorders')->getCollection();
476
+ $collection->addFieldToFilter('processed',array('eq'=>1));
477
  foreach($collection as $item)
478
  {
479
  $item->delete();
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());
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
  }
497
  public function cleanSubscribersAsync()
498
  {
499
+ $collection = Mage::getModel('monkey/asyncsubscribers')->getCollection();
500
+ $collection->addFieldToFilter('processed',array('eq'=>1));
501
  foreach($collection as $item)
502
  {
503
  $item->delete();
app/code/community/Ebizmarts/MageMonkey/Model/Ecommerce360.php CHANGED
@@ -147,8 +147,9 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
147
  $this->_info['order_id'] = $this->_order->getId();
148
  $sync->setInfo(serialize($this->_info))
149
  ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
150
- ->setProccessed(0)
151
  ->save();
 
152
  }
153
  else {
154
  //Send order to MailChimp
@@ -161,8 +162,9 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
161
  $this->_info['order_id'] = $this->_order->getId();
162
  $sync->setInfo(serialize($this->_info))
163
  ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
164
- ->setProccessed(0)
165
  ->save();
 
166
  }
167
  else {
168
  $rs = $api->ecommOrderAdd($this->_info);
@@ -186,7 +188,7 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
186
  */
187
  private function setItemstoSend()
188
  {
189
- foreach ($this->_order->getAllItems() as $item){
190
  $mcitem = array();
191
  $product = Mage::getSingleton('catalog/product')->load($item->getProductId());
192
 
@@ -269,70 +271,68 @@ class Ebizmarts_MageMonkey_Model_Ecommerce360
269
  */
270
  public function autoExportJobs($storeId){
271
  $allow_sent = false;
272
- $orders = Mage::getResourceModel('sales/order_collection')->addFieldToFilter('main_table.store_id',array('eq'=>$storeId));
273
- $orders->getSelect()->joinLeft( array('ecommerce'=> Mage::getSingleton('core/resource')->getTableName('monkey/ecommerce')), 'main_table.entity_id = ecommerce.order_id', 'main_table.*')->where('ecommerce.order_id is null');
274
-
275
  //Get status options selected in the Configuration
276
  $states = explode(',', Mage::helper('monkey')->config('order_status',$storeId));
277
- $max = Mage::getStoreConfig("monkey/general/order_max",$storeId);
278
- $counter = 0;
279
- foreach($orders as $order){
280
- if($counter>$max) {
281
  break;
282
  }
283
- foreach($states as $state){
284
- if($order->getStatus() == $state || $state == 'all_status'){
285
- $allow_sent = true;
286
- }
287
- }
288
-
289
- if($allow_sent == true){
290
- $this->_order = $order;
291
- $api = Mage::getSingleton('monkey/api', array('store' => $this->_order->getStoreId()));
292
- if(!$api){
293
- return false;
294
- }
295
-
296
- $subtotal = $this->_order->getBaseSubtotal();
297
- $discount = (float)$this->_order->getBaseDiscountAmount();
298
- if ($discount != 0) {
299
- $subtotal = $subtotal + ($discount);
300
- }
301
 
302
- $this->_info = array(
303
- 'id' => $this->_order->getIncrementId(),
304
- 'total' => $subtotal,
305
- 'shipping' => $this->_order->getBaseShippingAmount(),
306
- 'tax' => $this->_order->getBaseTaxAmount(),
307
- 'store_id' => $this->_order->getStoreId(),
308
- 'store_name' => $this->_order->getStoreName(),
309
- 'order_date' => $this->_order->getCreatedAt(),
310
- 'plugin_id' => 1215,
311
- 'items' => array()
312
- );
313
-
314
- $email = $this->_order->getCustomerEmail();
315
- $campaign = $this->_order->getEbizmartsMagemonkeyCampaignId();
316
- $this->setItemstoSend();
317
-
318
- if($email && $campaign){
319
- $this->_info ['email_id']= $email;
320
- $this->_info ['campaign_id']= $campaign;
321
-
322
- //Send order to MailChimp
323
- $rs = $api->campaignEcommOrderAdd($this->_info);
324
- }else{
325
- $this->_info ['email']= $email;
326
- $rs = $api->ecommOrderAdd($this->_info);
327
- }
328
- $allow_sent = false;
329
- if ( isset($rs['complete']) && $rs['complete'] == TRUE ) {
330
- $this->_logCall();
331
- $counter++;
332
- }
333
- }
334
 
335
- }
336
- }
 
 
 
337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  }
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
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);
188
  */
189
  private function setItemstoSend()
190
  {
191
+ foreach ($this->_order->getAllItems() as $item){
192
  $mcitem = array();
193
  $product = Mage::getSingleton('catalog/product')->load($item->getProductId());
194
 
271
  */
272
  public function autoExportJobs($storeId){
273
  $allow_sent = false;
 
 
 
274
  //Get status options selected in the Configuration
275
  $states = explode(',', Mage::helper('monkey')->config('order_status',$storeId));
276
+ $max = Mage::getStoreConfig("monkey/general/order_max", $storeId);
277
+ $count = 0;
278
+ foreach($states as $state) {
279
+ if($max == $count){
280
  break;
281
  }
282
+ if($state != 'all_status') {
283
+ $orders = Mage::getResourceModel('sales/order_collection')->addFieldToFilter('main_table.store_id', array('eq' => $storeId));
284
+ $orders->getSelect()->joinLeft(array('ecommerce' => Mage::getSingleton('core/resource')->getTableName('monkey/ecommerce')), 'main_table.entity_id = ecommerce.order_id', 'main_table.*')->where('ecommerce.order_id is null AND main_table.status = \'' . $state . '\'')
285
+ ->limit($max - $count);
286
+ }else{
287
+ $orders = Mage::getResourceModel('sales/order_collection')->addFieldToFilter('main_table.store_id', array('eq' => $storeId));
288
+ $orders->getSelect()->joinLeft(array('ecommerce' => Mage::getSingleton('core/resource')->getTableName('monkey/ecommerce')), 'main_table.entity_id = ecommerce.order_id', 'main_table.*')->where('ecommerce.order_id is null')
289
+ ->limit($max - $count);
290
+ }
291
+ $count += count($orders);
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;
298
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
 
300
+ $subtotal = $this->_order->getBaseSubtotal();
301
+ $discount = (float)$this->_order->getBaseDiscountAmount();
302
+ if ($discount != 0) {
303
+ $subtotal = $subtotal + ($discount);
304
+ }
305
 
306
+ $this->_info = array(
307
+ 'id' => $this->_order->getIncrementId(),
308
+ 'total' => $subtotal,
309
+ 'shipping' => $this->_order->getBaseShippingAmount(),
310
+ 'tax' => $this->_order->getBaseTaxAmount(),
311
+ 'store_id' => $this->_order->getStoreId(),
312
+ 'store_name' => $this->_order->getStoreName(),
313
+ 'order_date' => $this->_order->getCreatedAt(),
314
+ 'plugin_id' => 1215,
315
+ 'items' => array()
316
+ );
317
+
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
+ }
337
+ }
338
  }
app/code/community/Ebizmarts/MageMonkey/Model/MCAPI.php CHANGED
@@ -2430,7 +2430,6 @@ class Ebizmarts_MageMonkey_Model_MCAPI
2430
  if ($sep_changed){
2431
  ini_set("arg_separator.output", $orig_sep);
2432
  }
2433
-
2434
  $payload = "POST " . $this->apiUrl["path"] . "?" . $this->apiUrl["query"] . "&method=" . $method . " HTTP/1.0\r\n";
2435
  $payload .= "Host: " . $host . "\r\n";
2436
  //$payload .= "User-Agent: MCAPI/" . $this->version ."\r\n";
2430
  if ($sep_changed){
2431
  ini_set("arg_separator.output", $orig_sep);
2432
  }
 
2433
  $payload = "POST " . $this->apiUrl["path"] . "?" . $this->apiUrl["query"] . "&method=" . $method . " HTTP/1.0\r\n";
2434
  $payload .= "Host: " . $host . "\r\n";
2435
  //$payload .= "User-Agent: MCAPI/" . $this->version ."\r\n";
app/code/community/Ebizmarts/MageMonkey/Model/Monkey.php CHANGED
@@ -179,33 +179,33 @@ class Ebizmarts_MageMonkey_Model_Monkey {
179
  * @return void
180
  */
181
  protected function _unsubscribe(array $data) {
182
- $subscriber = $this->loadByEmail($data['data']['email']);
183
-
184
- if(!$subscriber->getId()){
185
- $subscriber = Mage::getModel('newsletter/subscriber')
186
- ->loadByEmail($data['data']['email']);
187
- }
188
-
189
- if($subscriber->getId()){
190
- try {
191
-
192
- switch ($data['data']['action']) {
193
- case 'delete' :
194
- //if config setting "Webhooks Delete action" is set as "Delete customer account"
195
- if(Mage::getStoreConfig("monkey/general/webhook_delete") == 1){
196
- $subscriber->delete();
197
- }else{
198
- $subscriber->setImportMode(TRUE)->unsubscribe();
199
- }
200
- break;
201
- case 'unsub':
202
- $subscriber->setImportMode(TRUE)->unsubscribe();
203
- break;
 
 
 
 
204
  }
205
- } catch (Exception $e) {
206
- Mage::logException($e);
207
- }
208
- }
209
  }
210
 
211
  /**
179
  * @return void
180
  */
181
  protected function _unsubscribe(array $data) {
182
+ $subscriber = $this->loadByEmail($data['data']['email']);
183
+
184
+ if(!$subscriber->getId()){
185
+ $subscriber = Mage::getModel('newsletter/subscriber')
186
+ ->loadByEmail($data['data']['email']);
187
+ }
188
+
189
+ if($subscriber->getId()){
190
+ try {
191
+
192
+ switch ($data['data']['action']) {
193
+ case 'delete' :
194
+ //if config setting "Webhooks Delete action" is set as "Delete customer account"
195
+ if(Mage::getStoreConfig("monkey/general/webhook_delete") == 1){
196
+ $subscriber->delete();
197
+ }else{
198
+ $subscriber->setImportMode(TRUE)->unsubscribe();
199
+ }
200
+ break;
201
+ case 'unsub':
202
+ $subscriber->setImportMode(TRUE)->unsubscribe();
203
+ break;
204
+ }
205
+ } catch (Exception $e) {
206
+ Mage::logException($e);
207
+ }
208
  }
 
 
 
 
209
  }
210
 
211
  /**
app/code/community/Ebizmarts/MageMonkey/Model/Observer.php CHANGED
@@ -33,84 +33,22 @@ class Ebizmarts_MageMonkey_Model_Observer
33
  return $observer;
34
  }
35
 
36
-
37
- if(!Mage::getSingleton('core/session')->getMonkeyCheckout()){
38
- return $observer;
39
- }
40
-
41
- $email = $subscriber->getSubscriberEmail();
42
- /*if($subscriber->getMcStoreId()){
43
- $listId = Mage::helper('monkey')->getDefaultList($subscriber->getMcStoreId());
44
- }
45
- elseif($subscriber->getStoreId()){
46
- $listId = Mage::helper('monkey')->getDefaultList($subscriber->getStoreId());
47
- }
48
- else{
49
- $listId = Mage::helper('monkey')->getDefaultList(Mage::app()->getStore()->getId());
50
- }*/
51
- $subscriber->setImportMode(TRUE);
52
- $isConfirmNeed = FALSE;
53
- if( !Mage::helper('monkey')->isAdmin() &&
54
- (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG, $subscriber->getStoreId()) == 1) ){
55
- $isConfirmNeed = TRUE;
56
- }
57
-
58
- if($isConfirmNeed){
59
- $subscriber->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNCONFIRMED);
60
- }
61
-
62
- //Check if customer is not yet subscribed on MailChimp
63
- $monkeyPost = Mage::getSingleton('core/session')->getMonkeyPost();
64
- if($monkeyPost) {
65
- $post = unserialize($monkeyPost);
66
- foreach($post['list'] as $listSubscribed){
67
- $listId = $listSubscribed['subscribed'];
68
- $isOnMailChimp = Mage::helper('monkey')->subscribedToList($email, $listId);
69
-
70
- //Flag only is TRUE when changing to SUBSCRIBE
71
- if( TRUE === $subscriber->getIsStatusChanged() ){
72
- if($isOnMailChimp == 1){
73
- return $observer;
74
- }
75
-
76
- if($isConfirmNeed){
77
- $subscriber->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNCONFIRMED);
78
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('monkey')->__('Confirmation request has been sent.'));
79
- }
80
-
81
- $mergeVars = $this->_mergeVars($subscriber, FALSE, $listId);
82
-
83
- if(Mage::getStoreConfig('monkey/general/checkout_async'))
84
- {
85
- $subs = Mage::getModel('monkey/asyncsubscribers');
86
- $subs->setMapfields(serialize($mergeVars))
87
- ->setEmail($email)
88
- ->setLists($listId)
89
- ->setConfirm($isConfirmNeed)
90
- ->setProccessed(0)
91
- ->setCreatedAt(Mage::getModel('core/date')->gmtDate())
92
- ->save();
93
- }
94
- else {
95
- Mage::getSingleton('monkey/api')->listSubscribe($listId, $email, $mergeVars, 'html', $isConfirmNeed);
96
  }
97
 
98
- }
99
- }
100
  Mage::getSingleton('core/session')->getMonkeyPost(TRUE);
 
 
101
  }
102
- // This code unsubscribe users if it's on MailChimp and the status it's unconfirmed
103
- /*else{
104
- if(($isOnMailChimp == 1) && ($subscriber->getStatus() == Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED)){
105
- $rs = Mage::getSingleton('monkey/api')
106
- ->listUnsubscribe($listId, $email);
107
- if($rs !== TRUE){
108
- Mage::throwException($rs);
109
- }
110
- }
111
- }*/
112
 
113
- }
114
 
115
  /**
116
  * Handle Subscriber deletion from Magento, unsubcribes email from MailChimp
@@ -172,8 +110,7 @@ class Ebizmarts_MageMonkey_Model_Observer
172
  * @return void|Varien_Event_Observer
173
  */
174
  public function saveConfig(Varien_Event_Observer $observer)
175
- {
176
-
177
  $scope = is_null($observer->getEvent()->getStore()) ? Mage::app()->getDefaultStoreView()->getCode(): $observer->getEvent()->getStore();
178
  $post = Mage::app()->getRequest()->getPost();
179
  $request = Mage::app()->getRequest();
@@ -336,35 +273,56 @@ class Ebizmarts_MageMonkey_Model_Observer
336
  */
337
  public function updateCustomer(Varien_Event_Observer $observer)
338
  {
339
- $post = Mage::app()->getRequest()->getPost();
340
  if(!Mage::helper('monkey')->canMonkey()){
341
  return $observer;
342
  }
343
 
344
  $customer = $observer->getEvent()->getCustomer();
345
 
346
- //Handle additional lists subscription on Customer Create Account
347
- Mage::helper('monkey')->additionalListsSubscription($customer);
348
-
349
  $oldEmail = $customer->getOrigData('email');
350
  if(!$oldEmail){
351
  return $observer;
352
  }
353
- $mergeVars = $this->_mergeVars($customer, TRUE);
354
- $api = Mage::getSingleton('monkey/api', array('store' => $customer->getStoreId()));
 
 
 
 
 
 
 
 
 
 
 
355
  $lists = $api->listsForEmail($oldEmail);
356
  if(is_array($lists)){
357
  foreach($lists as $listId){
 
358
  $api->listUpdateMember($listId, $oldEmail, $mergeVars);
359
  }
360
  }
361
- $request = Mage::app()->getRequest();
362
- //Unsubscribe when update customer from admin
363
- if (!isset($post['subscription']) && $request->getActionName() == 'save' && $request->getControllerName() == 'customer' && $request->getModuleName() == (string)Mage::getConfig()->getNode('admin/routers/adminhtml/args/frontName')) {
364
- $subscriber = Mage::getModel('newsletter/subscriber')
365
- ->loadByEmail($customer->getEmail());
366
- $subscriber->setImportMode(TRUE)->unsubscribe();
 
 
 
 
 
 
 
 
 
 
 
 
367
  }
 
368
 
369
  return $observer;
370
  }
@@ -378,9 +336,11 @@ class Ebizmarts_MageMonkey_Model_Observer
378
  public function registerCheckoutSubscribe(Varien_Event_Observer $observer)
379
  {
380
  if(!Mage::helper('monkey')->canMonkey()){
381
- return;
382
  }
383
 
 
 
384
  if(Mage::app()->getRequest()->isPost()){
385
  $subscribe = Mage::app()->getRequest()->getPost('magemonkey_subscribe');
386
  $force = Mage::app()->getRequest()->getPost('magemonkey_force');
@@ -388,8 +348,13 @@ class Ebizmarts_MageMonkey_Model_Observer
388
  Mage::getSingleton('core/session')->setMonkeyPost( serialize(Mage::app()->getRequest()->getPost()) );
389
  if(!is_null($subscribe)||!is_null($force)){
390
  Mage::getSingleton('core/session')->setMonkeyCheckout(true);
 
391
  }
392
  }
 
 
 
 
393
  }
394
 
395
  /**
@@ -400,8 +365,9 @@ class Ebizmarts_MageMonkey_Model_Observer
400
  */
401
  public function registerCheckoutSuccess(Varien_Event_Observer $observer)
402
  {
403
-
404
  if(!Mage::helper('monkey')->canMonkey()){
 
 
405
  return $observer;
406
  }
407
 
@@ -417,147 +383,39 @@ class Ebizmarts_MageMonkey_Model_Observer
417
  if($campaign_id){
418
  $order->setEbizmartsMagemonkeyCampaignId($campaign_id);
419
  }
420
- $sessionFlag = Mage::getSingleton('core/session')->getMonkeyCheckout();
421
- // $forceSubscription = Mage::helper('monkey')->canCheckoutSubscribe();
422
- // if($sessionFlag || $forceSubscription == 3 || $forceSubscription == 4){
423
- if($sessionFlag){
424
  //Guest Checkout
425
  if( (int)$order->getCustomerGroupId() === Mage_Customer_Model_Group::NOT_LOGGED_IN_ID ){
426
  Mage::helper('monkey')->registerGuestCustomer($order);
427
  }
428
-
429
- try{
430
- $subscriber = Mage::getModel('newsletter/subscriber')
431
- ->setImportMode(TRUE)
432
- ->subscribe($order->getCustomerEmail());
433
- }catch(Exception $e){
434
- Mage::logException($e);
435
- }
436
-
437
  }
438
 
439
  //Multiple lists on checkout
440
  $monkeyPost = Mage::getSingleton('core/session')->getMonkeyPost();
441
- if($monkeyPost){
 
 
 
 
 
442
 
443
- $post = unserialize($monkeyPost);
444
- $request = new Varien_Object(array('post' => $post));
445
- $customer = new Varien_Object(array('email' => $order->getCustomerEmail()));
446
 
447
- //Handle additional lists subscription on Customer Create Account
448
- Mage::helper('monkey')->additionalListsSubscription($customer, $request);
449
  }
450
 
451
  }
452
-
 
 
 
453
  }
454
 
455
- /**
456
- * Get Mergevars
457
- *
458
- * @param null|Mage_Customer_Model_Customer $object
459
- * @param bool $includeEmail
460
- * @return array
461
- */
462
- protected function _mergeVars($object = NULL, $includeEmail = FALSE, $currentList = NULL)
463
- {
464
-
465
- //Initialize as GUEST customer
466
- $customer = new Varien_Object;
467
-
468
- $regCustomer = Mage::registry('current_customer');
469
- $guestCustomer = Mage::registry('mc_guest_customer');
470
-
471
- if (Mage::helper('customer')->isLoggedIn()) {
472
- $customer = Mage::helper('customer')->getCustomer();
473
- } elseif ($regCustomer) {
474
- $customer = $regCustomer;
475
- } elseif ($guestCustomer) {
476
- $customer = $guestCustomer;
477
- } else {
478
- if (is_null($object)) {
479
- $customer->setEmail($object->getSubscriberEmail())
480
- ->setStoreId($object->getStoreId());
481
- } else {
482
- $customer = $object;
483
- }
484
-
485
- }
486
-
487
- if (is_object($object)) {
488
- if ($object->getListGroups()) {
489
- $customer->setListGroups($object->getListGroups());
490
- }
491
-
492
- if ($object->getMcListId()) {
493
- $customer->setMcListId($object->getMcListId());
494
- }
495
- }
496
-
497
- $mergeVars = Mage::helper('monkey')->getMergeVars($customer, $includeEmail);
498
- // add groups
499
- $monkeyPost = Mage::getSingleton('core/session')->getMonkeyPost();
500
- $defaultList = Mage::getStoreConfig('monkey/general/list', $object->getStoreId());
501
-
502
-
503
- if ($monkeyPost) {
504
- $post = unserialize($monkeyPost);
505
- //if can change customer set the groups set by customer else set the groups on MailChimp config
506
- if ($currentList && Mage::getStoreConfig('monkey/general/changecustomergroup', $object->getStoreId()) == 1) {
507
- $subscribeGroups = array(0 => array());
508
- foreach ($post['list'][$currentList] as $toGroups => $value) {
509
- if (is_numeric($toGroups)) {
510
- $subscribeGroups[0]['id'] = $toGroups;
511
- $subscribeGroups[0]['groups'] = implode(', ', array_unique($post['list'][$currentList][$subscribeGroups[0]['id']]));
512
- }
513
- }
514
- $groups = NULL;
515
- } else {
516
- $groups = Mage::getStoreConfig('monkey/general/cutomergroup', $object->getStoreId());
517
- $groups = explode(",", $groups);
518
- if (is_array($groups)) {
519
- $subscribeGroups = array();
520
- $_prevGroup = null;
521
- $checkboxes = array();
522
- foreach ($groups as $group) {
523
- $item = explode("_", $group);
524
- $currentGroup = $item[0];
525
- if ($currentGroup == $_prevGroup || $_prevGroup == null) {
526
- $checkboxes[] = $item[1];
527
- $_prevGroup = $currentGroup;
528
- } else {
529
- $subscribeGroups[] = array('id' => $_prevGroup, "groups" => str_replace('%C%', '\\,', implode(', ', $checkboxes)));
530
- $checkboxes = array();
531
- $_prevGroup = $currentGroup;
532
- $checkboxes[] = $item[1];
533
- }
534
- }
535
- $subscribeGroups[] = array('id' => $currentGroup, "groups" => str_replace('%C%', '\\,', implode(', ', $checkboxes)));
536
-
537
- }
538
- }
539
- if ($subscribeGroups[0]['id'] && $subscribeGroups[0]['id'] != -1) {
540
- $mergeVars["GROUPINGS"] = $subscribeGroups;
541
- }
542
-
543
- $force = Mage::getStoreConfig('monkey/general/checkout_subscribe', $object->getStoreId());
544
- $map = Mage::getStoreConfig('monkey/general/markfield', $object->getStoreId());
545
- if ($post['magemonkey_subscribe'] && $map != "") {
546
- $listsChecked = explode(',', $post['magemonkey_subscribe']);
547
- $hasClicked = in_array($currentList, $listsChecked);
548
- if ($hasClicked && $force != 3) {
549
- $mergeVars[$map] = "Yes";
550
- } else {
551
- $mergeVars[$map] = "No";
552
- }
553
- } else {
554
- $mergeVars[$map] = "No";
555
- }
556
- }
557
-
558
- return $mergeVars;
559
- }
560
-
561
  /** Add mass action option to Sales -> Order grid in admin panel to send orders to MC (Ecommerce360)
562
  *
563
  * @param Varien_Event_Observer $observer
@@ -566,7 +424,7 @@ class Ebizmarts_MageMonkey_Model_Observer
566
  public function massActionOption($observer)
567
  {
568
  if(!Mage::helper('monkey')->canMonkey()){
569
- return;
570
  }
571
  $block = $observer->getEvent()->getBlock();
572
 
@@ -581,6 +439,7 @@ class Ebizmarts_MageMonkey_Model_Observer
581
 
582
  }
583
  }
 
584
  }
585
 
586
  }
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;
50
+ }
 
 
 
 
 
 
 
 
51
 
 
52
 
53
  /**
54
  * Handle Subscriber deletion from Magento, unsubcribes email from MailChimp
110
  * @return void|Varien_Event_Observer
111
  */
112
  public function saveConfig(Varien_Event_Observer $observer)
113
+ {
 
114
  $scope = is_null($observer->getEvent()->getStore()) ? Mage::app()->getDefaultStoreView()->getCode(): $observer->getEvent()->getStore();
115
  $post = Mage::app()->getRequest()->getPost();
116
  $request = Mage::app()->getRequest();
273
  */
274
  public function updateCustomer(Varien_Event_Observer $observer)
275
  {
 
276
  if(!Mage::helper('monkey')->canMonkey()){
277
  return $observer;
278
  }
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
  }
336
  public function registerCheckoutSubscribe(Varien_Event_Observer $observer)
337
  {
338
  if(!Mage::helper('monkey')->canMonkey()){
339
+ return $observer;
340
  }
341
 
342
+ $oneStep = Mage::app()->getRequest()->getModuleName() == 'onestepcheckout';
343
+
344
  if(Mage::app()->getRequest()->isPost()){
345
  $subscribe = Mage::app()->getRequest()->getPost('magemonkey_subscribe');
346
  $force = Mage::app()->getRequest()->getPost('magemonkey_force');
348
  Mage::getSingleton('core/session')->setMonkeyPost( serialize(Mage::app()->getRequest()->getPost()) );
349
  if(!is_null($subscribe)||!is_null($force)){
350
  Mage::getSingleton('core/session')->setMonkeyCheckout(true);
351
+
352
  }
353
  }
354
+ if($oneStep){
355
+ Mage::getSingleton('core/session')->setIsOneStepCheckout(true);
356
+ }
357
+ return $observer;
358
  }
359
 
360
  /**
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
 
383
  if($campaign_id){
384
  $order->setEbizmartsMagemonkeyCampaignId($campaign_id);
385
  }
386
+
387
+ $sessionFlag = Mage::getSingleton('core/session')->getMonkeyCheckout() || Mage::getSingleton('core/session')->getIsOneStepCheckout();
388
+ if($sessionFlag){
 
389
  //Guest Checkout
390
  if( (int)$order->getCustomerGroupId() === Mage_Customer_Model_Group::NOT_LOGGED_IN_ID ){
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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
  /** Add mass action option to Sales -> Order grid in admin panel to send orders to MC (Ecommerce360)
420
  *
421
  * @param Varien_Event_Observer $observer
424
  public function massActionOption($observer)
425
  {
426
  if(!Mage::helper('monkey')->canMonkey()){
427
+ return $observer;
428
  }
429
  $block = $observer->getEvent()->getBlock();
430
 
439
 
440
  }
441
  }
442
+ return $observer;
443
  }
444
 
445
  }
app/code/community/Ebizmarts/MageMonkey/Model/Subscriber.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: santisp
5
+ * Date: 25/09/14
6
+ * Time: 12:26 PM
7
+ */
8
+
9
+ class Ebizmarts_MageMonkey_Model_Subscriber extends Mage_Newsletter_Model_Subscriber
10
+ {
11
+ public function sendUnsubscriptionEmail()
12
+ {
13
+ if(Mage::getStoreConfig('monkey/general/active', Mage::helper('monkey')->getThisStore()) == 1) {
14
+ return $this;
15
+ }else{
16
+ return parent::sendUnsubscriptionEmail();
17
+ }
18
+ }
19
+
20
+ public function sendConfirmationRequestEmail()
21
+ {
22
+ if(Mage::getStoreConfig('monkey/general/active', Mage::helper('monkey')->getThisStore()) == 1) {
23
+ return $this;
24
+ }else{
25
+ return parent::sendConfirmationRequestEmail();
26
+ }
27
+ }
28
+
29
+ public function sendConfirmationSuccessEmail()
30
+ {
31
+ if(Mage::getStoreConfig('monkey/general/active', Mage::helper('monkey')->getThisStore()) == 1) {
32
+ return $this;
33
+ }else{
34
+ return parent::sendConfirmationSuccessEmail();
35
+ }
36
+ }
37
+ }
app/code/community/Ebizmarts/MageMonkey/Model/System/Config/Source/List.php CHANGED
@@ -27,9 +27,13 @@ class Ebizmarts_MageMonkey_Model_System_Config_Source_List
27
  */
28
  public function __construct()
29
  {
 
 
 
 
30
  if( is_null($this->_lists) ){
31
  $this->_lists = Mage::getSingleton('monkey/api')
32
- ->lists();
33
  }
34
  }
35
 
27
  */
28
  public function __construct()
29
  {
30
+ $max = Mage::helper('monkey')->config('maxlistsamount');
31
+ if(!is_numeric($max)){
32
+ $max = null;
33
+ }
34
  if( is_null($this->_lists) ){
35
  $this->_lists = Mage::getSingleton('monkey/api')
36
+ ->lists(null, null, $max);
37
  }
38
  }
39
 
app/code/community/Ebizmarts/MageMonkey/controllers/Adminhtml/ConfigController.php CHANGED
@@ -14,7 +14,7 @@ class Ebizmarts_MageMonkey_Adminhtml_ConfigController extends Mage_Adminhtml_Con
14
  $listId = $params['list'];
15
  if(isset($params['store'])) {
16
  $store = $params['store'];
17
- $store =$this->_getStoreByCode($$store);
18
  $storeId = $store->getId();
19
  }
20
  else {
14
  $listId = $params['list'];
15
  if(isset($params['store'])) {
16
  $store = $params['store'];
17
+ $store = $this->_getStoreByCode($store);
18
  $storeId = $store->getId();
19
  }
20
  else {
app/code/community/Ebizmarts/MageMonkey/controllers/SignupController.php CHANGED
@@ -27,9 +27,7 @@ class Ebizmarts_MageMonkey_SignupController extends Mage_Core_Controller_Front_A
27
  $this->_redirect($this->_getRedirectPath());
28
  return;
29
  }
30
-
31
  Mage::helper('monkey')->handlePost($this->getRequest(), $guestEmail);
32
-
33
  if(!$loggedIn){
34
  Mage::getSingleton('core/session')
35
  ->addSuccess($this->__('Thanks for your subscription!'));
27
  $this->_redirect($this->_getRedirectPath());
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!'));
app/code/community/Ebizmarts/MageMonkey/controllers/WebhookController.php CHANGED
@@ -28,7 +28,6 @@ class Ebizmarts_MageMonkey_WebhookController extends Mage_Core_Controller_Front_
28
  ->sendResponse();
29
  return $this;
30
  }
31
-
32
  Mage::helper('monkey')->log( print_r($this->getRequest()->getPost(), true) );
33
 
34
  Mage::app()->setCurrentStore(Mage::app()->getDefaultStoreView());
28
  ->sendResponse();
29
  return $this;
30
  }
 
31
  Mage::helper('monkey')->log( print_r($this->getRequest()->getPost(), true) );
32
 
33
  Mage::app()->setCurrentStore(Mage::app()->getDefaultStoreView());
app/code/community/Ebizmarts/MageMonkey/etc/config.xml CHANGED
@@ -10,11 +10,16 @@
10
  <config>
11
  <modules>
12
  <Ebizmarts_MageMonkey>
13
- <version>1.1.22</version>
14
  </Ebizmarts_MageMonkey>
15
  </modules>
16
  <global>
17
  <events>
 
 
 
 
 
18
  <newsletter_subscriber_save_before>
19
  <observers>
20
  <monkey_subscribe_observer>
@@ -56,6 +61,11 @@
56
  <asyncorders><table>magemonkey_async_orders</table></asyncorders>
57
  </entities>
58
  </monkey_mysql4>
 
 
 
 
 
59
  </models>
60
  <resources>
61
  <monkey_setup>
@@ -231,6 +241,7 @@
231
  <double_optin>System->Configuration->Customers->Newsletter->Subscription Options->Need to Confirm</double_optin>
232
  <ecommerce360>0</ecommerce360>
233
  <showreallistname>0</showreallistname>
 
234
  <checkout_subscribe>0</checkout_subscribe>
235
  <transactional_emails>false</transactional_emails>
236
  <map_fields><![CDATA[a:14:{i:0;a:2:{s:7:"magento";s:9:"firstname";s:9:"mailchimp";s:5:"FNAME";}i:1;a:2:{s:7:"magento";s:8:"lastname";s:9:"mailchimp";s:5:"LNAME";}i:2;a:2:{s:7:"magento";s:3:"dob";s:9:"mailchimp";s:3:"DOB";}i:3;a:2:{s:7:"magento";s:6:"prefix";s:9:"mailchimp";s:7:"PRENAME";}i:4;a:2:{s:7:"magento";s:15:"billing_address";s:9:"mailchimp";s:7:"BILLING";}i:5;a:2:{s:7:"magento";s:16:"shipping_address";s:9:"mailchimp";s:8:"SHIPPING";}i:6;a:2:{s:7:"magento";s:6:"gender";s:9:"mailchimp";s:6:"GENDER";}i:7;a:2:{s:7:"magento";s:8:"store_id";s:9:"mailchimp";s:7:"STOREID";}i:8;a:2:{s:7:"magento";s:10:"website_id";s:9:"mailchimp";s:7:"WEBSITE";}i:9;a:2:{s:7:"magento";s:16:"date_of_purchase";s:9:"mailchimp";s:3:"DOP";}i:10;a:2:{s:7:"magento";s:19:"ee_customer_balance";s:9:"mailchimp";s:9:"STORECRED";}i:11;a:2:{s:7:"magento";s:8:"group_id";s:9:"mailchimp";s:6:"CGROUP";}i:12;a:2:{s:7:"magento";s:9:"telephone";s:9:"mailchimp";s:9:"TELEPHONE";}i:13;a:2:{s:7:"magento";s:7:"company";s:9:"mailchimp";s:7:"COMPANY";}}]]></map_fields>
@@ -250,15 +261,15 @@
250
  <jobs>
251
  <magemonkey_bulksync_export_subscribers>
252
  <schedule><cron_expr>0 * * * *</cron_expr></schedule>
253
- <run><model>monkey/cron::processExportJobs</model></run>
254
  </magemonkey_bulksync_export_subscribers>
255
  <magemonkey_bulksync_import_subscribers>
256
  <schedule><cron_expr>0 * * * *</cron_expr></schedule>
257
- <run><model>monkey/cron::processImportJobs</model></run>
258
  </magemonkey_bulksync_import_subscribers>
259
  <magemonkey_autoexport_subscribers>
260
  <schedule><cron_expr>0 * * * *</cron_expr></schedule>
261
- <run><model>monkey/cron::processAutoExportJobs</model></run>
262
  </magemonkey_autoexport_subscribers>
263
  <magemonkey_sendorders_asynch>
264
  <schedule><cron_expr>*/15 * * * *</cron_expr></schedule>
10
  <config>
11
  <modules>
12
  <Ebizmarts_MageMonkey>
13
+ <version>1.1.23</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>
61
  <asyncorders><table>magemonkey_async_orders</table></asyncorders>
62
  </entities>
63
  </monkey_mysql4>
64
+ <newsletter>
65
+ <rewrite>
66
+ <subscriber>Ebizmarts_MageMonkey_Model_Subscriber</subscriber>
67
+ </rewrite>
68
+ </newsletter>
69
  </models>
70
  <resources>
71
  <monkey_setup>
241
  <double_optin>System->Configuration->Customers->Newsletter->Subscription Options->Need to Confirm</double_optin>
242
  <ecommerce360>0</ecommerce360>
243
  <showreallistname>0</showreallistname>
244
+ <maxlistsamount>25</maxlistsamount>
245
  <checkout_subscribe>0</checkout_subscribe>
246
  <transactional_emails>false</transactional_emails>
247
  <map_fields><![CDATA[a:14:{i:0;a:2:{s:7:"magento";s:9:"firstname";s:9:"mailchimp";s:5:"FNAME";}i:1;a:2:{s:7:"magento";s:8:"lastname";s:9:"mailchimp";s:5:"LNAME";}i:2;a:2:{s:7:"magento";s:3:"dob";s:9:"mailchimp";s:3:"DOB";}i:3;a:2:{s:7:"magento";s:6:"prefix";s:9:"mailchimp";s:7:"PRENAME";}i:4;a:2:{s:7:"magento";s:15:"billing_address";s:9:"mailchimp";s:7:"BILLING";}i:5;a:2:{s:7:"magento";s:16:"shipping_address";s:9:"mailchimp";s:8:"SHIPPING";}i:6;a:2:{s:7:"magento";s:6:"gender";s:9:"mailchimp";s:6:"GENDER";}i:7;a:2:{s:7:"magento";s:8:"store_id";s:9:"mailchimp";s:7:"STOREID";}i:8;a:2:{s:7:"magento";s:10:"website_id";s:9:"mailchimp";s:7:"WEBSITE";}i:9;a:2:{s:7:"magento";s:16:"date_of_purchase";s:9:"mailchimp";s:3:"DOP";}i:10;a:2:{s:7:"magento";s:19:"ee_customer_balance";s:9:"mailchimp";s:9:"STORECRED";}i:11;a:2:{s:7:"magento";s:8:"group_id";s:9:"mailchimp";s:6:"CGROUP";}i:12;a:2:{s:7:"magento";s:9:"telephone";s:9:"mailchimp";s:9:"TELEPHONE";}i:13;a:2:{s:7:"magento";s:7:"company";s:9:"mailchimp";s:7:"COMPANY";}}]]></map_fields>
261
  <jobs>
262
  <magemonkey_bulksync_export_subscribers>
263
  <schedule><cron_expr>0 * * * *</cron_expr></schedule>
264
+ <run><model>monkey/cron::bulksyncExportSubscribers</model></run>
265
  </magemonkey_bulksync_export_subscribers>
266
  <magemonkey_bulksync_import_subscribers>
267
  <schedule><cron_expr>0 * * * *</cron_expr></schedule>
268
+ <run><model>monkey/cron::bulksyncImportSubscribers</model></run>
269
  </magemonkey_bulksync_import_subscribers>
270
  <magemonkey_autoexport_subscribers>
271
  <schedule><cron_expr>0 * * * *</cron_expr></schedule>
272
+ <run><model>monkey/cron::autoExportSubscribers</model></run>
273
  </magemonkey_autoexport_subscribers>
274
  <magemonkey_sendorders_asynch>
275
  <schedule><cron_expr>*/15 * * * *</cron_expr></schedule>
app/code/community/Ebizmarts/MageMonkey/etc/system.xml CHANGED
@@ -98,6 +98,15 @@
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
  <list translate="label comment">
102
  <label>General Subscription</label>
103
  <frontend_type>select</frontend_type>
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>
103
+ <frontend_type>text</frontend_type>
104
+ <sort_order>29</sort_order>
105
+ <show_in_default>1</show_in_default>
106
+ <show_in_website>0</show_in_website>
107
+ <show_in_store>1</show_in_store>
108
+ <can_be_empty>1</can_be_empty>
109
+ </maxlistsamount>
110
  <list translate="label comment">
111
  <label>General Subscription</label>
112
  <frontend_type>select</frontend_type>
app/code/community/Ebizmarts/MageMonkey/sql/monkey_setup/mysql4-upgrade-1.1.21-1.1.22.php CHANGED
@@ -23,7 +23,7 @@ $installer->run("
23
  `lists` TEXT NOT NULL,
24
  `mapfields` TEXT,
25
  `created_at` DATETIME NOT NULL ,
26
- `proccessed` smallint(1) default 0,
27
  PRIMARY KEY (`id`)
28
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
29
 
@@ -31,7 +31,7 @@ $installer->run("
31
  `id` INT(10) unsigned NOT NULL auto_increment,
32
  `info` TEXT NOT NULL,
33
  `created_at` DATETIME NOT NULL ,
34
- `proccessed` smallint(1) default 0,
35
  PRIMARY KEY (`id`)
36
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
37
 
23
  `lists` TEXT NOT NULL,
24
  `mapfields` TEXT,
25
  `created_at` DATETIME NOT NULL ,
26
+ `processed` smallint(1) default 0,
27
  PRIMARY KEY (`id`)
28
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
29
 
31
  `id` INT(10) unsigned NOT NULL auto_increment,
32
  `info` TEXT NOT NULL,
33
  `created_at` DATETIME NOT NULL ,
34
+ `processed` smallint(1) default 0,
35
  PRIMARY KEY (`id`)
36
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
37
 
app/code/community/Ebizmarts/Mandrill/Model/Email/Template.php CHANGED
@@ -125,6 +125,7 @@ class Ebizmarts_Mandrill_Model_Email_Template extends Mage_Core_Model_Email_Temp
125
  }
126
  else {
127
  $storeId = Mage::app()->getStore()->getId();
 
128
  $this->_mail = new Mandrill_Message(Mage::getStoreConfig( Ebizmarts_Mandrill_Model_System_Config::APIKEY,$storeId ));
129
  return $this->_mail;
130
  }
125
  }
126
  else {
127
  $storeId = Mage::app()->getStore()->getId();
128
+ Mage::log("store: $storeId API: ".Mage::getStoreConfig( Ebizmarts_Mandrill_Model_System_Config::APIKEY,$storeId ));
129
  $this->_mail = new Mandrill_Message(Mage::getStoreConfig( Ebizmarts_Mandrill_Model_System_Config::APIKEY,$storeId ));
130
  return $this->_mail;
131
  }
app/code/community/Ebizmarts/Mandrill/Model/System/Config/Source/Userinfo.php CHANGED
@@ -25,6 +25,15 @@ class Ebizmarts_Mandrill_Model_System_Config_Source_Userinfo
25
  public function __construct()
26
  {
27
  $storeId = Mage::app()->getStore()->getId();
 
 
 
 
 
 
 
 
 
28
  if (!$this->_account_details&&Mage::getStoreConfig( Ebizmarts_Mandrill_Model_System_Config::APIKEY,$storeId)) {
29
  $api = new Mandrill_Message(Mage::getStoreConfig( Ebizmarts_Mandrill_Model_System_Config::APIKEY,$storeId));
30
  try {
25
  public function __construct()
26
  {
27
  $storeId = Mage::app()->getStore()->getId();
28
+ if(Mage::app()->getRequest()->getParam('store')) {
29
+ $stores = Mage::app()->getStores();
30
+ foreach($stores as $store) {
31
+ if($store->getCode()==Mage::app()->getRequest()->getParam('store')) {
32
+ $storeId = $store->getStoreId();
33
+ break;
34
+ }
35
+ }
36
+ }
37
  if (!$this->_account_details&&Mage::getStoreConfig( Ebizmarts_Mandrill_Model_System_Config::APIKEY,$storeId)) {
38
  $api = new Mandrill_Message(Mage::getStoreConfig( Ebizmarts_Mandrill_Model_System_Config::APIKEY,$storeId));
39
  try {
app/code/community/Ebizmarts/Mandrill/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ebizmarts_Mandrill>
5
- <version>2.0.0</version>
6
  </Ebizmarts_Mandrill>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Ebizmarts_Mandrill>
5
+ <version>2.0.1</version>
6
  </Ebizmarts_Mandrill>
7
  </modules>
8
  <global>
app/design/adminhtml/default/default/template/magemonkey/system/config/resetlocal360.phtml CHANGED
@@ -6,7 +6,7 @@
6
  onSuccess: function(transport){
7
 
8
  if (transport.responseText == 1){
9
- alert('All local orders for Ecommerce360 was deleted')
10
  }
11
  else {
12
  alert('En error happens deleting local orders in Ecommerce360')
6
  onSuccess: function(transport){
7
 
8
  if (transport.responseText == 1){
9
+ alert('All local orders for Ecommerce360 were deleted')
10
  }
11
  else {
12
  alert('En error happens deleting local orders in Ecommerce360')
app/design/adminhtml/default/default/template/magemonkey/system/config/resetremote360.phtml CHANGED
@@ -6,7 +6,7 @@
6
  onSuccess: function(transport){
7
 
8
  if (transport.responseText == 1){
9
- alert('All remote orders for Ecommerce360 was deleted')
10
  }
11
  else {
12
  alert('En error happens deleting remote orders in Ecommerce360')
6
  onSuccess: function(transport){
7
 
8
  if (transport.responseText == 1){
9
+ alert('All remote orders for Ecommerce360 were deleted')
10
  }
11
  else {
12
  alert('En error happens deleting remote orders in Ecommerce360')
app/design/frontend/base/default/layout/ebizmarts/autoresponder.xml CHANGED
@@ -29,7 +29,7 @@
29
  </customer_account>
30
  <catalog_product_view>
31
  <reference name="head">
32
- <action method="addJs" ifconfig="ebizmarts_autoresponder/visitedproducts/active"><script>ebizmarts/autoresponders/visitedproducts.js</script></action>
33
  </reference>
34
  </catalog_product_view>
35
  <!--review_product_list>
@@ -62,15 +62,20 @@
62
  </review_product_list-->
63
 
64
  <catalog_product_view>
 
 
65
  <reference name="content">
66
  <reference name="product.info">
67
  <reference name="alert.urls">
68
- <block type="ebizmarts_autoresponder/backtostock_notice" name="backtostock.notice" as="backtostock_notice" template="ebizmarts/autoresponder/backtostock/catalog/product/notice.phtml" />
69
  </reference>
70
  </reference>
71
  <reference name="product.info.additional">
72
- <block type="ebizmarts_autoresponder/backtostock_notice" name="backtostock.form" as="backtostock_form" template="ebizmarts/autoresponder/backtostock/catalog/product/form.phtml" />
73
  </reference>
74
  </reference>
 
 
 
75
  </catalog_product_view>
76
  </layout>
29
  </customer_account>
30
  <catalog_product_view>
31
  <reference name="head">
32
+ <action method="addJs" module="ebizmarts_autoresponder"><script helper="ebizmarts_autoresponder/getCanShowJs"></script></action>
33
  </reference>
34
  </catalog_product_view>
35
  <!--review_product_list>
62
  </review_product_list-->
63
 
64
  <catalog_product_view>
65
+ <block type="ebizmarts_autoresponder/backtostock_notice" name="backtostock.notice" as="backtostock_notice" template="ebizmarts/autoresponder/backtostock/catalog/product/notice.phtml" />
66
+ <block type="ebizmarts_autoresponder/backtostock_notice" name="backtostock.form" as="backtostock_form" template="ebizmarts/autoresponder/backtostock/catalog/product/form.phtml" />
67
  <reference name="content">
68
  <reference name="product.info">
69
  <reference name="alert.urls">
70
+ <action method="append" ifconfig="ebizmarts_autoresponder/general/active"><block>backtostock.notice</block></action>
71
  </reference>
72
  </reference>
73
  <reference name="product.info.additional">
74
+ <action method="append" ifconfig="ebizmarts_autoresponder/general/active"><block>backtostock.form</block></action>
75
  </reference>
76
  </reference>
77
+ <depends>
78
+ <ifconfig>ebizmarts_autoresponder/backtostock/active</ifconfig>
79
+ </depends>
80
  </catalog_product_view>
81
  </layout>
app/design/frontend/base/default/template/ebizmarts/autoresponder/backtostock/catalog/product/form.phtml CHANGED
@@ -13,7 +13,7 @@
13
  $_product = $this->getProduct();
14
  $formAction = $this->getSubscribeUrl();
15
  ?>
16
- <?php if($_product && !$_product->getStockItem()->getIsInStock()): ?>
17
 
18
  <?php if( $this->isLoggedIn() || (!$this->isLoggedIn() && Mage::helper('ebizmarts_autoresponder')->isBacktoStockEnabledForGuest()) ): ?>
19
 
13
  $_product = $this->getProduct();
14
  $formAction = $this->getSubscribeUrl();
15
  ?>
16
+ <?php if($_product && !$_product->getStockItem()->getIsInStock() && Mage::helper('ebizmarts_autoresponder')->config('backtostock/active')): ?>
17
 
18
  <?php if( $this->isLoggedIn() || (!$this->isLoggedIn() && Mage::helper('ebizmarts_autoresponder')->isBacktoStockEnabledForGuest()) ): ?>
19
 
app/design/frontend/base/default/template/ebizmarts/autoresponder/backtostock/catalog/product/notice.phtml CHANGED
@@ -13,7 +13,7 @@
13
  $_product = $this->getProduct();
14
  $formAction = $this->getSubscribeUrl();
15
  ?>
16
- <?php if($_product && !$_product->getStockItem()->getIsInStock()): ?>
17
 
18
  <?php if($this->isLoggedIn() || (!$this->isLoggedIn() && Mage::helper('ebizmarts_autoresponder')->isBacktoStockEnabledForGuest()) ): ?>
19
  <div class="box-collateral block-autoresponder-backtostock">
13
  $_product = $this->getProduct();
14
  $formAction = $this->getSubscribeUrl();
15
  ?>
16
+ <?php if($_product && (!$_product->getStockItem()->getIsInStock() || $_product->getStockItem()->getQty() == 0) && Mage::helper('ebizmarts_autoresponder')->config('backtostock/active')): ?>
17
 
18
  <?php if($this->isLoggedIn() || (!$this->isLoggedIn() && Mage::helper('ebizmarts_autoresponder')->isBacktoStockEnabledForGuest()) ): ?>
19
  <div class="box-collateral block-autoresponder-backtostock">
app/design/frontend/base/default/template/magemonkey/checkout/subscribe.phtml CHANGED
@@ -16,10 +16,7 @@ $force = $this->getForce();
16
  subscribeValue = checkedLists+',';
17
  $('magemonkey-subscribe').remove();
18
  }
19
- var id = "subscribe-"+element.readAttribute('value');
20
- if($(id)) {
21
- $(id).remove();
22
- }
23
  //if checked add this element else remove it
24
  if(element.checked){
25
  var inputer = new Element('input', { name: "magemonkey_subscribe", id: "magemonkey-subscribe", value: subscribeValue+element.readAttribute('value'), type: "hidden" });
@@ -53,14 +50,19 @@ $force = $this->getForce();
53
 
54
  }
55
  addGroupToPost = function (element){
 
56
  if(element.checked){
57
 
58
  try{
59
- var group = new Element('input', { name: element.readAttribute('name'), id: element.readAttribute('id'), value: element.getValue(), checked:true, type: "checkbox" });
60
  Element.insert(Form.findFirstElement(payment.form), group);
61
  }catch(notelem){
62
  $("co-payment-form").insert(group);
63
  }
 
 
 
 
64
  }
65
  }
66
  addElementToPost = function (element){
@@ -81,35 +83,32 @@ $force = $this->getForce();
81
  <h1><?php echo $this->__('Newsletter Subscription'); ?></h1>
82
  </div>
83
  <?php echo $this->getBlockHtml('formkey'); ?>
84
- <ul class="monkey-additional-lists">
85
- <li class="listdata"><?php echo $generalList['name']; ?>
86
- <input<?php if($auto): ?> checked="checked"<?php endif;?> type="checkbox" onchange="addSubscribeToPost(this);" name="list[<?php echo $generalList['id'] ?>][subscribed]" id="magemonkey-trigger" value="<?php echo $generalList['id']; ?>" title="<?php echo $generalList['name']; ?>" class="monkey-list-subscriber" />
87
- <?php if(is_array($generalList['interest_groupings']) && $this->getCanModify() == 1): ?>
88
- <div id="interest_groupings_<?php echo $generalList['id']; ?>" class="interest-groupings">
89
- <?php foreach($generalList['interest_groupings'] as $group): ?>
90
- <?php if($group['name'] != 'MAGE_CUSTOMER_GROUPS'): ?>
91
- <div class="grouping">
92
- <?php if ($group['form_field'] != 'hidden'): ?><strong><?php echo $group['name']; ?></strong><?php endif; ?>
93
- <?php echo $this->renderGroup($group, $generalList); ?>
94
- </div>
95
- <?php endif; ?>
96
- <?php endforeach; ?>
97
- </div>
98
-
99
- <?php endif; ?>
100
- </li>
101
- </ul>
102
- <!-- General Subscription -->
103
-
104
- <!-- Additional Lists -->
105
  <div class="monkey-multisubscribe">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  <ul class="monkey-additional-lists">
107
  <?php
108
  foreach($lists as $list):
109
 
110
- if($this->notInMyAccount() && in_array($list['id'], $myLists)){
111
- continue;
112
- }
113
  $igroups = $list['interest_groupings'];
114
  ?>
115
  <li class="listdata"><?php echo $list['name']; ?>
@@ -119,13 +118,12 @@ $force = $this->getForce();
119
  <?php foreach($igroups as $group): ?>
120
  <?php if($group['name'] != 'MAGE_CUSTOMER_GROUPS'): ?>
121
  <div class="grouping">
122
- <strong><?php echo $group['name']; ?></strong>
123
- <?php echo $this->renderGroup($group, $list); ?>
124
  </div>
125
  <?php endif; ?>
126
  <?php endforeach; ?>
127
  </div>
128
-
129
  <?php endif; ?>
130
  </li>
131
  <?php endforeach; ?>
@@ -133,12 +131,6 @@ $force = $this->getForce();
133
  </div>
134
  <!-- Additional Lists -->
135
  </div>
136
- <?php
137
- //Check if there's additional list selected, if not Dont show this section
138
- if(count($lists) > 0):
139
- //echo $this->getChildHtml('left.monkeysignup');
140
- endif;
141
- ?>
142
 
143
  <script type="text/javascript">
144
  //Handle newsletter subscribe/unsubscribe checkbox events
@@ -166,44 +158,60 @@ endif;
166
  });
167
  });
168
  //If force subscription or checked by default set the elements as clicked
169
- <?php if($auto):?>addSubscribeToPost($('magemonkey-trigger'));<?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
170
  <?php if($auto):
171
  foreach($lists as $list):
172
  $string = "magemonkey-trigger-".$list['id'];
173
  ?>addSubscribeToPost($(<?php Print(json_encode($string)); ?>));
 
 
 
 
 
 
 
174
  <?php endforeach; ?>
175
  <?php endif; ?>
176
 
177
 
178
- if( $$('div#checkout-step-review div.monkey-multisubscribe').length ){
179
-
180
- var event = 'change';
181
-
182
- //Radio||Checkbox
183
- /*$$('div#checkout-step-review div.monkey-multisubscribe input').each(function(input){
184
-
185
- if(input.readAttribute('type') == 'radio'){
186
- event = 'click';
187
- }
188
-
189
- input.observe(event, function(){
190
- addElementToPost(this);
191
- });
192
- });*/
193
-
194
- $$('div#checkout-step-review div.monkey-multisubscribe select').each(function(ddl){
195
- ddl.observe(event, function(){
196
- addElementToPost(this);
197
- });
198
- });
199
-
200
- }
201
- //Handle newsletter subscribe/unsubscribe checkbox events
202
  $$('.interest-groupings input').each(function(group){
203
  group.observe('change', function(){
204
- if(group.checked){
205
- addGroupToPost(group);
206
- }
207
  });
208
  });
209
  </script>
16
  subscribeValue = checkedLists+',';
17
  $('magemonkey-subscribe').remove();
18
  }
19
+
 
 
 
20
  //if checked add this element else remove it
21
  if(element.checked){
22
  var inputer = new Element('input', { name: "magemonkey_subscribe", id: "magemonkey-subscribe", value: subscribeValue+element.readAttribute('value'), type: "hidden" });
50
 
51
  }
52
  addGroupToPost = function (element){
53
+
54
  if(element.checked){
55
 
56
  try{
57
+ var group = new Element('input', { name: element.readAttribute('name'), id: "subscribe"+element.readAttribute('id'), value: element.getValue(), checked:true, type: "checkbox" });
58
  Element.insert(Form.findFirstElement(payment.form), group);
59
  }catch(notelem){
60
  $("co-payment-form").insert(group);
61
  }
62
+ }else{
63
+ if($("subscribe"+element.readAttribute('id'))){
64
+ $("subscribe"+element.readAttribute('id')).remove();
65
+ }
66
  }
67
  }
68
  addElementToPost = function (element){
83
  <h1><?php echo $this->__('Newsletter Subscription'); ?></h1>
84
  </div>
85
  <?php echo $this->getBlockHtml('formkey'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  <div class="monkey-multisubscribe">
87
+ <ul class="monkey-general-list">
88
+ <li class="listdata"><?php echo $generalList['name']; ?>
89
+ <input<?php if($auto): ?> checked="checked"<?php endif;?> type="checkbox" onchange="addSubscribeToPost(this);" name="list[<?php echo $generalList['id'] ?>][subscribed]" id="magemonkey-trigger" value="<?php echo $generalList['id']; ?>" title="<?php echo $generalList['name']; ?>" class="monkey-list-subscriber" />
90
+ <?php if(is_array($generalList['interest_groupings']) && $this->getCanModify() == 1): ?>
91
+ <div id="interest_groupings_<?php echo $generalList['id']; ?>" class="interest-groupings">
92
+ <?php foreach($generalList['interest_groupings'] as $group): ?>
93
+ <?php if($group['name'] != 'MAGE_CUSTOMER_GROUPS'): ?>
94
+ <div class="grouping">
95
+ <?php if ($group['form_field'] != 'hidden'): ?><strong><?php echo $group['name']; ?></strong><?php endif; ?>
96
+ <?php echo $this->renderGroup($group, $generalList, $auto); ?>
97
+ </div>
98
+ <?php endif; ?>
99
+ <?php endforeach; ?>
100
+ </div>
101
+
102
+ <?php endif; ?>
103
+ </li>
104
+ </ul>
105
+ <!-- General Subscription -->
106
+
107
+ <!-- Additional Lists -->
108
  <ul class="monkey-additional-lists">
109
  <?php
110
  foreach($lists as $list):
111
 
 
 
 
112
  $igroups = $list['interest_groupings'];
113
  ?>
114
  <li class="listdata"><?php echo $list['name']; ?>
118
  <?php foreach($igroups as $group): ?>
119
  <?php if($group['name'] != 'MAGE_CUSTOMER_GROUPS'): ?>
120
  <div class="grouping">
121
+ <?php if ($group['form_field'] != 'hidden'): ?><strong><?php echo $group['name']; ?></strong><?php endif; ?>
122
+ <?php echo $this->renderGroup($group, $list, $auto); ?>
123
  </div>
124
  <?php endif; ?>
125
  <?php endforeach; ?>
126
  </div>
 
127
  <?php endif; ?>
128
  </li>
129
  <?php endforeach; ?>
131
  </div>
132
  <!-- Additional Lists -->
133
  </div>
 
 
 
 
 
 
134
 
135
  <script type="text/javascript">
136
  //Handle newsletter subscribe/unsubscribe checkbox events
158
  });
159
  });
160
  //If force subscription or checked by default set the elements as clicked
161
+ <?php if($auto):?>addSubscribeToPost($('magemonkey-trigger'));
162
+ <?php if($this->getCanModify() && is_array($generalList['interest_groupings'])): ?>
163
+ <?php foreach($generalList['interest_groupings'] as $group): ?>
164
+ <?php foreach($group['groups'] as $g): ?>
165
+ <?php $idToAdd = $this->getGroupId($g, TRUE); ?>
166
+ <?php if($idToAdd): ?>
167
+ addGroupToPost($(<?php Print(json_encode($idToAdd));?>));
168
+ <?php endif; ?>
169
+ <?php endforeach; ?>
170
+ <?php endforeach; ?>
171
+ <?php endif; ?>
172
+ <?php endif; ?>
173
  <?php if($auto):
174
  foreach($lists as $list):
175
  $string = "magemonkey-trigger-".$list['id'];
176
  ?>addSubscribeToPost($(<?php Print(json_encode($string)); ?>));
177
+ <?php if(is_array($list['interest_groupings'])): ?>
178
+ <?php foreach($list['interest_groupings'] as $group): ?>
179
+ <?php foreach($group['groups'] as $g): ?>
180
+ addGroupToPost($(<?php Print(json_encode($this->getGroupId($g)));?>));
181
+ <?php endforeach; ?>
182
+ <?php endforeach; ?>
183
+ <?php endif; ?>
184
  <?php endforeach; ?>
185
  <?php endif; ?>
186
 
187
 
188
+ // if( $$('div#checkout-step-review div.monkey-multisubscribe').length ){
189
+ //
190
+ // var event = 'change';
191
+ //
192
+ // //Radio||Checkbox
193
+ // $$('div#checkout-step-review div.monkey-multisubscribe input').each(function(input){
194
+ //
195
+ // if(input.readAttribute('type') == 'radio'){
196
+ // event = 'click';
197
+ // }
198
+ //
199
+ // input.observe(event, function(){
200
+ // addElementToPost(this);
201
+ // });
202
+ // });
203
+ //
204
+ // $$('div#checkout-step-review div.monkey-multisubscribe select').each(function(ddl){
205
+ // ddl.observe(event, function(){
206
+ // addElementToPost(this);
207
+ // });
208
+ // });
209
+ //
210
+ // }
211
+ //Handle newsletter groups subscribe/unsubscribe checkbox events
212
  $$('.interest-groupings input').each(function(group){
213
  group.observe('change', function(){
214
+ addGroupToPost(group);
 
 
215
  });
216
  });
217
  </script>
app/design/frontend/base/default/template/magemonkey/lists.phtml CHANGED
@@ -19,7 +19,7 @@ $canmodify = $this->getCanModify();
19
  <?php if($this->getShowGeneral()): ?>
20
  <!-- General Subscription -->
21
  <li class="listdata"><?php echo $this->listLabel($generalList); ?>
22
- <?php if(is_array($generalList['interest_groupings'])): ?>
23
 
24
  <div id="interest_groupings_<?php echo $generalList['id']; ?>" class="interest-groupings">
25
  <?php foreach($generalList['interest_groupings'] as $group): ?>
@@ -49,7 +49,7 @@ $canmodify = $this->getCanModify();
49
  ?>
50
 
51
  <li class="listdata"><?php echo $this->listLabel($list); ?>
52
- <?php if(is_array($igroups)): ?>
53
  <div id="interest_groupings_<?php echo $list['id']; ?>" class="interest-groupings">
54
  <?php foreach($igroups as $group): ?>
55
  <?php if($group['name'] != 'MAGE_CUSTOMER_GROUPS'): ?>
19
  <?php if($this->getShowGeneral()): ?>
20
  <!-- General Subscription -->
21
  <li class="listdata"><?php echo $this->listLabel($generalList); ?>
22
+ <?php if($generalList['interest_groupings'] && is_array($generalList['interest_groupings'])): ?>
23
 
24
  <div id="interest_groupings_<?php echo $generalList['id']; ?>" class="interest-groupings">
25
  <?php foreach($generalList['interest_groupings'] as $group): ?>
49
  ?>
50
 
51
  <li class="listdata"><?php echo $this->listLabel($list); ?>
52
+ <?php if($igroups && is_array($igroups)): ?>
53
  <div id="interest_groupings_<?php echo $list['id']; ?>" class="interest-groupings">
54
  <?php foreach($igroups as $group): ?>
55
  <?php if($group['name'] != 'MAGE_CUSTOMER_GROUPS'): ?>
js/ebizmarts/autoresponders/visitedproducts.js CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  (function () {
8
  function markVisited(productID) {
9
- new Ajax.Request('../index.php/ebizautoresponder/autoresponder/markVisitedProducts?product_id=' + productID, {
10
  method: 'get',
11
  onSuccess: function (transport) {
12
  }
6
  */
7
  (function () {
8
  function markVisited(productID) {
9
+ new Ajax.Request('/ebizautoresponder/autoresponder/markVisitedProducts?product_id=' + productID, {
10
  method: 'get',
11
  onSuccess: function (transport) {
12
  }
js/ebizmarts/autoresponders/visitedproductsstorecodes.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Ebizmarts_MageMonkey
3
+ * @copyright Copyright Ebizmarts
4
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
5
+ *
6
+ */
7
+ (function () {
8
+ function getUrl(){
9
+ var path = window.location.toString();
10
+ var myUrl = path.split('/')
11
+ var max = 4;
12
+ if(jQuery.inArray('index.php', myUrl) != -1){
13
+ max = 5;
14
+ }
15
+ return myUrl.slice(0,max).join('/') + '/ebizautoresponder/autoresponder/';
16
+ }
17
+
18
+ function markVisited(productID) {
19
+ new Ajax.Request(getUrl() + 'markVisitedProducts?product_id=' + productID, {
20
+ method: 'get',
21
+ onSuccess: function (transport) {
22
+ }
23
+ });
24
+ }
25
+
26
+ var cb = function () {
27
+ var $product = $$('input[name^=product]').first(),
28
+ productID = '';
29
+ if ($product) {
30
+ productID = $product.value;
31
+ new Ajax.Request(getUrl() + 'getVisitedProductsConfig?product_id=' + productID, {
32
+ method: 'get',
33
+ onSuccess: function (transport) {
34
+ if (transport.responseJSON.time > -1) {
35
+ markVisited.delay(transport.responseJSON.time, productID);
36
+ }
37
+ }
38
+ });
39
+ }
40
+ }
41
+ if (document.loaded) {
42
+ cb();
43
+ } else {
44
+ document.observe('dom:loaded', cb);
45
+ }
46
+ // window.markVisited = markVisited;
47
+ })();
lib/Mandrill/Mandrill.php CHANGED
@@ -1,21 +1,41 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- require_once 'Mandrill/Templates.php';
4
- require_once 'Mandrill/Exports.php';
5
- require_once 'Mandrill/Users.php';
6
- require_once 'Mandrill/Rejects.php';
7
- require_once 'Mandrill/Inbound.php';
8
- require_once 'Mandrill/Tags.php';
9
- require_once 'Mandrill/Messages.php';
10
- require_once 'Mandrill/Whitelists.php';
11
- require_once 'Mandrill/Ips.php';
12
- require_once 'Mandrill/Internal.php';
13
- require_once 'Mandrill/Subaccounts.php';
14
- require_once 'Mandrill/Urls.php';
15
- require_once 'Mandrill/Webhooks.php';
16
- require_once 'Mandrill/Senders.php';
17
- require_once 'Mandrill/Metadata.php';
18
- require_once 'Mandrill/Exceptions.php';
19
 
20
  class Mandrill_Mandrill {
21
 
@@ -125,11 +145,16 @@ class Mandrill_Mandrill {
125
  if(curl_error($ch)) {
126
  throw new Mandrill_HttpError("API call to $url failed: " . curl_error($ch));
127
  }
 
128
  $result = json_decode($response_body, true);
129
  if($result === null) throw new Mandrill_Error('We were unable to decode the JSON response from the Mandrill API: ' . $response_body);
130
-
131
- if(floor($info['http_code'] / 100) >= 4) {
132
- throw $this->castError($result);
 
 
 
 
133
  }
134
 
135
  return $result;
1
  <?php
2
+ if(defined("COMPILER_INCLUDE_PATH")) {
3
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Templates.php');
4
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Exports.php');
5
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Users.php');
6
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Rejects.php');
7
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Inbound.php');
8
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Tags.php');
9
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Messages.php');
10
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Whitelists.php');
11
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Ips.php');
12
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Internal.php');
13
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Subaccounts.php');
14
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Urls.php');
15
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Webhooks.php');
16
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Senders.php');
17
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Metadata.php');
18
+ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Exceptions.php');
19
+ }
20
+ else {
21
+ require_once(dirname(__FILE__) . '/Mandrill/Templates.php');
22
+ require_once(dirname(__FILE__) . '/Mandrill/Exports.php');
23
+ require_once(dirname(__FILE__) . '/Mandrill/Users.php');
24
+ require_once(dirname(__FILE__) . '/Mandrill/Rejects.php');
25
+ require_once(dirname(__FILE__) . '/Mandrill/Inbound.php');
26
+ require_once(dirname(__FILE__) . '/Mandrill/Tags.php');
27
+ require_once(dirname(__FILE__) . '/Mandrill/Messages.php');
28
+ require_once(dirname(__FILE__) . '/Mandrill/Whitelists.php');
29
+ require_once(dirname(__FILE__) . '/Mandrill/Ips.php');
30
+ require_once(dirname(__FILE__) . '/Mandrill/Internal.php');
31
+ require_once(dirname(__FILE__) . '/Mandrill/Subaccounts.php');
32
+ require_once(dirname(__FILE__) . '/Mandrill/Urls.php');
33
+ require_once(dirname(__FILE__) . '/Mandrill/Webhooks.php');
34
+ require_once(dirname(__FILE__) . '/Mandrill/Senders.php');
35
+ require_once(dirname(__FILE__) . '/Mandrill/Metadata.php');
36
+ require_once(dirname(__FILE__) . '/Mandrill/Exceptions.php');
37
 
38
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  class Mandrill_Mandrill {
41
 
145
  if(curl_error($ch)) {
146
  throw new Mandrill_HttpError("API call to $url failed: " . curl_error($ch));
147
  }
148
+
149
  $result = json_decode($response_body, true);
150
  if($result === null) throw new Mandrill_Error('We were unable to decode the JSON response from the Mandrill API: ' . $response_body);
151
+
152
+ try {
153
+ if (floor($info['http_code'] / 100) >= 4) {
154
+ throw $this->castError($result);
155
+ }
156
+ }catch(Exception $e){
157
+ $this->log($e->getMessage());
158
  }
159
 
160
  return $result;
lib/Mandrill/Message.php CHANGED
@@ -16,6 +16,7 @@ class Mandrill_Message extends Mandrill_Mandrill
16
  protected $_from = null;
17
  protected $_to = array();
18
  protected $_headers = array();
 
19
 
20
 
21
  public function createAttachment($body,
@@ -109,6 +110,7 @@ class Mandrill_Message extends Mandrill_Mandrill
109
  $email = $this->_filterEmail($email);
110
  // $name = $this->_filterName($name);
111
  $this->_from = $email;
 
112
  // $this->_storeHeader('From', $this->_formatAddress($email, $name), true);
113
 
114
  return $this;
@@ -179,13 +181,51 @@ class Mandrill_Message extends Mandrill_Mandrill
179
  throw new Zend_Mail_Exception('Cannot set standard header from addHeader()');
180
  }
181
 
182
- $this->_header[] = array($name=>$value);
183
 
184
  return $this;
185
  }
186
  public function getHeaders()
187
  {
188
- return $this->_headers;
189
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
 
 
 
 
 
 
 
 
 
 
191
  }
16
  protected $_from = null;
17
  protected $_to = array();
18
  protected $_headers = array();
19
+ protected $_fromName;
20
 
21
 
22
  public function createAttachment($body,
110
  $email = $this->_filterEmail($email);
111
  // $name = $this->_filterName($name);
112
  $this->_from = $email;
113
+ $this->_fromName = $name;
114
  // $this->_storeHeader('From', $this->_formatAddress($email, $name), true);
115
 
116
  return $this;
181
  throw new Zend_Mail_Exception('Cannot set standard header from addHeader()');
182
  }
183
 
184
+ $this->_header[$name] = $value;
185
 
186
  return $this;
187
  }
188
  public function getHeaders()
189
  {
190
+ return $this->_headers[0];
191
  }
192
+ public function send()
193
+ {
194
+ $email = array();
195
+ foreach($this->_to as $to) {
196
+ $email['to'][] = array(
197
+ 'email' => $to
198
+ );
199
+ }
200
+ foreach($this->_bcc as $bcc) {
201
+ $email['to'][] = array(
202
+ 'email' => $bcc,
203
+ 'type' => 'bcc'
204
+ );
205
+ }
206
+ $email['subject'] = $this->_subject;
207
+ if(isset($this->_fromName)) {
208
+ $email['from_name'] = $this->_fromName;
209
+ }
210
+ $email['from_email'] = $this->_from;
211
+ $email['headers'] = $this->getHeaders();
212
+ if($att = $this->getAttachments()) {
213
+ $email['attachments'] = $att;
214
+ }
215
+ if($this->_bodyHtml) {
216
+ $email['html'] = $this->_bodyHtml;
217
+ }
218
+ if($this->_bodyText) {
219
+ $email['text'] = $this->_bodyText;
220
+ }
221
 
222
+ try {
223
+ $result = $this->messages->send($email);
224
+ }
225
+ catch( Exception $e ) {
226
+ Mage::logException( $e );
227
+ return false;
228
+ }
229
+ return true;
230
+ }
231
  }
package.xml CHANGED
@@ -1,28 +1,43 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ebizmarts_MageMonkey</name>
4
- <version>1.1.22</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.22&#xD;
12
  --------&#xD;
13
- - New Mandrill implementation&#xD;
14
- - Async implementation for subscritions and ecommerce360&#xD;
15
- - New mark for identify if the customers click on subscribe or not&#xD;
16
- - New implementation for differentiate abandoned cart emails&#xD;
17
- - New buttons for reset ecommerce360 order (local and remote)&#xD;
18
- - New customer group management&#xD;
19
- - Fix for product availability in abandoned cart&#xD;
20
- - Fix for ecommerce360 currency&#xD;
21
- - Fix for coupons</notes>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  <authors><author><name>Ebizmarts Development Team</name><user>auto-converted</user><email>info@ebizmarts.com</email></author></authors>
23
- <date>2014-09-22</date>
24
- <time>20:08:08</time>
25
- <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="0912559d8068a1af340765695b36eb7e"/></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="f28a37562c410fba09d976e730f769af"/><file name="Signup.php" hash="222115a830f5fe9d35a7d15d811936bd"/></dir><dir name="Helper"><file name="Cache.php" hash="67e65a10f74e15e46e198ff938614d46"/><file name="Data.php" hash="9e1708ebd0dc4924e4973697142d7839"/><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="12114a33e1301ae0f2c80e5c19a13796"/><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="e68a4a99bc5fda1bdd3776c3e63f9761"/><file name="Ecommerce.php" hash="d74ca44e23d32d22f5f64898028d784f"/><file name="Ecommerce360.php" hash="bff87004ce4eb7410dfde9ab7e4ffddc"/><file name="MCAPI.php" hash="086a523af515ce216ac20730f56bdd47"/><file name="MCEXPORTAPI.php" hash="c8f16211692cf33992fbd785019c01f7"/><file name="Monkey.php" hash="16dd9b512c80d7fc41a36cd9bebf8b82"/><file name="Observer.php" hash="8e2471c52572c2513811603c68f2f0a1"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BulksyncController.php" hash="14e771adfcbe3395d5624e3f3ca6e8a2"/><file name="ConfigController.php" hash="72dcb0b31d5bcaaab9f9d4ca4a6e22e6"/><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="24f60fa1eaf04bf90459ef2f2d3be893"/><file name="WebhookController.php" hash="134517b313c1173fc47b5bd9481656c1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2cd1bef6c2144cfbdcd68da1647e100c"/><file name="config.xml" hash="c1a3fd94f2503cf606bf90cd36ac3f77"/><file name="system.xml" hash="fd1923beed4749924162c6c257cbcb7c"/></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="52d1950ebedd5d0afe69cf381245cef0"/><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="c670b249708a5f341df96d7b269f31a6"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Userinfo.php" hash="ab0252b2116f0f5f4fa19c30fc007561"/></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="6f0d837f1a85ef7c82f52d16ba14d2c1"/><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="9590493276691d775bc16be69570371e"/></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="7ba53f0d262e55e55c2212bffeff3fc7"/></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="529bd17883e7122dd738ec824a27c962"/><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="9e5e895f96a0374c2a7feb489e95364d"/><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="9b4a79044374ef53028bfd53d6f6cb8c"/></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="b59125e9bdffba559d45ab4ad9d6d173"/><file name="EventObserver.php" hash="507db9bceb25832481e81053aecc082e"/><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="dcc9961677efd579fa17c9c07df10b00"/><file name="BacktostockController.php" hash="0a7f9280f87c7a663f06529e3811cfc1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="59a240f12b496566f1a2b1de5f053e96"/><file name="config.xml" hash="78775a88cd3a28618aea456f55a92cb8"/><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="e8eb1cc7faf18deb6a415b56f290f5f6"/></dir><file name="magemonkey.xml" hash="f86c4a1e77468bf497bbc31f00d379c9"/></dir><dir name="template"><dir name="magemonkey"><dir name="checkout"><file name="subscribe.phtml" hash="d4929f4baa9d908c9ac6d2a0ccd1c064"/></dir><file name="lists.phtml" hash="711deb72f80bbabca14a52d3a62bc661"/></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="0bf63a70962abf54ad5d995ef38724d3"/><file name="notice.phtml" hash="50e73f8633d6c90ef0a6f630e4d23802"/></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="b33c2f9490e0d7ba1dd984b1b61686ca"/><file name="resetremote360.phtml" hash="1dd1ea0de2041a07de09a4344c336b87"/></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="dfbaecea4b88464d3d3a62c269075d5d"/><file name="Message.php" hash="42361e8199df12c74a271bd296643e46"/></dir></dir><dir name="js"><dir name="ebizmarts"><dir name="autoresponders"><file name="visitedproducts.js" hash="a8baeac3511ff874b7972c9008c6543b"/></dir></dir></dir></target></contents>
26
  <compatible/>
27
  <dependencies/>
28
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ebizmarts_MageMonkey</name>
4
+ <version>1.1.23</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.23&#xD;
12
  --------&#xD;
13
+ Fixed subscriber synchronization with MailChimp bug.&#xD;
14
+ http://ebizmarts.com/forums/topics/view/13298&#xD;
15
+ &#xD;
16
+ Fixed abandoned cart dashboard when no abandoned cart email sent.&#xD;
17
+ http://ebizmarts.com/forums/topics/view/13268&#xD;
18
+ http://ebizmarts.com/forums/topics/view/13668&#xD;
19
+ &#xD;
20
+ Fixed to send birthday autoresponder emails the set days before the birthday instead of after.&#xD;
21
+ http://ebizmarts.com/forums/topics/view/13637&#xD;
22
+ &#xD;
23
+ Show MailChimp lists as subscribed on customer account if in magemonkey database.&#xD;
24
+ &#xD;
25
+ Added checkout asymc subscription compatibility with one step checkout.&#xD;
26
+ &#xD;
27
+ Fixed visited products autoresponder when store codes enabled.&#xD;
28
+ &#xD;
29
+ Only render form when backtostock autoresponder is active.&#xD;
30
+ (mikeymike)&#xD;
31
+ &#xD;
32
+ Fixed abandoned cart dashboard for Magento versions under 1.6.&#xD;
33
+ (fysiomike)&#xD;
34
+ &#xD;
35
+ Order by on export process.&#xD;
36
+ (rissip and diglin)</notes>
37
  <authors><author><name>Ebizmarts Development Team</name><user>auto-converted</user><email>info@ebizmarts.com</email></author></authors>
38
+ <date>2014-10-20</date>
39
+ <time>12:53:11</time>
40
+ <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="0912559d8068a1af340765695b36eb7e"/></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="9ee412451c8678099b6aa6df78741a63"/><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="0a42fb506a5cb7fd3644bd98d1af5e46"/><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="35520d1f15e891b51c5310735d0d6f0a"/><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="31ed9738c1c2c3e3fbc9be7380cb6976"/></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="78eae86c8e7e6a1c34413e7aa34d2d30"/><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="b00f85927f96a18b4b91c39cd1e3e77e"/></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="12d3d56be60f4803c9bcd3d4edfdfc3c"/></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="a563bd6633667828b9e410a3d333067d"/></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="9bc8418fe5f4ca0230c825e5bce715d7"/></dir></dir><dir name="js"><dir name="ebizmarts"><dir name="autoresponders"><file name="visitedproducts.js" hash="cbc036a3134e6a026a5716491ebb8eb2"/><file name="visitedproductsstorecodes.js" hash="d180467767a4eaaa705730ddbf47ca75"/></dir></dir></dir></target></contents>
41
  <compatible/>
42
  <dependencies/>
43
  </package>