Pure360 - Version 1.1.3

Version Notes

1.1.3
- Added support for SUPEE-6788
- Remove LF and CR characters from lists csv rows;
- Fix bug Abandoned carts are triggered only 1 time for each customer in magento 1.9;
- Fix JavaScript problems so that the checkbox for subscribe displays also in magento 1.9 rwd theme;
- Changed text encoding for emails to UTF-8 when necessary so that sending one2one always works with pure360;

1.1.2
- Allow Response API to be accessed via HTTPS
- Also allow HTTP API access

1.1.1
- Opt out removal syncronisation fix

1.1.0
- Username/password check when changing API URL
- Increased the page refresh time in Cron job page
- Newsletter signup checkbox should not be checked by default if the use has already opted-out

1.0.4
- List opt-out support extended

1.0.3
- Stability fixes
- Verbose error handling
- List Sync fixes

1.0.2
- Dropdown values synced properly
- Boolean Yes/No synced
- Data consistency
- UI tweaks
- Admin routing updated

1.0.1
- Magento Connect compliance

Download this release

Release Info

Developer Stewart Waller
Extension Pure360
Version 1.1.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.1.3

Files changed (59) hide show
  1. app/code/community/Pure360/Cart/Helper/Data.php +1 -1
  2. app/code/community/Pure360/Cart/Job/Trigger.php +19 -21
  3. app/code/community/Pure360/Cart/controllers/AjaxController.php +1 -1
  4. app/code/community/Pure360/Cart/etc/config.xml +10 -10
  5. app/code/community/Pure360/Cart/sql/pure360_cart_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} +0 -0
  6. app/code/community/Pure360/Cart/sql/pure360_cart_setup/mysql4-upgrade-1.1.2-1.1.3.php +45 -0
  7. app/code/community/Pure360/Common/Helper/Api.php +21 -4
  8. app/code/community/Pure360/Common/Helper/Data.php +15 -4
  9. app/code/community/Pure360/Common/Helper/File.php +2 -1
  10. app/code/community/Pure360/Common/controllers/AjaxController.php +1 -1
  11. app/code/community/Pure360/Common/etc/config.xml +10 -10
  12. app/code/community/Pure360/Cron/Model/Observer.php +3 -0
  13. app/code/community/Pure360/Cron/controllers/AjaxController.php +1 -1
  14. app/code/community/Pure360/Cron/etc/config.xml +10 -10
  15. app/code/community/Pure360/Cron/sql/pure360_cron_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} +0 -0
  16. app/code/community/Pure360/Email/Model/Email/Message.php +45 -3
  17. app/code/community/Pure360/Email/etc/config.xml +10 -10
  18. app/code/community/Pure360/Email/sql/pure360_email_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} +0 -0
  19. app/code/community/Pure360/List/Helper/Api.php +4 -3
  20. app/code/community/Pure360/List/Helper/Data.php +23 -0
  21. app/code/community/Pure360/List/Job/Sync.php +213 -9
  22. app/code/community/Pure360/List/Model/Customer.php +5 -15
  23. app/code/community/Pure360/List/Model/Optout.php +17 -0
  24. app/code/community/Pure360/List/Model/Resource/Optout.php +28 -0
  25. app/code/community/Pure360/List/Model/Resource/Optout/Collection.php +56 -0
  26. app/code/community/Pure360/List/Model/Subscriber.php +55 -0
  27. app/code/community/Pure360/List/controllers/AjaxController.php +1 -1
  28. app/code/community/Pure360/List/etc/config.xml +18 -10
  29. app/code/community/Pure360/List/sql/pure360_list_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} +43 -15
  30. app/code/community/Pure360/List/sql/pure360_list_setup/mysql4-upgrade-1.0.3-1.0.4.php +30 -0
  31. app/code/community/Pure360/Newsletter/Block/Checkout/Onepage/Newsletter.php +13 -3
  32. app/code/community/Pure360/Newsletter/Helper/Api.php +40 -30
  33. app/code/community/Pure360/Newsletter/Model/Subscriber.php +48 -52
  34. app/code/community/Pure360/Newsletter/etc/config.xml +12 -12
  35. app/code/community/Pure360/Newsletter/sql/pure360_newsletter_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} +0 -0
  36. app/design/adminhtml/default/default/layout/pure360_cart.xml +8 -8
  37. app/design/adminhtml/default/default/layout/pure360_common.xml +8 -8
  38. app/design/adminhtml/default/default/layout/pure360_cron.xml +7 -7
  39. app/design/adminhtml/default/default/layout/pure360_email.xml +7 -7
  40. app/design/adminhtml/default/default/layout/pure360_list.xml +14 -14
  41. app/design/adminhtml/default/default/layout/pure360_newsletter.xml +7 -7
  42. app/design/adminhtml/default/default/template/pure360/common/about.phtml +8 -8
  43. app/design/adminhtml/default/default/template/pure360/common/disabled.phtml +10 -10
  44. app/design/adminhtml/default/default/template/pure360/common/error.phtml +10 -10
  45. app/design/adminhtml/default/default/template/pure360/common/jsinit.phtml +16 -16
  46. app/design/adminhtml/default/default/template/pure360/email/transactional.phtml +69 -69
  47. app/design/frontend/base/default/layout/pure360/cart.xml +10 -10
  48. app/design/frontend/base/default/layout/pure360/newsletter.xml +11 -11
  49. app/design/frontend/base/default/template/pure360/cart/email/order/items.phtml +85 -85
  50. app/design/frontend/base/default/template/pure360/cart/email/order/items/order/default.phtml +111 -111
  51. app/design/frontend/base/default/template/pure360/newsletter/jsinit.phtml +2 -2
  52. app/etc/modules/Pure360_Cart.xml +11 -11
  53. app/locale/en_US/template/email/pure360/abandoned_cart.html +37 -37
  54. app/locale/en_US/template/email/pure360/abandoned_cart_guest.html +37 -37
  55. js/mage/adminhtml/pure360/common.js +5 -1
  56. js/mage/adminhtml/pure360/cron.js +1 -1
  57. lib/Pure360/Client.php +34 -30
  58. lib/Pure360/Session.php +2 -1
  59. package.xml +40 -9
app/code/community/Pure360/Cart/Helper/Data.php CHANGED
@@ -29,7 +29,7 @@ class Pure360_Cart_Helper_Data extends Pure360_Common_Helper_Data
29
  $storeIds = Mage::helper('pure360_common')->getStoreIdsForScope($scope, $scopeId);
30
 
31
  $sql = "UPDATE $table
32
- SET pure360_trigger_count = -1
33
  WHERE is_active = 1
34
  AND store_id IN (". implode(",", $storeIds) .")";
35
 
29
  $storeIds = Mage::helper('pure360_common')->getStoreIdsForScope($scope, $scopeId);
30
 
31
  $sql = "UPDATE $table
32
+ SET pure360_trigger_id = -1
33
  WHERE is_active = 1
34
  AND store_id IN (". implode(",", $storeIds) .")";
35
 
app/code/community/Pure360/Cart/Job/Trigger.php CHANGED
@@ -36,9 +36,9 @@ class Pure360_Cart_Job_Trigger extends Pure360_Cron_Job_Abstract
36
  $this->max_cart_size = Mage::helper('pure360_common')->getScopedConfig('pure360_cart/' . $filter . 'settings/max_cart_size', $scope, $scopeId);
37
  $this->processed = array();
38
 
39
- for($i = 1; $i <= 3; $i++)
40
  {
41
- $triggerName = 'trigger' . ($i);
42
  $triggerEnabled = Mage::helper('pure360_common')->getScopedConfig('pure360_cart/' . $filter . $triggerName . '/enabled', $scope, $scopeId);
43
 
44
  if($triggerEnabled)
@@ -62,13 +62,14 @@ class Pure360_Cart_Job_Trigger extends Pure360_Cron_Job_Abstract
62
  }
63
  }
64
 
65
- $quotes = $this->getQuotesForTrigger($scope, $scopeId, $triggerDelay, $i);
66
 
67
  foreach($quotes as $quote)
68
  {
69
- // Increment trigger count
70
- $this->incrementTriggerCount($quote);
71
- $quote->setPure360TriggerCount($quote->getPure360TriggerCount()+1);
 
72
 
73
  // Store Id as processed
74
  $this->processed[] = $quote->getEntityId();
@@ -147,9 +148,6 @@ class Pure360_Cart_Job_Trigger extends Pure360_Cron_Job_Abstract
147
  $to = date('Y-m-d H:i:s', $lastTime);
148
  $collection->addFieldToFilter('updated_at', array('to' => $to));
149
 
150
- // Add triggerNumber filter
151
- $collection->addFieldToFilter('pure360_trigger_count', array('eq' => ($triggerNumber - 1)));
152
-
153
  // Add processed filter
154
  if(!empty($this->processed))
155
  {
@@ -157,29 +155,29 @@ class Pure360_Cart_Job_Trigger extends Pure360_Cron_Job_Abstract
157
  }
158
 
159
  // Add order and limit
160
- $collection->getSelect()->order('updated_at asc')->limit($this->max_cart_size);
 
 
161
 
162
  return $collection;
163
  }
164
 
165
  /**
166
- * Increments trigger count by one
167
  *
168
  * @param Mage_Sales_Model_Quote $quote
169
  */
170
- private function incrementTriggerCount($quote)
171
  {
172
- $resource = Mage::getSingleton('core/resource');
173
- $write = $resource->getConnection('core_write');
174
- $table = $resource->getTableName('sales/quote');
175
- $createdAt = $quote->getCreatedAt();
176
- $updatedAt = $quote->getUpdatedAt();
177
- $entityId = $quote->getEntityId();
178
 
179
  $sql = "UPDATE $table
180
- SET created_at = '$createdAt',
181
- updated_at = '$updatedAt',
182
- pure360_trigger_count = pure360_trigger_count+1
183
  WHERE entity_id = $entityId";
184
 
185
  $write->query($sql);
36
  $this->max_cart_size = Mage::helper('pure360_common')->getScopedConfig('pure360_cart/' . $filter . 'settings/max_cart_size', $scope, $scopeId);
37
  $this->processed = array();
38
 
39
+ for($triggerId = 1; $triggerId <= 3; $triggerId++)
40
  {
41
+ $triggerName = 'trigger' . ($triggerId);
42
  $triggerEnabled = Mage::helper('pure360_common')->getScopedConfig('pure360_cart/' . $filter . $triggerName . '/enabled', $scope, $scopeId);
43
 
44
  if($triggerEnabled)
62
  }
63
  }
64
 
65
+ $quotes = $this->getQuotesForTrigger($scope, $scopeId, $triggerDelay, $triggerId);
66
 
67
  foreach($quotes as $quote)
68
  {
69
+
70
+ $quote->setPure360TriggerId($triggerId);
71
+ // Update Trigger Id and date
72
+ $this->updateTriggerIdAndTriggerDate($quote);
73
 
74
  // Store Id as processed
75
  $this->processed[] = $quote->getEntityId();
148
  $to = date('Y-m-d H:i:s', $lastTime);
149
  $collection->addFieldToFilter('updated_at', array('to' => $to));
150
 
 
 
 
151
  // Add processed filter
152
  if(!empty($this->processed))
153
  {
155
  }
156
 
157
  // Add order and limit
158
+ $collection->getSelect()
159
+ ->where(new Zend_Db_Expr('pure360_trigger_id = '.($triggerNumber - 1).' OR updated_at > pure360_trigger_dt')) // Add triggerNumber filter
160
+ ->order('updated_at asc')->limit($this->max_cart_size);
161
 
162
  return $collection;
163
  }
164
 
165
  /**
166
+ * Update trigger id and trigger date
167
  *
168
  * @param Mage_Sales_Model_Quote $quote
169
  */
170
+ private function updateTriggerIdAndTriggerDate($quote)
171
  {
172
+ $resource = Mage::getSingleton('core/resource');
173
+ $write = $resource->getConnection('core_write');
174
+ $table = $resource->getTableName('sales/quote');
175
+ $entityId = $quote->getEntityId();
176
+ $triggerId = $quote->getPure360TriggerId();
 
177
 
178
  $sql = "UPDATE $table
179
+ SET pure360_trigger_id = $triggerId,
180
+ pure360_trigger_dt = NOW()
 
181
  WHERE entity_id = $entityId";
182
 
183
  $write->query($sql);
app/code/community/Pure360/Cart/controllers/AjaxController.php CHANGED
@@ -4,7 +4,7 @@
4
  * @package Pure360\Cart
5
  * @copyright 2013 Pure360.com
6
  */
7
- class Pure360_Cart_AjaxController extends Mage_Adminhtml_Controller_Action
8
  {
9
 
10
  /**
4
  * @package Pure360\Cart
5
  * @copyright 2013 Pure360.com
6
  */
7
+ class Pure360_Cart_AjaxController extends Mage_Core_Controller_Front_Action
8
  {
9
 
10
  /**
app/code/community/Pure360/Cart/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pure360_Cart>
5
- <version>1.0.2</version>
6
  </Pure360_Cart>
7
  </modules>
8
  <global>
@@ -107,15 +107,15 @@
107
  </layout>
108
  </adminhtml>
109
  <admin>
110
- <routers>
111
- <pure360_cart>
112
- <use>admin</use>
113
- <args>
114
- <module>Pure360_Cart</module>
115
- <frontName>pure360_cart</frontName>
116
- </args>
117
- </pure360_cart>
118
- </routers>
119
  </admin>
120
  <default>
121
  <pure360_cart>
2
  <config>
3
  <modules>
4
  <Pure360_Cart>
5
+ <version>1.1.3</version>
6
  </Pure360_Cart>
7
  </modules>
8
  <global>
107
  </layout>
108
  </adminhtml>
109
  <admin>
110
+ <routers>
111
+ <adminhtml>
112
+ <args>
113
+ <modules>
114
+ <pure360_cart before="Mage_Adminhtml">Pure360_Cart_Adminhtml</pure360_cart>
115
+ </modules>
116
+ </args>
117
+ </adminhtml>
118
+ </routers>
119
  </admin>
120
  <default>
121
  <pure360_cart>
app/code/community/Pure360/Cart/sql/pure360_cart_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} RENAMED
File without changes
app/code/community/Pure360/Cart/sql/pure360_cart_setup/mysql4-upgrade-1.1.2-1.1.3.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ /* @var $installer Mage_Sales_Model_Mysql4_Setup */
5
+
6
+ $installer->startSetup();
7
+
8
+ try {
9
+ $installer->run("
10
+ ALTER TABLE {$installer->getTable('sales/quote')}
11
+ CHANGE pure360_trigger_count pure360_trigger_id INT(11);
12
+ ");
13
+ } catch (Exception $e) {
14
+ //
15
+ }
16
+
17
+ try {
18
+ $installer->run("
19
+ ALTER TABLE {$installer->getTable('sales/quote')}
20
+ DROP INDEX IDX_PURE360_CART_TRIG_CNT,
21
+ ADD INDEX IDX_PURE360_CART_TRIG_ID(pure360_trigger_id);
22
+ ");
23
+ } catch (Exception $e) {
24
+ //
25
+ }
26
+
27
+ try {
28
+ $installer->run("
29
+ ALTER TABLE {$installer->getTable('sales/quote')}
30
+ ADD COLUMN pure360_trigger_dt TIMESTAMP DEFAULT '0000-00-00 00:00:00';
31
+ ");
32
+ } catch (Exception $e) {
33
+ //
34
+ }
35
+
36
+ try {
37
+ $installer->run("
38
+ UPDATE {$installer->getTable('sales/quote')}
39
+ SET pure360_trigger_dt = NOW();
40
+ ");
41
+ } catch (Exception $e) {
42
+ //
43
+ }
44
+
45
+ $installer->endSetup();
app/code/community/Pure360/Common/Helper/Api.php CHANGED
@@ -82,15 +82,32 @@ class Pure360_Common_Helper_Api extends Mage_Core_Helper_Abstract
82
  }
83
 
84
  /**
85
- *
 
 
86
  * @param type $url
87
  * @return string
88
  */
89
  public function getWsdl($url)
90
  {
91
- $domain = str_replace("http://", "", $url);
92
- $paint_domain = str_replace("response", "paint", $domain);
93
- $wsdl = "http://" . $paint_domain . '/' . $paint_domain . '/ctrlPaintLiteral.wsdl';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  return $wsdl;
96
  }
82
  }
83
 
84
  /**
85
+ * Generate the WSDL url, replacing the response domain with paint if needed
86
+ *
87
+ *
88
  * @param type $url
89
  * @return string
90
  */
91
  public function getWsdl($url)
92
  {
93
+ $urlParts = parse_url($url);
94
+ $defaults = array(
95
+ 'host' => '',
96
+ 'scheme' => 'http',
97
+ 'wsdl' => 'ctrlPaintLiteral.wsdl'
98
+ );
99
+
100
+ if (array_key_exists('host', $urlParts))
101
+ {
102
+ $domainParts = explode('.', $urlParts['host']);
103
+ $paintDomain = preg_replace('/^response$/i', 'paint', $domainParts, 1);
104
+ $host = implode('.', $paintDomain);
105
+ $urlParts['host'] = $host;
106
+ }
107
+ // Add any defaults
108
+ $urlParts = array_merge($defaults, $urlParts);
109
+ // Create the path to the WSDL using the correct Scheme and Host
110
+ $wsdl = "${urlParts['scheme']}://${urlParts['host']}/${urlParts['host']}/${urlParts['wsdl']}";
111
 
112
  return $wsdl;
113
  }
app/code/community/Pure360/Common/Helper/Data.php CHANGED
@@ -410,12 +410,21 @@ class Pure360_Common_Helper_Data extends Mage_Core_Helper_Abstract
410
  * @param string|null $file
411
  * @return bool|void
412
  */
413
- public function writeError($message, $file = 'error')
414
  {
415
- if (is_object($message) && $message instanceOf Exception)
 
 
 
 
 
 
 
 
416
  {
417
- $message = $message->getMessage();
418
  }
 
419
  if ($this->isNoticesEnabled())
420
  {
421
  if (Mage::getSingleton('admin/session')->isLoggedIn())
@@ -423,12 +432,14 @@ class Pure360_Common_Helper_Data extends Mage_Core_Helper_Abstract
423
  /* @var $message Mage_Core_Model_Message_Error */
424
  $message = Mage::getSingleton('core/message')->error("[Pure360] {$message}");
425
  Mage::getSingleton('adminhtml/session')->addMessage($message);
 
426
  } else
427
  {
428
  Mage::getSingleton('core/session')->addError("[Pure360] {$message}");
429
  }
430
  }
431
- return $this->writeLog($message, $file, Zend_Log::ERR);
 
432
  }
433
 
434
  /**
410
  * @param string|null $file
411
  * @return bool|void
412
  */
413
+ public function writeError($error, $file = 'error')
414
  {
415
+ $message = '';
416
+ $backtrace = '';
417
+
418
+ if (is_object($error) && $error instanceOf Exception)
419
+ {
420
+ $message = $error->getMessage();
421
+ $backtrace = '\n' . $error->getTraceAsString();
422
+
423
+ } else
424
  {
425
+ $message = $error;
426
  }
427
+
428
  if ($this->isNoticesEnabled())
429
  {
430
  if (Mage::getSingleton('admin/session')->isLoggedIn())
432
  /* @var $message Mage_Core_Model_Message_Error */
433
  $message = Mage::getSingleton('core/message')->error("[Pure360] {$message}");
434
  Mage::getSingleton('adminhtml/session')->addMessage($message);
435
+
436
  } else
437
  {
438
  Mage::getSingleton('core/session')->addError("[Pure360] {$message}");
439
  }
440
  }
441
+
442
+ return $this->writeLog($message . $backtrace, $file, Zend_Log::ERR);
443
  }
444
 
445
  /**
app/code/community/Pure360/Common/Helper/File.php CHANGED
@@ -165,7 +165,8 @@ class Pure360_Common_Helper_File extends Mage_Core_Helper_Abstract
165
  */
166
  public function outputCSV($filepath, $csv)
167
  {
168
-
 
169
  // Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.
170
  $handle = fopen($filepath, "a");
171
 
165
  */
166
  public function outputCSV($filepath, $csv)
167
  {
168
+ $csv = preg_replace(array("/\r/", "/\n/"), " ", $csv);
169
+
170
  // Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.
171
  $handle = fopen($filepath, "a");
172
 
app/code/community/Pure360/Common/controllers/AjaxController.php CHANGED
@@ -4,7 +4,7 @@
4
  * @package Pure360\Common
5
  * @copyright 2013 Pure360.com
6
  */
7
- class Pure360_Common_AjaxController extends Mage_Adminhtml_Controller_Action
8
  {
9
 
10
  /**
4
  * @package Pure360\Common
5
  * @copyright 2013 Pure360.com
6
  */
7
+ class Pure360_Common_AjaxController extends Mage_Core_Controller_Front_Action
8
  {
9
 
10
  /**
app/code/community/Pure360/Common/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pure360_Common>
5
- <version>1.0.2</version>
6
  </Pure360_Common>
7
  </modules>
8
  <global>
@@ -97,15 +97,15 @@
97
  </layout>
98
  </adminhtml>
99
  <admin>
100
- <routers>
101
- <pure360_common>
102
- <use>admin</use>
103
- <args>
104
- <module>Pure360_Common</module>
105
- <frontName>pure360</frontName>
106
- </args>
107
- </pure360_common>
108
- </routers>
109
  </admin>
110
  <default>
111
  <pure360>
2
  <config>
3
  <modules>
4
  <Pure360_Common>
5
+ <version>1.1.2</version>
6
  </Pure360_Common>
7
  </modules>
8
  <global>
97
  </layout>
98
  </adminhtml>
99
  <admin>
100
+ <routers>
101
+ <adminhtml>
102
+ <args>
103
+ <modules>
104
+ <pure360_common after="Mage_Adminhtml">Pure360_Common_Adminhtml</pure360_common>
105
+ </modules>
106
+ </args>
107
+ </adminhtml>
108
+ </routers>
109
  </admin>
110
  <default>
111
  <pure360>
app/code/community/Pure360/Cron/Model/Observer.php CHANGED
@@ -222,6 +222,7 @@ class Pure360_Cron_Model_Observer extends Mage_Core_Model_Abstract
222
  $job->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS);
223
  $job->setFinishedAt($finish);
224
  $job->save();
 
225
  } catch(Pure360_Exception_ValidationException $ve)
226
  {
227
  $errorMessage = $ve->getMessage() . ': ';
@@ -230,9 +231,11 @@ class Pure360_Cron_Model_Observer extends Mage_Core_Model_Abstract
230
  {
231
  $errorMessage .= $error . ' [' . $message . "]; \n";
232
  }
 
233
  } catch(Exception $e)
234
  {
235
  $errorMessage = $e->getMessage();
 
236
  }
237
 
238
  if(!is_null($errorMessage))
222
  $job->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS);
223
  $job->setFinishedAt($finish);
224
  $job->save();
225
+
226
  } catch(Pure360_Exception_ValidationException $ve)
227
  {
228
  $errorMessage = $ve->getMessage() . ': ';
231
  {
232
  $errorMessage .= $error . ' [' . $message . "]; \n";
233
  }
234
+
235
  } catch(Exception $e)
236
  {
237
  $errorMessage = $e->getMessage();
238
+ Mage::helper('pure360_common')->writeError($e);
239
  }
240
 
241
  if(!is_null($errorMessage))
app/code/community/Pure360/Cron/controllers/AjaxController.php CHANGED
@@ -4,7 +4,7 @@
4
  * @package Pure360\Cron
5
  * @copyright 2013 Pure360.com
6
  */
7
- class Pure360_Cron_AjaxController extends Mage_Adminhtml_Controller_Action
8
  {
9
 
10
  /**
4
  * @package Pure360\Cron
5
  * @copyright 2013 Pure360.com
6
  */
7
+ class Pure360_Cron_AjaxController extends Mage_Core_Controller_Front_Action
8
  {
9
 
10
  /**
app/code/community/Pure360/Cron/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pure360_Cron>
5
- <version>1.0.2</version>
6
  </Pure360_Cron>
7
  </modules>
8
  <global>
@@ -102,15 +102,15 @@
102
  </layout>
103
  </adminhtml>
104
  <admin>
105
- <routers>
106
- <pure360_cron>
107
- <use>admin</use>
108
- <args>
109
- <module>Pure360_Cron</module>
110
- <frontName>pure360_cron</frontName>
111
- </args>
112
- </pure360_cron>
113
- </routers>
114
  </admin>
115
  <default>
116
  <pure360_cron>
2
  <config>
3
  <modules>
4
  <Pure360_Cron>
5
+ <version>1.1.2</version>
6
  </Pure360_Cron>
7
  </modules>
8
  <global>
102
  </layout>
103
  </adminhtml>
104
  <admin>
105
+ <routers>
106
+ <adminhtml>
107
+ <args>
108
+ <modules>
109
+ <pure360_cron after="Mage_Adminhtml">Pure360_Cron_Adminhtml</pure360_cron>
110
+ </modules>
111
+ </args>
112
+ </adminhtml>
113
+ </routers>
114
  </admin>
115
  <default>
116
  <pure360_cron>
app/code/community/Pure360/Cron/sql/pure360_cron_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} RENAMED
File without changes
app/code/community/Pure360/Email/Model/Email/Message.php CHANGED
@@ -135,7 +135,28 @@ class Pure360_Email_Model_Email_Message extends Mage_Core_Model_Email_Template
135
 
136
  $this->setUseAbsoluteLinks(true);
137
  $text = $this->getProcessedTemplate($variables, true);
138
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  try
140
  {
141
  // Create API Client for current context
@@ -145,11 +166,32 @@ class Pure360_Email_Model_Email_Message extends Mage_Core_Model_Email_Template
145
  $password = Mage::helper('pure360_common')->getModuleGroupKeyValue('pure360', 'settings_transactional', 'password', $storeId);
146
  $client = Mage::helper('pure360_common/api')->getClient($url, $username, $password);
147
 
148
- // Send using Pure360 One2One
149
  $messageSubject = $this->getProcessedTemplateSubject($variables);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  $messageName = $templateId;
151
  $messageBodyHtml = $this->isPlain() ? null : $text;
152
- $messageBodyPlain = $this->isPlain() ? $text : null;
153
  $toAddress = $variables['email'];
154
  $fromAddress = $this->getSenderEmail();
155
  $fromDesc = $this->getSenderName();
135
 
136
  $this->setUseAbsoluteLinks(true);
137
  $text = $this->getProcessedTemplate($variables, true);
138
+ $plainText = $text;
139
+
140
+ if(!$this->isPlain())
141
+ {
142
+
143
+ $searchPatterns = array(
144
+ '/<style.*>.*<\/style>/Usi',
145
+ '/<p.*>/Ui',
146
+ '/<\/p>/i',
147
+ '/<br.*\/?>/i',
148
+ '/<[^>]+>/Usi',
149
+ );
150
+ $replaceValues = array(
151
+ '',
152
+ "\r\n\r\n",
153
+ "\r\n",
154
+ "\r\n",
155
+ '',
156
+ );
157
+ $plainText = preg_replace($searchPatterns, $replaceValues, $plainText);
158
+ }
159
+
160
  try
161
  {
162
  // Create API Client for current context
166
  $password = Mage::helper('pure360_common')->getModuleGroupKeyValue('pure360', 'settings_transactional', 'password', $storeId);
167
  $client = Mage::helper('pure360_common/api')->getClient($url, $username, $password);
168
 
169
+ $context = $client->getcontext();
170
  $messageSubject = $this->getProcessedTemplateSubject($variables);
171
+
172
+ if (strpos($context["defaultLanguage"],'UTF-8') !== false )
173
+ {
174
+ // check if $text is already UTF-8 encoded
175
+ if (utf8_encode(utf8_decode($text)) !== $text){
176
+ $text = utf8_encode($text);
177
+ }
178
+
179
+ // check if $plainText is already UTF-8 encoded
180
+ if (utf8_encode(utf8_decode($plainText)) !== $plainText){
181
+ $plainText = utf8_encode($plainText);
182
+ }
183
+
184
+ // check if $messageSubject is already UTF-8 encoded
185
+ if (utf8_encode(utf8_decode($messageSubject)) !== $messageSubject){
186
+ $messageSubject = utf8_encode($messageSubject);
187
+ }
188
+ }
189
+
190
+ // Send using Pure360 One2One
191
+ // Todo: allow modification of the plain text message. Currently, only stripping the tags out of the HTML message.
192
  $messageName = $templateId;
193
  $messageBodyHtml = $this->isPlain() ? null : $text;
194
+ $messageBodyPlain = $this->isPlain() ? $text : $plainText;
195
  $toAddress = $variables['email'];
196
  $fromAddress = $this->getSenderEmail();
197
  $fromDesc = $this->getSenderName();
app/code/community/Pure360/Email/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pure360_Email>
5
- <version>1.0.2</version>
6
  </Pure360_Email>
7
  </modules>
8
  <global>
@@ -96,15 +96,15 @@
96
  </layout>
97
  </adminhtml>
98
  <admin>
99
- <routers>
100
- <pure360_email>
101
- <use>admin</use>
102
- <args>
103
- <module>Pure360_Email</module>
104
- <frontName>pure360_email</frontName>
105
- </args>
106
- </pure360_email>
107
- </routers>
108
  </admin>
109
  <default>
110
  <pure360_email>
2
  <config>
3
  <modules>
4
  <Pure360_Email>
5
+ <version>1.1.2</version>
6
  </Pure360_Email>
7
  </modules>
8
  <global>
96
  </layout>
97
  </adminhtml>
98
  <admin>
99
+ <routers>
100
+ <adminhtml>
101
+ <args>
102
+ <modules>
103
+ <pure360_email after="Mage_Adminhtml">Pure360_Email_Adminhtml</pure360_email>
104
+ </modules>
105
+ </args>
106
+ </adminhtml>
107
+ </routers>
108
  </admin>
109
  <default>
110
  <pure360_email>
app/code/community/Pure360/Email/sql/pure360_email_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} RENAMED
File without changes
app/code/community/Pure360/List/Helper/Api.php CHANGED
@@ -189,7 +189,8 @@ class Pure360_List_Helper_Api extends Pure360_Common_Helper_Api
189
  {
190
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
191
 
192
- $listData = array();
 
193
 
194
  // Search to see if a lists already exists with this name
195
  $searchOutput = $client->campaign->marketingList->_search(array("listName" => $listName));
@@ -335,7 +336,7 @@ class Pure360_List_Helper_Api extends Pure360_Common_Helper_Api
335
  {
336
  $domain = Mage::helper('pure360_common')->getModuleGroupKeyValue('pure360', 'settings', 'api_url');
337
  }
338
- $domain = str_replace("http://", "", $domain);
339
 
340
  $successTrackingToken = $list->getSuccessTrackingToken();
341
  $successTrackingToken = empty($successTrackingToken) ? 'magento' : $successTrackingToken;
@@ -354,7 +355,7 @@ class Pure360_List_Helper_Api extends Pure360_Common_Helper_Api
354
 
355
  $curl = curl_init();
356
 
357
- curl_setopt($curl, CURLOPT_URL, 'http://' . $domain . '/_act/tracking.php');
358
  curl_setopt($curl, CURLOPT_HEADER, false);
359
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
360
  curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
189
  {
190
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
191
 
192
+ $listData = array();
193
+ $status = null;
194
 
195
  // Search to see if a lists already exists with this name
196
  $searchOutput = $client->campaign->marketingList->_search(array("listName" => $listName));
336
  {
337
  $domain = Mage::helper('pure360_common')->getModuleGroupKeyValue('pure360', 'settings', 'api_url');
338
  }
339
+ //$domain = str_replace("http://", "", $domain);
340
 
341
  $successTrackingToken = $list->getSuccessTrackingToken();
342
  $successTrackingToken = empty($successTrackingToken) ? 'magento' : $successTrackingToken;
355
 
356
  $curl = curl_init();
357
 
358
+ curl_setopt($curl, CURLOPT_URL, $domain . '/_act/tracking.php');
359
  curl_setopt($curl, CURLOPT_HEADER, false);
360
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
361
  curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
app/code/community/Pure360/List/Helper/Data.php CHANGED
@@ -406,6 +406,29 @@ class Pure360_List_Helper_Data extends Pure360_Common_Helper_Data
406
  return $list;
407
  }
408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  public function toDate($value)
410
  {
411
  $date = date_create($value);
406
  return $list;
407
  }
408
 
409
+ /**
410
+ * Add email address to optout list
411
+ * @param string $email
412
+ * @param integer $storeId
413
+ */
414
+ public function listOptout($email, $storeId)
415
+ {
416
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
417
+
418
+ $list = $this->getListForStore($storeId);
419
+
420
+ /* @var $job Pure360_List_Model_Optout */
421
+ $optout = Mage::getModel('pure360_list/optout');
422
+ $optout->setData('scope', $list->getScope());
423
+ $optout->setData('scope_id', $list->getScopeId());
424
+ $optout->setData('email', $email);
425
+ $optout->setCreatedAt(time());
426
+ $optout->setUpdatedAt(time());
427
+ $optout->save();
428
+
429
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - end');
430
+ }
431
+
432
  public function toDate($value)
433
  {
434
  $date = date_create($value);
app/code/community/Pure360/List/Job/Sync.php CHANGED
@@ -58,6 +58,7 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
58
 
59
  // Set status to syncing
60
  $list->rows = 0;
 
61
  $list->setListStatus(Pure360_List_Model_List::LIST_STATUS_SYNCING);
62
  $list->save();
63
 
@@ -67,6 +68,9 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
67
  // Export all Subscribers next
68
  $this->exportSubscriberList($list);
69
 
 
 
 
70
  // Sync List
71
  if($list->rows > 0)
72
  {
@@ -80,11 +84,19 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
80
  $list->save();
81
  }
82
 
 
 
 
 
 
 
83
  // Finally perform a logout
84
  $this->client->logout();
85
 
86
  // Update message with rows uploaded
87
- $this->_data->setData('message', $list->rows . ' rows uploaded ');
 
 
88
 
89
  // Save list data
90
  $this->_data->save();
@@ -273,7 +285,9 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
273
 
274
  unset($currentBatch);
275
  } while($condition == $batchSize && $list->rows < $this->max_sync_size);
276
-
 
 
277
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - end');
278
  }
279
 
@@ -292,7 +306,7 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
292
  ;
293
 
294
  // Add Default Select
295
- $collection
296
  ->addAttributeToSelect('email')
297
  ->addAttributeToSelect('store_id')
298
  ->addAttributeToSelect('website_id')
@@ -300,7 +314,7 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
300
  ->addAttributeToSelect('subscriber_status')
301
  ->addAttributeToSelect('subscription_date')
302
  ;
303
-
304
  // Add Custom Select
305
  foreach($list->getListFields() as $field)
306
  {
@@ -409,7 +423,12 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
409
  }
410
 
411
  // Get the option label
412
- $val = Mage::getResourceSingleton('customer/customer')->getAttribute($key)->getSource()->getOptionText($val);
 
 
 
 
 
413
 
414
  // Convert back to string
415
  if(is_array($val))
@@ -505,7 +524,9 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
505
 
506
  unset($currentBatch);
507
  } while($condition == $batchSize && $list->rows <= $this->max_sync_size);
508
-
 
 
509
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - end');
510
  }
511
 
@@ -520,6 +541,7 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
520
 
521
  // Configure Collection
522
  $collection = Mage::getModel('newsletter/subscriber')->getCollection()
 
523
  ->addFieldToFilter('main_table.customer_id', array('eq' => 0))
524
  ->addFieldToFilter('subscriber_status', array('eq' => Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED))
525
  ->addStoreFilter($storeIds);
@@ -582,6 +604,110 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
582
  return $dataToSend;
583
  }
584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  private function uploadList(&$list)
586
  {
587
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
@@ -601,6 +727,8 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
601
  $count = count($files);
602
  $page = 1;
603
 
 
 
604
  // Create file
605
  $api->createFile($this->client, $fileCategory, $fileName, $count, "Y");
606
 
@@ -611,7 +739,7 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
611
  $api->uploadFileChunk($this->client, $fileCategory, $fileName, $page, $chunkData, "base64");
612
  $page++;
613
  }
614
-
615
  reset($files);
616
 
617
  // Create/Append list
@@ -639,12 +767,44 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
639
 
640
  $count = 0;
641
 
642
- // Mark customers as synced
643
  foreach($files as $filename)
644
  {
645
  $dataArray = Mage::helper('pure360_common/file')->readCsv($filename);
 
 
 
 
 
 
 
 
 
 
 
646
 
647
- if(strstr($filename, 'subscribe'))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
648
  {
649
  $emails = array();
650
 
@@ -674,6 +834,7 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
674
  $stmt->execute();
675
  }
676
  }
 
677
  } else
678
  {
679
  $ids = array();
@@ -724,6 +885,49 @@ class Pure360_List_Job_Sync extends Pure360_Cron_Job_Abstract
724
  return;
725
  }
726
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
727
  private function cleanup($list)
728
  {
729
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
58
 
59
  // Set status to syncing
60
  $list->rows = 0;
61
+ $list->optout_rows = 0;
62
  $list->setListStatus(Pure360_List_Model_List::LIST_STATUS_SYNCING);
63
  $list->save();
64
 
68
  // Export all Subscribers next
69
  $this->exportSubscriberList($list);
70
 
71
+ // Finally all Optouts
72
+ $this->exportOptoutList($list);
73
+
74
  // Sync List
75
  if($list->rows > 0)
76
  {
84
  $list->save();
85
  }
86
 
87
+ // Upload Optouts
88
+ if($list->optout_rows > 0)
89
+ {
90
+ $this->uploadOptouts($list);
91
+ }
92
+
93
  // Finally perform a logout
94
  $this->client->logout();
95
 
96
  // Update message with rows uploaded
97
+ $this->_data->setData('message', $list->rows . ' rows processed, ' . $list->optout_rows . ' rows opted out ');
98
+
99
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' message: '. $list->rows . ' rows processed, ' . $list->optout_rows . ' rows opted out ');
100
 
101
  // Save list data
102
  $this->_data->save();
285
 
286
  unset($currentBatch);
287
  } while($condition == $batchSize && $list->rows < $this->max_sync_size);
288
+
289
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ .' FilePath where data is temporarily saved - '.$filePath);
290
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ .' Number of rows to sync - '. $list->rows);
291
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - end');
292
  }
293
 
306
  ;
307
 
308
  // Add Default Select
309
+ $collection->distinct(true)
310
  ->addAttributeToSelect('email')
311
  ->addAttributeToSelect('store_id')
312
  ->addAttributeToSelect('website_id')
314
  ->addAttributeToSelect('subscriber_status')
315
  ->addAttributeToSelect('subscription_date')
316
  ;
317
+
318
  // Add Custom Select
319
  foreach($list->getListFields() as $field)
320
  {
423
  }
424
 
425
  // Get the option label
426
+ $attr = Mage::getResourceSingleton('customer/customer')->getAttribute($key);
427
+
428
+ if(!empty($attr))
429
+ {
430
+ $val = $attr->getSource()->getOptionText($val);
431
+ }
432
 
433
  // Convert back to string
434
  if(is_array($val))
524
 
525
  unset($currentBatch);
526
  } while($condition == $batchSize && $list->rows <= $this->max_sync_size);
527
+
528
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ .' FilePath where data is temporarily saved - '.$filePath);
529
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ .' Number of rows to sync - '. $list->rows);
530
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - end');
531
  }
532
 
541
 
542
  // Configure Collection
543
  $collection = Mage::getModel('newsletter/subscriber')->getCollection()
544
+ ->distinct(true)
545
  ->addFieldToFilter('main_table.customer_id', array('eq' => 0))
546
  ->addFieldToFilter('subscriber_status', array('eq' => Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED))
547
  ->addStoreFilter($storeIds);
604
  return $dataToSend;
605
  }
606
 
607
+ private function exportOptoutList(&$list)
608
+ {
609
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
610
+
611
+ $resource = Mage::getSingleton('core/resource');
612
+
613
+ // Get handle for write
614
+ $write = $resource->getConnection('core_write');
615
+
616
+ // Clean invalid optouts
617
+ $optoutTable = $resource->getTableName('pure360_optout');
618
+ $subscriberTable = $resource->getTableName('newsletter_subscriber');
619
+
620
+ $stmt = $write->prepare("DELETE e FROM $optoutTable AS e " .
621
+ " LEFT JOIN $subscriberTable AS s ON (s.subscriber_email = e.email) " .
622
+ " WHERE s.subscriber_status = :status AND e.scope = :scope AND e.scope_id = :scopeId ");
623
+
624
+ $status = Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED;
625
+
626
+ $stmt->bindParam(":status", $status, PDO::PARAM_INT);
627
+ $stmt->bindParam(":scope", $list->getScope(), PDO::PARAM_STR);
628
+ $stmt->bindParam(":scopeId", $list->getScopeId(), PDO::PARAM_INT);
629
+
630
+ $stmt->execute();
631
+
632
+ // Export optout list
633
+ $fileSlug = $list->fileSlug . '__OPTOUT__';
634
+
635
+ $file_ext = '.csv';
636
+ $batchNum = 1;
637
+ $batchSize = self::CHUNK_SIZE;
638
+ $firstEmail = null;
639
+
640
+ do
641
+ {
642
+ $time_start = microtime(true);
643
+ $currentBatch = $this->getOptoutBatch($list, $batchSize, $batchNum);
644
+ $condition = count($currentBatch);
645
+ $filePath = Mage::helper('pure360_common/file')->getFilePath($fileSlug . $batchNum . $file_ext);
646
+
647
+ $firstRow = reset($currentBatch);
648
+
649
+ if(empty($firstRow) || $firstEmail == $firstRow)
650
+ {
651
+ break;
652
+ } else
653
+ {
654
+ $firstEmail = $firstRow;
655
+ }
656
+
657
+ foreach($currentBatch as $email)
658
+ {
659
+ if($list->optout_rows < $this->max_sync_size)
660
+ {
661
+ Mage::helper('pure360_common/file')->outputCSV($filePath, array($email));
662
+ $list->optout_rows++;
663
+ } else
664
+ {
665
+ break;
666
+ }
667
+ }
668
+
669
+ $time_end = microtime(true);
670
+ $time_in_seconds = $time_end - $time_start;
671
+
672
+ Mage::helper('pure360_list')->writeDebug('Exported Optout Batch ' . $batchNum . ' in ' . $time_in_seconds . ' seconds - (' . memory_get_usage() . ') to ' . $filePath);
673
+
674
+ $batchNum++;
675
+
676
+ unset($currentBatch);
677
+ } while($condition == $batchSize && $list->optout_rows <= $this->max_sync_size);
678
+
679
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ .' FilePath where data is temporarily saved - '.$filePath);
680
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ .' Number of rows to sync - '. $list->rows);
681
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - end');
682
+ }
683
+
684
+ private function getOptoutBatch($list, $batchSize = 0, $batchNum = 1)
685
+ {
686
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
687
+
688
+ $emails = array();
689
+
690
+ // Configure Collection
691
+ $collection = Mage::getModel('pure360_list/optout')->getCollection()
692
+ ->distinct(true)
693
+ ->addScopeFilter($list->getScope(), $list->getScopeId());
694
+
695
+ // Add paging for batch operation
696
+ $collection->setCurPage($batchNum)->setPageSize($batchSize);
697
+
698
+ // Get email for each item in collection
699
+ foreach($collection as $row)
700
+ {
701
+ $emails[] = $row->getEmail();
702
+ }
703
+
704
+ unset($collection);
705
+
706
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - end');
707
+
708
+ return $emails;
709
+ }
710
+
711
  private function uploadList(&$list)
712
  {
713
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
727
  $count = count($files);
728
  $page = 1;
729
 
730
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ .' Number of chunks - '.$count);
731
+
732
  // Create file
733
  $api->createFile($this->client, $fileCategory, $fileName, $count, "Y");
734
 
739
  $api->uploadFileChunk($this->client, $fileCategory, $fileName, $page, $chunkData, "base64");
740
  $page++;
741
  }
742
+
743
  reset($files);
744
 
745
  // Create/Append list
767
 
768
  $count = 0;
769
 
 
770
  foreach($files as $filename)
771
  {
772
  $dataArray = Mage::helper('pure360_common/file')->readCsv($filename);
773
+
774
+ // Remove optouts
775
+ if(strstr($filename, 'OPTOUT'))
776
+ {
777
+ $emails = array();
778
+
779
+ foreach($dataArray as $dataRow)
780
+ {
781
+ // Email should always be the only column for optout
782
+ $emails[] = $dataRow[0];
783
+ }
784
 
785
+ // Update Sync Statuses.
786
+ $optoutTable = $resource->getTableName('pure360_optout');
787
+ $email = null;
788
+
789
+ foreach($emails as $emailKey => $email)
790
+ {
791
+ if(empty($email))
792
+ {
793
+ unset($emails[$emailKey]);
794
+
795
+ } else
796
+ {
797
+ $emails[$emailKey] = addslashes($email);
798
+ }
799
+ }
800
+ $sql = "DELETE FROM $optoutTable
801
+ WHERE `email` IN ('".implode("','",$emails)."')
802
+ AND `scope` = '".addslashes($list->getScope())."'
803
+ AND `scope_id` = '".addslashes($list->getScopeId())."' ";
804
+ $write->query($sql);
805
+
806
+ // Mark subscribers as synced
807
+ } else if(strstr($filename, 'subscribe'))
808
  {
809
  $emails = array();
810
 
834
  $stmt->execute();
835
  }
836
  }
837
+ // Mark customers as synced
838
  } else
839
  {
840
  $ids = array();
885
  return;
886
  }
887
 
888
+ private function uploadOptouts(&$list)
889
+ {
890
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
891
+
892
+ // Get list properties
893
+ $listName = '__OPTOUT__';
894
+ $listFields = array('email');
895
+ $files = Mage::helper('pure360_common/file')->getFilenamesForSlug($list->fileSlug . '__OPTOUT__');
896
+
897
+ /* @var $api Pure360_List_Helper_Api */
898
+ $api = Mage::helper('pure360_list/api');
899
+
900
+ // Setup file transfer
901
+ $context = $this->client->getContext();
902
+ $fileCategory = "PAINT";
903
+ $fileName = $context['beanId'] . '__OPTOUT__';
904
+ $count = count($files);
905
+ $page = 1;
906
+
907
+ // Create file
908
+ $api->createFile($this->client, $fileCategory, $fileName, $count, "Y");
909
+
910
+ // Upload chunks
911
+ foreach($files as $filename)
912
+ {
913
+ $chunkData = Mage::helper('pure360_common/file')->readFile($filename, true);
914
+ $api->uploadFileChunk($this->client, $fileCategory, $fileName, $page, $chunkData, "base64");
915
+ $page++;
916
+ }
917
+
918
+ reset($files);
919
+
920
+ // Create/Append list
921
+ $api->createAppendReplaceList($this->client, $listName, $listFields);
922
+
923
+ // Load file data onto list
924
+ $api->loadFileData($this->client, $fileCategory, $fileName, $listName);
925
+
926
+ Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - end');
927
+
928
+ return;
929
+ }
930
+
931
  private function cleanup($list)
932
  {
933
  Mage::helper('pure360_list')->writeDebug(__METHOD__ . ' - start');
app/code/community/Pure360/List/Model/Customer.php CHANGED
@@ -13,24 +13,14 @@ class Pure360_List_Model_Customer extends Mage_Customer_Model_Customer
13
  */
14
  protected function _beforeSave()
15
  {
16
- parent::_beforeSave();
17
-
18
- if (Mage::helper('pure360_list')->isEnabledForStore($this->getStoreId()))
19
  {
20
- $this->setPure360SyncStatus(0);
 
 
 
21
  }
22
-
23
  return $this;
24
  }
25
-
26
- /**
27
- * Processing object after delete data
28
- *
29
- * @return Pure360_List_Model_Customer
30
- */
31
- protected function _afterDelete()
32
- {
33
- parent::_afterDelete();
34
- }
35
  }
36
 
13
  */
14
  protected function _beforeSave()
15
  {
16
+ if(parent::_beforeSave())
 
 
17
  {
18
+ if (Mage::helper('pure360_list')->isEnabledForStore($this->getStoreId()))
19
+ {
20
+ $this->setPure360SyncStatus(0);
21
+ }
22
  }
 
23
  return $this;
24
  }
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
app/code/community/Pure360/List/Model/Optout.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Pure360\List
5
+ * @copyright 2013 Pure360.com
6
+ */
7
+ class Pure360_List_Model_Optout extends Mage_Core_Model_Abstract
8
+ {
9
+
10
+ public function _construct()
11
+ {
12
+ parent::_construct();
13
+
14
+ $this->_init('pure360_list/optout');
15
+ }
16
+
17
+ }
app/code/community/Pure360/List/Model/Resource/Optout.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Pure360\List
5
+ * @copyright 2013 Pure360.com
6
+ */
7
+ class Pure360_List_Model_Resource_Optout extends Mage_Core_Model_Mysql4_Abstract
8
+ {
9
+
10
+ /**
11
+ * Primary key auto increment flag
12
+ *
13
+ * @var bool
14
+ */
15
+ protected $_isPkAutoIncrement = false;
16
+
17
+ /**
18
+ * Initialize Model
19
+ *
20
+ * @return void
21
+ * @access public
22
+ */
23
+ public function _construct()
24
+ {
25
+ $this->_init('pure360_list/optout', 'optout_id');
26
+ }
27
+
28
+ }
app/code/community/Pure360/List/Model/Resource/Optout/Collection.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Pure360\List
5
+ * @copyright 2013 Pure360.com
6
+ */
7
+ class Pure360_List_Model_Resource_Optout_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
8
+ {
9
+ const MAX_COLLECTION_SIZE = 5;
10
+
11
+ /**
12
+ * Initialize Model
13
+ *
14
+ * @return void
15
+ * @access public
16
+ */
17
+ public function _construct()
18
+ {
19
+ parent::_construct();
20
+ $this->_init('pure360_list/optout');
21
+ }
22
+
23
+ /**
24
+ * @param string $scope
25
+ * @param integer $scopeIds
26
+ */
27
+ public function addScopeFilter($scope, $scopeId)
28
+ {
29
+ $this->getSelect()->where('scope = ?', $scope);
30
+ $this->getSelect()->where('scope_id = ?', $scopeId);
31
+ return $this;
32
+ }
33
+
34
+ /**
35
+ * Sort order by order created_at date
36
+ *
37
+ * @param string $dir
38
+ */
39
+ public function orderByCreatedAt($dir = self::SORT_ORDER_DESC)
40
+ {
41
+ $this->setOrder('created_at', $dir);
42
+ return $this;
43
+ }
44
+
45
+ /**
46
+ * Sort order by order updated_at date
47
+ *
48
+ * @param string $dir
49
+ */
50
+ public function orderByUpdatedAt($dir = self::SORT_ORDER_DESC)
51
+ {
52
+ $this->setOrder('updated_at', $dir);
53
+ return $this;
54
+ }
55
+
56
+ }
app/code/community/Pure360/List/Model/Subscriber.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Pure360\List
5
+ * @copyright 2013 Pure360.com
6
+ */
7
+ class Pure360_List_Model_Subscriber extends Mage_Newsletter_Model_Subscriber
8
+ {
9
+
10
+ /**
11
+ * Processing object before save data
12
+ *
13
+ * @return Pure360_Newsletter_Model_Subscriber
14
+ */
15
+ protected function _beforeSave()
16
+ {
17
+ if(parent::_beforeSave())
18
+ {
19
+ if(Mage::helper('pure360_list')->isEnabledForStore($this->getStoreId()))
20
+ {
21
+ $this->setPure360SyncStatus(0);
22
+
23
+ // Trigger Pure360 sync status for customer too
24
+ if($this->getCustomerId() > 0)
25
+ {
26
+ $customer = Mage::getModel('customer/customer')->load($this->getCustomerId());
27
+
28
+ if($customer->getId())
29
+ {
30
+ $customer->save();
31
+ }
32
+ }
33
+ }
34
+ }
35
+ return $this;
36
+ }
37
+
38
+ /**
39
+ * Processing object after delete data
40
+ *
41
+ * @return Pure360_Newsletter_Model_Subscriber
42
+ */
43
+ protected function _afterDelete()
44
+ {
45
+ if(parent::_afterDelete())
46
+ {
47
+ if(Mage::helper('pure360_list')->isEnabledForStore($this->getStoreId()))
48
+ {
49
+ // Add to optout list to make sure
50
+ Mage::helper('pure360_list')->listOptout($this->getSubscriberEmail(), $this->getStoreId());
51
+ }
52
+ }
53
+ return $this;
54
+ }
55
+ }
app/code/community/Pure360/List/controllers/AjaxController.php CHANGED
@@ -4,7 +4,7 @@
4
  * @package Pure360\List
5
  * @copyright 2013 Pure360.com
6
  */
7
- class Pure360_List_AjaxController extends Mage_Adminhtml_Controller_Action
8
  {
9
  /**
10
  * Save / Update list from request parameters
4
  * @package Pure360\List
5
  * @copyright 2013 Pure360.com
6
  */
7
+ class Pure360_List_AjaxController extends Mage_Core_Controller_Front_Action
8
  {
9
  /**
10
  * Save / Update list from request parameters
app/code/community/Pure360/List/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pure360_List>
5
- <version>1.0.2</version>
6
  </Pure360_List>
7
  </modules>
8
  <global>
@@ -27,6 +27,9 @@
27
  <list>
28
  <table>pure360_list</table>
29
  </list>
 
 
 
30
  <field>
31
  <table>pure360_list_field</table>
32
  </field>
@@ -43,6 +46,11 @@
43
  <customer>Pure360_List_Model_Customer</customer>
44
  </rewrite>
45
  </customer>
 
 
 
 
 
46
  </models>
47
  <resources>
48
  <pure360_list_setup>
@@ -145,15 +153,15 @@
145
  </layout>
146
  </adminhtml>
147
  <admin>
148
- <routers>
149
- <pure360_list>
150
- <use>admin</use>
151
- <args>
152
- <module>Pure360_List</module>
153
- <frontName>pure360_list</frontName>
154
- </args>
155
- </pure360_list>
156
- </routers>
157
  </admin>
158
  <default>
159
  <pure360_list>
2
  <config>
3
  <modules>
4
  <Pure360_List>
5
+ <version>1.1.2</version>
6
  </Pure360_List>
7
  </modules>
8
  <global>
27
  <list>
28
  <table>pure360_list</table>
29
  </list>
30
+ <optout>
31
+ <table>pure360_optout</table>
32
+ </optout>
33
  <field>
34
  <table>pure360_list_field</table>
35
  </field>
46
  <customer>Pure360_List_Model_Customer</customer>
47
  </rewrite>
48
  </customer>
49
+ <subscriber>
50
+ <rewrite>
51
+ <customer>Pure360_List_Model_Subscriber</customer>
52
+ </rewrite>
53
+ </subscriber>
54
  </models>
55
  <resources>
56
  <pure360_list_setup>
153
  </layout>
154
  </adminhtml>
155
  <admin>
156
+ <routers>
157
+ <adminhtml>
158
+ <args>
159
+ <modules>
160
+ <pure360_list after="Mage_Adminhtml">Pure360_List_Adminhtml</pure360_list>
161
+ </modules>
162
+ </args>
163
+ </adminhtml>
164
+ </routers>
165
  </admin>
166
  <default>
167
  <pure360_list>
app/code/community/Pure360/List/sql/pure360_list_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} RENAMED
@@ -5,6 +5,28 @@ $installer = $this;
5
 
6
  $installer->startSetup();
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  try
9
  {
10
  // Create New Table
@@ -103,20 +125,26 @@ foreach($oldAttributes as $oldAttribute)
103
  }
104
 
105
  // Add attributes to customer
106
- $model->addAttribute(
107
- 'customer', 'pure360_sync_status', array(
108
- 'group' => 'Default',
109
- 'type' => 'int',
110
- 'label' => 'Pure360 Sync Status',
111
- 'input' => 'select',
112
- 'source' => 'eav/entity_attribute_source_boolean',
113
- 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
114
- 'required' => 0,
115
- 'default' => 0,
116
- 'visible_on_front' => 0,
117
- 'used_for_price_rules' => 0,
118
- 'adminhtml_only' => 1,
119
- )
120
- );
 
 
 
 
 
 
121
 
122
  $installer->endSetup();
5
 
6
  $installer->startSetup();
7
 
8
+ try
9
+ {
10
+ // Create New Table
11
+ $installer->run("
12
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('pure360_optout')}` (
13
+ `optout_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Optout Id',
14
+ `scope` varchar(10) DEFAULT 'default' COMMENT 'Scope',
15
+ `scope_id` smallint(5) unsigned NOT NULL COMMENT 'Scope Id',
16
+ `email` varchar(100) COMMENT 'Subscriber email',
17
+ `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
18
+ `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
19
+ PRIMARY KEY (`optout_id`),
20
+ KEY `IDX_PURE360_OPTOUT_SCOPE_ID` (`scope_id`),
21
+ KEY `IDX_PURE360_OPTOUT_CREATED_AT` (`created_at`),
22
+ KEY `IDX_PURE360_OPTOUT_UPDATED_AT` (`updated_at`)
23
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Pure360 Optout';
24
+ ");
25
+ } catch(Exception $e)
26
+ {
27
+ // throw new RuntimeException('Failed Creating and Populating Table: ' . $e->getMessage());
28
+ }
29
+
30
  try
31
  {
32
  // Create New Table
125
  }
126
 
127
  // Add attributes to customer
128
+ try
129
+ {
130
+ $model->addAttribute(
131
+ 'customer', 'pure360_sync_status', array(
132
+ 'group' => 'Default',
133
+ 'type' => 'int',
134
+ 'label' => 'Pure360 Sync Status',
135
+ 'input' => 'select',
136
+ 'source' => 'eav/entity_attribute_source_boolean',
137
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
138
+ 'required' => 0,
139
+ 'default' => 0,
140
+ 'visible_on_front' => 0,
141
+ 'used_for_price_rules' => 0,
142
+ 'adminhtml_only' => 1,
143
+ )
144
+ );
145
+ } catch(Exception $e)
146
+ {
147
+
148
+ }
149
 
150
  $installer->endSetup();
app/code/community/Pure360/List/sql/pure360_list_setup/mysql4-upgrade-1.0.3-1.0.4.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ /* @var $installer Mage_Sales_Model_Mysql4_Setup */
5
+
6
+ $installer->startSetup();
7
+
8
+ try
9
+ {
10
+ // Create New Table
11
+ $installer->run("
12
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('pure360_optout')}` (
13
+ `optout_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Optout Id',
14
+ `scope` varchar(10) DEFAULT 'default' COMMENT 'Scope',
15
+ `scope_id` smallint(5) unsigned NOT NULL COMMENT 'Scope Id',
16
+ `email` varchar(100) COMMENT 'Subscriber email',
17
+ `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
18
+ `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
19
+ PRIMARY KEY (`optout_id`),
20
+ KEY `IDX_PURE360_OPTOUT_SCOPE_ID` (`scope_id`),
21
+ KEY `IDX_PURE360_OPTOUT_CREATED_AT` (`created_at`),
22
+ KEY `IDX_PURE360_OPTOUT_UPDATED_AT` (`updated_at`)
23
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Pure360 Optout';
24
+ ");
25
+ } catch(Exception $e)
26
+ {
27
+ // throw new RuntimeException('Failed Creating and Populating Table: ' . $e->getMessage());
28
+ }
29
+
30
+ $installer->endSetup();
app/code/community/Pure360/Newsletter/Block/Checkout/Onepage/Newsletter.php CHANGED
@@ -91,10 +91,20 @@ class Pure360_Newsletter_Block_Checkout_Onepage_Newsletter extends Mage_Checkout
91
  if($this->$methodName())
92
  {
93
  $action = 'show';
94
- if($this->isSubscribed() || $this->isEnabledCheckedByDefault())
95
  {
96
- $checked = 'true';
97
- $value = '1';
 
 
 
 
 
 
 
 
 
 
98
  }
99
  }
100
  }
91
  if($this->$methodName())
92
  {
93
  $action = 'show';
94
+ if(strtolower($method) == 'customer')
95
  {
96
+ if($this->isSubscribed())
97
+ {
98
+ $checked = 'true';
99
+ $value = '1';
100
+ }
101
+ } else
102
+ {
103
+ if($this->isSubscribed() || $this->isEnabledCheckedByDefault())
104
+ {
105
+ $checked = 'true';
106
+ $value = '1';
107
+ }
108
  }
109
  }
110
  }
app/code/community/Pure360/Newsletter/Helper/Api.php CHANGED
@@ -24,10 +24,10 @@ class Pure360_Newsletter_Helper_Api extends Pure360_Common_Helper_Api
24
  {
25
  $domain = Mage::helper('pure360_common')->getModuleGroupKeyValue('pure360', 'settings', 'api_url');
26
  }
27
- $domain = str_replace("http://", "", $domain);
28
 
29
  // Build url
30
- $url = 'http://' . $domain . '/interface/list.php';
31
 
32
  // Get store and webste ids
33
  $storeId = $subscriber->getStoreId();
@@ -79,7 +79,7 @@ class Pure360_Newsletter_Helper_Api extends Pure360_Common_Helper_Api
79
  * @param Mage_Customer_Model_Customer $customer
80
  * @return type
81
  */
82
- public function listSubscribeCustomer($client, $customer, $date)
83
  {
84
  Mage::helper('pure360_newsletter')->writeDebug(__METHOD__ . ' - start');
85
 
@@ -116,50 +116,60 @@ class Pure360_Newsletter_Helper_Api extends Pure360_Common_Helper_Api
116
  $postFields .= '&website=' . urlencode(Mage::app()->getWebsite($websiteId)->getName());
117
  $postFields .= '&store=' . urlencode($store->getName());
118
 
119
- // Process Customer
120
- $salesFields = Mage::helper('pure360_list')->getSalesFields($list);
 
121
 
122
- $salesData = empty($salesFields) ? array() : Mage::helper('pure360_list')->getSalesData($customer, $salesFields);
 
123
 
124
- $groupData = array('customer_group' =>
125
- Mage::helper('pure360_common')->arrayToCsv(
126
- Mage::helper('pure360_list')->getCustomerGroupData($customer)));
127
 
128
- $segmentData = array('customer_segments' =>
129
- Mage::helper('pure360_common')->arrayToCsv(
130
- Mage::helper('pure360_list')->getCustomerSegmentData($customer)));
131
 
132
- $customerData = array_merge($customer->toArray(), $salesData, $groupData, $segmentData);
 
 
133
 
134
- // Get date key lookup:
135
- $dateKeyLookup = Mage::helper('pure360_list')->getDateKeyLookup();
136
 
137
- foreach(Mage::helper('pure360_list')->getListKeys($list) as $key)
138
- {
139
- $val = '';
140
 
141
- if(isset($customerData[$key]))
142
  {
143
- $val = $customerData[$key];
144
- if(!empty($val))
 
145
  {
146
- if(in_array($key, $dateKeyLookup))
 
147
  {
148
- // Format to pure360 list date
149
- $val = Mage::helper('pure360_list')->toDate($val);
 
 
 
150
  }
151
  }
 
 
152
  }
153
 
154
- $postFields .= '&' . $key . '=' . $val;
155
- }
 
 
156
 
157
- if($list->getDoubleOptinEnabled() != 'y')
 
 
158
  {
159
- $postFields .= '&doubleOptin=false';
160
  }
161
-
162
- $postFields .= '&signup_date=' . urlencode(Mage::helper('pure360_list')->toDate($date));
163
  $postFields .= '&email=' . urlencode($customer->getEmail());
164
 
165
  // Do post
24
  {
25
  $domain = Mage::helper('pure360_common')->getModuleGroupKeyValue('pure360', 'settings', 'api_url');
26
  }
27
+ //$domain = str_replace("http://", "", $domain);
28
 
29
  // Build url
30
+ $url = $domain . '/interface/list.php';
31
 
32
  // Get store and webste ids
33
  $storeId = $subscriber->getStoreId();
79
  * @param Mage_Customer_Model_Customer $customer
80
  * @return type
81
  */
82
+ public function listSubscribeCustomer($client, $customer, $date, $subscribe = true)
83
  {
84
  Mage::helper('pure360_newsletter')->writeDebug(__METHOD__ . ' - start');
85
 
116
  $postFields .= '&website=' . urlencode(Mage::app()->getWebsite($websiteId)->getName());
117
  $postFields .= '&store=' . urlencode($store->getName());
118
 
119
+ if($subscribe)
120
+ {
121
+
122
 
123
+ // Process Customer
124
+ $salesFields = Mage::helper('pure360_list')->getSalesFields($list);
125
 
126
+ $salesData = empty($salesFields) ? array() : Mage::helper('pure360_list')->getSalesData($customer, $salesFields);
 
 
127
 
128
+ $groupData = array('customer_group' =>
129
+ Mage::helper('pure360_common')->arrayToCsv(
130
+ Mage::helper('pure360_list')->getCustomerGroupData($customer)));
131
 
132
+ $segmentData = array('customer_segments' =>
133
+ Mage::helper('pure360_common')->arrayToCsv(
134
+ Mage::helper('pure360_list')->getCustomerSegmentData($customer)));
135
 
136
+ $customerData = array_merge($customer->toArray(), $salesData, $groupData, $segmentData);
 
137
 
138
+ // Get date key lookup:
139
+ $dateKeyLookup = Mage::helper('pure360_list')->getDateKeyLookup();
 
140
 
141
+ foreach(Mage::helper('pure360_list')->getListKeys($list) as $key)
142
  {
143
+ $val = '';
144
+
145
+ if(isset($customerData[$key]))
146
  {
147
+ $val = $customerData[$key];
148
+ if(!empty($val))
149
  {
150
+ if(in_array($key, $dateKeyLookup))
151
+ {
152
+ // Format to pure360 list date
153
+ $val = Mage::helper('pure360_list')->toDate($val);
154
+ }
155
  }
156
  }
157
+
158
+ $postFields .= '&' . $key . '=' . $val;
159
  }
160
 
161
+ if($list->getDoubleOptinEnabled() != 'y')
162
+ {
163
+ $postFields .= '&doubleOptin=false';
164
+ }
165
 
166
+ $postFields .= '&signup_date=' . urlencode(Mage::helper('pure360_list')->toDate($date));
167
+
168
+ } else
169
  {
170
+ $postFields .= '&mode=OPTOUT';
171
  }
172
+
 
173
  $postFields .= '&email=' . urlencode($customer->getEmail());
174
 
175
  // Do post
app/code/community/Pure360/Newsletter/Model/Subscriber.php CHANGED
@@ -6,6 +6,7 @@
6
  */
7
  class Pure360_Newsletter_Model_Subscriber extends Mage_Newsletter_Model_Subscriber
8
  {
 
9
  /**
10
  * Override default subscribe action.
11
  */
@@ -18,7 +19,7 @@ class Pure360_Newsletter_Model_Subscriber extends Mage_Newsletter_Model_Subscrib
18
  if($this->getIsStatusChanged() && $this->getStatus() == self::STATUS_SUBSCRIBED)
19
  {
20
  $this->tagSubscription();
21
-
22
  if(Mage::app()->getWebsite()->getCode() !== 'admin')
23
  {
24
  if($callback)
@@ -42,20 +43,44 @@ class Pure360_Newsletter_Model_Subscriber extends Mage_Newsletter_Model_Subscrib
42
  {
43
  if(Mage::helper('pure360_newsletter')->isEnabledForStore($customer->getStoreId()))
44
  {
45
- if($this->getIsStatusChanged() && $this->getStatus() == self::STATUS_SUBSCRIBED)
46
  {
47
- $this->tagSubscription();
48
-
49
- if(Mage::app()->getWebsite()->getCode() !== 'admin')
50
- {
51
- if($callback)
52
  {
53
- $client = Mage::helper('pure360_common/api')->getClientForWebsite();
54
- Mage::helper('pure360_newsletter/api')->listSubscribeCustomer($client, $customer, $this->getSubscriptionDate());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  }
56
  }
57
-
58
- $customer->save();
59
  }
60
  }
61
  }
@@ -70,13 +95,13 @@ class Pure360_Newsletter_Model_Subscriber extends Mage_Newsletter_Model_Subscrib
70
  if(parent::unsubscribe())
71
  {
72
  $storeId = $this->getStoreId();
73
-
74
  if($this->getCustomerId())
75
  {
76
  $customer = Mage::getModel('customer/customer')->load($this->getCustomerId());
77
- $storeId = $customer->getStoreId();
78
  }
79
-
80
  if(Mage::helper('pure360_newsletter')->isEnabledForStore($storeId))
81
  {
82
  if($this->getStatus() == self::STATUS_UNSUBSCRIBED)
@@ -89,6 +114,9 @@ class Pure360_Newsletter_Model_Subscriber extends Mage_Newsletter_Model_Subscrib
89
  Mage::helper('pure360_newsletter/api')->listSubscribe($client, $this, false);
90
  }
91
  }
 
 
 
92
  }
93
  }
94
  }
@@ -107,6 +135,8 @@ class Pure360_Newsletter_Model_Subscriber extends Mage_Newsletter_Model_Subscrib
107
  /**
108
  * Suppress default confirmation success email function if Pure360
109
  * module is active.
 
 
110
  */
111
  public function sendConfirmationSuccessEmail()
112
  {
@@ -123,52 +153,18 @@ class Pure360_Newsletter_Model_Subscriber extends Mage_Newsletter_Model_Subscrib
123
  /**
124
  * Suppress default unsubscribe confirmation email function if Pure360
125
  * module is active.
 
 
126
  */
127
  public function sendUnsubscriptionEmail()
128
  {
129
  if(Mage::helper('pure360_newsletter')->isEnabledForStore($this->getStoreId()))
130
  {
131
  return $this;
 
132
  } else
133
  {
134
  return parent::sendUnsubscriptionEmail();
135
  }
136
  }
137
-
138
- /**
139
- * Processing object before save data
140
- *
141
- */
142
- protected function _beforeSave()
143
- {
144
- parent::_beforeSave();
145
-
146
- if(Mage::helper('pure360_newsletter')->isEnabledForStore($this->getStoreId()))
147
- {
148
- $this->setPure360SyncStatus(0);
149
-
150
- // Trigger Pure360 sync status for customer too
151
- if($this->getCustomerId() > 0)
152
- {
153
- $customer = Mage::getModel('customer/customer')->load($this->getCustomerId());
154
- if($customer->getId())
155
- {
156
- $customer->save();
157
- }
158
- }
159
- }
160
-
161
- return $this;
162
- }
163
-
164
- /**
165
- * Processing object after delete data
166
- *
167
- * @return Pure360_Newsletter_Model_Subscriber
168
- */
169
- protected function _afterDelete()
170
- {
171
- parent::_afterDelete();
172
- }
173
-
174
- }
6
  */
7
  class Pure360_Newsletter_Model_Subscriber extends Mage_Newsletter_Model_Subscriber
8
  {
9
+
10
  /**
11
  * Override default subscribe action.
12
  */
19
  if($this->getIsStatusChanged() && $this->getStatus() == self::STATUS_SUBSCRIBED)
20
  {
21
  $this->tagSubscription();
22
+
23
  if(Mage::app()->getWebsite()->getCode() !== 'admin')
24
  {
25
  if($callback)
43
  {
44
  if(Mage::helper('pure360_newsletter')->isEnabledForStore($customer->getStoreId()))
45
  {
46
+ if($this->getIsStatusChanged())
47
  {
48
+ switch($this->getStatus())
49
+ {
50
+ case self::STATUS_SUBSCRIBED:
 
 
51
  {
52
+ $this->tagSubscription();
53
+
54
+ if(Mage::app()->getWebsite()->getCode() !== 'admin')
55
+ {
56
+ if($callback)
57
+ {
58
+ $client = Mage::helper('pure360_common/api')->getClientForWebsite();
59
+ Mage::helper('pure360_newsletter/api')->listSubscribeCustomer($client, $customer, $this->getSubscriptionDate(), true);
60
+ }
61
+ }
62
+
63
+ $customer->save();
64
+ break;
65
+ }
66
+ case self::STATUS_UNSUBSCRIBED:
67
+ {
68
+ if(Mage::app()->getWebsite()->getCode() !== 'admin')
69
+ {
70
+ if($callback)
71
+ {
72
+ $client = Mage::helper('pure360_common/api')->getClientForWebsite();
73
+ Mage::helper('pure360_newsletter/api')->listSubscribeCustomer($client, $customer, $this->getSubscriptionDate(), false);
74
+ }
75
+ }
76
+
77
+ // Add to optout list to make sure
78
+ Mage::helper('pure360_list')->listOptout($this->getSubscriberEmail(), $customer->getStoreId());
79
+
80
+ $customer->save();
81
+ break;
82
  }
83
  }
 
 
84
  }
85
  }
86
  }
95
  if(parent::unsubscribe())
96
  {
97
  $storeId = $this->getStoreId();
98
+
99
  if($this->getCustomerId())
100
  {
101
  $customer = Mage::getModel('customer/customer')->load($this->getCustomerId());
102
+ $storeId = $customer->getStoreId();
103
  }
104
+
105
  if(Mage::helper('pure360_newsletter')->isEnabledForStore($storeId))
106
  {
107
  if($this->getStatus() == self::STATUS_UNSUBSCRIBED)
114
  Mage::helper('pure360_newsletter/api')->listSubscribe($client, $this, false);
115
  }
116
  }
117
+
118
+ // Add to optout list to make sure
119
+ Mage::helper('pure360_list')->listOptout($this->getSubscriberEmail(), $storeId);
120
  }
121
  }
122
  }
135
  /**
136
  * Suppress default confirmation success email function if Pure360
137
  * module is active.
138
+ *
139
+ * @return Pure360_Newsletter_Model_Subscriber
140
  */
141
  public function sendConfirmationSuccessEmail()
142
  {
153
  /**
154
  * Suppress default unsubscribe confirmation email function if Pure360
155
  * module is active.
156
+ *
157
+ * @return Pure360_Newsletter_Model_Subscriber
158
  */
159
  public function sendUnsubscriptionEmail()
160
  {
161
  if(Mage::helper('pure360_newsletter')->isEnabledForStore($this->getStoreId()))
162
  {
163
  return $this;
164
+
165
  } else
166
  {
167
  return parent::sendUnsubscriptionEmail();
168
  }
169
  }
170
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Pure360/Newsletter/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Pure360_Newsletter>
5
- <version>1.0.2</version>
6
  </Pure360_Newsletter>
7
  </modules>
8
  <global>
@@ -92,7 +92,7 @@
92
  <children>
93
  <config>
94
  <children>
95
- <pure360_newsletter module="pure360_newsletterr">
96
  <title>Pure360 Newsletter Options Section</title>
97
  </pure360_newsletter>
98
  </children>
@@ -112,15 +112,15 @@
112
  </layout>
113
  </adminhtml>
114
  <admin>
115
- <routers>
116
- <pure360_newsletter>
117
- <use>admin</use>
118
- <args>
119
- <module>Pure360_Newsletter</module>
120
- <frontName>pure360_newsletter</frontName>
121
- </args>
122
- </pure360_newsletter>
123
- </routers>
124
  </admin>
125
  <default>
126
  <pure360_newsletter>
@@ -139,4 +139,4 @@
139
  </modules>
140
  </suite>
141
  </phpunit>
142
- </config>
2
  <config>
3
  <modules>
4
  <Pure360_Newsletter>
5
+ <version>1.1.2</version>
6
  </Pure360_Newsletter>
7
  </modules>
8
  <global>
92
  <children>
93
  <config>
94
  <children>
95
+ <pure360_newsletter module="pure360_newsletter">
96
  <title>Pure360 Newsletter Options Section</title>
97
  </pure360_newsletter>
98
  </children>
112
  </layout>
113
  </adminhtml>
114
  <admin>
115
+ <routers>
116
+ <adminhtml>
117
+ <args>
118
+ <modules>
119
+ <pure360_newsletter after="Mage_Adminhtml">Pure360_Newsletter_Adminhtml</pure360_newsletter>
120
+ </modules>
121
+ </args>
122
+ </adminhtml>
123
+ </routers>
124
  </admin>
125
  <default>
126
  <pure360_newsletter>
139
  </modules>
140
  </suite>
141
  </phpunit>
142
+ </config>
app/code/community/Pure360/Newsletter/sql/pure360_newsletter_setup/{mysql4-install-1.0.2.php → mysql4-install-1.0.4.php} RENAMED
File without changes
app/design/adminhtml/default/default/layout/pure360_cart.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <adminhtml_system_config_edit>
4
- <reference name="content">
5
- <block type="pure360_cart/jsinit" name="pure360_cart_jsinit" template="pure360/cart/jsinit.phtml"></block>
6
- </reference>
7
- </adminhtml_system_config_edit>
8
- </layout>
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_system_config_edit>
4
+ <reference name="content">
5
+ <block type="pure360_cart/jsinit" name="pure360_cart_jsinit" template="pure360/cart/jsinit.phtml"></block>
6
+ </reference>
7
+ </adminhtml_system_config_edit>
8
+ </layout>
app/design/adminhtml/default/default/layout/pure360_common.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <adminhtml_system_config_edit>
4
- <reference name="content">
5
- <block type="pure360_common/jsinit" name="pure360_common_jsinit" template="pure360/common/jsinit.phtml"></block>
6
- </reference>
7
- </adminhtml_system_config_edit>
8
- </layout>
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_system_config_edit>
4
+ <reference name="content">
5
+ <block type="pure360_common/jsinit" name="pure360_common_jsinit" template="pure360/common/jsinit.phtml"></block>
6
+ </reference>
7
+ </adminhtml_system_config_edit>
8
+ </layout>
app/design/adminhtml/default/default/layout/pure360_cron.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <adminhtml_system_config_edit>
4
- <reference name="content">
5
- <block type="pure360_cron/jsinit" name="pure360_cron_jsinit" template="pure360/cron/jsinit.phtml"></block>
6
- </reference>
7
- </adminhtml_system_config_edit>
8
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_system_config_edit>
4
+ <reference name="content">
5
+ <block type="pure360_cron/jsinit" name="pure360_cron_jsinit" template="pure360/cron/jsinit.phtml"></block>
6
+ </reference>
7
+ </adminhtml_system_config_edit>
8
  </layout>
app/design/adminhtml/default/default/layout/pure360_email.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <adminhtml_system_config_edit>
4
- <reference name="content">
5
- <block type="pure360_email/jsinit" name="pure360_email_jsinit" template="pure360/email/jsinit.phtml"></block>
6
- </reference>
7
- </adminhtml_system_config_edit>
8
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_system_config_edit>
4
+ <reference name="content">
5
+ <block type="pure360_email/jsinit" name="pure360_email_jsinit" template="pure360/email/jsinit.phtml"></block>
6
+ </reference>
7
+ </adminhtml_system_config_edit>
8
  </layout>
app/design/adminhtml/default/default/layout/pure360_list.xml CHANGED
@@ -1,15 +1,15 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <adminhtml_system_config_edit>
4
- <reference name="content">
5
- <block type="pure360_list/jsinit" name="pure360_list_jsinit" template="pure360/list/jsinit.phtml"></block>
6
- </reference>
7
- </adminhtml_system_config_edit>
8
-
9
- <pure360_list>
10
- <reference name="content">
11
- <block type="pure360_list/adminhtml_system_config_list" name="pure360_list" template="pure360/list/list.phtml"></block>
12
- </reference>
13
- </pure360_list>
14
-
15
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_system_config_edit>
4
+ <reference name="content">
5
+ <block type="pure360_list/jsinit" name="pure360_list_jsinit" template="pure360/list/jsinit.phtml"></block>
6
+ </reference>
7
+ </adminhtml_system_config_edit>
8
+
9
+ <pure360_list>
10
+ <reference name="content">
11
+ <block type="pure360_list/adminhtml_system_config_list" name="pure360_list" template="pure360/list/list.phtml"></block>
12
+ </reference>
13
+ </pure360_list>
14
+
15
  </layout>
app/design/adminhtml/default/default/layout/pure360_newsletter.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <adminhtml_system_config_edit>
4
- <reference name="content">
5
- <block type="pure360_newsletter/jsinit" name="pure360_newsletter_jsinit" template="pure360/newsletter/jsinit.phtml"></block>
6
- </reference>
7
- </adminhtml_system_config_edit>
8
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_system_config_edit>
4
+ <reference name="content">
5
+ <block type="pure360_newsletter/jsinit" name="pure360_newsletter_jsinit" template="pure360/newsletter/jsinit.phtml"></block>
6
+ </reference>
7
+ </adminhtml_system_config_edit>
8
  </layout>
app/design/adminhtml/default/default/template/pure360/common/about.phtml CHANGED
@@ -1,9 +1,9 @@
1
- <?php /* var $this Pure360_Common_Block_Adminhtml_System_Config_About */ ?>
2
-
3
- <div style="background-color: #f4f9f5; border: 1px solid #D6D6D6; margin-bottom: 10px; padding: 10px 5px 15px 30px; color: #000">
4
- <p style="float: right; font-family: monospace; font-size: 9px; color: gray">v<?php echo $this->helper('pure360_common')->getModuleVersion(); ?></p>
5
- <a href="http://www.pure360.com" target="_blank"><img src="<?php echo $this->getSkinUrl('images/pure360/pure_logo.png'); ?>" alt="Pure360" style="float: left; margin-right: 20px;"/></a>
6
- <strong>Improving your email marketing &amp; SMS results together</strong><br/>
7
- Call Pure360 on 08082 562353<br/>
8
- <a href="http://www.pure360.com">http://www.pure360.com</a><br/>
9
  </div>
1
+ <?php /* var $this Pure360_Common_Block_Adminhtml_System_Config_About */ ?>
2
+
3
+ <div style="background-color: #f4f9f5; border: 1px solid #D6D6D6; margin-bottom: 10px; padding: 10px 5px 15px 30px; color: #000">
4
+ <p style="float: right; font-family: monospace; font-size: 9px; color: gray">v<?php echo $this->helper('pure360_common')->getModuleVersion(); ?></p>
5
+ <a href="http://www.pure360.com" target="_blank"><img src="<?php echo $this->getSkinUrl('images/pure360/pure_logo.png'); ?>" alt="Pure360" style="float: left; margin-right: 20px;"/></a>
6
+ <strong>Improving your email marketing &amp; SMS results together</strong><br/>
7
+ Call Pure360 on 08082 562353<br/>
8
+ <a href="http://www.pure360.com">http://www.pure360.com</a><br/>
9
  </div>
app/design/adminhtml/default/default/template/pure360/common/disabled.phtml CHANGED
@@ -1,10 +1,10 @@
1
- <?php include 'about.phtml'; ?>
2
- <div id="messages">
3
- <ul class="messages">
4
- <li class="error-msg">
5
- <ul>
6
- <li><span>This module is currently disabled at this scope. Please try a different configuration scope or check the API Configuration has been set correctly.</span></li>
7
- </ul>
8
- </li>
9
- </ul>
10
- </div>
1
+ <?php include 'about.phtml'; ?>
2
+ <div id="messages">
3
+ <ul class="messages">
4
+ <li class="error-msg">
5
+ <ul>
6
+ <li><span>This module is currently disabled at this scope. Please try a different configuration scope or check the API Configuration has been set correctly.</span></li>
7
+ </ul>
8
+ </li>
9
+ </ul>
10
+ </div>
app/design/adminhtml/default/default/template/pure360/common/error.phtml CHANGED
@@ -1,10 +1,10 @@
1
-
2
- <div id="messages">
3
- <ul class="messages">
4
- <li class="error-msg">
5
- <ul>
6
- <li><span>An error occurred: <?php echo $this->error->getMessage();?></span></li>
7
- </ul>
8
- </li>
9
- </ul>
10
- </div>
1
+
2
+ <div id="messages">
3
+ <ul class="messages">
4
+ <li class="error-msg">
5
+ <ul>
6
+ <li><span>An error occurred: <?php echo $this->error->getMessage();?></span></li>
7
+ </ul>
8
+ </li>
9
+ </ul>
10
+ </div>
app/design/adminhtml/default/default/template/pure360/common/jsinit.phtml CHANGED
@@ -1,16 +1,16 @@
1
- <?php
2
- $scope = Mage::helper('pure360_common')->getScope();
3
- $scopeId = Mage::helper('pure360_common')->getScopeId();
4
- ?>
5
- <script type="text/javascript">
6
-
7
- //<![CDATA[
8
- function initPure360()
9
- {
10
- pure360 = new Pure360(
11
- '<?php echo $scope; ?>',
12
- '<?php echo $this->getUrl('pure360_common/ajax/validate'); ?>');
13
- }
14
- //]]>
15
- </script>
16
-
1
+ <?php
2
+ $scope = Mage::helper('pure360_common')->getScope();
3
+ $scopeId = Mage::helper('pure360_common')->getScopeId();
4
+ ?>
5
+ <script type="text/javascript">
6
+
7
+ //<![CDATA[
8
+ function initPure360()
9
+ {
10
+ pure360 = new Pure360(
11
+ '<?php echo $scope; ?>',
12
+ '<?php echo $this->getUrl('pure360_common/ajax/validate'); ?>');
13
+ }
14
+ //]]>
15
+ </script>
16
+
app/design/adminhtml/default/default/template/pure360/email/transactional.phtml CHANGED
@@ -1,70 +1,70 @@
1
- <?php if ($this->transactionalProfileEnabled) : ?>
2
-
3
- <?php
4
- $transactionals = $this->getTransactionals();
5
-
6
- if($transactionals && false) : ?>
7
-
8
- <div id="pure360_email_transactional_container">
9
- <div id="pure360_email_transactional_options" class="entry-edit">
10
- <div class="entry-edit-head">
11
- <h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('pure360_email')->__('Transactional Email Mapping') ?></h4>
12
- </div>
13
- <fieldset name="pure360_email_transactional">
14
- <legend><?php echo Mage::helper('pure360_email')->__('Transactional Email Mapping') ?></legend>
15
- <table id="mapping_table" class="form-list" cellspacing="0">
16
- <colgroup class="label"></colgroup>
17
- <colgroup class="value"></colgroup>
18
- <colgroup class="scope-label"></colgroup>
19
- <colgroup class=""></colgroup>
20
- <tbody>
21
-
22
- <?php if (!$transactionals->getSize()) : ?>
23
-
24
- <tr class="addMappingRow">
25
- <td class="label"><label></label></td>
26
- <td class="value">
27
- <select name="pure360_email_template_ids[]" class="select">
28
- <?php echo $this->getTemplates(); ?>
29
- </select>
30
- </td>
31
- <td class="value">
32
- <select name="pure360_email_message_ids[]" class="select">
33
- <?php echo $this->getMessages(); ?>
34
- </select>
35
- </td>
36
- </tr>
37
-
38
- <?php else : ?>
39
-
40
- <?php foreach ($transactionals as $transactional) : ?>
41
-
42
- <tr class="addMappingRow">
43
- <td class="label"><label></label></td>
44
- <td class="value">
45
- <select name="pure360_email_template_ids[]" class="select">
46
- <?php echo $this->getTemplates($transactional->getTemplateId()); ?>
47
- </select>
48
- </td>
49
- <td class="value">
50
- <select name="pure360_email_message_ids[]" class="select">
51
- <?php echo $this->getMessages($transactional->getMessageId()); ?>
52
- </select>
53
- </td>
54
- </tr>
55
-
56
- <?php endforeach; ?>
57
-
58
- <?php endif; ?>
59
-
60
- <tr class="addButtonRow">
61
- <td colspan="3"><button onclick="pure360Email.addMapping()" class="scalable save right" style="margin: 10px; margin-right: 25px;" type="button" >Add new</button></td>
62
- </tr>
63
- </tbody>
64
- </table>
65
- </fieldset>
66
- </div>
67
- </div>
68
- <?php endif; ?>
69
-
70
  <?php endif; ?>
1
+ <?php if ($this->transactionalProfileEnabled) : ?>
2
+
3
+ <?php
4
+ $transactionals = $this->getTransactionals();
5
+
6
+ if($transactionals && false) : ?>
7
+
8
+ <div id="pure360_email_transactional_container">
9
+ <div id="pure360_email_transactional_options" class="entry-edit">
10
+ <div class="entry-edit-head">
11
+ <h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('pure360_email')->__('Transactional Email Mapping') ?></h4>
12
+ </div>
13
+ <fieldset name="pure360_email_transactional">
14
+ <legend><?php echo Mage::helper('pure360_email')->__('Transactional Email Mapping') ?></legend>
15
+ <table id="mapping_table" class="form-list" cellspacing="0">
16
+ <colgroup class="label"></colgroup>
17
+ <colgroup class="value"></colgroup>
18
+ <colgroup class="scope-label"></colgroup>
19
+ <colgroup class=""></colgroup>
20
+ <tbody>
21
+
22
+ <?php if (!$transactionals->getSize()) : ?>
23
+
24
+ <tr class="addMappingRow">
25
+ <td class="label"><label></label></td>
26
+ <td class="value">
27
+ <select name="pure360_email_template_ids[]" class="select">
28
+ <?php echo $this->getTemplates(); ?>
29
+ </select>
30
+ </td>
31
+ <td class="value">
32
+ <select name="pure360_email_message_ids[]" class="select">
33
+ <?php echo $this->getMessages(); ?>
34
+ </select>
35
+ </td>
36
+ </tr>
37
+
38
+ <?php else : ?>
39
+
40
+ <?php foreach ($transactionals as $transactional) : ?>
41
+
42
+ <tr class="addMappingRow">
43
+ <td class="label"><label></label></td>
44
+ <td class="value">
45
+ <select name="pure360_email_template_ids[]" class="select">
46
+ <?php echo $this->getTemplates($transactional->getTemplateId()); ?>
47
+ </select>
48
+ </td>
49
+ <td class="value">
50
+ <select name="pure360_email_message_ids[]" class="select">
51
+ <?php echo $this->getMessages($transactional->getMessageId()); ?>
52
+ </select>
53
+ </td>
54
+ </tr>
55
+
56
+ <?php endforeach; ?>
57
+
58
+ <?php endif; ?>
59
+
60
+ <tr class="addButtonRow">
61
+ <td colspan="3"><button onclick="pure360Email.addMapping()" class="scalable save right" style="margin: 10px; margin-right: 25px;" type="button" >Add new</button></td>
62
+ </tr>
63
+ </tbody>
64
+ </table>
65
+ </fieldset>
66
+ </div>
67
+ </div>
68
+ <?php endif; ?>
69
+
70
  <?php endif; ?>
app/design/frontend/base/default/layout/pure360/cart.xml CHANGED
@@ -1,10 +1,10 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <pure360_cart_email_order_items>
4
- <block type="pure360_cart/email_order_items" name="items" template="pure360/cart/email/order/items.phtml">
5
- <action method="addItemRender"><type>default</type><block>pure360_cart/email_order_items_order_default</block><template>pure360/cart/email/order/items/order/default.phtml</template></action>
6
- <action method="addItemRender"><type>grouped</type><block>pure360_cart/email_order_items_order_grouped</block><template>pure360/cart/email/order/items/order/default.phtml</template></action>
7
- </block>
8
- <block type="core/text_list" name="additional.product.info" />
9
- </pure360_cart_email_order_items>
10
- </layout>
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <pure360_cart_email_order_items>
4
+ <block type="pure360_cart/email_order_items" name="items" template="pure360/cart/email/order/items.phtml">
5
+ <action method="addItemRender"><type>default</type><block>pure360_cart/email_order_items_order_default</block><template>pure360/cart/email/order/items/order/default.phtml</template></action>
6
+ <action method="addItemRender"><type>grouped</type><block>pure360_cart/email_order_items_order_grouped</block><template>pure360/cart/email/order/items/order/default.phtml</template></action>
7
+ </block>
8
+ <block type="core/text_list" name="additional.product.info" />
9
+ </pure360_cart_email_order_items>
10
+ </layout>
app/design/frontend/base/default/layout/pure360/newsletter.xml CHANGED
@@ -1,12 +1,12 @@
1
- <?xml version="1.0"?>
2
- <layout>
3
- <checkout_onepage_index>
4
- <reference name="content">
5
- <block type="pure360_newsletter/checkout_onepage_newsletter" name="checkout.onepage.billing.newsletter.js" after="-">
6
- <action method="setTemplate" >
7
- <template>pure360/newsletter/jsinit.phtml</template>
8
- </action>
9
- </block>
10
- </reference>
11
- </checkout_onepage_index>
12
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <checkout_onepage_index>
4
+ <reference name="content">
5
+ <block type="pure360_newsletter/checkout_onepage_newsletter" name="checkout.onepage.billing.newsletter.js" after="-">
6
+ <action method="setTemplate" >
7
+ <template>pure360/newsletter/jsinit.phtml</template>
8
+ </action>
9
+ </block>
10
+ </reference>
11
+ </checkout_onepage_index>
12
  </layout>
app/design/frontend/base/default/template/pure360/cart/email/order/items.phtml CHANGED
@@ -1,86 +1,86 @@
1
- <?php $_quote = $this->getQuote() ?>
2
- <table cellspacing="0" cellpadding="0" border="0" width="650" style="border:1px solid #EAEAEA;">
3
- <thead>
4
- <tr>
5
- <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Item') ?></th>
6
- <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Sku') ?></th>
7
- <th align="center" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Qty') ?></th>
8
- <th align="right" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Subtotal') ?></th>
9
- </tr>
10
- </thead>
11
- <?php if(is_object($_quote)) : ?>
12
- <?php $i = 0;
13
- foreach($_quote->getAllItems() as $_item): ?>
14
- <?php if($_item->getParentItemId()) continue;
15
- else $i++; ?>
16
- <?php
17
- if($_item->getProductType() == 'configurable' || $_item->getProductType() == 'bundle') :
18
- $finalResult = array();
19
- $result = array();
20
- $options = $_item->getProduct()->getTypeInstance(true)->getOrderOptions($_item->getProduct());
21
- // Check for options
22
- if($options)
23
- {
24
- if(isset($options['options']))
25
- {
26
- $result = array_merge($result, $options['options']);
27
- }
28
- if(isset($options['additional_options']))
29
- {
30
- $result = array_merge($result, $options['additional_options']);
31
- }
32
- if(!empty($options['attributes_info']))
33
- {
34
- $result = array_merge($options['attributes_info'], $result);
35
- }
36
- if(isset($options['bundle_options']))
37
- {
38
-
39
-
40
- $bundled_product = new Mage_Catalog_Model_Product();
41
- $bundled_product->load($_item->getProduct()->getId());
42
- $selectionCollection = $bundled_product->getTypeInstance(true)->getSelectionsCollection(
43
- $bundled_product->getTypeInstance(true)->getOptionsIds($bundled_product), $bundled_product
44
- );
45
-
46
- $bundled_items = array();
47
- $label = '';
48
- $qty = '';
49
- foreach($selectionCollection as $option)
50
- {
51
- foreach($options['bundle_options'] as $bundle)
52
- {
53
- if($bundle['value'][0]['title'] == $option->getName())
54
- {
55
- $label = $bundle['label'];
56
- $qty = $bundle['value'][0]['qty'];
57
- $aux_options[] = array('label' => $label, 'value' => $qty . ' x ' . $option->getName() . ' ' . Mage::helper('checkout')->formatPrice($option->getPrice()), 'sku' => $option->getSku());
58
- }
59
- }
60
- }
61
-
62
- $result = array_merge($result, $aux_options);
63
- }
64
- }
65
- $options = array_merge($finalResult, $result);
66
- endif;
67
- ?>
68
- <tbody<?php echo $i % 2 ? ' bgcolor="#F6F6F6"' : '' ?>>
69
- <tr>
70
- <?php echo '<td valign="top" align="left" style="padding:3px 9px">' . $_item['name'] . '</td>'; ?>
71
- <?php echo '<td valign="top" align="left" style="padding:3px 9px">' . $_item['sku'] . '</td>'; ?>
72
- <?php echo '<td valign="top" align="center" style="padding:3px 9px">' . $_item['qty'] . '</td>'; ?>
73
- <?php echo '<td valign="top" align="right" style="padding:3px 9px">' . $this->getTax($_item) . '</td>'; ?>
74
- <?php if(isset($options) && is_array($options)) : foreach($options as $option) : echo '<tr><td valign="top" align="left" style="padding:3px 9px" colspan="4"><strong><em>' . $option['label'] . '</em></strong></td></tr>' . '<tr><td valign="top" align="left" style="padding:3px 19px">' . $option['value'] . '</td>';
75
- if(isset($option['sku'])) : echo '<td style="padding:3px 9px">' . $option['sku'] . '</td><td></td><td></td>';
76
- else: echo '<td></td><td></td><td></td>';
77
- endif;
78
- endforeach;
79
- $options = null;
80
- endif;
81
- '</tr>' ?>
82
- </tr>
83
- </tbody>
84
- <?php endforeach; ?>
85
- <?php endif; ?>
86
  </table>
1
+ <?php $_quote = $this->getQuote() ?>
2
+ <table cellspacing="0" cellpadding="0" border="0" width="650" style="border:1px solid #EAEAEA;">
3
+ <thead>
4
+ <tr>
5
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Item') ?></th>
6
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Sku') ?></th>
7
+ <th align="center" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Qty') ?></th>
8
+ <th align="right" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Subtotal') ?></th>
9
+ </tr>
10
+ </thead>
11
+ <?php if(is_object($_quote)) : ?>
12
+ <?php $i = 0;
13
+ foreach($_quote->getAllItems() as $_item): ?>
14
+ <?php if($_item->getParentItemId()) continue;
15
+ else $i++; ?>
16
+ <?php
17
+ if($_item->getProductType() == 'configurable' || $_item->getProductType() == 'bundle') :
18
+ $finalResult = array();
19
+ $result = array();
20
+ $options = $_item->getProduct()->getTypeInstance(true)->getOrderOptions($_item->getProduct());
21
+ // Check for options
22
+ if($options)
23
+ {
24
+ if(isset($options['options']))
25
+ {
26
+ $result = array_merge($result, $options['options']);
27
+ }
28
+ if(isset($options['additional_options']))
29
+ {
30
+ $result = array_merge($result, $options['additional_options']);
31
+ }
32
+ if(!empty($options['attributes_info']))
33
+ {
34
+ $result = array_merge($options['attributes_info'], $result);
35
+ }
36
+ if(isset($options['bundle_options']))
37
+ {
38
+
39
+
40
+ $bundled_product = new Mage_Catalog_Model_Product();
41
+ $bundled_product->load($_item->getProduct()->getId());
42
+ $selectionCollection = $bundled_product->getTypeInstance(true)->getSelectionsCollection(
43
+ $bundled_product->getTypeInstance(true)->getOptionsIds($bundled_product), $bundled_product
44
+ );
45
+
46
+ $bundled_items = array();
47
+ $label = '';
48
+ $qty = '';
49
+ foreach($selectionCollection as $option)
50
+ {
51
+ foreach($options['bundle_options'] as $bundle)
52
+ {
53
+ if($bundle['value'][0]['title'] == $option->getName())
54
+ {
55
+ $label = $bundle['label'];
56
+ $qty = $bundle['value'][0]['qty'];
57
+ $aux_options[] = array('label' => $label, 'value' => $qty . ' x ' . $option->getName() . ' ' . Mage::helper('checkout')->formatPrice($option->getPrice()), 'sku' => $option->getSku());
58
+ }
59
+ }
60
+ }
61
+
62
+ $result = array_merge($result, $aux_options);
63
+ }
64
+ }
65
+ $options = array_merge($finalResult, $result);
66
+ endif;
67
+ ?>
68
+ <tbody<?php echo $i % 2 ? ' bgcolor="#F6F6F6"' : '' ?>>
69
+ <tr>
70
+ <?php echo '<td valign="top" align="left" style="padding:3px 9px">' . $_item['name'] . '</td>'; ?>
71
+ <?php echo '<td valign="top" align="left" style="padding:3px 9px">' . $_item['sku'] . '</td>'; ?>
72
+ <?php echo '<td valign="top" align="center" style="padding:3px 9px">' . $_item['qty'] . '</td>'; ?>
73
+ <?php echo '<td valign="top" align="right" style="padding:3px 9px">' . $this->getTax($_item) . '</td>'; ?>
74
+ <?php if(isset($options) && is_array($options)) : foreach($options as $option) : echo '<tr><td valign="top" align="left" style="padding:3px 9px" colspan="4"><strong><em>' . $option['label'] . '</em></strong></td></tr>' . '<tr><td valign="top" align="left" style="padding:3px 19px">' . $option['value'] . '</td>';
75
+ if(isset($option['sku'])) : echo '<td style="padding:3px 9px">' . $option['sku'] . '</td><td></td><td></td>';
76
+ else: echo '<td></td><td></td><td></td>';
77
+ endif;
78
+ endforeach;
79
+ $options = null;
80
+ endif;
81
+ '</tr>' ?>
82
+ </tr>
83
+ </tbody>
84
+ <?php endforeach; ?>
85
+ <?php endif; ?>
86
  </table>
app/design/frontend/base/default/template/pure360/cart/email/order/items/order/default.phtml CHANGED
@@ -1,111 +1,111 @@
1
- <?php $_item = $this->getItem() ?>
2
- <?php $_quote = $this->getItem()->getQuote() ?>
3
- <tr>
4
- <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
5
- <strong style="font-size:11px;"><?php echo $this->htmlEscape($_item->getName()) ?></strong>
6
- <?php if($this->getItemOptions()): ?>
7
- <dl style="margin:0; padding:0;">
8
- <?php foreach($this->getItemOptions() as $option): ?>
9
- <dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
10
- <dd style="margin:0; padding:0 0 0 9px;">
11
- <?php echo nl2br($this->escapeHtml($option['value'])) ?>
12
- </dd>
13
- <?php endforeach; ?>
14
- </dl>
15
- <?php endif; ?>
16
- <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
17
- <?php if($addInfoBlock) : ?>
18
- <?php echo $addInfoBlock->setItem($_item)->toHtml(); ?>
19
- <?php endif; ?>
20
- <?php echo $this->escapeHtml($_item->getDescription()) ?>
21
- </td>
22
- <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $this->htmlEscape($this->getSku($_item)) ?></td>
23
- <td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $_item->getQtyOrdered() * 1 ?></td>
24
- <td align="right" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
25
- <?php if($this->helper('tax')->displaySalesPriceExclTax($_quote->getStoreId()) || $this->helper('tax')->displaySalesBothPrices($_quote->getStore())): ?>
26
- <?php if($this->helper('tax')->displaySalesBothPrices($_quote->getStoreId())): ?>
27
- <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
28
- <?php endif; ?>
29
- <?php if(Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_quote->getStore())): ?>
30
- <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_item->getRowTotal() + $_item->getWeeeTaxAppliedRowAmount() + $_item->getWeeeTaxRowDisposition()); ?>
31
- <?php //echo $_quote->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
32
- <?php else: ?>
33
- <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_item->getRowTotal()) ?>
34
- <?php endif; ?>
35
-
36
-
37
- <?php if(Mage::helper('weee')->getApplied($_item)): ?>
38
- <br />
39
- <?php if(Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_quote->getStore())): ?>
40
- <small>
41
- <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
42
- <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount'], true, true); ?></span><br />
43
- <?php endforeach; ?>
44
- </small>
45
- <?php elseif(Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_quote->getStoreId())): ?>
46
- <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
47
- <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount_incl_tax'], true, true); ?></small></span><br />
48
- <?php endforeach; ?>
49
- <?php elseif(Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_quote->getStoreId())): ?>
50
- <small>
51
- <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
52
- <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount_incl_tax'], true, true); ?></span><br />
53
- <?php endforeach; ?>
54
- </small>
55
- <?php endif; ?>
56
-
57
- <?php if(Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_quote->getStore())): ?>
58
- <br />
59
- <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_item->getCalculationPrice() + $_item->getWeeeTaxAppliedRowAmount() + $_item->getWeeeTaxRowDisposition()); ?></span>
60
- <?php endif; ?>
61
- <?php endif; ?>
62
- <?php endif; ?>
63
-
64
-
65
- <?php if($this->helper('tax')->displaySalesPriceInclTax($_quote->getStoreId()) || $this->helper('tax')->displaySalesBothPrices($_quote->getStoreId())): ?>
66
- <?php if($this->helper('tax')->displaySalesBothPrices($_quote->getStoreId())): ?>
67
- <br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
68
- <?php endif; ?>
69
- <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
70
- <?php if(Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_quote->getStoreId())): ?>
71
- <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_incl + $_item->getWeeeTaxAppliedRowAmount()); ?>
72
- <?php else: ?>
73
- <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_incl - $_item->getWeeeTaxRowDisposition()) ?>
74
- <?php endif; ?>
75
- <?php if(Mage::helper('weee')->getApplied($_item)): ?>
76
- <br />
77
- <?php if(Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_quote->getStore())): ?>
78
- <small>
79
- <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
80
- <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount'], true, true); ?></span><br />
81
- <?php endforeach; ?>
82
- </small>
83
- <?php elseif(Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_quote->getStoreId())): ?>
84
- <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
85
- <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount_incl_tax'], true, true); ?></small></span><br />
86
- <?php endforeach; ?>
87
- <?php elseif(Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_quote->getStoreId())): ?>
88
- <small>
89
- <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
90
- <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount_incl_tax'], true, true); ?></span><br />
91
- <?php endforeach; ?>
92
- </small>
93
- <?php endif; ?>
94
-
95
- <?php if(Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_quote->getStoreId())): ?>
96
- <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_incl + $_item->getWeeeTaxAppliedRowAmount()); ?></span>
97
- <?php endif; ?>
98
- <?php endif; ?>
99
- <?php endif; ?>
100
- </td>
101
- </tr>
102
- <?php if($_item->getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?>
103
- <tr>
104
- <td colspan="4" style=" border-bottom:2px solid #CCCCCC; padding:3px 9px;">
105
- <strong style="color:#444444; font-size:11px;"><?php echo $this->__('Gift Message') ?></strong>
106
- <?php echo $this->__('From:'); ?> <?php echo $this->htmlEscape($_giftMessage->getSender()) ?><br />
107
- <?php echo $this->__('To:'); ?> <?php echo $this->htmlEscape($_giftMessage->getRecipient()) ?><br />
108
- <strong><?php echo $this->__('Message:'); ?></strong><br /><?php echo $this->htmlEscape($_giftMessage->getMessage()) ?>
109
- </td>
110
- </tr>
111
- <?php endif; ?>
1
+ <?php $_item = $this->getItem() ?>
2
+ <?php $_quote = $this->getItem()->getQuote() ?>
3
+ <tr>
4
+ <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
5
+ <strong style="font-size:11px;"><?php echo $this->htmlEscape($_item->getName()) ?></strong>
6
+ <?php if($this->getItemOptions()): ?>
7
+ <dl style="margin:0; padding:0;">
8
+ <?php foreach($this->getItemOptions() as $option): ?>
9
+ <dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
10
+ <dd style="margin:0; padding:0 0 0 9px;">
11
+ <?php echo nl2br($this->escapeHtml($option['value'])) ?>
12
+ </dd>
13
+ <?php endforeach; ?>
14
+ </dl>
15
+ <?php endif; ?>
16
+ <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
17
+ <?php if($addInfoBlock) : ?>
18
+ <?php echo $addInfoBlock->setItem($_item)->toHtml(); ?>
19
+ <?php endif; ?>
20
+ <?php echo $this->escapeHtml($_item->getDescription()) ?>
21
+ </td>
22
+ <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $this->htmlEscape($this->getSku($_item)) ?></td>
23
+ <td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $_item->getQtyOrdered() * 1 ?></td>
24
+ <td align="right" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
25
+ <?php if($this->helper('tax')->displaySalesPriceExclTax($_quote->getStoreId()) || $this->helper('tax')->displaySalesBothPrices($_quote->getStore())): ?>
26
+ <?php if($this->helper('tax')->displaySalesBothPrices($_quote->getStoreId())): ?>
27
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
28
+ <?php endif; ?>
29
+ <?php if(Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_quote->getStore())): ?>
30
+ <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_item->getRowTotal() + $_item->getWeeeTaxAppliedRowAmount() + $_item->getWeeeTaxRowDisposition()); ?>
31
+ <?php //echo $_quote->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
32
+ <?php else: ?>
33
+ <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_item->getRowTotal()) ?>
34
+ <?php endif; ?>
35
+
36
+
37
+ <?php if(Mage::helper('weee')->getApplied($_item)): ?>
38
+ <br />
39
+ <?php if(Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_quote->getStore())): ?>
40
+ <small>
41
+ <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
42
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount'], true, true); ?></span><br />
43
+ <?php endforeach; ?>
44
+ </small>
45
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_quote->getStoreId())): ?>
46
+ <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
47
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount_incl_tax'], true, true); ?></small></span><br />
48
+ <?php endforeach; ?>
49
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_quote->getStoreId())): ?>
50
+ <small>
51
+ <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
52
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount_incl_tax'], true, true); ?></span><br />
53
+ <?php endforeach; ?>
54
+ </small>
55
+ <?php endif; ?>
56
+
57
+ <?php if(Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_quote->getStore())): ?>
58
+ <br />
59
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_item->getCalculationPrice() + $_item->getWeeeTaxAppliedRowAmount() + $_item->getWeeeTaxRowDisposition()); ?></span>
60
+ <?php endif; ?>
61
+ <?php endif; ?>
62
+ <?php endif; ?>
63
+
64
+
65
+ <?php if($this->helper('tax')->displaySalesPriceInclTax($_quote->getStoreId()) || $this->helper('tax')->displaySalesBothPrices($_quote->getStoreId())): ?>
66
+ <?php if($this->helper('tax')->displaySalesBothPrices($_quote->getStoreId())): ?>
67
+ <br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
68
+ <?php endif; ?>
69
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
70
+ <?php if(Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_quote->getStoreId())): ?>
71
+ <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_incl + $_item->getWeeeTaxAppliedRowAmount()); ?>
72
+ <?php else: ?>
73
+ <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_incl - $_item->getWeeeTaxRowDisposition()) ?>
74
+ <?php endif; ?>
75
+ <?php if(Mage::helper('weee')->getApplied($_item)): ?>
76
+ <br />
77
+ <?php if(Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_quote->getStore())): ?>
78
+ <small>
79
+ <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
80
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount'], true, true); ?></span><br />
81
+ <?php endforeach; ?>
82
+ </small>
83
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_quote->getStoreId())): ?>
84
+ <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
85
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount_incl_tax'], true, true); ?></small></span><br />
86
+ <?php endforeach; ?>
87
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_quote->getStoreId())): ?>
88
+ <small>
89
+ <?php foreach(Mage::helper('weee')->getApplied($_item) as $tax): ?>
90
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($tax['row_amount_incl_tax'], true, true); ?></span><br />
91
+ <?php endforeach; ?>
92
+ </small>
93
+ <?php endif; ?>
94
+
95
+ <?php if(Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_quote->getStoreId())): ?>
96
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo Mage::app()->getLocale()->currency($_quote->getQuoteCurrencyCode())->toCurrency($_incl + $_item->getWeeeTaxAppliedRowAmount()); ?></span>
97
+ <?php endif; ?>
98
+ <?php endif; ?>
99
+ <?php endif; ?>
100
+ </td>
101
+ </tr>
102
+ <?php if($_item->getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?>
103
+ <tr>
104
+ <td colspan="4" style=" border-bottom:2px solid #CCCCCC; padding:3px 9px;">
105
+ <strong style="color:#444444; font-size:11px;"><?php echo $this->__('Gift Message') ?></strong>
106
+ <?php echo $this->__('From:'); ?> <?php echo $this->htmlEscape($_giftMessage->getSender()) ?><br />
107
+ <?php echo $this->__('To:'); ?> <?php echo $this->htmlEscape($_giftMessage->getRecipient()) ?><br />
108
+ <strong><?php echo $this->__('Message:'); ?></strong><br /><?php echo $this->htmlEscape($_giftMessage->getMessage()) ?>
109
+ </td>
110
+ </tr>
111
+ <?php endif; ?>
app/design/frontend/base/default/template/pure360/newsletter/jsinit.phtml CHANGED
@@ -35,7 +35,7 @@
35
  });
36
  }
37
 
38
- $$('#co-billing-form fieldset ul').first().insert(
39
  '<li><!-- --></li>' +
40
  '<li class="control" id="customer-subscribe" style="display:none;">' +
41
  '<input name="billing[is_subscribed]" id="billing:is_subscribed_box" value="1" checked="checked" title="Ship to this address" onchange="setSubscribedValue(this); return false;" class="checkbox" type="checkbox" />' +
@@ -43,7 +43,7 @@
43
  '</li>'
44
  );
45
 
46
- $$('#co-billing-form fieldset')[0].insert(
47
  '<input id="billing:is_subscribed_original" type="hidden" name="billing[is_subscribed_original]" value="1" />' +
48
  '<input id="billing:is_subscribed" type="hidden" name="billing[is_subscribed]" value="1" />');
49
 
35
  });
36
  }
37
 
38
+ $$('#co-billing-form .fieldset ul, #co-billing-form fieldset ul').first().insert(
39
  '<li><!-- --></li>' +
40
  '<li class="control" id="customer-subscribe" style="display:none;">' +
41
  '<input name="billing[is_subscribed]" id="billing:is_subscribed_box" value="1" checked="checked" title="Ship to this address" onchange="setSubscribedValue(this); return false;" class="checkbox" type="checkbox" />' +
43
  '</li>'
44
  );
45
 
46
+ $$('#co-billing-form .fieldset, #co-billing-form fieldset')[0].insert(
47
  '<input id="billing:is_subscribed_original" type="hidden" name="billing[is_subscribed_original]" value="1" />' +
48
  '<input id="billing:is_subscribed" type="hidden" name="billing[is_subscribed]" value="1" />');
49
 
app/etc/modules/Pure360_Cart.xml CHANGED
@@ -1,12 +1,12 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Pure360_Cart>
5
- <active>true</active>
6
- <codePool>community</codePool>
7
- <depends>
8
- <Pure360_Common/>
9
- </depends>
10
- </Pure360_Cart>
11
- </modules>
12
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Pure360_Cart>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <depends>
8
+ <Pure360_Common/>
9
+ </depends>
10
+ </Pure360_Cart>
11
+ </modules>
12
  </config>
app/locale/en_US/template/email/pure360/abandoned_cart.html CHANGED
@@ -1,38 +1,38 @@
1
- <!--@subject {{var store.getFrontendName()}}: Cart Reminder @-->
2
- <!--@styles
3
- body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
4
- @-->
5
- <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
6
- <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
7
- <table cellspacing="0" cellpadding="0" border="0" width="100%">
8
- <tr>
9
- <td align="center" valign="top" style="padding:20px 0 20px 0">
10
- <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
11
- <tr>
12
- <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
13
- </tr>
14
- <tr>
15
- <td valign="top">
16
- <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Hello, {{htmlescape var=$quote.getCustomerName()}}</h1>
17
- <p style="font-size:12px; line-height:16px; margin:0;">
18
- You have an abandoned cart at {{var store.getFrontendName()}}.
19
- You can check the status of your cart by <a href="{{store url="customer/account/"}}" style="color:#1E7EC8;">logging into your account</a>.
20
- </p>
21
- <p style="font-size:12px; line-height:16px; margin:0;">If you have any questions about your cart please contact us at <a href="mailto:{{config path='trans_email/ident_support/email'}}" style="color:#1E7EC8;">{{config path='trans_email/ident_support/email'}}</a> or call us at <span class="nobr">{{config path='general/store_information/phone'}}</span> Monday - Friday, 8am - 5pm PST.</p>
22
- </tr>
23
- <tr>
24
- <td>
25
- {{block type='pure360_cart/email_order_items' area='frontend' template='pure360/cart/email/order/items.phtml' quote=$quote}}
26
- </td>
27
- </tr>
28
- <tr>
29
- <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;">
30
- <p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p>
31
- </td>
32
- </tr>
33
- </table>
34
- </td>
35
- </tr>
36
- </table>
37
- </div>
38
  </body>
1
+ <!--@subject {{var store.getFrontendName()}}: Cart Reminder @-->
2
+ <!--@styles
3
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
4
+ @-->
5
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
6
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
7
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
8
+ <tr>
9
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
10
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
11
+ <tr>
12
+ <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
13
+ </tr>
14
+ <tr>
15
+ <td valign="top">
16
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Hello, {{htmlescape var=$quote.getCustomerName()}}</h1>
17
+ <p style="font-size:12px; line-height:16px; margin:0;">
18
+ You have an abandoned cart at {{var store.getFrontendName()}}.
19
+ You can check the status of your cart by <a href="{{store url="customer/account/"}}" style="color:#1E7EC8;">logging into your account</a>.
20
+ </p>
21
+ <p style="font-size:12px; line-height:16px; margin:0;">If you have any questions about your cart please contact us at <a href="mailto:{{config path='trans_email/ident_support/email'}}" style="color:#1E7EC8;">{{config path='trans_email/ident_support/email'}}</a> or call us at <span class="nobr">{{config path='general/store_information/phone'}}</span> Monday - Friday, 8am - 5pm PST.</p>
22
+ </tr>
23
+ <tr>
24
+ <td>
25
+ {{block type='pure360_cart/email_order_items' area='frontend' template='pure360/cart/email/order/items.phtml' quote=$quote}}
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;">
30
+ <p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p>
31
+ </td>
32
+ </tr>
33
+ </table>
34
+ </td>
35
+ </tr>
36
+ </table>
37
+ </div>
38
  </body>
app/locale/en_US/template/email/pure360/abandoned_cart_guest.html CHANGED
@@ -1,38 +1,38 @@
1
- <!--@subject {{var store.getFrontendName()}}: Cart Reminder @-->
2
- <!--@styles
3
- body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
4
- @-->
5
- <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
6
- <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
7
- <table cellspacing="0" cellpadding="0" border="0" width="100%">
8
- <tr>
9
- <td align="center" valign="top" style="padding:20px 0 20px 0">
10
- <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
11
- <tr>
12
- <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
13
- </tr>
14
- <tr>
15
- <td valign="top">
16
- <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">Hello, {{htmlescape var=$quote.getCustomerName()}}</h1>
17
- <p style="font-size:12px; line-height:16px; margin:0;">
18
- You have an abandoned cart at {{var store.getFrontendName()}}.
19
- You can check the status of your cart by <a href="{{store url="customer/account/"}}" style="color:#1E7EC8;">logging into your account</a>.
20
- </p>
21
- <p style="font-size:12px; line-height:16px; margin:0;">If you have any questions about your cart please contact us at <a href="mailto:{{config path='trans_email/ident_support/email'}}" style="color:#1E7EC8;">{{config path='trans_email/ident_support/email'}}</a> or call us at <span class="nobr">{{config path='general/store_information/phone'}}</span> Monday - Friday, 8am - 5pm PST.</p>
22
- </tr>
23
- <tr>
24
- <td>
25
- {{block type='pure360_cart/email_order_items' area='frontend' template='pure360/cart/email/order/items.phtml' quote=$quote}}
26
- </td>
27
- </tr>
28
- <tr>
29
- <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;">
30
- <p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p>
31
- </td>
32
- </tr>
33
- </table>
34
- </td>
35
- </tr>
36
- </table>
37
- </div>
38
  </body>
1
+ <!--@subject {{var store.getFrontendName()}}: Cart Reminder @-->
2
+ <!--@styles
3
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
4
+ @-->
5
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
6
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
7
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
8
+ <tr>
9
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
10
+ <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
11
+ <tr>
12
+ <td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
13
+ </tr>
14
+ <tr>
15
+ <td valign="top">
16
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">Hello, {{htmlescape var=$quote.getCustomerName()}}</h1>
17
+ <p style="font-size:12px; line-height:16px; margin:0;">
18
+ You have an abandoned cart at {{var store.getFrontendName()}}.
19
+ You can check the status of your cart by <a href="{{store url="customer/account/"}}" style="color:#1E7EC8;">logging into your account</a>.
20
+ </p>
21
+ <p style="font-size:12px; line-height:16px; margin:0;">If you have any questions about your cart please contact us at <a href="mailto:{{config path='trans_email/ident_support/email'}}" style="color:#1E7EC8;">{{config path='trans_email/ident_support/email'}}</a> or call us at <span class="nobr">{{config path='general/store_information/phone'}}</span> Monday - Friday, 8am - 5pm PST.</p>
22
+ </tr>
23
+ <tr>
24
+ <td>
25
+ {{block type='pure360_cart/email_order_items' area='frontend' template='pure360/cart/email/order/items.phtml' quote=$quote}}
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;">
30
+ <p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p>
31
+ </td>
32
+ </tr>
33
+ </table>
34
+ </td>
35
+ </tr>
36
+ </table>
37
+ </div>
38
  </body>
js/mage/adminhtml/pure360/common.js CHANGED
@@ -57,7 +57,11 @@ Pure360.prototype =
57
  this.password_marketing.onchange = function(e) { return self.checkValidated('marketing'); };
58
  this.username_transactional.onchange = function(e) { return self.checkValidated('transactional'); };
59
  this.password_transactional.onchange = function(e) { return self.checkValidated('transactional'); };
60
- this.url.onchange = function(e) { return self.checkValidated('marketing') && self.checkValidated('transactional'); };
 
 
 
 
61
 
62
  this.checkEnabled();
63
  this.checkValidated('marketing');
57
  this.password_marketing.onchange = function(e) { return self.checkValidated('marketing'); };
58
  this.username_transactional.onchange = function(e) { return self.checkValidated('transactional'); };
59
  this.password_transactional.onchange = function(e) { return self.checkValidated('transactional'); };
60
+ this.url.onchange = function(e) {
61
+ var marketing = self.checkValidated('marketing');
62
+ var transactional = self.checkValidated('transactional')
63
+ return true;
64
+ };
65
 
66
  this.checkEnabled();
67
  this.checkValidated('marketing');
js/mage/adminhtml/pure360/cron.js CHANGED
@@ -1,6 +1,6 @@
1
  Event.observe(window, 'load', function() {
2
  initPure360Cron();
3
- setTimeout('window.location.reload();', 10000);
4
  });
5
 
6
  Pure360Cron = Class.create();
1
  Event.observe(window, 'load', function() {
2
  initPure360Cron();
3
+ setTimeout('window.location.reload();', 30000);
4
  });
5
 
6
  Pure360Cron = Class.create();
lib/Pure360/Client.php CHANGED
@@ -129,44 +129,48 @@ class Pure360_Client
129
 
130
  } catch (Exception $e)
131
  {
132
- throw new Exception('[Pure360] Could not connect to host');
133
  }
134
-
135
- // Validate response
136
- if (isset($response['result']))
137
- {
138
- switch ($response["result"])
139
  {
140
- case "success":
141
- if (!empty($response["resultData"]))
142
- {
143
- $results = $response["resultData"];
144
- } else
145
- {
146
- $results = array();
147
- }
148
- break;
 
 
149
 
150
- case "bean_exception_validation":
151
-
152
- throw new Pure360_Exception_ValidationException($response["resultData"]);
153
 
154
- case "bean_exception_security":
155
-
156
- throw new Pure360_Exception_SecurityException($response["resultData"]);
157
 
158
- case "bean_exception_system":
159
-
160
- throw new Pure360_Exception_SystemException($response["resultData"]);
161
 
162
- default:
163
-
164
- throw new Exception("[Pure360] Unhandled exception");
165
- }
 
 
 
 
 
 
166
 
167
- } else
 
 
 
 
168
  {
169
- throw new Exception("[Pure360] Invalid api response.");
170
  }
171
 
172
  // Save request and response
129
 
130
  } catch (Exception $e)
131
  {
132
+ throw new Exception('[Pure360] Could not connect to host: '.$class.'::'.$process.' '. $e->getMessage());
133
  }
134
+ try {
135
+ // Validate response
136
+ if (isset($response['result']))
 
 
137
  {
138
+ switch ($response["result"])
139
+ {
140
+ case "success":
141
+ if (!empty($response["resultData"]))
142
+ {
143
+ $results = $response["resultData"];
144
+ } else
145
+ {
146
+ $results = array();
147
+ }
148
+ break;
149
 
150
+ case "bean_exception_validation":
 
 
151
 
152
+ throw new Pure360_Exception_ValidationException($response["resultData"]);
 
 
153
 
154
+ case "bean_exception_security":
 
 
155
 
156
+ throw new Pure360_Exception_SecurityException($response["resultData"]);
157
+
158
+ case "bean_exception_system":
159
+
160
+ throw new Pure360_Exception_SystemException($response["resultData"]);
161
+
162
+ default:
163
+
164
+ throw new Exception("[Pure360] Unhandled exception");
165
+ }
166
 
167
+ } else
168
+ {
169
+ throw new Exception("[Pure360] Invalid api response.");
170
+ }
171
+ } catch (Exception $e)
172
  {
173
+ Mage::helper('pure360_list')->writeError("Client - ".$e->getMessage());
174
  }
175
 
176
  // Save request and response
lib/Pure360/Session.php CHANGED
@@ -40,7 +40,8 @@ class Pure360_Session
40
  $this->beanData = $context->login($this->properties["username"], $this->properties["password"]);
41
 
42
  // Set context
43
- $this->context = $this->beanData["bus_entity_context"];
 
44
  $this->client->setContext($this->context);
45
 
46
  // Set identity
40
  $this->beanData = $context->login($this->properties["username"], $this->properties["password"]);
41
 
42
  // Set context
43
+ $this->context = $this->beanData["bus_entity_context"];
44
+ $this->context['defaultLanguage'] = $this->beanData["bus_entity_account_identity"]["defaultLanguage"];
45
  $this->client->setContext($this->context);
46
 
47
  // Set identity
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Pure360</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
  <channel>community</channel>
@@ -54,7 +54,11 @@
54
  &#xD;
55
  &lt;li&gt;Create successful campaigns by combining customer data imported from Magento with other PureResponse features such as dynamic content, split content testing and intelligent time sending&lt;/li&gt;&#xD;
56
  &lt;p&gt;&lt;/p&gt;&#xD;
57
- &#xD;
 
 
 
 
58
  &lt;h3&gt;Take a Trial&lt;/h3&gt;&#xD;
59
  &#xD;
60
  &lt;p&gt;To trial Pure360's fantastic integration &lt;a title="Sign up here" href="http://www.pure360.com/take-a-trial-software-august"&gt;sign up here&lt;/a&gt; - we'll be in touch shortly to get you started.&lt;/p&gt;&#xD;
@@ -63,20 +67,47 @@
63
  &#xD;
64
  &lt;h3&gt;Pricing&lt;/h3&gt;&#xD;
65
  &#xD;
66
- &lt;p&gt;To see Pure360 pricing &lt;a title="Sign up here" href="http://www.pure360.com/take-a-trial-software-august"&gt;sign up here&lt;/a&gt; and a member of the team will be in touch to discuss your requirements and build a package that suits your individual needs.&lt;/p&gt;&#xD;
67
- </description>
68
- <notes>1.0.2&#xD;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  - Dropdown values synced properly&#xD;
70
  - Boolean Yes/No synced&#xD;
71
  - Data consistency&#xD;
72
  - UI tweaks&#xD;
 
73
  &#xD;
74
  1.0.1&#xD;
75
  - Magento Connect compliance</notes>
76
  <authors><author><name>Stewart Waller</name><user>stewart_pure360</user><email>stewart.waller@pure360.com</email></author></authors>
77
- <date>2013-10-18</date>
78
- <time>08:11:23</time>
79
- <contents><target name="magecommunity"><dir name="Pure360"><dir name="Cart"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="b2a89a4eb5a0cc07a4ddb9851b5d8490"/></dir></dir></dir><dir name="Email"><dir name="Order"><file name="Items.php" hash="45b9becd073ab968872f142243d52d63"/></dir></dir><file name="Jsinit.php" hash="9ba1a3c3b20736d2b2376046da2b3fcf"/></dir><dir name="Helper"><file name="Data.php" hash="bc15d6ba50c4e6f0242eb07532b13c99"/></dir><dir name="Job"><file name="Trigger.php" hash="192fc12b542e97665d21e6d88d6713fb"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Backend"><file name="Enable.php" hash="742234ea19b737b33de9af1aea4dcf6e"/></dir><dir name="Source"><file name="Delay.php" hash="386d7aa81411c136516e8c4cc3f13ad3"/><dir name="Email"><file name="Template.php" hash="9f2fab6d42a1da181f272d70c5236172"/><file name="TemplateGuest.php" hash="682117c74cecda7395941cb5fcbdc729"/></dir><file name="Type.php" hash="a4a09a9fcaf0f970e823479bb784e92c"/></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="82a5cba1c9069306bbd9886fd9ad1bf9"/></dir><dir name="etc"><file name="config.xml" hash="7e61b6192345eb5c6b60b3c41b2a6f24"/><file name="system.xml" hash="02bfe0ba69816df211fb6851067414dc"/></dir><dir name="sql"><dir name="pure360_cart_setup"><file name="mysql4-install-1.0.2.php" hash="49960b758d00481bad2d3baa2daba9cd"/></dir></dir></dir><dir name="Common"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="29091a400a1ce9c9207d732de03ce7bd"/><file name="Disabled.php" hash="9970f5fc1b0b34000b8219f2519eccaa"/><dir name="Form"><dir name="Field"><file name="Hidden.php" hash="95ed0e83cd87c03de709789eb21ab1b2"/></dir><file name="Field.php" hash="34766e8795a023cdf19c2fc0bb0c976f"/><file name="Fieldset.php" hash="0605c96e429b6d1c5ae6081b6a1bf76e"/></dir><file name="Form.php" hash="d8c5c4aa3d8132c7318311981cd1fdee"/><file name="Hidden.php" hash="b4b32095413ebdd63f4de1194e20ea0e"/><file name="Modules.php" hash="3deb577d540a7537d91059a8393d759d"/><file name="Tabs.php" hash="de833cdcb3b278923e53ee85d685820f"/><dir name="Validate"><file name="Marketing.php" hash="86513e7b18dc53ab3f6a17ae1c2ffb07"/><file name="Transactional.php" hash="578130a5e13e24848eea90dede3d8ab5"/></dir></dir></dir></dir><file name="Jsinit.php" hash="47c0e55bbe05d6adc07840090034eca7"/></dir><dir name="Helper"><file name="Ajax.php" hash="57787267c712dd712f74fc54e6f2765f"/><file name="Api.php" hash="16862411672bafb439a5b81ddca0c49f"/><file name="Data.php" hash="b7006096a1a9693b5c2d13d03810c6b5"/><file name="File.php" hash="9ce95f89acca0eddc0745e21dccdb165"/></dir><dir name="Interface"><file name="Job.php" hash="59c3fcfe0e35f2a7867a3bd8e5f51d61"/></dir><dir name="Model"><file name="Observer.php" hash="045ba8d185a9646cc2bfb0adfe96e6ef"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Enable.php" hash="9445b26df9a78548fd0c22be126acc7c"/></dir><dir name="Source"><dir name="Cron"><file name="Days.php" hash="0174fb71a0cd1979b4b1a74b4d5dfe6e"/><file name="Frequency.php" hash="0c0afecf1341100e4ba90e180df6facf"/><file name="Minutes.php" hash="b7a8eef1155ca8cddadc79d643ac56bc"/></dir><file name="Field.php" hash="da1801ccb45426ce8e960a4d40952303"/><file name="Global.php" hash="412071d06a25bf92962d2c2be1eb411a"/><file name="Message.php" hash="aa72d6227f29795dadf9c45405cafffd"/></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="6e267f11b1d7df2ef27a721ae4c10887"/><file name="JobController.php" hash="99b6026a540c4f02c8c827e66a85d48b"/><file name="Pure360Controller.php" hash="07599b0ad90725bda1201b8bd291e0d5"/></dir><dir name="etc"><file name="config.xml" hash="35e2aa9156c1678c82ab86b27616bb76"/><file name="system.xml" hash="9b467fbbc758e3933e1343f8a0f63715"/></dir></dir><dir name="Cron"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="4c08269367666f8aa9ea9028f1afc0b7"/></dir><dir name="Cron"><dir name="Manager"><dir name="Grid"><dir name="Renderer"><file name="Actions.php" hash="c0ee554f426a5147b486384c52f8eae3"/><file name="Crontab.php" hash="b28f87aeb8259bd17583b2a86fa16e19"/><file name="Force.php" hash="69f68ee9b7e7deccf161991aff2013fe"/><file name="Pause.php" hash="780dd8620f8c0c0a7094c558d6c1b0fc"/></dir></dir><file name="Grid.php" hash="a654543f57a356152eb7119cf971f4a9"/><dir name="Logs"><dir name="Renderer"><file name="Bytes.php" hash="a252cdb9290293c58962b19ec376d11f"/><file name="Clean.php" hash="448c3aae8e6fef07e676a53ac1225e11"/><file name="Download.php" hash="1046ed159db6e270d78823af78e4dec0"/><file name="Tail.php" hash="57ad12798b10af495e3e3d34e84ecb36"/></dir></dir><file name="Logs.php" hash="bbad87b3c1ff4165179ffa799554f568"/></dir><file name="Manager.php" hash="407928e5052d387a45f02b5c8e70810b"/></dir></dir></dir><file name="Jsinit.php" hash="28d2d2074598dd783db41884fc624f88"/></dir><dir name="Helper"><file name="Data.php" hash="fa6c7e721a561c014382692aa2a49eab"/></dir><dir name="Job"><file name="Abstract.php" hash="f59fb9712d9001f3406d10c202a45223"/><file name="Interface.php" hash="306c4c9de6dc281ce2d50012759da82c"/></dir><dir name="Model"><file name="Job.php" hash="2876e7fcff63de170d0b34d2aef92254"/><file name="Observer.php" hash="b42620793b3cda50d47f752c7d0e600b"/><dir name="Resource"><dir name="Job"><file name="Collection.php" hash="a42b6c45b4786f35d2d808bd3e0860da"/></dir><file name="Job.php" hash="ca3d4f31293d6419fb4b84a10dec4464"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="01b2c823877a8e7838c8e1cd5f3f568b"/></dir><dir name="etc"><file name="config.xml" hash="029ada4d5f1111fd158f33d1e934abb1"/><file name="system.xml" hash="d398d5ef4758562b8e8c7007b2470b7b"/></dir><dir name="sql"><dir name="pure360_cron_setup"><file name="mysql4-install-1.0.2.php" hash="6819eab799199893f65c05a53451e3a0"/></dir></dir></dir><dir name="Email"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="c03154f20bdfbe72631bc09fbd3f86da"/><file name="Transactional.php" hash="37476f57155a4d28a9a16d75f1c2269c"/></dir></dir></dir><file name="Jsinit.php" hash="463a0092939237b6de4c4e9b47e897d8"/></dir><dir name="Helper"><file name="Api.php" hash="ddeb4f28ee7f82530b96055c4b5ccaa8"/><file name="Data.php" hash="ca33046f86cd97daff222e2386879ee8"/></dir><dir name="Model"><dir name="Email"><file name="Message.php" hash="2cae4bee4aaff2c4850d93bbf762ce04"/></dir><file name="Messages.php" hash="56eeb27a00e794774759d4631df0df0d"/><dir name="Resource"><dir name="Transactional"><file name="Collection.php" hash="92714dd16f619e43ae8695bf6b9a5d59"/></dir><file name="Transactional.php" hash="c2c02bf63ab5c7314eca1f94f4f953bc"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Email"><file name="Template.php" hash="6e04d1a0f99becc198a940ef1c8ebf57"/></dir></dir></dir></dir><file name="Transactional.php" hash="f71a307d7dc6bb652a1267921b78a7e6"/></dir><dir name="controllers"><file name="AjaxController.php" hash="1d81c0ad2620918a07266c40d772b8e0"/></dir><dir name="etc"><file name="config.xml" hash="8c6afc0a1f4a4cac0c3df34c78e4a668"/><file name="system.xml" hash="b1ed057cfe7d27ecfb86fdf5a3f02e27"/></dir><dir name="sql"><dir name="pure360_email_setup"><file name="mysql4-install-1.0.2.php" hash="bb37fdf2a7c8907b13e003eb56f13542"/></dir></dir></dir><dir name="List"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="f66afdcd44d13a9a4dbd92fc3d77114a"/><file name="Form.php" hash="9b8b1a093cc9c455fb108a6f9d3960c0"/><file name="List.php" hash="9ee4a1c9e91b63402060f85726296f16"/></dir></dir></dir><file name="Jsinit.php" hash="78daf97d49034d34c36007322408c9a8"/></dir><dir name="Helper"><file name="Api.php" hash="c6fad3966387a14f3b2cc6b6939f1c82"/><file name="Data.php" hash="5d6e01975c1a5ba84c44477591ffd977"/></dir><dir name="Job"><file name="Sync.php" hash="95e15392c2cb4ccfeba3cf06edbd8bd2"/></dir><dir name="Model"><file name="Address.php" hash="844441bf49a1f1ac492939449c33f28c"/><file name="Customer.php" hash="e0e3418881877b5b17579bec7978728f"/><file name="Data.php" hash="1e70c242bcfd71a92832cc300d8697fc"/><file name="Groups.php" hash="05f58791bbd56a161b8dc614831197ca"/><file name="List.php" hash="9125566c34a2500734e1c2583371aec3"/><file name="Observer.php" hash="ca2ea4a8ca36f7203c1a9ea30c70aa08"/><dir name="Resource"><dir name="List"><file name="Collection.php" hash="503fae2e6c778646ba730eaf98a67ae5"/></dir><file name="List.php" hash="5b443a43c67230dca205cf44e568b613"/></dir><file name="Sales.php" hash="9910099ba6f492c414e951a49e5960c1"/><file name="Segments.php" hash="6bf9009dc93f71224d29644c333c1a61"/></dir><dir name="controllers"><file name="AjaxController.php" hash="20084d7deabcb5ba6c37b53da0d8524e"/></dir><dir name="etc"><file name="config.xml" hash="de6805f928ce93fe3c7bce2910c7d28f"/><file name="system.xml" hash="33bc7c064f682b6009e650213ee49854"/></dir><dir name="sql"><dir name="pure360_list_setup"><file name="mysql4-install-1.0.2.php" hash="adfcfc98f03a7f9711061473fdba5a58"/></dir></dir></dir><dir name="Newsletter"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="dbc0efc7099f1ac9af12d02fc87f559c"/></dir></dir></dir><dir name="Checkout"><dir name="Onepage"><file name="Newsletter.php" hash="c65136e4076cbb4c686b465c5d04fcc2"/></dir></dir><file name="Jsinit.php" hash="3cdd4b0da1539ac253e440997bb56308"/></dir><dir name="Helper"><file name="Api.php" hash="b31a077fab97c6d0a7a99c2a1d5db05a"/><file name="Data.php" hash="c2c63a8c9546183b6cb5048e6d7ddf7b"/></dir><dir name="Model"><file name="Observer.php" hash="0320f4334ef874f2c112e5d595760ec1"/><file name="Subscriber.php" hash="412d9a51803047fd337672712d0e44a9"/></dir><dir name="controllers"><file name="IndexController.php" hash="da4dfea12608bf7ef6e177b9a0be47ba"/></dir><dir name="etc"><file name="config.xml" hash="062115dd7dddfe8336f204e73254d282"/><file name="system.xml" hash="35d9f9afe40ee6ea617906a3a830252f"/></dir><dir name="sql"><dir name="pure360_newsletter_setup"><file name="mysql4-install-1.0.2.php" hash="8487bc8b8483b9a941f9895e25280455"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pure360_cart.xml" hash="bb41c36682cf8829553a12881db5b2ea"/><file name="pure360_common.xml" hash="27f8fe83bb013ef6e4c3111e855aed67"/><file name="pure360_cron.xml" hash="fb35138a5514721477356dac81ac3fc1"/><file name="pure360_email.xml" hash="05ebc3cd33d33d492cae9196dfc1b65b"/><file name="pure360_list.xml" hash="4f3346bce27d07ebf2c78b888453d33f"/><file name="pure360_newsletter.xml" hash="d7ba5b55c3a3d473e96d8a7fab313584"/></dir><dir name="template"><dir name="pure360"><dir name="cart"><file name="jsinit.phtml" hash="2bca290370210037cb71c62e15b0d9cc"/></dir><dir name="common"><file name="about.phtml" hash="643d4e13c093fd954e928ada274772de"/><file name="config.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="disabled.phtml" hash="69dee703408ead95dd5c913ad2bfca9d"/><file name="error.phtml" hash="0f4f65766466a459cd57743bcbcd4085"/><file name="hidden.phtml" hash="bd8768ad057df0a9dda8e50a0507b3ed"/><file name="jsinit.phtml" hash="f30da6ab4caf72ee8f135c450a504801"/><file name="modules.phtml" hash="2dcf7bab0da85eb4533d07f8479c4c38"/></dir><dir name="cron"><file name="jsinit.phtml" hash="697388afb41375e3dfe9f7c4fff25712"/><file name="manager.phtml" hash="a413d279ec78fce33ffe2c7196fd2acb"/></dir><dir name="email"><file name="jsinit.phtml" hash="91b9745ad690249ea58b5f80c7487a1f"/><file name="transactional.phtml" hash="7f201cf65dd510fb067a173edbb0a14c"/></dir><file name="hint.phtml" hash="6e50c5cce42b12e8481e5211e8cf0f35"/><dir name="list"><file name="jsinit.phtml" hash="2a66b7d233cdf95c751e102974504ca0"/><file name="list.phtml" hash="f310c3197118223821176f4f791eeed4"/></dir><dir name="newsletter"><file name="jsinit.phtml" hash="e57d9c2279ff4440df096e79643f9bca"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="pure360"><file name="cart.xml" hash="31aa1884491949f7965aa0b8c514fc7c"/><file name="newsletter.xml" hash="790ced3bb4a2a83267b548fb0e0544e8"/></dir></dir><dir name="template"><dir name="pure360"><dir name="cart"><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="de146a4a2796d166c1337e8734ae02cd"/></dir></dir><file name="items.phtml" hash="086c832780aab518bb04cb3a8157e5ba"/></dir></dir></dir><dir name="newsletter"><file name="jsinit.phtml" hash="e99f59688cef74ad2aa3f57751c25a9f"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pure360_Cart.xml" hash="4bf660dc41ebb88fd04421b5edcb93f5"/><file name="Pure360_Common.xml" hash="21ce1650dac593cf9d1293167592ce9d"/><file name="Pure360_Cron.xml" hash="3fac7040468efecd5ae487b3e0509737"/><file name="Pure360_Email.xml" hash="e58b87357af6ed25523afd5983a63297"/><file name="Pure360_List.xml" hash="277e4aea059838480e1af90a3b2d0a7a"/><file name="Pure360_Newsletter.xml" hash="500c3d494e2c3edc7b0a0bdb0a429126"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="pure360"><file name="abandoned_cart.html" hash="5aef51ca2baff2a5afc489c12daabd51"/><file name="abandoned_cart_guest.html" hash="f65bbcd0ea761b0e80ac7c0082fc9456"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="mage"><dir name="adminhtml"><dir name="pure360"><file name="cart.js" hash="ee5b1110af04c4d24f0ed5f1668cf4d5"/><file name="common.js" hash="342feffc1c2665c3e23b490fd37974b6"/><file name="cron.js" hash="b0ba0b28d2a4595bb3f87c6b04d004c4"/><file name="email.js" hash="3c9259fe31d2ade24aacc622b0790ea2"/><file name="list.js" hash="443b0acec1d1a3016f3b606e92a435d5"/><file name="newsletter.js" hash="15d462e8eaab011460431cc10a75bdb2"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Pure360"><file name="Client.php" hash="2daae4bee1c878da1c4a316ed9d0b8c7"/><file name="Entity.php" hash="ba76dccb0a80ce11a110d3e1c5e108a1"/><dir name="Exception"><file name="SecurityException.php" hash="1e30dd834995651eb8ab0ff19c022713"/><file name="SystemException.php" hash="dbb715d39318c4a63db0d05eaeb85eab"/><file name="ValidationException.php" hash="69540e782165d00400c1ae460aa755ed"/></dir><dir name="Package"><dir name="Account"><file name="Identity.php" hash="56a192c63b4b82f95a03bf01dfb0e320"/><file name="Login.php" hash="b5cf3c5a7f02c34a7714492cb088b12d"/><file name="Pool.php" hash="6ca9929fae710c8d3b6baff9bb9ebd56"/></dir><file name="Account.php" hash="549fc8c168e102b5d622192e7161314f"/><dir name="Campaign"><file name="Automation.php" hash="7ef9a900dd1e48b5bc131aa3c801c4bb"/><file name="AutomationByDate.php" hash="0042f336568ce900d74e8e19e9d70a9b"/><file name="AutomationBySignup.php" hash="23e9d9e19a02c602ab67a2e706e64184"/><file name="ContentItem.php" hash="797bfd1d0fee23e2d8a00a7118934fc9"/><file name="Delivery.php" hash="a38c9f831977dc635140af291f529bbb"/><file name="DynamicRegion.php" hash="f81afeb8f67d3b5d6adb279126325321"/><file name="Email.php" hash="ae09ee6eb161c2032a68af8486227a8f"/><file name="Filter.php" hash="16cbfe1f34080bf88326315cde2c7fae"/><file name="GroupDelivery.php" hash="e470a337c36cd6c6e6c2126c2d8a6b05"/><file name="MarketingList.php" hash="62a2cb099555c922abc8971fb904af84"/><file name="Message.php" hash="115a7a8d5d313cc1fc91c404af4e277f"/><file name="One2One.php" hash="b3f229593bc9e78f717807967923e181"/><file name="Person.php" hash="465cc7928b872f1a1f9c71099e70e640"/><file name="Sms.php" hash="c525a6fb395d67651e91c1fe6481777b"/></dir><file name="Campaign.php" hash="bfab52155c32995acd3b7e376b683001"/><dir name="Context"><file name="Context.php" hash="2fe3109a45d6459f4cf441b3aa1ed7a3"/><file name="Preference.php" hash="8a390e782e04ad0decc26f72cc7f362c"/></dir><file name="Context.php" hash="7032b8dd4c00fded3f49511b174ebeba"/><dir name="Data"><file name="Meta.php" hash="a0489bfbbd52443eeb3f019f36840846"/><file name="Scheduler.php" hash="a37efb3c2d5497bc37393a8fa4879b57"/></dir><file name="Data.php" hash="77c4d9c47b4a2cd161a506d74024e639"/><dir name="Other"><file name="EventNotification.php" hash="c880abfad0408709e7c801f74c0c1882"/><file name="File.php" hash="71f3239c95c09f03a954d47ebdd20233"/></dir><file name="Other.php" hash="bea8844bf4037303bcf7bd064e18ae3f"/></dir><file name="Package.php" hash="2b1d5236b81621130c7522ddc105bd90"/><file name="Session.php" hash="340e63e5c25296bbe9baf8426dba1726"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="pure360"><file name="pure360.css" hash="ea0485422716685e1753945731b3391e"/></dir><dir name="images"><dir name="pure360"><file name="pure_logo.png" hash="e03329ae9efacfeb292f079992a18a41"/><file name="switch.png" hash="dc4dd15ad074ab584444bda7660afe7a"/></dir></dir></dir></dir></dir></target></contents>
80
  <compatible/>
81
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>soap</name><min/><max/></extension></required></dependencies>
82
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Pure360</name>
4
+ <version>1.1.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
  <channel>community</channel>
54
  &#xD;
55
  &lt;li&gt;Create successful campaigns by combining customer data imported from Magento with other PureResponse features such as dynamic content, split content testing and intelligent time sending&lt;/li&gt;&#xD;
56
  &lt;p&gt;&lt;/p&gt;&#xD;
57
+ &lt;h3&gt; Documentation&lt;/h3&gt;&#xD;
58
+ &lt;p&gt;&lt;a title="Quick Configuration Guide" href="https://docs.google.com/file/d/0BwOeOUbclbR1QVJuYjZlckliMzA/edit?usp=sharing"&gt;Quick Configuration Guide&lt;/a&gt;&lt;/p&gt;&#xD;
59
+ &lt;p&gt;&lt;a title="Magento Reference Guide" href="https://docs.google.com/file/d/0BwOeOUbclbR1SlR3bGxPM3QzUHc/edit?usp=sharing"&gt;Magento Integration Reference Guide&lt;/a&gt;&lt;/p&gt;&#xD;
60
+ &lt;p&gt;&lt;a title="Magento Administration, Reference and Configuration Guide" href="https://docs.google.com/file/d/0BwOeOUbclbR1UE1iY00wOU1INFE/edit?usp=sharing"&gt;Magento Integration Administration, Reference and Configuration Guide&lt;/a&gt;&lt;/p&gt;&#xD;
61
+ &lt;p&gt;&lt;/p&gt;&#xD;
62
  &lt;h3&gt;Take a Trial&lt;/h3&gt;&#xD;
63
  &#xD;
64
  &lt;p&gt;To trial Pure360's fantastic integration &lt;a title="Sign up here" href="http://www.pure360.com/take-a-trial-software-august"&gt;sign up here&lt;/a&gt; - we'll be in touch shortly to get you started.&lt;/p&gt;&#xD;
67
  &#xD;
68
  &lt;h3&gt;Pricing&lt;/h3&gt;&#xD;
69
  &#xD;
70
+ &lt;p&gt;To see Pure360 pricing &lt;a title="Sign up here" href="http://www.pure360.com/take-a-trial-software-august"&gt;sign up here&lt;/a&gt; and a member of the team will be in touch to discuss your requirements and build a package that suits your individual needs.&lt;/p&gt;</description>
71
+ <notes>1.1.3&#xD;
72
+ - Added support for SUPEE-6788&#xD;
73
+ - Remove LF and CR characters from lists csv rows;&#xD;
74
+ - Fix bug Abandoned carts are triggered only 1 time for each customer in magento 1.9;&#xD;
75
+ - Fix JavaScript problems so that the checkbox for subscribe displays also in magento 1.9 rwd theme;&#xD;
76
+ - Changed text encoding for emails to UTF-8 when necessary so that sending one2one always works with pure360;&#xD;
77
+ &#xD;
78
+ 1.1.2&#xD;
79
+ - Allow Response API to be accessed via HTTPS&#xD;
80
+ - Also allow HTTP API access&#xD;
81
+ &#xD;
82
+ 1.1.1&#xD;
83
+ - Opt out removal syncronisation fix&#xD;
84
+ &#xD;
85
+ 1.1.0&#xD;
86
+ - Username/password check when changing API URL&#xD;
87
+ - Increased the page refresh time in Cron job page&#xD;
88
+ - Newsletter signup checkbox should not be checked by default if the use has already opted-out&#xD;
89
+ &#xD;
90
+ 1.0.4&#xD;
91
+ - List opt-out support extended&#xD;
92
+ &#xD;
93
+ 1.0.3&#xD;
94
+ - Stability fixes&#xD;
95
+ - Verbose error handling&#xD;
96
+ - List Sync fixes&#xD;
97
+ &#xD;
98
+ 1.0.2&#xD;
99
  - Dropdown values synced properly&#xD;
100
  - Boolean Yes/No synced&#xD;
101
  - Data consistency&#xD;
102
  - UI tweaks&#xD;
103
+ - Admin routing updated&#xD;
104
  &#xD;
105
  1.0.1&#xD;
106
  - Magento Connect compliance</notes>
107
  <authors><author><name>Stewart Waller</name><user>stewart_pure360</user><email>stewart.waller@pure360.com</email></author></authors>
108
+ <date>2015-11-06</date>
109
+ <time>12:58:07</time>
110
+ <contents><target name="magecommunity"><dir name="Pure360"><dir name="Cart"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="b2a89a4eb5a0cc07a4ddb9851b5d8490"/></dir></dir></dir><dir name="Email"><dir name="Order"><file name="Items.php" hash="45b9becd073ab968872f142243d52d63"/></dir></dir><file name="Jsinit.php" hash="9ba1a3c3b20736d2b2376046da2b3fcf"/></dir><dir name="Helper"><file name="Data.php" hash="48fd162115b086d3a02628a448bf7abd"/></dir><dir name="Job"><file name="Trigger.php" hash="08625794841c4bbf0ff1956428e50412"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Backend"><file name="Enable.php" hash="742234ea19b737b33de9af1aea4dcf6e"/></dir><dir name="Source"><file name="Delay.php" hash="386d7aa81411c136516e8c4cc3f13ad3"/><dir name="Email"><file name="Template.php" hash="9f2fab6d42a1da181f272d70c5236172"/><file name="TemplateGuest.php" hash="682117c74cecda7395941cb5fcbdc729"/></dir><file name="Type.php" hash="a4a09a9fcaf0f970e823479bb784e92c"/></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="c084c8b407d66b68d859c9e21b11e863"/></dir><dir name="etc"><file name="config.xml" hash="0bca6e17fd6e26ce76c5cb896fe72818"/><file name="system.xml" hash="02bfe0ba69816df211fb6851067414dc"/></dir><dir name="sql"><dir name="pure360_cart_setup"><file name="mysql4-install-1.0.4.php" hash="49960b758d00481bad2d3baa2daba9cd"/><file name="mysql4-upgrade-1.1.2-1.1.3.php" hash="603d4269a49fc664313bd3c3f05cfac9"/></dir></dir></dir><dir name="Common"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="29091a400a1ce9c9207d732de03ce7bd"/><file name="Disabled.php" hash="9970f5fc1b0b34000b8219f2519eccaa"/><dir name="Form"><dir name="Field"><file name="Hidden.php" hash="95ed0e83cd87c03de709789eb21ab1b2"/></dir><file name="Field.php" hash="34766e8795a023cdf19c2fc0bb0c976f"/><file name="Fieldset.php" hash="0605c96e429b6d1c5ae6081b6a1bf76e"/></dir><file name="Form.php" hash="d8c5c4aa3d8132c7318311981cd1fdee"/><file name="Hidden.php" hash="b4b32095413ebdd63f4de1194e20ea0e"/><file name="Modules.php" hash="3deb577d540a7537d91059a8393d759d"/><file name="Tabs.php" hash="de833cdcb3b278923e53ee85d685820f"/><dir name="Validate"><file name="Marketing.php" hash="86513e7b18dc53ab3f6a17ae1c2ffb07"/><file name="Transactional.php" hash="578130a5e13e24848eea90dede3d8ab5"/></dir></dir></dir></dir><file name="Jsinit.php" hash="47c0e55bbe05d6adc07840090034eca7"/></dir><dir name="Helper"><file name="Ajax.php" hash="57787267c712dd712f74fc54e6f2765f"/><file name="Api.php" hash="5bbe4e34310f1dfb7f83395a622b6a08"/><file name="Data.php" hash="37fba89884930b660c000910b73ff159"/><file name="File.php" hash="f3439f121e49b1dbf52aa4b15436a75f"/></dir><dir name="Interface"><file name="Job.php" hash="59c3fcfe0e35f2a7867a3bd8e5f51d61"/></dir><dir name="Model"><file name="Observer.php" hash="045ba8d185a9646cc2bfb0adfe96e6ef"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Enable.php" hash="9445b26df9a78548fd0c22be126acc7c"/></dir><dir name="Source"><dir name="Cron"><file name="Days.php" hash="0174fb71a0cd1979b4b1a74b4d5dfe6e"/><file name="Frequency.php" hash="0c0afecf1341100e4ba90e180df6facf"/><file name="Minutes.php" hash="b7a8eef1155ca8cddadc79d643ac56bc"/></dir><file name="Field.php" hash="da1801ccb45426ce8e960a4d40952303"/><file name="Global.php" hash="412071d06a25bf92962d2c2be1eb411a"/><file name="Message.php" hash="aa72d6227f29795dadf9c45405cafffd"/></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="1b13dcdd114be2ae40a6386ac304fdb9"/><file name="JobController.php" hash="99b6026a540c4f02c8c827e66a85d48b"/><file name="Pure360Controller.php" hash="07599b0ad90725bda1201b8bd291e0d5"/></dir><dir name="etc"><file name="config.xml" hash="a33da4e0cc1f3344a532730ed499315b"/><file name="system.xml" hash="9b467fbbc758e3933e1343f8a0f63715"/></dir></dir><dir name="Cron"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="4c08269367666f8aa9ea9028f1afc0b7"/></dir><dir name="Cron"><dir name="Manager"><dir name="Grid"><dir name="Renderer"><file name="Actions.php" hash="c0ee554f426a5147b486384c52f8eae3"/><file name="Crontab.php" hash="b28f87aeb8259bd17583b2a86fa16e19"/><file name="Force.php" hash="69f68ee9b7e7deccf161991aff2013fe"/><file name="Pause.php" hash="780dd8620f8c0c0a7094c558d6c1b0fc"/></dir></dir><file name="Grid.php" hash="a654543f57a356152eb7119cf971f4a9"/><dir name="Logs"><dir name="Renderer"><file name="Bytes.php" hash="a252cdb9290293c58962b19ec376d11f"/><file name="Clean.php" hash="448c3aae8e6fef07e676a53ac1225e11"/><file name="Download.php" hash="1046ed159db6e270d78823af78e4dec0"/><file name="Tail.php" hash="57ad12798b10af495e3e3d34e84ecb36"/></dir></dir><file name="Logs.php" hash="bbad87b3c1ff4165179ffa799554f568"/></dir><file name="Manager.php" hash="407928e5052d387a45f02b5c8e70810b"/></dir></dir></dir><file name="Jsinit.php" hash="28d2d2074598dd783db41884fc624f88"/></dir><dir name="Helper"><file name="Data.php" hash="fa6c7e721a561c014382692aa2a49eab"/></dir><dir name="Job"><file name="Abstract.php" hash="f59fb9712d9001f3406d10c202a45223"/><file name="Interface.php" hash="306c4c9de6dc281ce2d50012759da82c"/></dir><dir name="Model"><file name="Job.php" hash="2876e7fcff63de170d0b34d2aef92254"/><file name="Observer.php" hash="788e7fbcca63ac8aea5ed254097886aa"/><dir name="Resource"><dir name="Job"><file name="Collection.php" hash="a42b6c45b4786f35d2d808bd3e0860da"/></dir><file name="Job.php" hash="ca3d4f31293d6419fb4b84a10dec4464"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="0bc1a43d2f780d1d1685e729c643439b"/></dir><dir name="etc"><file name="config.xml" hash="f8ad2e8b8aef8ff49df707ab2e2e168c"/><file name="system.xml" hash="d398d5ef4758562b8e8c7007b2470b7b"/></dir><dir name="sql"><dir name="pure360_cron_setup"><file name="mysql4-install-1.0.4.php" hash="6819eab799199893f65c05a53451e3a0"/></dir></dir></dir><dir name="Email"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="c03154f20bdfbe72631bc09fbd3f86da"/><file name="Transactional.php" hash="37476f57155a4d28a9a16d75f1c2269c"/></dir></dir></dir><file name="Jsinit.php" hash="463a0092939237b6de4c4e9b47e897d8"/></dir><dir name="Helper"><file name="Api.php" hash="ddeb4f28ee7f82530b96055c4b5ccaa8"/><file name="Data.php" hash="ca33046f86cd97daff222e2386879ee8"/></dir><dir name="Model"><dir name="Email"><file name="Message.php" hash="658029c96a60ce6f542934fdf9993bb2"/></dir><file name="Messages.php" hash="56eeb27a00e794774759d4631df0df0d"/><dir name="Resource"><dir name="Transactional"><file name="Collection.php" hash="92714dd16f619e43ae8695bf6b9a5d59"/></dir><file name="Transactional.php" hash="c2c02bf63ab5c7314eca1f94f4f953bc"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Email"><file name="Template.php" hash="6e04d1a0f99becc198a940ef1c8ebf57"/></dir></dir></dir></dir><file name="Transactional.php" hash="f71a307d7dc6bb652a1267921b78a7e6"/></dir><dir name="controllers"><file name="AjaxController.php" hash="1d81c0ad2620918a07266c40d772b8e0"/></dir><dir name="etc"><file name="config.xml" hash="aebec2970abf97ebf4ccca84d554fa51"/><file name="system.xml" hash="b1ed057cfe7d27ecfb86fdf5a3f02e27"/></dir><dir name="sql"><dir name="pure360_email_setup"><file name="mysql4-install-1.0.4.php" hash="bb37fdf2a7c8907b13e003eb56f13542"/></dir></dir></dir><dir name="List"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="f66afdcd44d13a9a4dbd92fc3d77114a"/><file name="Form.php" hash="9b8b1a093cc9c455fb108a6f9d3960c0"/><file name="List.php" hash="9ee4a1c9e91b63402060f85726296f16"/></dir></dir></dir><file name="Jsinit.php" hash="78daf97d49034d34c36007322408c9a8"/></dir><dir name="Helper"><file name="Api.php" hash="159d953cad20a35eeaebab802e4b3b2a"/><file name="Data.php" hash="2bf3dd35442b2dc6191cb765512e28f7"/></dir><dir name="Job"><file name="Sync.php" hash="656178fd017807d5c8854a439933dc34"/></dir><dir name="Model"><file name="Address.php" hash="844441bf49a1f1ac492939449c33f28c"/><file name="Customer.php" hash="69e24f841868d937b403c5a95b2b70ae"/><file name="Data.php" hash="1e70c242bcfd71a92832cc300d8697fc"/><file name="Groups.php" hash="05f58791bbd56a161b8dc614831197ca"/><file name="List.php" hash="9125566c34a2500734e1c2583371aec3"/><file name="Observer.php" hash="ca2ea4a8ca36f7203c1a9ea30c70aa08"/><file name="Optout.php" hash="8ef1933d96623fd1e74038be26b37034"/><dir name="Resource"><dir name="List"><file name="Collection.php" hash="503fae2e6c778646ba730eaf98a67ae5"/></dir><file name="List.php" hash="5b443a43c67230dca205cf44e568b613"/><dir name="Optout"><file name="Collection.php" hash="51f4304dcdbd28e90e98d0f3c165c3b6"/></dir><file name="Optout.php" hash="7c59ba27cdb4a565ce08a92ef43ec89d"/></dir><file name="Sales.php" hash="9910099ba6f492c414e951a49e5960c1"/><file name="Segments.php" hash="6bf9009dc93f71224d29644c333c1a61"/><file name="Subscriber.php" hash="f5ba2429a89167639bad5ca63e971012"/></dir><dir name="controllers"><file name="AjaxController.php" hash="844117b2639e1e0540c4ea7bcadd5b29"/></dir><dir name="etc"><file name="config.xml" hash="135d804e2df4c858afcaa0cd7fc36b27"/><file name="system.xml" hash="33bc7c064f682b6009e650213ee49854"/></dir><dir name="sql"><dir name="pure360_list_setup"><file name="mysql4-install-1.0.4.php" hash="f9babd3b5b9b11100638e688a7c59379"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="bd6d2cd02673217a8c5846e789c9467d"/></dir></dir></dir><dir name="Newsletter"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="dbc0efc7099f1ac9af12d02fc87f559c"/></dir></dir></dir><dir name="Checkout"><dir name="Onepage"><file name="Newsletter.php" hash="7f58aea512497487aeaec8b8e23f4107"/></dir></dir><file name="Jsinit.php" hash="3cdd4b0da1539ac253e440997bb56308"/></dir><dir name="Helper"><file name="Api.php" hash="3219caeb42f3e36ec0e40b5c4cd727e5"/><file name="Data.php" hash="c2c63a8c9546183b6cb5048e6d7ddf7b"/></dir><dir name="Model"><file name="Observer.php" hash="0320f4334ef874f2c112e5d595760ec1"/><file name="Subscriber.php" hash="a35b3346fb4d0e6c12856e0e04451074"/></dir><dir name="controllers"><file name="IndexController.php" hash="da4dfea12608bf7ef6e177b9a0be47ba"/></dir><dir name="etc"><file name="config.xml" hash="2a166b47c3718c3d5a2bbe1b7d142222"/><file name="system.xml" hash="35d9f9afe40ee6ea617906a3a830252f"/></dir><dir name="sql"><dir name="pure360_newsletter_setup"><file name="mysql4-install-1.0.4.php" hash="8487bc8b8483b9a941f9895e25280455"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pure360_cart.xml" hash="273917f43f2d5b661005cfe09ef19981"/><file name="pure360_common.xml" hash="936bcb981defde27e7ec4fb0d9d64333"/><file name="pure360_cron.xml" hash="f3a1e028121e2abcca8c48aa588c61aa"/><file name="pure360_email.xml" hash="3d455306546061dd3845dc66647a6c67"/><file name="pure360_list.xml" hash="16622be692caa1bdb4ea95f864faca74"/><file name="pure360_newsletter.xml" hash="2cbc34cdb97a0f0e87df04d72c4cee02"/></dir><dir name="template"><dir name="pure360"><dir name="cart"><file name="jsinit.phtml" hash="2bca290370210037cb71c62e15b0d9cc"/></dir><dir name="common"><file name="about.phtml" hash="c532330d3f02612b6bc04b5b918f3c46"/><file name="config.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="disabled.phtml" hash="3fe3a819a246c58ee95404ce7428285e"/><file name="error.phtml" hash="891d140f2a5616f2929b307edf39c18b"/><file name="hidden.phtml" hash="bd8768ad057df0a9dda8e50a0507b3ed"/><file name="jsinit.phtml" hash="fe043d6f61686949e2098108686ecad4"/><file name="modules.phtml" hash="2dcf7bab0da85eb4533d07f8479c4c38"/></dir><dir name="cron"><file name="jsinit.phtml" hash="697388afb41375e3dfe9f7c4fff25712"/><file name="manager.phtml" hash="a413d279ec78fce33ffe2c7196fd2acb"/></dir><dir name="email"><file name="jsinit.phtml" hash="91b9745ad690249ea58b5f80c7487a1f"/><file name="transactional.phtml" hash="2002641f30185ea1d63f2c492478ff95"/></dir><file name="hint.phtml" hash="6e50c5cce42b12e8481e5211e8cf0f35"/><dir name="list"><file name="jsinit.phtml" hash="2a66b7d233cdf95c751e102974504ca0"/><file name="list.phtml" hash="f310c3197118223821176f4f791eeed4"/></dir><dir name="newsletter"><file name="jsinit.phtml" hash="e57d9c2279ff4440df096e79643f9bca"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="pure360"><file name="cart.xml" hash="ae1b704553530b74108d9759f575376b"/><file name="newsletter.xml" hash="678ce91ac72cce3f541daae259a4ef32"/></dir></dir><dir name="template"><dir name="pure360"><dir name="cart"><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="307ede936c9f667a7fbd64115942a721"/></dir></dir><file name="items.phtml" hash="0e349df6e260ca4d4be1092e58c7be24"/></dir></dir></dir><dir name="newsletter"><file name="jsinit.phtml" hash="db2d4424149c02ace0f501fad2c77d36"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pure360_Cart.xml" hash="29d028bc4960d42dd9ae5471c9bbf904"/><file name="Pure360_Common.xml" hash="21ce1650dac593cf9d1293167592ce9d"/><file name="Pure360_Cron.xml" hash="3fac7040468efecd5ae487b3e0509737"/><file name="Pure360_Email.xml" hash="e58b87357af6ed25523afd5983a63297"/><file name="Pure360_List.xml" hash="277e4aea059838480e1af90a3b2d0a7a"/><file name="Pure360_Newsletter.xml" hash="500c3d494e2c3edc7b0a0bdb0a429126"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="pure360"><file name="abandoned_cart.html" hash="e2b9facb56c028a2e19a69f5420052ff"/><file name="abandoned_cart_guest.html" hash="00cbc838e6f4e44fc87c51d98cedd2a2"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="mage"><dir name="adminhtml"><dir name="pure360"><file name="cart.js" hash="ee5b1110af04c4d24f0ed5f1668cf4d5"/><file name="common.js" hash="2ffa56e258da7022973ec1568d00785c"/><file name="cron.js" hash="29b6311859e63be290a9ececc3dbc547"/><file name="email.js" hash="3c9259fe31d2ade24aacc622b0790ea2"/><file name="list.js" hash="443b0acec1d1a3016f3b606e92a435d5"/><file name="newsletter.js" hash="15d462e8eaab011460431cc10a75bdb2"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Pure360"><file name="Client.php" hash="61f3e6ab0345e05d92d0b2161395f378"/><file name="Entity.php" hash="ba76dccb0a80ce11a110d3e1c5e108a1"/><dir name="Exception"><file name="SecurityException.php" hash="1e30dd834995651eb8ab0ff19c022713"/><file name="SystemException.php" hash="dbb715d39318c4a63db0d05eaeb85eab"/><file name="ValidationException.php" hash="69540e782165d00400c1ae460aa755ed"/></dir><dir name="Package"><dir name="Account"><file name="Identity.php" hash="56a192c63b4b82f95a03bf01dfb0e320"/><file name="Login.php" hash="b5cf3c5a7f02c34a7714492cb088b12d"/><file name="Pool.php" hash="6ca9929fae710c8d3b6baff9bb9ebd56"/></dir><file name="Account.php" hash="549fc8c168e102b5d622192e7161314f"/><dir name="Campaign"><file name="Automation.php" hash="7ef9a900dd1e48b5bc131aa3c801c4bb"/><file name="AutomationByDate.php" hash="0042f336568ce900d74e8e19e9d70a9b"/><file name="AutomationBySignup.php" hash="23e9d9e19a02c602ab67a2e706e64184"/><file name="ContentItem.php" hash="797bfd1d0fee23e2d8a00a7118934fc9"/><file name="Delivery.php" hash="a38c9f831977dc635140af291f529bbb"/><file name="DynamicRegion.php" hash="f81afeb8f67d3b5d6adb279126325321"/><file name="Email.php" hash="ae09ee6eb161c2032a68af8486227a8f"/><file name="Filter.php" hash="16cbfe1f34080bf88326315cde2c7fae"/><file name="GroupDelivery.php" hash="e470a337c36cd6c6e6c2126c2d8a6b05"/><file name="MarketingList.php" hash="62a2cb099555c922abc8971fb904af84"/><file name="Message.php" hash="115a7a8d5d313cc1fc91c404af4e277f"/><file name="One2One.php" hash="b3f229593bc9e78f717807967923e181"/><file name="Person.php" hash="465cc7928b872f1a1f9c71099e70e640"/><file name="Sms.php" hash="c525a6fb395d67651e91c1fe6481777b"/></dir><file name="Campaign.php" hash="bfab52155c32995acd3b7e376b683001"/><dir name="Context"><file name="Context.php" hash="2fe3109a45d6459f4cf441b3aa1ed7a3"/><file name="Preference.php" hash="8a390e782e04ad0decc26f72cc7f362c"/></dir><file name="Context.php" hash="7032b8dd4c00fded3f49511b174ebeba"/><dir name="Data"><file name="Meta.php" hash="a0489bfbbd52443eeb3f019f36840846"/><file name="Scheduler.php" hash="a37efb3c2d5497bc37393a8fa4879b57"/></dir><file name="Data.php" hash="77c4d9c47b4a2cd161a506d74024e639"/><dir name="Other"><file name="EventNotification.php" hash="c880abfad0408709e7c801f74c0c1882"/><file name="File.php" hash="71f3239c95c09f03a954d47ebdd20233"/></dir><file name="Other.php" hash="bea8844bf4037303bcf7bd064e18ae3f"/></dir><file name="Package.php" hash="2b1d5236b81621130c7522ddc105bd90"/><file name="Session.php" hash="281fbef841672f74682b6a7ad58915d3"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="pure360"><file name="pure360.css" hash="ea0485422716685e1753945731b3391e"/></dir><dir name="images"><dir name="pure360"><file name="pure_logo.png" hash="e03329ae9efacfeb292f079992a18a41"/><file name="switch.png" hash="dc4dd15ad074ab584444bda7660afe7a"/></dir></dir></dir></dir></dir></target></contents>
111
  <compatible/>
112
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>soap</name><min></min><max></max></extension></required></dependencies>
113
  </package>