dotmailermagento - Version 6.2.0

Version Notes

New Automation improvements.

Transactional Emails, Custom Customer Attributes, Reports & More

This release includes some great new functionality as well as including a number of fixes.

##IMPORTANT## Dynamic content URL's have been changed so will need updating within your dotMailer account to ensure they continue working correctly. ##IMPORTANT##

Release Highlights:

+ Transactional Emails: Replace the standard emails Magento currently sends to your customers and guests with beautifully created campaigns from dotMailer. Emails include new account, new order, dispatch, cancel and refund emails. **A dotMailer child account is required to enable this functionality**

+ Custom Customer Attributes: Sync your custom created customer attributes to dotMailer

+ Dynamic Content Styling: Apply custom CSS to all dynamic content pages e.g. font size, colour and type.

+ Reporting: Now within the Newsletter section in Magento you can view the import status of contacts and orders, as well as the sending status of transactional and lost basket emails.

Download this release

Release Info

Developer Calin Diacon
Extension dotmailermagento
Version 6.2.0
Comparing to
See all releases


Code changes from version 6.1.0 to 6.2.0

Files changed (49) hide show
  1. app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/Campaign/Grid.php +17 -9
  2. app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/Customer/Tab/Stats.php +18 -16
  3. app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/Dashboard/Tabs/Status.php +92 -222
  4. app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/System/Appcues.php +60 -0
  5. app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/System/Dynamic/Couponinfo.php +1 -1
  6. app/code/community/Dotdigitalgroup/Email/Block/Basket.php +16 -5
  7. app/code/community/Dotdigitalgroup/Email/Block/Coupon.php +40 -8
  8. app/code/community/Dotdigitalgroup/Email/Block/Customer/Account/Books.php +1 -1
  9. app/code/community/Dotdigitalgroup/Email/Block/Edc.php +28 -3
  10. app/code/community/Dotdigitalgroup/Email/Block/Recommended/Products.php +1 -1
  11. app/code/community/Dotdigitalgroup/Email/Helper/Config.php +4 -1
  12. app/code/community/Dotdigitalgroup/Email/Helper/Data.php +26 -7
  13. app/code/community/Dotdigitalgroup/Email/Model/Adminhtml/Source/Automation/Programme.php +4 -3
  14. app/code/community/Dotdigitalgroup/Email/Model/Adminhtml/Source/Campaigns.php +2 -3
  15. app/code/community/Dotdigitalgroup/Email/Model/Adminhtml/Source/Datafields.php +1 -1
  16. app/code/community/Dotdigitalgroup/Email/Model/Adminhtml/Source/Publicdatafields.php +3 -0
  17. app/code/community/Dotdigitalgroup/Email/Model/Apiconnector/Client.php +28 -0
  18. app/code/community/Dotdigitalgroup/Email/Model/Automation.php +81 -35
  19. app/code/community/Dotdigitalgroup/Email/Model/Campaign.php +128 -76
  20. app/code/community/Dotdigitalgroup/Email/Model/Connector/Order.php +7 -1
  21. app/code/community/Dotdigitalgroup/Email/Model/Customer/Wishlist/Item.php +2 -2
  22. app/code/community/Dotdigitalgroup/Email/Model/Importer.php +18 -17
  23. app/code/community/Dotdigitalgroup/Email/Model/Newsletter/Observer.php +5 -3
  24. app/code/community/Dotdigitalgroup/Email/Model/Observer.php +65 -0
  25. app/code/community/Dotdigitalgroup/Email/Model/Resource/Campaign.php +80 -0
  26. app/code/community/Dotdigitalgroup/Email/Model/Resource/Contact.php +24 -5
  27. app/code/community/Dotdigitalgroup/Email/Model/Resource/Coupon.php +56 -0
  28. app/code/community/Dotdigitalgroup/Email/Model/Resource/Rule/Collection.php +137 -0
  29. app/code/community/Dotdigitalgroup/Email/Model/Rules.php +22 -16
  30. app/code/community/Dotdigitalgroup/Email/Model/Sales/Observer.php +50 -14
  31. app/code/community/Dotdigitalgroup/Email/Model/Sales/Order.php +17 -84
  32. app/code/community/Dotdigitalgroup/Email/Model/Wishlist.php +54 -14
  33. app/code/community/Dotdigitalgroup/Email/controllers/Adminhtml/ConnectorController.php +2 -2
  34. app/code/community/Dotdigitalgroup/Email/controllers/Adminhtml/Email/CampaignController.php +10 -0
  35. app/code/community/Dotdigitalgroup/Email/controllers/Adminhtml/System/Email/TemplateController.php +6 -4
  36. app/code/community/Dotdigitalgroup/Email/etc/adminhtml.xml +2 -2
  37. app/code/community/Dotdigitalgroup/Email/etc/config.xml +26 -9
  38. app/code/community/Dotdigitalgroup/Email/etc/system.xml +23 -4
  39. app/code/community/Dotdigitalgroup/Email/sql/email_connector_setup/mysql4-install-5.0.0.php +23 -0
  40. app/code/community/Dotdigitalgroup/Email/sql/email_connector_setup/mysql4-install-6.0.0.php +1521 -0
  41. app/code/community/Dotdigitalgroup/Email/sql/email_connector_setup/mysql4-upgrade-6.1.0-6.1.1.php +71 -0
  42. app/design/adminhtml/default/default/layout/connector/email.xml +2 -1
  43. app/design/adminhtml/default/default/template/connector/appcues.phtml +5 -2
  44. app/design/frontend/base/default/template/connector/basket.phtml +6 -1
  45. app/design/frontend/base/default/template/connector/product/bundle_price.phtml +325 -0
  46. app/design/frontend/base/default/template/connector/product/list.phtml +7 -2
  47. app/design/frontend/base/default/template/connector/product/price.phtml +1 -1
  48. app/design/frontend/base/default/template/connector/wishlist.phtml +8 -1
  49. package.xml +5 -5
app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/Campaign/Grid.php CHANGED
@@ -60,22 +60,30 @@ class Dotdigitalgroup_Email_Block_Adminhtml_Campaign_Grid
60
  'escape' => true
61
  )
62
  )->addColumn(
63
- 'is_sent', array(
64
  'header' => Mage::helper('ddg')->__(
65
- 'Is Sent'
66
  ),
67
  'align' => 'center',
68
  'width' => '20px',
69
- 'index' => 'is_sent',
70
  'escape' => true,
71
  'type' => 'options',
72
- 'renderer' => 'ddg_automation/adminhtml_column_renderer_imported',
73
  'options' => array(
74
- '1' => 'Is Send',
75
- 'null' => 'Not Send'
76
- ),
77
- 'filter_condition_callback' => array($this,
78
- 'filterCallbackContact')
 
 
 
 
 
 
 
 
 
79
  )
80
  )->addColumn(
81
  'message', array(
60
  'escape' => true
61
  )
62
  )->addColumn(
63
+ 'send_status', array(
64
  'header' => Mage::helper('ddg')->__(
65
+ 'Send Status'
66
  ),
67
  'align' => 'center',
68
  'width' => '20px',
69
+ 'index' => 'send_status',
70
  'escape' => true,
71
  'type' => 'options',
 
72
  'options' => array(
73
+ Dotdigitalgroup_Email_Model_Campaign::PENDING => 'Pending',
74
+ Dotdigitalgroup_Email_Model_Campaign::PROCESSING => 'Processing',
75
+ Dotdigitalgroup_Email_Model_Campaign::SENT => 'Sent',
76
+ Dotdigitalgroup_Email_Model_Campaign::FAILED => 'Failed'
77
+ )
78
+ )
79
+ )->addColumn(
80
+ 'send_id', array(
81
+ 'header' => Mage::helper('ddg')->__('Send Id'),
82
+ 'align' => 'left',
83
+ 'width' => '300px',
84
+ 'index' => 'send_id',
85
+ 'type' => 'text',
86
+ 'escape' => true
87
  )
88
  )->addColumn(
89
  'message', array(
app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/Customer/Tab/Stats.php CHANGED
@@ -19,22 +19,24 @@ class Dotdigitalgroup_Email_Block_Adminhtml_Customer_Tab_Stats
19
  $website = $customer->getStore()->getWebsite();
20
 
21
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
22
- $contact = $client->postContacts($email);
23
- if ( ! isset($contact->message)) {
24
- $locale = Mage::app()->getLocale()->getLocale();
25
- $date = Zend_Date::now($locale)->subDay(30);
26
- $response = $client->getCampaignsWithActivitySinceDate(
27
- $date->toString(Zend_Date::ISO_8601)
28
- );
29
- if ( ! isset($response->message) && is_array($response)) {
30
- foreach ($response as $one) {
31
- $result = $client->getCampaignActivityByContactId(
32
- $one->id, $contact->id
33
- );
34
- if ( ! empty($result) && ! isset($result->message)
35
- && ! is_null($result)
36
- ) {
37
- $this->_stat[$one->name] = $result;
 
 
38
  }
39
  }
40
  }
19
  $website = $customer->getStore()->getWebsite();
20
 
21
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
22
+ if ($client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
23
+ $contact = $client->postContacts($email);
24
+ if (!isset($contact->message)) {
25
+ $locale = Mage::app()->getLocale()->getLocale();
26
+ $date = Zend_Date::now($locale)->subDay(30);
27
+ $response = $client->getCampaignsWithActivitySinceDate(
28
+ $date->toString(Zend_Date::ISO_8601)
29
+ );
30
+ if (!isset($response->message) && is_array($response)) {
31
+ foreach ($response as $one) {
32
+ $result = $client->getCampaignActivityByContactId(
33
+ $one->id, $contact->id
34
+ );
35
+ if (!empty($result) && !isset($result->message)
36
+ && !is_null($result)
37
+ ) {
38
+ $this->_stat[$one->name] = $result;
39
+ }
40
  }
41
  }
42
  }
app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/Dashboard/Tabs/Status.php CHANGED
@@ -30,10 +30,7 @@ class Dotdigitalgroup_Email_Block_Adminhtml_Dashboard_Tabs_Status
30
  'order_syncing' => 'Orders Syncing',
31
  'custom_order_attributes' => 'Custom Order Attributes',
32
  'quote_enabled' => 'Quote Sync Enabled',
33
- 'quote_syncing' => 'Quote Syncing',
34
- 'custom_quote_attributes' => 'Custom Quote Attributes',
35
  'last_abandoned_cart_sent_day' => 'Last Abandoned Cart Sent Day',
36
- 'easy_email_capture_enabled' => 'Easy Email Capture Enabled',
37
  'disable_newsletter_success_enabled' => 'Disable Newsletter Success Enabled',
38
  'system_information' => 'System Information'
39
 
@@ -578,18 +575,7 @@ class Dotdigitalgroup_Email_Block_Adminhtml_Dashboard_Tabs_Status
578
  )
579
  );
580
 
581
- //number of customers not match, try to update
582
- if ($countCustomers != $countCustomerContacts) {
583
-
584
- $url = Mage::helper('adminhtml')->getUrl(
585
- '*/connector/populatecontacts',
586
- array('type' => 'customers', 'website' => $website->getId())
587
- );
588
- $link = ' <a href="' . $url . '"> populate</a>';
589
- $tableData['Status']
590
- = 'Customers not matching the contact table. ' . $link;
591
- //customers not synced yet
592
- } elseif ($countCustomers > $countCustomerContacts + $suppressed) {
593
  $tableData['Status'] = 'Syncing..';
594
  //all customers syned.
595
  } else {
@@ -1371,6 +1357,20 @@ class Dotdigitalgroup_Email_Block_Adminhtml_Dashboard_Tabs_Status
1371
  $passed = false;
1372
  $mapped++;
1373
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1374
  $tableData['Mapped Percentage'] = number_format(
1375
  (1 - $mapped / 32) * 100, 2
1376
  ) . ' %';
@@ -1626,91 +1626,6 @@ class Dotdigitalgroup_Email_Block_Adminhtml_Dashboard_Tabs_Status
1626
  return $resultContent;
1627
  }
1628
 
1629
- /**
1630
- * check if any custom quote attribute selected
1631
- *
1632
- * @return Dotdigitalgroup_Email_Model_Adminhtml_Dashboard_Content
1633
- */
1634
- public function customQuoteAttributes()
1635
- {
1636
- $resultContent = Mage::getModel(
1637
- 'ddg_automation/adminhtml_dashboard_content'
1638
- );
1639
- $resultContent->setStyle(self::CONNECTOR_DASHBOARD_PASSED)
1640
- ->setTitle('Custom Quote Attributes : ')
1641
- ->setMessage('Selected.');
1642
-
1643
- foreach (Mage::app()->getWebsites() as $website) {
1644
- $websiteName = $website->getName();
1645
- $customQuoteAttribute = ($website->getConfig(
1646
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOM_QUOTE_ATTRIBUTES
1647
- )) ? true : false;
1648
-
1649
- if ($customQuoteAttribute !== true) {
1650
- $resultContent->setStyle(self::CONNECTOR_DASHBOARD_FAILED)
1651
- ->setTitle(
1652
- 'Custom quote attribute not selected (ignore if you do not want to import custom quote attributes) :'
1653
- )
1654
- ->setMessage('')
1655
- ->setTable(
1656
- array(
1657
- 'Website' => $websiteName,
1658
- 'Status' => 'No Custom Quote Attribute Selected'
1659
- )
1660
- );
1661
- }
1662
- }
1663
-
1664
- return $resultContent;
1665
- }
1666
-
1667
- /**
1668
- * Check if any quote are imported.
1669
- *
1670
- * @return Dotdigitalgroup_Email_Model_Adminhtml_Dashboard_Content
1671
- */
1672
- public function quoteSyncing()
1673
- {
1674
- $resultContent = Mage::getModel(
1675
- 'ddg_automation/adminhtml_dashboard_content'
1676
- );
1677
- $resultContent->setStyle(self::CONNECTOR_DASHBOARD_PASSED)
1678
- ->setTitle('Quote Syncing : ')
1679
- ->setMessage('Looks Great.');
1680
-
1681
- foreach (Mage::app()->getWebsites() as $website) {
1682
- $websiteName = $website->getName();
1683
- $storeIds = $website->getStoreIds();
1684
-
1685
- if (empty($storeIds)) {
1686
- continue;
1687
- }
1688
-
1689
- //number of quote marked as imported
1690
- $numQuotes = Mage::getModel('ddg_automation/quote')->getCollection()
1691
- ->addFieldToFilter('imported', 1)
1692
- ->addFieldToFilter('store_id', array('in', $storeIds))->getSize(
1693
- );
1694
-
1695
- if ( ! $numQuotes) {
1696
- $resultContent->setStyle(self::CONNECTOR_DASHBOARD_FAILED)
1697
- ->setTitle(
1698
- 'Quote Syncing (ignore if you have reset quote for re-import) :'
1699
- )
1700
- ->setMessage('')
1701
- ->setTable(
1702
- array(
1703
- 'Website' => $websiteName,
1704
- 'Status' => 'No Imported Quotes Found'
1705
- )
1706
- );
1707
- }
1708
- }
1709
-
1710
- return $resultContent;
1711
-
1712
- }
1713
-
1714
  /**
1715
  * review sync enabled.
1716
  *
@@ -1834,84 +1749,86 @@ class Dotdigitalgroup_Email_Block_Adminhtml_Dashboard_Tabs_Status
1834
  $websiteName = $website->getName();
1835
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
1836
 
1837
- //customer carts
1838
- $customerCampaign1 = $website->getConfig(
1839
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_ABANDONED_CAMPAIGN_1
1840
- );
1841
- $customerCampaign2 = $website->getConfig(
1842
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_ABANDONED_CAMPAIGN_2
1843
- );
1844
- $customerCampaign3 = $website->getConfig(
1845
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_ABANDONED_CAMPAIGN_3
1846
- );
 
1847
 
1848
- //guests carts
1849
- $guestCampaign1 = $website->getConfig(
1850
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_GUEST_ABANDONED_CAMPAIGN_1
1851
- );
1852
- $guestCampaign2 = $website->getConfig(
1853
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_GUEST_ABANDONED_CAMPAIGN_2
1854
- );
1855
- $guestCampaign3 = $website->getConfig(
1856
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_GUEST_ABANDONED_CAMPAIGN_3
1857
- );
1858
 
1859
 
1860
- //date customer carts
1861
-
1862
- $cusDateSent1 = ($customerCampaign1) ? $client->getCampaignSummary(
1863
- $customerCampaign1
1864
- ) : '';
1865
- $cusDateSent2 = ($customerCampaign2) ? $client->getCampaignSummary(
1866
- $customerCampaign2
1867
- ) : '';
1868
- $cusDateSent3 = ($customerCampaign3) ? $client->getCampaignSummary(
1869
- $customerCampaign3
1870
- ) : '';
1871
-
1872
- //date guest carts
1873
- $resGuest1 = ($guestCampaign1) ? $client->getCampaignSummary(
1874
- $guestCampaign1
1875
- ) : '';
1876
- $resGuest2 = ($guestCampaign2) ? $client->getCampaignSummary(
1877
- $guestCampaign2
1878
- ) : '';
1879
- $resGuest3 = ($guestCampaign3) ? $client->getCampaignSummary(
1880
- $guestCampaign3
1881
- ) : '';
1882
-
1883
- /**
1884
- * Customers.
1885
- */
1886
- $customerCampaign1 = (isset($cusDateSent1->dateSent)
1887
- ? $cusDateSent1->dateSent : 'Not Sent/Selected');
1888
- $customerCampaign2 = (isset($cusDateSent2->dateSent)
1889
- ? $cusDateSent2->dateSent : 'Not Sent/Selected');
1890
- $customerCampaign3 = (isset($cusDateSent3->dateSent)
1891
- ? $cusDateSent3->dateSent : 'Not Sent/Selected');
1892
-
1893
- /**
1894
- * Guests.
1895
- */
1896
- $guestCampaign1 = (isset($resGuest1->dateSent)
1897
- ? $resGuest1->dateSent : 'Not Sent/Selected');
1898
- $guestCampaign2 = (isset($resGuest2->dateSent)
1899
- ? $resGuest2->dateSent : 'Not Sent/Selected');
1900
- $guestCampaign3 = (isset($resGuest3->dateSent)
1901
- ? $resGuest3->dateSent : 'Not Sent/Selected');
1902
-
1903
-
1904
- $resultContent->setTable(
1905
- array(
1906
- 'Website' => $websiteName,
1907
- 'Customer Campaign 1' => $customerCampaign1,
1908
- 'Customer Campaign 2' => $customerCampaign2,
1909
- 'Customer Campaign 3' => $customerCampaign3,
1910
- 'Guest Campaign 1' => $guestCampaign1,
1911
- 'Guest Campaign 2' => $guestCampaign2,
1912
- 'Guest Campaign 3' => $guestCampaign3
1913
- )
1914
- );
 
1915
  }
1916
 
1917
  return $resultContent;
@@ -2180,53 +2097,6 @@ class Dotdigitalgroup_Email_Block_Adminhtml_Dashboard_Tabs_Status
2180
  return $method;
2181
  }
2182
 
2183
- /**
2184
- * easy email capture enabled
2185
- *
2186
- * @return Dotdigitalgroup_Email_Model_Adminhtml_Dashboard_Content
2187
- */
2188
- public function easyEmailCaptureEnabled()
2189
- {
2190
- $resultContent = Mage::getModel(
2191
- 'ddg_automation/adminhtml_dashboard_content'
2192
- );
2193
- $resultContent->setStyle(self::CONNECTOR_DASHBOARD_PASSED)
2194
- ->setTitle('Easy Email Capture : ')
2195
- ->setMessage('Enabled.');
2196
-
2197
- foreach (Mage::app()->getWebsites() as $website) {
2198
- $websiteName = $website->getName();
2199
- $enabled = ($website->getConfig(
2200
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_EMAIL_CAPTURE
2201
- ))
2202
- ? true
2203
- :
2204
- 'Disabled';
2205
-
2206
- if ($enabled !== true) {
2207
- $url = Mage::helper('adminhtml')->getUrl(
2208
- '*/connector/enablewebsiteconfiguration',
2209
- array('path' => 'XML_PATH_CONNECTOR_EMAIL_CAPTURE',
2210
- 'website' => $website->getId())
2211
- );
2212
- $resultContent->setStyle(self::CONNECTOR_DASHBOARD_FAILED)
2213
- ->setMessage(
2214
- 'Don\'t forget to enable if you want to enable easy email capture.'
2215
- )
2216
- ->setTable(
2217
- array(
2218
- 'Website' => $websiteName,
2219
- 'Status' => $enabled,
2220
- 'Fast Fix' => 'Click <a href="' . $url
2221
- . '">here </a>to enable.'
2222
- )
2223
- );
2224
- }
2225
- }
2226
-
2227
- return $resultContent;
2228
- }
2229
-
2230
  /**
2231
  * disabled newsletter success enabled
2232
  *
30
  'order_syncing' => 'Orders Syncing',
31
  'custom_order_attributes' => 'Custom Order Attributes',
32
  'quote_enabled' => 'Quote Sync Enabled',
 
 
33
  'last_abandoned_cart_sent_day' => 'Last Abandoned Cart Sent Day',
 
34
  'disable_newsletter_success_enabled' => 'Disable Newsletter Success Enabled',
35
  'system_information' => 'System Information'
36
 
575
  )
576
  );
577
 
578
+ if ($countCustomers > $countCustomerContacts + $suppressed) {
 
 
 
 
 
 
 
 
 
 
 
579
  $tableData['Status'] = 'Syncing..';
580
  //all customers syned.
581
  } else {
1357
  $passed = false;
1358
  $mapped++;
1359
  }
1360
+ if (!$website->getConfig(
1361
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_BILLING_COMPANY_NAME
1362
+ )
1363
+ ) {
1364
+ $passed = false;
1365
+ $mapped++;
1366
+ }
1367
+ if (!$website->getConfig(
1368
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_DELIVERY_COMPANY_NAME
1369
+ )
1370
+ ) {
1371
+ $passed = false;
1372
+ $mapped++;
1373
+ }
1374
  $tableData['Mapped Percentage'] = number_format(
1375
  (1 - $mapped / 32) * 100, 2
1376
  ) . ' %';
1626
  return $resultContent;
1627
  }
1628
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1629
  /**
1630
  * review sync enabled.
1631
  *
1749
  $websiteName = $website->getName();
1750
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
1751
 
1752
+ if ($client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
1753
+ //customer carts
1754
+ $customerCampaign1 = $website->getConfig(
1755
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_ABANDONED_CAMPAIGN_1
1756
+ );
1757
+ $customerCampaign2 = $website->getConfig(
1758
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_ABANDONED_CAMPAIGN_2
1759
+ );
1760
+ $customerCampaign3 = $website->getConfig(
1761
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_ABANDONED_CAMPAIGN_3
1762
+ );
1763
 
1764
+ //guests carts
1765
+ $guestCampaign1 = $website->getConfig(
1766
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_GUEST_ABANDONED_CAMPAIGN_1
1767
+ );
1768
+ $guestCampaign2 = $website->getConfig(
1769
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_GUEST_ABANDONED_CAMPAIGN_2
1770
+ );
1771
+ $guestCampaign3 = $website->getConfig(
1772
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_GUEST_ABANDONED_CAMPAIGN_3
1773
+ );
1774
 
1775
 
1776
+ //date customer carts
1777
+
1778
+ $cusDateSent1 = ($customerCampaign1) ? $client->getCampaignSummary(
1779
+ $customerCampaign1
1780
+ ) : '';
1781
+ $cusDateSent2 = ($customerCampaign2) ? $client->getCampaignSummary(
1782
+ $customerCampaign2
1783
+ ) : '';
1784
+ $cusDateSent3 = ($customerCampaign3) ? $client->getCampaignSummary(
1785
+ $customerCampaign3
1786
+ ) : '';
1787
+
1788
+ //date guest carts
1789
+ $resGuest1 = ($guestCampaign1) ? $client->getCampaignSummary(
1790
+ $guestCampaign1
1791
+ ) : '';
1792
+ $resGuest2 = ($guestCampaign2) ? $client->getCampaignSummary(
1793
+ $guestCampaign2
1794
+ ) : '';
1795
+ $resGuest3 = ($guestCampaign3) ? $client->getCampaignSummary(
1796
+ $guestCampaign3
1797
+ ) : '';
1798
+
1799
+ /**
1800
+ * Customers.
1801
+ */
1802
+ $customerCampaign1 = (isset($cusDateSent1->dateSent)
1803
+ ? $cusDateSent1->dateSent : 'Not Sent/Selected');
1804
+ $customerCampaign2 = (isset($cusDateSent2->dateSent)
1805
+ ? $cusDateSent2->dateSent : 'Not Sent/Selected');
1806
+ $customerCampaign3 = (isset($cusDateSent3->dateSent)
1807
+ ? $cusDateSent3->dateSent : 'Not Sent/Selected');
1808
+
1809
+ /**
1810
+ * Guests.
1811
+ */
1812
+ $guestCampaign1 = (isset($resGuest1->dateSent)
1813
+ ? $resGuest1->dateSent : 'Not Sent/Selected');
1814
+ $guestCampaign2 = (isset($resGuest2->dateSent)
1815
+ ? $resGuest2->dateSent : 'Not Sent/Selected');
1816
+ $guestCampaign3 = (isset($resGuest3->dateSent)
1817
+ ? $resGuest3->dateSent : 'Not Sent/Selected');
1818
+
1819
+
1820
+ $resultContent->setTable(
1821
+ array(
1822
+ 'Website' => $websiteName,
1823
+ 'Customer Campaign 1' => $customerCampaign1,
1824
+ 'Customer Campaign 2' => $customerCampaign2,
1825
+ 'Customer Campaign 3' => $customerCampaign3,
1826
+ 'Guest Campaign 1' => $guestCampaign1,
1827
+ 'Guest Campaign 2' => $guestCampaign2,
1828
+ 'Guest Campaign 3' => $guestCampaign3
1829
+ )
1830
+ );
1831
+ }
1832
  }
1833
 
1834
  return $resultContent;
2097
  return $method;
2098
  }
2099
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2100
  /**
2101
  * disabled newsletter success enabled
2102
  *
app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/System/Appcues.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Dotdigitalgroup_Email_Block_Adminhtml_System_Appcues
4
+ extends Mage_Core_Block_Template
5
+ {
6
+ public $sections
7
+ = array(
8
+ 'connector_api_credentials',
9
+ 'connector_data_mapping',
10
+ 'connector_sync_settings',
11
+ 'connector_lost_baskets',
12
+ 'connector_automation_studio',
13
+ 'connector_dynamic_content',
14
+ 'connector_transactional_emails',
15
+ 'connector_configuration',
16
+ 'connector_developer_settings'
17
+ );
18
+
19
+ public $handles
20
+ = array(
21
+ 'adminhtml_email_dashboard_index',
22
+ 'adminhtml_email_importer_index',
23
+ 'adminhtml_email_order_index',
24
+ 'adminhtml_email_quote_index',
25
+ 'adminhtml_email_review_index',
26
+ 'adminhtml_email_studio_index',
27
+ 'adminhtml_email_contact_index',
28
+ 'adminhtml_email_wishlist_index',
29
+ 'adminhtml_email_campaign_index',
30
+ 'adminhtml_email_automation_index',
31
+ 'adminhtml_email_catalog_index',
32
+ 'adminhtml_email_rules_index',
33
+ 'adminhtml_email_rules_edit',
34
+ 'adminhtml_customer_edit'
35
+ );
36
+
37
+ /**
38
+ * Check if can run script if certain conditions matches
39
+ *
40
+ * @return bool
41
+ */
42
+ public function canRunScript()
43
+ {
44
+ //Check if current section is in predefined sections array
45
+ $section = $this->getRequest()->getParam('section');
46
+ if (in_array($section, $this->sections)) {
47
+ return true;
48
+ }
49
+
50
+ //Check if current handle is in predefined handles array
51
+ $handles = $this->getLayout()->getUpdate()->getHandles();
52
+ foreach ($handles as $handle) {
53
+ if (in_array($handle, $this->handles)) {
54
+ return true;
55
+ }
56
+ }
57
+
58
+ return false;
59
+ }
60
+ }
app/code/community/Dotdigitalgroup/Email/Block/Adminhtml/System/Dynamic/Couponinfo.php CHANGED
@@ -21,7 +21,7 @@ class Dotdigitalgroup_Email_Block_Adminhtml_System_Dynamic_Couponinfo
21
 
22
  //full url
23
  $text = $baseUrl . 'connector/email/coupon/id/[INSERT ID HERE]/code/'
24
- . $code . '/@EMAIL@';
25
 
26
  $element->setData('value', $text);
27
  $element->setData('disabled', 'disabled');
21
 
22
  //full url
23
  $text = $baseUrl . 'connector/email/coupon/id/[INSERT ID HERE]/code/'
24
+ . $code . '/expire_days/[INSERT NUMBER OF DAYS HERE]/@EMAIL@';
25
 
26
  $element->setData('value', $text);
27
  $element->setData('disabled', 'disabled');
app/code/community/Dotdigitalgroup/Email/Block/Basket.php CHANGED
@@ -44,15 +44,11 @@ class Dotdigitalgroup_Email_Block_Basket extends Mage_Core_Block_Template
44
  $appEmulation = Mage::getSingleton('core/app_emulation');
45
  $appEmulation->startEnvironmentEmulation($storeId);
46
 
47
- $quoteItems = $quoteModel->getAllItems();
48
 
49
  $itemsData = array();
50
 
51
  foreach ($quoteItems as $quoteItem) {
52
- if ($quoteItem->getParentItemId() != null) {
53
- continue;
54
- }
55
-
56
  $_product = $quoteItem->getProduct();
57
  $inStock = ($_product->getStockItem()->getIsInStock())
58
  ? 'In Stock'
@@ -135,4 +131,19 @@ class Dotdigitalgroup_Email_Block_Basket extends Mage_Core_Block_Template
135
  return $dynamicStyle;
136
  }
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
44
  $appEmulation = Mage::getSingleton('core/app_emulation');
45
  $appEmulation->startEnvironmentEmulation($storeId);
46
 
47
+ $quoteItems = $quoteModel->getAllVisibleItems();
48
 
49
  $itemsData = array();
50
 
51
  foreach ($quoteItems as $quoteItem) {
 
 
 
 
52
  $_product = $quoteItem->getProduct();
53
  $inStock = ($_product->getStockItem()->getIsInStock())
54
  ? 'In Stock'
131
  return $dynamicStyle;
132
  }
133
 
134
+ public function getProductImage($product)
135
+ {
136
+ $helper = Mage::helper('ddg');
137
+ if ($helper->getWebsiteConfig(Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_DYNAMIC_PRODUCT_IMAGE)
138
+ && $product->getTypeId() == "simple"
139
+ ) {
140
+ $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
141
+ if (!empty($parentIds)) {
142
+ $parentProduct = Mage::getModel('catalog/product')->load($parentIds[0]);
143
+ return $this->helper('catalog/image')->init($parentProduct, 'small_image')->resize(85);
144
+ }
145
+ }
146
+ return $this->helper('catalog/image')->init($product, 'small_image')->resize(85);
147
+ }
148
+
149
  }
app/code/community/Dotdigitalgroup/Email/Block/Coupon.php CHANGED
@@ -39,7 +39,7 @@ class Dotdigitalgroup_Email_Block_Coupon extends Mage_Core_Block_Template
39
  $generator->setUsesPerCoupon(1);
40
  $generator->setDash(3);
41
  $generator->setLength(9);
42
- $generator->setPrefix('');
43
  $generator->setSuffix('');
44
  //set the generation settings
45
  $rule->setCouponCodeGenerator($generator);
@@ -48,12 +48,20 @@ class Dotdigitalgroup_Email_Block_Coupon extends Mage_Core_Block_Template
48
  $coupon = $rule->acquireCoupon();
49
  $couponCode = $coupon->getCode();
50
  //save the type of coupon
51
- $couponModel = Mage::getModel('salesrule/coupon')->loadByCode(
52
- $couponCode
53
- );
54
- $couponModel->setType(
55
- Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON
56
- );
 
 
 
 
 
 
 
 
57
  $couponModel->save();
58
 
59
  return $couponCode;
@@ -62,7 +70,11 @@ class Dotdigitalgroup_Email_Block_Coupon extends Mage_Core_Block_Template
62
  return false;
63
  }
64
 
65
-
 
 
 
 
66
  protected function getStyle()
67
  {
68
  return explode(
@@ -72,6 +84,11 @@ class Dotdigitalgroup_Email_Block_Coupon extends Mage_Core_Block_Template
72
  );
73
  }
74
 
 
 
 
 
 
75
  protected function getCouponColor()
76
  {
77
  return Mage::getStoreConfig(
@@ -79,6 +96,11 @@ class Dotdigitalgroup_Email_Block_Coupon extends Mage_Core_Block_Template
79
  );
80
  }
81
 
 
 
 
 
 
82
  protected function getFontSize()
83
  {
84
  return Mage::getStoreConfig(
@@ -86,6 +108,11 @@ class Dotdigitalgroup_Email_Block_Coupon extends Mage_Core_Block_Template
86
  );
87
  }
88
 
 
 
 
 
 
89
  protected function getFont()
90
  {
91
  return Mage::getStoreConfig(
@@ -93,6 +120,11 @@ class Dotdigitalgroup_Email_Block_Coupon extends Mage_Core_Block_Template
93
  );
94
  }
95
 
 
 
 
 
 
96
  protected function getBackgroundColor()
97
  {
98
  return Mage::getStoreConfig(
39
  $generator->setUsesPerCoupon(1);
40
  $generator->setDash(3);
41
  $generator->setLength(9);
42
+ $generator->setPrefix('DOT-');
43
  $generator->setSuffix('');
44
  //set the generation settings
45
  $rule->setCouponCodeGenerator($generator);
48
  $coupon = $rule->acquireCoupon();
49
  $couponCode = $coupon->getCode();
50
  //save the type of coupon
51
+ $couponModel = Mage::getModel('salesrule/coupon')
52
+ ->loadByCode(
53
+ $couponCode
54
+ );
55
+ $couponModel->setType(Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON)
56
+ ->setGeneratedByDotmailer(1);
57
+
58
+ if (is_numeric($params['expire_days'])) {
59
+ $locale = Mage::app()->getLocale()->getLocale();
60
+ $expirationDate = Zend_Date::now($locale)->addDay($params['expire_days']);
61
+ $couponModel->setExpirationDate($expirationDate->toString('yyyy-MM-dd HH:mm'));
62
+ } elseif ($rule->getToDate()) {
63
+ $couponModel->setExpirationDate($rule->getToDate());
64
+ }
65
  $couponModel->save();
66
 
67
  return $couponCode;
70
  return false;
71
  }
72
 
73
+ /**
74
+ * Get style text from config
75
+ *
76
+ * @return array
77
+ */
78
  protected function getStyle()
79
  {
80
  return explode(
84
  );
85
  }
86
 
87
+ /**
88
+ * Get coupon font color
89
+ *
90
+ * @return mixed
91
+ */
92
  protected function getCouponColor()
93
  {
94
  return Mage::getStoreConfig(
96
  );
97
  }
98
 
99
+ /**
100
+ * Get font size
101
+ *
102
+ * @return mixed
103
+ */
104
  protected function getFontSize()
105
  {
106
  return Mage::getStoreConfig(
108
  );
109
  }
110
 
111
+ /**
112
+ * Get font
113
+ *
114
+ * @return mixed
115
+ */
116
  protected function getFont()
117
  {
118
  return Mage::getStoreConfig(
120
  );
121
  }
122
 
123
+ /**
124
+ * Get background color
125
+ *
126
+ * @return mixed
127
+ */
128
  protected function getBackgroundColor()
129
  {
130
  return Mage::getStoreConfig(
app/code/community/Dotdigitalgroup/Email/Block/Customer/Account/Books.php CHANGED
@@ -218,7 +218,7 @@ class Dotdigitalgroup_Email_Block_Customer_Account_Books
218
  $contact = $this->_getApiClient()->getContactByEmail(
219
  $this->getCustomer()->getEmail()
220
  );
221
- if ($contact->id) {
222
  $this->_getCustomerSession()->setConnectorContactId($contact->id);
223
  $this->contactId = $contact->id;
224
  } else {
218
  $contact = $this->_getApiClient()->getContactByEmail(
219
  $this->getCustomer()->getEmail()
220
  );
221
+ if (isset($contact->id)) {
222
  $this->_getCustomerSession()->setConnectorContactId($contact->id);
223
  $this->contactId = $contact->id;
224
  } else {
app/code/community/Dotdigitalgroup/Email/Block/Edc.php CHANGED
@@ -103,7 +103,11 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
103
  */
104
  public function getPriceHtml($product)
105
  {
106
- $this->setTemplate('connector/product/price.phtml');
 
 
 
 
107
  $this->setProduct($product);
108
 
109
  return $this->toHtml();
@@ -179,6 +183,7 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
179
  $productIds = $productItems->getColumnValues('product_id');
180
  //get product collection to check for salable
181
  $productCollection = Mage::getModel('catalog/product')->getCollection()
 
182
  ->addAttributeToSelect('*')
183
  ->addFieldToFilter('entity_id', array('in' => $productIds));
184
  //show products only if is salable
@@ -209,6 +214,7 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
209
  $productCollection = Mage::getResourceModel(
210
  'catalog/product_collection'
211
  )
 
212
  ->addAttributeToFilter('entity_id', array('in' => $productIds))
213
  ->addAttributeToSelect(
214
  array('product_url', 'name', 'store_id', 'small_image', 'price')
@@ -325,6 +331,7 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
325
  $productCollection = Mage::getResourceModel(
326
  'catalog/product_collection'
327
  )
 
328
  ->addIdFilter($productIds)
329
  ->addAttributeToSelect(
330
  array('product_url', 'name', 'store_id', 'small_image', 'price')
@@ -353,7 +360,8 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
353
  if ($category->getId()) {
354
  $productCollection->getSelect()
355
  ->joinLeft(
356
- array("ccpi" => 'catalog_category_product_index'),
 
357
  "e.entity_id = ccpi.product_id",
358
  array("category_id")
359
  )
@@ -385,7 +393,7 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
385
  Mage::helper('ddg')->__('no current_quote found for EDC')
386
  );
387
  }
388
- $quoteItems = $quoteModel->getAllItems();
389
 
390
  $productsToDisplay = $this->getProductsToDisplay(
391
  $quoteItems, $limit, $mode, 'QUOTE'
@@ -440,6 +448,7 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
440
 
441
  $recommendedProducts = Mage::getModel('catalog/product')
442
  ->getCollection()
 
443
  ->addIdFilter($recommendedProducts)
444
  ->addAttributeToSelect(
445
  array('product_url', 'name', 'store_id', 'small_image',
@@ -473,6 +482,7 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
473
  ->getFallbackIds();
474
  $productCollection = Mage::getModel('catalog/product')
475
  ->getCollection()
 
476
  ->addIdFilter($fallbackIds)
477
  ->addAttributeToSelect(
478
  array('product_url', 'name', 'store_id', 'small_image',
@@ -493,4 +503,19 @@ class Dotdigitalgroup_Email_Block_Edc extends Mage_Core_Block_Template
493
 
494
  return $productsToDisplay;
495
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
496
  }
103
  */
104
  public function getPriceHtml($product)
105
  {
106
+ if ($product->getTypeId() == 'bundle') {
107
+ $this->setTemplate('connector/product/bundle_price.phtml');
108
+ } else {
109
+ $this->setTemplate('connector/product/price.phtml');
110
+ }
111
  $this->setProduct($product);
112
 
113
  return $this->toHtml();
183
  $productIds = $productItems->getColumnValues('product_id');
184
  //get product collection to check for salable
185
  $productCollection = Mage::getModel('catalog/product')->getCollection()
186
+ ->addPriceData()
187
  ->addAttributeToSelect('*')
188
  ->addFieldToFilter('entity_id', array('in' => $productIds));
189
  //show products only if is salable
214
  $productCollection = Mage::getResourceModel(
215
  'catalog/product_collection'
216
  )
217
+ ->addPriceData()
218
  ->addAttributeToFilter('entity_id', array('in' => $productIds))
219
  ->addAttributeToSelect(
220
  array('product_url', 'name', 'store_id', 'small_image', 'price')
331
  $productCollection = Mage::getResourceModel(
332
  'catalog/product_collection'
333
  )
334
+ ->addPriceData()
335
  ->addIdFilter($productIds)
336
  ->addAttributeToSelect(
337
  array('product_url', 'name', 'store_id', 'small_image', 'price')
360
  if ($category->getId()) {
361
  $productCollection->getSelect()
362
  ->joinLeft(
363
+ array("ccpi" => Mage::getSingleton('core/resource')
364
+ ->getTableName('catalog_category_product_index')),
365
  "e.entity_id = ccpi.product_id",
366
  array("category_id")
367
  )
393
  Mage::helper('ddg')->__('no current_quote found for EDC')
394
  );
395
  }
396
+ $quoteItems = $quoteModel->getAllVisibleItems();
397
 
398
  $productsToDisplay = $this->getProductsToDisplay(
399
  $quoteItems, $limit, $mode, 'QUOTE'
448
 
449
  $recommendedProducts = Mage::getModel('catalog/product')
450
  ->getCollection()
451
+ ->addPriceData()
452
  ->addIdFilter($recommendedProducts)
453
  ->addAttributeToSelect(
454
  array('product_url', 'name', 'store_id', 'small_image',
482
  ->getFallbackIds();
483
  $productCollection = Mage::getModel('catalog/product')
484
  ->getCollection()
485
+ ->addPriceData()
486
  ->addIdFilter($fallbackIds)
487
  ->addAttributeToSelect(
488
  array('product_url', 'name', 'store_id', 'small_image',
503
 
504
  return $productsToDisplay;
505
  }
506
+
507
+ public function getProductImage($product)
508
+ {
509
+ $helper = Mage::helper('ddg');
510
+ if ($helper->getWebsiteConfig(Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_DYNAMIC_PRODUCT_IMAGE)
511
+ && $product->getTypeId() == "simple"
512
+ ) {
513
+ $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
514
+ if (!empty($parentIds)) {
515
+ $parentProduct = Mage::getModel('catalog/product')->load($parentIds[0]);
516
+ return $this->helper('catalog/image')->init($parentProduct, 'small_image')->resize(135);
517
+ }
518
+ }
519
+ return $this->helper('catalog/image')->init($product, 'small_image')->resize(135);
520
+ }
521
  }
app/code/community/Dotdigitalgroup/Email/Block/Recommended/Products.php CHANGED
@@ -26,7 +26,7 @@ class Dotdigitalgroup_Email_Block_Recommended_Products
26
  ->getDisplayLimitByMode(
27
  $mode
28
  );
29
- $orderItems = $orderModel->getAllItems();
30
  $productsToDisplay = $this->getProductsToDisplay(
31
  $orderItems, $limit, $mode, 'PRODUCT'
32
  );
26
  ->getDisplayLimitByMode(
27
  $mode
28
  );
29
+ $orderItems = $orderModel->getAllVisibleItems();
30
  $productsToDisplay = $this->getProductsToDisplay(
31
  $orderItems, $limit, $mode, 'PRODUCT'
32
  );
app/code/community/Dotdigitalgroup/Email/Helper/Config.php CHANGED
@@ -153,6 +153,7 @@ class Dotdigitalgroup_Email_Helper_Config
153
  const XML_PATH_CONNECTOR_DYNAMIC_COUPON_STYLE = 'connector_configuration/dynamic_content_style/coupon_style';
154
  const XML_PATH_CONNECTOR_DYNAMIC_COUPON_FONT = 'connector_configuration/dynamic_content_style/coupon_font_picker';
155
  const XML_PATH_CONNECTOR_DYNAMIC_COUPON_BG_COLOR = 'connector_configuration/dynamic_content_style/coupon_doc_color';
 
156
 
157
  //Catalog
158
  const XML_PATH_CONNECTOR_SYNC_CATALOG_VALUES = 'connector_configuration/catalog_sync/catalog_values';
@@ -184,8 +185,10 @@ class Dotdigitalgroup_Email_Helper_Config
184
  const XML_PATH_CONNECTOR_AUTOMATION_STUDIO_REVIEW = 'connector_automation_studio/visitor_automation/review_automation';
185
  const XML_PATH_CONNECTOR_AUTOMATION_STUDIO_WISHLIST = 'connector_automation_studio/visitor_automation/wishlist_automation';
186
  const XML_PATH_CONNECTOR_AUTOMATION_STUDIO_ORDER_STATUS = 'connector_automation_studio/order_status_automation/status_to_automation';
 
187
 
188
- //PRODUCT REVIEW REMINDER.
 
189
  const XML_PATH_AUTOMATION_REVIEW_STATUS = 'connector_automation_studio/review_settings/status';
190
  const XML_PATH_AUTOMATION_REVIEW_DELAY = 'connector_automation_studio/review_settings/delay';
191
  const XML_PATH_AUTOMATION_REVIEW_CAMPAIGN = 'connector_automation_studio/review_settings/campaign';
153
  const XML_PATH_CONNECTOR_DYNAMIC_COUPON_STYLE = 'connector_configuration/dynamic_content_style/coupon_style';
154
  const XML_PATH_CONNECTOR_DYNAMIC_COUPON_FONT = 'connector_configuration/dynamic_content_style/coupon_font_picker';
155
  const XML_PATH_CONNECTOR_DYNAMIC_COUPON_BG_COLOR = 'connector_configuration/dynamic_content_style/coupon_doc_color';
156
+ const XML_PATH_CONNECTOR_DYNAMIC_PRODUCT_IMAGE = 'connector_configuration/dynamic_content_style/product_image';
157
 
158
  //Catalog
159
  const XML_PATH_CONNECTOR_SYNC_CATALOG_VALUES = 'connector_configuration/catalog_sync/catalog_values';
185
  const XML_PATH_CONNECTOR_AUTOMATION_STUDIO_REVIEW = 'connector_automation_studio/visitor_automation/review_automation';
186
  const XML_PATH_CONNECTOR_AUTOMATION_STUDIO_WISHLIST = 'connector_automation_studio/visitor_automation/wishlist_automation';
187
  const XML_PATH_CONNECTOR_AUTOMATION_STUDIO_ORDER_STATUS = 'connector_automation_studio/order_status_automation/status_to_automation';
188
+ const XML_PATH_CONNECTOR_AUTOMATION_STUDIO_NEW_ORDER = 'connector_automation_studio/visitor_automation/first_order_automation';
189
 
190
+
191
+ //PRODUCT REVIEW REMINDER.
192
  const XML_PATH_AUTOMATION_REVIEW_STATUS = 'connector_automation_studio/review_settings/status';
193
  const XML_PATH_AUTOMATION_REVIEW_DELAY = 'connector_automation_studio/review_settings/delay';
194
  const XML_PATH_AUTOMATION_REVIEW_CAMPAIGN = 'connector_automation_studio/review_settings/campaign';
app/code/community/Dotdigitalgroup/Email/Helper/Data.php CHANGED
@@ -175,9 +175,18 @@ class Dotdigitalgroup_Email_Helper_Data extends Mage_Core_Helper_Abstract
175
  }
176
 
177
  $client = $this->getWebsiteApiClient($websiteId);
 
 
 
 
178
  $response = $client->postContacts($email);
179
 
180
  if (isset($response->message)) {
 
 
 
 
 
181
  return false;
182
  }
183
  //save contact id
@@ -785,7 +794,9 @@ class Dotdigitalgroup_Email_Helper_Data extends Mage_Core_Helper_Abstract
785
  if (!empty($data)) {
786
  //update data fields
787
  $client = $this->getWebsiteApiClient($website);
788
- $client->updateContactDatafieldsByEmail($email, $data);
 
 
789
  }
790
  }
791
 
@@ -824,15 +835,20 @@ class Dotdigitalgroup_Email_Helper_Data extends Mage_Core_Helper_Abstract
824
  public function updateLastQuoteId($quoteId, $email, $websiteId)
825
  {
826
  $client = $this->getWebsiteApiClient($websiteId);
827
- //last quote id config data mapped
828
- $quoteIdField = $this->getLastQuoteId();
 
 
 
829
 
830
  $data[] = array(
831
  'Key' => $quoteIdField,
832
  'Value' => $quoteId
833
  );
834
- //update datafields for conctact
835
- $client->updateContactDatafieldsByEmail($email, $data);
 
 
836
  }
837
 
838
  /**
@@ -1028,7 +1044,7 @@ class Dotdigitalgroup_Email_Helper_Data extends Mage_Core_Helper_Abstract
1028
  // id config data mapped
1029
  $field = $this->getAbandonedProductName();
1030
 
1031
- if ($field) {
1032
  $data[] = array(
1033
  'Key' => $field,
1034
  'Value' => $name
@@ -1062,11 +1078,14 @@ class Dotdigitalgroup_Email_Helper_Data extends Mage_Core_Helper_Abstract
1062
  *
1063
  * @param int $website
1064
  *
1065
- * @return string
1066
  */
1067
  public function getAccountEmail($website = 0)
1068
  {
1069
  $client = $this->getWebsiteApiClient($website);
 
 
 
1070
  $info = $client->getAccountInfo();
1071
  $email = '';
1072
 
175
  }
176
 
177
  $client = $this->getWebsiteApiClient($websiteId);
178
+ if ($client === false) {
179
+ return false;
180
+ }
181
+
182
  $response = $client->postContacts($email);
183
 
184
  if (isset($response->message)) {
185
+ $contact->setEmailImported(1);
186
+ if ($response->message == Dotdigitalgroup_Email_Model_Apiconnector_Client::API_ERROR_CONTACT_SUPPRESSED) {
187
+ $contact->setSuppressed(1);
188
+ }
189
+ $contact->save();
190
  return false;
191
  }
192
  //save contact id
794
  if (!empty($data)) {
795
  //update data fields
796
  $client = $this->getWebsiteApiClient($website);
797
+ if ($client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
798
+ $client->updateContactDatafieldsByEmail($email, $data);
799
+ }
800
  }
801
  }
802
 
835
  public function updateLastQuoteId($quoteId, $email, $websiteId)
836
  {
837
  $client = $this->getWebsiteApiClient($websiteId);
838
+ //last quote id config data mapped from website level config
839
+ $quoteIdField = $this->getWebsiteConfig(
840
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_MAPPING_LAST_QUOTE_ID,
841
+ $websiteId
842
+ );
843
 
844
  $data[] = array(
845
  'Key' => $quoteIdField,
846
  'Value' => $quoteId
847
  );
848
+ if ($client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
849
+ //update datafields for conctact
850
+ $client->updateContactDatafieldsByEmail($email, $data);
851
+ }
852
  }
853
 
854
  /**
1044
  // id config data mapped
1045
  $field = $this->getAbandonedProductName();
1046
 
1047
+ if ($field && $client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
1048
  $data[] = array(
1049
  'Key' => $field,
1050
  'Value' => $name
1078
  *
1079
  * @param int $website
1080
  *
1081
+ * @return bool|string
1082
  */
1083
  public function getAccountEmail($website = 0)
1084
  {
1085
  $client = $this->getWebsiteApiClient($website);
1086
+ if ($client === false) {
1087
+ return false;
1088
+ }
1089
  $info = $client->getAccountInfo();
1090
  $email = '';
1091
 
app/code/community/Dotdigitalgroup/Email/Model/Adminhtml/Source/Automation/Programme.php CHANGED
@@ -22,9 +22,10 @@ class Dotdigitalgroup_Email_Model_Adminhtml_Source_Automation_Programme
22
  $fields[] = array('value' => '0',
23
  'label' => Mage::helper('ddg')->__('-- Disabled --'));
24
 
25
- if (Mage::helper('ddg')->isEnabled($website)) {
26
-
27
- $client = Mage::helper('ddg')->getWebsiteApiClient($website);
 
28
  $programmes = $client->getPrograms();
29
  if ($programmes) {
30
  foreach ($programmes as $one) {
22
  $fields[] = array('value' => '0',
23
  'label' => Mage::helper('ddg')->__('-- Disabled --'));
24
 
25
+ $client = Mage::helper('ddg')->getWebsiteApiClient($website);
26
+ if (Mage::helper('ddg')->isEnabled($website)
27
+ && $client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client
28
+ ) {
29
  $programmes = $client->getPrograms();
30
  if ($programmes) {
31
  foreach ($programmes as $one) {
app/code/community/Dotdigitalgroup/Email/Model/Adminhtml/Source/Campaigns.php CHANGED
@@ -29,11 +29,10 @@ class Dotdigitalgroup_Email_Model_Adminhtml_Source_Campaigns
29
  }
30
 
31
  $enabled = Mage::helper('ddg')->isEnabled($website);
 
32
 
33
  //api enabled get campaigns
34
- if ($enabled) {
35
- $client = Mage::helper('ddg')->getWebsiteApiClient($website);
36
-
37
  $savedCampaigns = Mage::registry('savedcampigns');
38
 
39
  //get campaigns from registry
29
  }
30
 
31
  $enabled = Mage::helper('ddg')->isEnabled($website);
32
+ $client = Mage::helper('ddg')->getWebsiteApiClient($website);
33
 
34
  //api enabled get campaigns
35
+ if ($enabled && $client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
 
 
36
  $savedCampaigns = Mage::registry('savedcampigns');
37
 
38
  //get campaigns from registry
app/code/community/Dotdigitalgroup/Email/Model/Adminhtml/Source/Datafields.php CHANGED
@@ -21,7 +21,7 @@ class Dotdigitalgroup_Email_Model_Adminhtml_Source_Datafields
21
  $client = $helper->getWebsiteApiClient($website);
22
 
23
  //get datafields options
24
- if ($helper->isEnabled($website)) {
25
 
26
  $savedDatafields = Mage::registry('datafields');
27
 
21
  $client = $helper->getWebsiteApiClient($website);
22
 
23
  //get datafields options
24
+ if ($helper->isEnabled($website) && $client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
25
 
26
  $savedDatafields = Mage::registry('datafields');
27
 
app/code/community/Dotdigitalgroup/Email/Model/Adminhtml/Source/Publicdatafields.php CHANGED
@@ -24,6 +24,9 @@ class Dotdigitalgroup_Email_Model_Adminhtml_Source_Publicdatafields
24
  $helper = Mage::helper('ddg');
25
  $website = $this->getWebsite();
26
  $client = $helper->getWebsiteApiClient($website);
 
 
 
27
 
28
  //grab the datafields request and save to register
29
  $datafields = $client->getDataFields();
24
  $helper = Mage::helper('ddg');
25
  $website = $this->getWebsite();
26
  $client = $helper->getWebsiteApiClient($website);
27
+ if ($client === false) {
28
+ return array();
29
+ }
30
 
31
  //grab the datafields request and save to register
32
  $datafields = $client->getDataFields();
app/code/community/Dotdigitalgroup/Email/Model/Apiconnector/Client.php CHANGED
@@ -1525,4 +1525,32 @@ class Dotdigitalgroup_Email_Model_Apiconnector_Client
1525
 
1526
  return $response;
1527
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1528
  }
1525
 
1526
  return $response;
1527
  }
1528
+
1529
+ /**
1530
+ * Gets the send status using send ID.
1531
+ *
1532
+ * @param $id
1533
+ * @return object
1534
+ */
1535
+ public function getSendStatus($id)
1536
+ {
1537
+ $url = $this->_apiEndpoint . self::REST_CAMPAIGN_SEND . '/' . $id;
1538
+ $this->setUrl($url)
1539
+ ->setVerb('GET');
1540
+
1541
+ $response = $this->execute();
1542
+ //log error
1543
+ if (isset($response->message)
1544
+ && !in_array(
1545
+ $response->message, $this->exludeMessages
1546
+ )
1547
+ ) {
1548
+ $message = 'GETS THE SEND STATUS USING SEND ID: '
1549
+ . $response->message;
1550
+ Mage::helper('ddg')->log($message)
1551
+ ->rayLog($response->message);
1552
+ }
1553
+
1554
+ return $response;
1555
+ }
1556
  }
app/code/community/Dotdigitalgroup/Email/Model/Automation.php CHANGED
@@ -10,6 +10,9 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
10
  const AUTOMATION_TYPE_NEW_REVIEW = 'review_automation';
11
  const AUTOMATION_TYPE_NEW_WISHLIST = 'wishlist_automation';
12
  const AUTOMATION_STATUS_PENDING = 'pending';
 
 
 
13
  //automation enrolment limit
14
  public $limit = 100;
15
  public $email;
@@ -34,8 +37,8 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
34
  Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_AUTOMATION_STUDIO_REVIEW,
35
  self::AUTOMATION_TYPE_NEW_WISHLIST =>
36
  Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_AUTOMATION_STUDIO_WISHLIST,
37
- 'order_automation_' =>
38
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_AUTOMATION_STUDIO_ORDER_STATUS
39
  );
40
 
41
  /**
@@ -63,25 +66,54 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
63
  return $this;
64
  }
65
 
 
 
 
66
  public function enrollment()
67
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  $helper = Mage::helper('ddg');
69
  //send the campaign by each types
70
  foreach ($this->automationTypes as $type => $config) {
71
  $contacts = array();
72
  foreach (Mage::app()->getWebsites(true) as $website) {
73
- $contacts[$website->getId()]['programId'] = $helper->getWebsiteConfig($config, $website);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
  //get collection from type
76
  $automationCollection = $this->getCollection()
77
  ->addFieldToFilter(
78
  'enrolment_status', self::AUTOMATION_STATUS_PENDING
79
  );
80
- if ($type == 'order_automation_') {
81
- $automationCollection->addFieldToFilter('automation_type', array('like' => '%' . $type . '%'));
82
- } else {
83
- $automationCollection->addFieldToFilter('automation_type', $type);
84
- }
85
  //limit because of the each contact request to get the id
86
  $automationCollection->getSelect()->limit($this->limit);
87
  foreach ($automationCollection as $automation) {
@@ -90,19 +122,29 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
90
  $this->typeId = $automation->getTypeId();
91
  $this->websiteId = $automation->getWebsiteId();
92
  $this->storeName = $automation->getStoreName();
93
- $contactId = Mage::helper('ddg')->getContactId(
94
- $email, $this->websiteId
95
- );
96
- //contact id is valid, can update datafields
97
- if ($contactId) {
98
- //need to update datafields
99
- $this->updateDatafieldsByType(
100
- $this->automationType, $email
 
101
  );
102
- $contacts[$automation->getWebsiteId()]['contacts'][$automation->getId()] = $contactId;
 
 
 
 
 
 
 
 
 
 
103
  } else {
104
- // the contact is suppressed or the request failed
105
- $automation->setEnrolmentStatus('Suppressed')->save();
106
  }
107
  }
108
  foreach ($contacts as $websiteId => $websiteContacts) {
@@ -128,13 +170,13 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
128
  ) {
129
  $this->programStatus = 'Deactivated';
130
  }
131
- //update contacts with the new status, and log the error message if failes
132
  $num = $this->getResource()->updateContacts(
133
  $contactsArray, $this->programStatus, $this->programMessage
134
  );
135
  if ($num) {
136
  Mage::helper('ddg')->log(
137
- 'Automation type : ' . $type . ', updated no : ' . $num
138
  );
139
  }
140
  }
@@ -151,23 +193,17 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
151
  {
152
  switch ($type) {
153
  case self::AUTOMATION_TYPE_NEW_CUSTOMER :
154
- $this->_updateDefaultDatafields($email);
155
- break;
156
  case self::AUTOMATION_TYPE_NEW_SUBSCRIBER :
 
157
  $this->_updateDefaultDatafields($email);
158
  break;
159
  case self::AUTOMATION_TYPE_NEW_ORDER :
160
- $this->_updateNewOrderDatafields();
161
- break;
162
- case self::AUTOMATION_TYPE_NEW_GUEST_ORDER:
163
- $this->_updateNewOrderDatafields();
164
- break;
165
  case self::AUTOMATION_TYPE_NEW_REVIEW :
 
 
166
  $this->_updateNewOrderDatafields();
167
  break;
168
- case self::AUTOMATION_TYPE_NEW_WISHLIST:
169
- $this->_updateDefaultDatafields($email);
170
- break;
171
  default:
172
  $this->_updateDefaultDatafields($email);
173
  break;
@@ -245,9 +281,11 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
245
  if ( ! empty($data)) {
246
  //update data fields
247
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
248
- $client->updateContactDatafieldsByEmail(
249
- $order->getCustomerEmail(), $data
250
- );
 
 
251
  }
252
  }
253
 
@@ -265,6 +303,10 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
265
  return false;
266
  }
267
  $client = Mage::helper('ddg')->getWebsiteApiClient($this->websiteId);
 
 
 
 
268
  $program = $client->getProgramById($programId);
269
  //program status
270
  if (isset($program->status)) {
@@ -283,11 +325,15 @@ class Dotdigitalgroup_Email_Model_Automation extends Mage_Core_Model_Abstract
283
  * @param $contacts
284
  * @param $websiteId
285
  *
286
- * @return null
287
  */
288
  public function sendContactsToAutomation($contacts, $websiteId)
289
  {
290
  $client = Mage::helper('ddg')->getWebsiteApiClient($websiteId);
 
 
 
 
291
  $data = array(
292
  'Contacts' => $contacts,
293
  'ProgramId' => $this->programId,
10
  const AUTOMATION_TYPE_NEW_REVIEW = 'review_automation';
11
  const AUTOMATION_TYPE_NEW_WISHLIST = 'wishlist_automation';
12
  const AUTOMATION_STATUS_PENDING = 'pending';
13
+ const ORDER_STATUS_AUTOMATION = 'order_automation_';
14
+ const AUTOMATION_TYPE_CUSTOMER_FIRST_ORDER = 'first_order_automation';
15
+
16
  //automation enrolment limit
17
  public $limit = 100;
18
  public $email;
37
  Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_AUTOMATION_STUDIO_REVIEW,
38
  self::AUTOMATION_TYPE_NEW_WISHLIST =>
39
  Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_AUTOMATION_STUDIO_WISHLIST,
40
+ self::AUTOMATION_TYPE_CUSTOMER_FIRST_ORDER =>
41
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_AUTOMATION_STUDIO_NEW_ORDER
42
  );
43
 
44
  /**
66
  return $this;
67
  }
68
 
69
+ /**
70
+ * Automation enrollment
71
+ */
72
  public function enrollment()
73
  {
74
+ $automationOrderStatusCollection = $this->getCollection()
75
+ ->addFieldToFilter(
76
+ 'enrolment_status', self::AUTOMATION_STATUS_PENDING
77
+ );
78
+ $automationOrderStatusCollection
79
+ ->addFieldToFilter(
80
+ 'automation_type',
81
+ array('like' => '%' . 'order_automation_' . '%')
82
+ )->getSelect()->group('automation_type');
83
+
84
+ $statusTypes
85
+ = $automationOrderStatusCollection->getColumnValues('automation_type');
86
+ foreach ($statusTypes as $type) {
87
+ $this->automationTypes[$type]
88
+ = Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_AUTOMATION_STUDIO_ORDER_STATUS;
89
+ }
90
  $helper = Mage::helper('ddg');
91
  //send the campaign by each types
92
  foreach ($this->automationTypes as $type => $config) {
93
  $contacts = array();
94
  foreach (Mage::app()->getWebsites(true) as $website) {
95
+ if (strpos($type, self::ORDER_STATUS_AUTOMATION) !== false) {
96
+ $configValue
97
+ = unserialize($helper->getWebsiteConfig($config, $website));
98
+ if (is_array($configValue) && !empty($configValue)) {
99
+ foreach ($configValue as $one) {
100
+ if (strpos($type, $one['status']) !== false) {
101
+ $contacts[$website->getId()]['programId']
102
+ = $one['automation'];
103
+ }
104
+ }
105
+ }
106
+ } else {
107
+ $contacts[$website->getId()]['programId']
108
+ = $helper->getWebsiteConfig($config, $website);
109
+ }
110
  }
111
  //get collection from type
112
  $automationCollection = $this->getCollection()
113
  ->addFieldToFilter(
114
  'enrolment_status', self::AUTOMATION_STATUS_PENDING
115
  );
116
+ $automationCollection->addFieldToFilter('automation_type', $type);
 
 
 
 
117
  //limit because of the each contact request to get the id
118
  $automationCollection->getSelect()->limit($this->limit);
119
  foreach ($automationCollection as $automation) {
122
  $this->typeId = $automation->getTypeId();
123
  $this->websiteId = $automation->getWebsiteId();
124
  $this->storeName = $automation->getStoreName();
125
+ $typeDouble = $type;
126
+ //Set type to generic automation status if type contains constant value
127
+ if (strpos($typeDouble, self::ORDER_STATUS_AUTOMATION) !== false) {
128
+ $typeDouble = self::ORDER_STATUS_AUTOMATION;
129
+ }
130
+ //Only if api is enabled and credentials are filled
131
+ if ($helper->getWebsiteApiClient($this->websiteId)) {
132
+ $contactId = Mage::helper('ddg')->getContactId(
133
+ $email, $this->websiteId
134
  );
135
+ //contact id is valid, can update datafields
136
+ if ($contactId) {
137
+ //need to update datafields
138
+ $this->updateDatafieldsByType(
139
+ $typeDouble, $email
140
+ );
141
+ $contacts[$automation->getWebsiteId()]['contacts'][$automation->getId()] = $contactId;
142
+ } else {
143
+ // the contact is suppressed or the request failed
144
+ $automation->setEnrolmentStatus('Suppressed')->save();
145
+ }
146
  } else {
147
+ unset($contacts[$this->websiteId]);
 
148
  }
149
  }
150
  foreach ($contacts as $websiteId => $websiteContacts) {
170
  ) {
171
  $this->programStatus = 'Deactivated';
172
  }
173
+ //update contacts with the new status, and log the error message if fails
174
  $num = $this->getResource()->updateContacts(
175
  $contactsArray, $this->programStatus, $this->programMessage
176
  );
177
  if ($num) {
178
  Mage::helper('ddg')->log(
179
+ 'Automation type : ' . $type . ', enrolled : ' . $num
180
  );
181
  }
182
  }
193
  {
194
  switch ($type) {
195
  case self::AUTOMATION_TYPE_NEW_CUSTOMER :
 
 
196
  case self::AUTOMATION_TYPE_NEW_SUBSCRIBER :
197
+ case self::AUTOMATION_TYPE_NEW_WISHLIST :
198
  $this->_updateDefaultDatafields($email);
199
  break;
200
  case self::AUTOMATION_TYPE_NEW_ORDER :
201
+ case self::AUTOMATION_TYPE_NEW_GUEST_ORDER :
 
 
 
 
202
  case self::AUTOMATION_TYPE_NEW_REVIEW :
203
+ case self::AUTOMATION_TYPE_CUSTOMER_FIRST_ORDER :
204
+ case self::ORDER_STATUS_AUTOMATION :
205
  $this->_updateNewOrderDatafields();
206
  break;
 
 
 
207
  default:
208
  $this->_updateDefaultDatafields($email);
209
  break;
281
  if ( ! empty($data)) {
282
  //update data fields
283
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
284
+ if ($client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
285
+ $client->updateContactDatafieldsByEmail(
286
+ $order->getCustomerEmail(), $data
287
+ );
288
+ }
289
  }
290
  }
291
 
303
  return false;
304
  }
305
  $client = Mage::helper('ddg')->getWebsiteApiClient($this->websiteId);
306
+ if ($client === false) {
307
+ return false;
308
+ }
309
+
310
  $program = $client->getProgramById($programId);
311
  //program status
312
  if (isset($program->status)) {
325
  * @param $contacts
326
  * @param $websiteId
327
  *
328
+ * @return bool|null
329
  */
330
  public function sendContactsToAutomation($contacts, $websiteId)
331
  {
332
  $client = Mage::helper('ddg')->getWebsiteApiClient($websiteId);
333
+ if ($client === false) {
334
+ return false;
335
+ }
336
+
337
  $data = array(
338
  'Contacts' => $contacts,
339
  'ProgramId' => $this->programId,
app/code/community/Dotdigitalgroup/Email/Model/Campaign.php CHANGED
@@ -28,10 +28,17 @@ class Dotdigitalgroup_Email_Model_Campaign extends Mage_Core_Model_Abstract
28
  const XML_PATH_GUEST_LOSTBASKET_2_CAMPAIGN = 'connector_lost_baskets/guests/campaign_2';
29
  const XML_PATH_GUEST_LOSTBASKET_3_CAMPAIGN = 'connector_lost_baskets/guests/campaign_3';
30
 
 
 
 
 
31
 
32
  //error messages
33
  const SEND_EMAIL_CONTACT_ID_MISSING = 'Error : missing contact id - will try later to send ';
34
 
 
 
 
35
  /**
36
  * constructor
37
  */
@@ -80,108 +87,153 @@ class Dotdigitalgroup_Email_Model_Campaign extends Mage_Core_Model_Abstract
80
  }
81
 
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  /**
84
  * Sending the campaigns.
85
  */
86
  public function sendCampaigns()
87
  {
88
- //grab the emails not send
89
- $emailsToSend = $this->_getEmailCampaigns();
90
-
91
- foreach ($emailsToSend as $campaign) {
92
-
93
- $email = $campaign->getEmail();
94
- $storeId = $campaign->getStoreId();
95
- $campaignId = $campaign->getCampaignId();
96
- $store = Mage::app()->getStore($storeId);
97
- $websiteId = $store->getWebsiteId();
98
-
99
-
100
- if ( ! $campaignId) {
101
- $campaign->setMessage('Missing campaign id: ' . $campaignId)
102
- ->setIsSent(1)
103
- ->save();
104
- continue;
105
- } elseif ( ! $email) {
106
- $campaign->setMessage('Missing email : ' . $email)
107
- ->setIsSent(1)
108
- ->save();
109
- continue;
110
- }
111
- try {
112
  $client = Mage::helper('ddg')->getWebsiteApiClient(
113
  $websiteId
114
  );
115
- $contactId = Mage::helper('ddg')->getContactId(
116
- $campaign->getEmail(), $websiteId
117
- );
118
- if (is_numeric($contactId)) {
119
- //update data fields for order review camapigns
120
- if ($campaign->getEventName() == 'Order Review') {
121
- $website = Mage::app()->getWebsite($websiteId);
122
- $order = Mage::getModel('sales/order')->loadByIncrementId($campaign->getOrderIncrementId());
123
-
124
- if ($lastOrderId = $website->getConfig(
125
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_LAST_ORDER_ID
126
- )
127
- ) {
128
- $data[] = array(
129
- 'Key' => $lastOrderId,
130
- 'Value' => $order->getId()
131
- );
132
- }
133
- if ($orderIncrementId = $website->getConfig(
134
- Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_LAST_ORDER_INCREMENT_ID
135
- )
136
- ) {
137
- $data[] = array(
138
- 'Key' => $orderIncrementId,
139
- 'Value' => $order->getIncrementId()
140
- );
141
- }
142
 
143
- if (!empty($data)) {
144
- //update data fields
145
- $client->updateContactDatafieldsByEmail(
146
- $email, $data
147
- );
148
- }
 
 
 
 
 
 
149
  }
150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  $response = $client->postCampaignsSend(
152
- $campaignId, array($contactId)
153
  );
154
  if (isset($response->message)) {
155
  //update the failed to send email message
156
- $campaign->setMessage($response->message)->setIsSent(1);
 
 
 
 
 
157
  }
158
- $now = Mage::getSingleton('core/date')->gmtDate();
159
- //record suscces
160
- $campaign->setIsSent(1)
161
- ->setMessage(null)
162
- ->setSentAt($now)
163
- ->save();
164
- } else {
165
- //update the failed to send email message- error message from post contact
166
- $campaign->setContactMessage($contactId)->setIsSent(1)
167
- ->save();
168
  }
169
- } catch (Exception $e) {
170
- Mage::logException($e);
171
  }
172
  }
173
  }
174
 
175
  /**
176
- * @return mixed
 
 
 
 
 
177
  */
178
- protected function _getEmailCampaigns()
179
  {
180
  $emailCollection = $this->getCollection();
181
- $emailCollection->addFieldToFilter('is_sent', array('null' => true))
182
- ->addFieldToFilter('campaign_id', array('notnull' => true));
183
- $emailCollection->getSelect()->order('campaign_id');
 
 
 
 
 
 
 
 
 
 
 
184
 
 
185
  return $emailCollection;
186
  }
187
  }
28
  const XML_PATH_GUEST_LOSTBASKET_2_CAMPAIGN = 'connector_lost_baskets/guests/campaign_2';
29
  const XML_PATH_GUEST_LOSTBASKET_3_CAMPAIGN = 'connector_lost_baskets/guests/campaign_3';
30
 
31
+ const PENDING = 0;
32
+ const PROCESSING = 1;
33
+ const SENT = 2;
34
+ const FAILED = 3;
35
 
36
  //error messages
37
  const SEND_EMAIL_CONTACT_ID_MISSING = 'Error : missing contact id - will try later to send ';
38
 
39
+ //single call contact limit
40
+ const SEND_EMAIL_CONTACT_LIMIT = 10;
41
+
42
  /**
43
  * constructor
44
  */
87
  }
88
 
89
 
90
+ private function _checkSendStatus($website)
91
+ {
92
+ $campaigns = $this->_getEmailCampaigns($website->getStoreIds(), self::PROCESSING, true);
93
+ foreach ($campaigns as $campaign) {
94
+ $client = Mage::helper('ddg')->getWebsiteApiClient($website);
95
+ $response = $client->getSendStatus($campaign->getSendId());
96
+ if (isset($response->message)) {
97
+ //update the failed to send email message
98
+ $this->getResource()->setMessage(array($campaign->getSendId()), $response->message);
99
+ } elseif ($response->status == 'Sent') {
100
+ $this->getResource()->setSent($campaign->getSendId());
101
+ }
102
+ }
103
+ }
104
+
105
  /**
106
  * Sending the campaigns.
107
  */
108
  public function sendCampaigns()
109
  {
110
+ /** @var Mage_Core_Model_Website $website */
111
+ foreach (Mage::app()->getWebsites(true) as $website) {
112
+ //check send status for processing
113
+ $this->_checkSendStatus($website);
114
+ //start send process
115
+ $emailsToSend = $this->_getEmailCampaigns($website->getStoreIds());
116
+ $campaignsToSend = array();
117
+ foreach ($emailsToSend as $campaign) {
118
+
119
+ $email = $campaign->getEmail();
120
+ $campaignId = $campaign->getCampaignId();
121
+ $websiteId = $website->getId();
 
 
 
 
 
 
 
 
 
 
 
 
122
  $client = Mage::helper('ddg')->getWebsiteApiClient(
123
  $websiteId
124
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
+ //Only if valid client is returned
127
+ if ($client) {
128
+ if (!$campaignId) {
129
+ $campaign->setMessage('Missing campaign id: ' . $campaignId)
130
+ ->setSendStatus(self::FAILED)
131
+ ->save();
132
+ continue;
133
+ } elseif (!$email) {
134
+ $campaign->setMessage('Missing email')
135
+ ->setSendStatus(self::FAILED)
136
+ ->save();
137
+ continue;
138
  }
139
 
140
+ $campaignsToSend[$campaignId]['client'] = $client;
141
+ try {
142
+ $contactId = Mage::helper('ddg')->getContactId(
143
+ $campaign->getEmail(), $websiteId
144
+ );
145
+ if (is_numeric($contactId)) {
146
+ //update data fields for order review camapigns
147
+ if ($campaign->getEventName() == 'Order Review') {
148
+ $order = Mage::getModel('sales/order')->loadByIncrementId($campaign->getOrderIncrementId());
149
+
150
+ if ($lastOrderId = $website->getConfig(
151
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_LAST_ORDER_ID
152
+ )
153
+ ) {
154
+ $data[] = array(
155
+ 'Key' => $lastOrderId,
156
+ 'Value' => $order->getId()
157
+ );
158
+ }
159
+ if ($orderIncrementId = $website->getConfig(
160
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_LAST_ORDER_INCREMENT_ID
161
+ )
162
+ ) {
163
+ $data[] = array(
164
+ 'Key' => $orderIncrementId,
165
+ 'Value' => $order->getIncrementId()
166
+ );
167
+ }
168
+
169
+ if (!empty($data)) {
170
+ //update data fields
171
+ $client->updateContactDatafieldsByEmail(
172
+ $email, $data
173
+ );
174
+ }
175
+ }
176
+ $campaignsToSend[$campaignId]['contacts'][] = $contactId;
177
+ $campaignsToSend[$campaignId]['ids'][] = $campaign->getId();
178
+ } else {
179
+ //update the failed to send email message error message
180
+ $campaign->setSendStatus(self::FAILED)
181
+ ->setMessage('contact id returned is not numeric for email ' . $email)
182
+ ->save();
183
+ }
184
+ } catch (Exception $e) {
185
+ Mage::logException($e);
186
+ }
187
+ }
188
+ }
189
+ foreach ($campaignsToSend as $campaignId => $data) {
190
+ if (isset($data['contacts']) && isset($data['client'])) {
191
+ $contacts = $data['contacts'];
192
+ $client = $data['client'];
193
  $response = $client->postCampaignsSend(
194
+ $campaignId, $contacts
195
  );
196
  if (isset($response->message)) {
197
  //update the failed to send email message
198
+ $this->getResource()->setMessage($data['ids'], $response->message);
199
+ } elseif (isset($response->id)) {
200
+ $this->getResource()->setProcessing($campaignId, $response->id);
201
+ } else {
202
+ //update the failed to send email message
203
+ $this->getResource()->setMessage($data['ids'], 'No send id returned.');
204
  }
 
 
 
 
 
 
 
 
 
 
205
  }
 
 
206
  }
207
  }
208
  }
209
 
210
  /**
211
+ * Get campaign collection
212
+ *
213
+ * @param $storeIds
214
+ * @param $sendStatus
215
+ * @param $sendIdCheck
216
+ * @return Dotdigitalgroup_Email_Model_Resource_Campaign_Collection
217
  */
218
+ protected function _getEmailCampaigns($storeIds, $sendStatus = 0, $sendIdCheck = false)
219
  {
220
  $emailCollection = $this->getCollection();
221
+ $emailCollection->addFieldToFilter('send_status', array('eq' => $sendStatus))
222
+ ->addFieldToFilter('campaign_id', array('notnull' => true))
223
+ ->addFieldToFilter('store_id', array('in' => $storeIds));
224
+
225
+ //check for send id
226
+ if ($sendIdCheck) {
227
+ $emailCollection->addFieldToFilter('send_id', array('notnull' => true))
228
+ ->getSelect()
229
+ ->group('send_id');
230
+ } else {
231
+ $emailCollection->getSelect()
232
+ ->order('campaign_id');
233
+ }
234
+
235
 
236
+ $emailCollection->getSelect()->limit(self::SEND_EMAIL_CONTACT_LIMIT);
237
  return $emailCollection;
238
  }
239
  }
app/code/community/Dotdigitalgroup/Email/Model/Connector/Order.php CHANGED
@@ -103,7 +103,9 @@ class Dotdigitalgroup_Email_Model_Connector_Order
103
 
104
  $this->purchase_date = $created_at->toString(Zend_Date::ISO_8601);
105
  $this->delivery_method = $orderData->getShippingDescription();
106
- $this->delivery_total = $orderData->getShippingAmount();
 
 
107
  $this->currency = $orderData->getStoreCurrencyCode();
108
 
109
  if ($payment = $orderData->getPayment()) {
@@ -509,6 +511,10 @@ class Dotdigitalgroup_Email_Model_Connector_Order
509
  if (is_string($value)) {
510
  $attributes[][$attribute_code]
511
  = $this->_limitLength($value);
 
 
 
 
512
  }
513
  }
514
  }
103
 
104
  $this->purchase_date = $created_at->toString(Zend_Date::ISO_8601);
105
  $this->delivery_method = $orderData->getShippingDescription();
106
+ $this->delivery_total = (float)number_format(
107
+ $orderData->getShippingAmount(), 2, '.', ''
108
+ );
109
  $this->currency = $orderData->getStoreCurrencyCode();
110
 
111
  if ($payment = $orderData->getPayment()) {
511
  if (is_string($value)) {
512
  $attributes[][$attribute_code]
513
  = $this->_limitLength($value);
514
+ } elseif(is_array($value)) { // check for multi select values
515
+ $value = implode($value, ', ');
516
+ $attributes[][$attribute_code]
517
+ = $this->_limitLength($value);
518
  }
519
  }
520
  }
app/code/community/Dotdigitalgroup/Email/Model/Customer/Wishlist/Item.php CHANGED
@@ -76,10 +76,10 @@ class Dotdigitalgroup_Email_Model_Customer_Wishlist_Item
76
  */
77
  public function setPrice($product)
78
  {
79
- $this->_price = $product->getFinalPrice();
80
  $total = $this->_price * $this->_qty;
81
 
82
- $this->_totalValueOfProduct = number_format($total, 2, '.', ',');
83
 
84
  return $this;
85
  }
76
  */
77
  public function setPrice($product)
78
  {
79
+ $this->_price = (float)number_format($product->getFinalPrice(), 2, '.', '');
80
  $total = $this->_price * $this->_qty;
81
 
82
+ $this->_totalValueOfProduct = (float)number_format($total, 2, '.', '');
83
 
84
  return $this;
85
  }
app/code/community/Dotdigitalgroup/Email/Model/Importer.php CHANGED
@@ -183,24 +183,25 @@ class Dotdigitalgroup_Email_Model_Importer extends Mage_Core_Model_Abstract
183
  {
184
  $helper = Mage::helper('ddg');
185
  $client = $helper->getWebsiteApiClient($websiteId);
186
- $data = $client->getContactImportReportFaults($id);
187
-
188
- if ($data) {
189
- $data = $this->_removeUtf8Bom($data);
190
- $fileName = Mage::getBaseDir('var') . DS . 'DmTempCsvFromApi.csv';
191
- $io = new Varien_Io_File();
192
- $io->open();
193
- $check = $io->write($fileName, $data);
194
- if ($check) {
195
- try {
196
- $csvArray = $this->_csvToArray($fileName);
197
- $io->rm($fileName);
198
- Mage::getResourceModel('ddg_automation/contact')->unsubscribe($csvArray);
199
- } catch (Exception $e) {
200
- Mage::logException($e);
 
 
 
201
  }
202
- } else {
203
- $helper->log('_processContactImportReportFaults: cannot save data to CSV file.');
204
  }
205
  }
206
  }
183
  {
184
  $helper = Mage::helper('ddg');
185
  $client = $helper->getWebsiteApiClient($websiteId);
186
+ if ($client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
187
+ $data = $client->getContactImportReportFaults($id);
188
+ if ($data) {
189
+ $data = $this->_removeUtf8Bom($data);
190
+ $fileName = Mage::getBaseDir('var') . DS . 'DmTempCsvFromApi.csv';
191
+ $io = new Varien_Io_File();
192
+ $io->open();
193
+ $check = $io->write($fileName, $data);
194
+ if ($check) {
195
+ try {
196
+ $csvArray = $this->_csvToArray($fileName);
197
+ $io->rm($fileName);
198
+ Mage::getResourceModel('ddg_automation/contact')->unsubscribe($csvArray);
199
+ } catch (Exception $e) {
200
+ Mage::logException($e);
201
+ }
202
+ } else {
203
+ $helper->log('_processContactImportReportFaults: cannot save data to CSV file.');
204
  }
 
 
205
  }
206
  }
207
  }
app/code/community/Dotdigitalgroup/Email/Model/Newsletter/Observer.php CHANGED
@@ -48,9 +48,11 @@ class Dotdigitalgroup_Email_Model_Newsletter_Observer
48
 
49
  //not subscribed
50
  } else {
51
- $unsubscribeEmails = Mage::registry('unsubscribeEmails');
52
- if (is_array($unsubscribeEmails)) {
53
- if (in_array($email, $unsubscribeEmails)) {
 
 
54
  return $this;
55
  }
56
  }
48
 
49
  //not subscribed
50
  } else {
51
+ $unsubscribeEmail = Mage::registry('unsubscribeEmail');
52
+ if ($unsubscribeEmail) {
53
+ //un-register
54
+ Mage::unregister('unsubscribeEmail');
55
+ if ($email == $unsubscribeEmail) {
56
  return $this;
57
  }
58
  }
app/code/community/Dotdigitalgroup/Email/Model/Observer.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Dotdigitalgroup_Email_Model_Observer
4
+ {
5
+ /**
6
+ * before block to html observer
7
+ *
8
+ * @param Varien_Event_Observer $observer
9
+ */
10
+ public function beforeBlockToHtml(Varien_Event_Observer $observer)
11
+ {
12
+ $grid = $observer->getBlock();
13
+
14
+ /**
15
+ * Mage_Adminhtml_Block_Customer_Grid
16
+ */
17
+ if ($grid instanceof Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid) {
18
+ $grid->addColumnAfter(
19
+ 'expiration_date',
20
+ array(
21
+ 'header' => Mage::helper('salesrule')->__('Expiration date'),
22
+ 'index' => 'expiration_date',
23
+ 'type' => 'datetime',
24
+ 'default' => '-',
25
+ 'align' => 'center',
26
+ 'width' => '160'
27
+ ),
28
+ 'created_at'
29
+ )->addColumnAfter(
30
+ 'generated_by_dotmailer',
31
+ array(
32
+ 'header' => Mage::helper('salesrule')->__('Generated By dotmailer'),
33
+ 'index' => 'generated_by_dotmailer',
34
+ 'type' => 'options',
35
+ 'options' => array('null' => 'No', '1' => 'Yes'),
36
+ 'width' => '30',
37
+ 'align' => 'center',
38
+ 'filter_condition_callback' => array(
39
+ $this,
40
+ 'filterCallbackContact'
41
+ )
42
+ ),
43
+ 'expiration_date'
44
+ );
45
+ }
46
+ }
47
+
48
+ /**
49
+ * Callback action for .
50
+ *
51
+ * @param $collection
52
+ * @param $column
53
+ */
54
+ public function filterCallbackContact($collection, $column)
55
+ {
56
+ $field = $column->getFilterIndex() ? $column->getFilterIndex()
57
+ : $column->getIndex();
58
+ $value = $column->getFilter()->getValue();
59
+ if ($value == 'null') {
60
+ $collection->addFieldToFilter($field, array('null' => true));
61
+ } else {
62
+ $collection->addFieldToFilter($field, array('notnull' => true));
63
+ }
64
+ }
65
+ }
app/code/community/Dotdigitalgroup/Email/Model/Resource/Campaign.php CHANGED
@@ -78,4 +78,84 @@ class Dotdigitalgroup_Email_Model_Resource_Campaign
78
  return $e;
79
  }
80
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
78
  return $e;
79
  }
80
  }
81
+
82
+ /**
83
+ * Set error message
84
+ *
85
+ * @param $ids
86
+ * @param $message
87
+ * @param $sendId
88
+ */
89
+ public function setMessage($ids, $message, $sendId = false)
90
+ {
91
+ try {
92
+ $ids = implode("', '", $ids);
93
+ if ($sendId) {
94
+ $map = 'send_id';
95
+ } else {
96
+ $map = 'id';
97
+ }
98
+ $now = Mage::getSingleton('core/date')->gmtDate();
99
+ $conn = $this->_getWriteAdapter();
100
+ $conn->update(
101
+ $this->getMainTable(),
102
+ array(
103
+ 'message' => $message,
104
+ 'send_status' => Dotdigitalgroup_Email_Model_Campaign::FAILED,
105
+ 'sent_at' => $now
106
+ ),
107
+ array("$map in ('$ids')")
108
+ );
109
+ } catch (Exception $e) {
110
+ Mage::logException($e);
111
+ }
112
+ }
113
+
114
+ /**
115
+ * Set sent
116
+ *
117
+ * @param bool $sendId
118
+ */
119
+ public function setSent($sendId)
120
+ {
121
+ try {
122
+ $now = Mage::getSingleton('core/date')->gmtDate();
123
+ $bind = array(
124
+ 'send_status' => Dotdigitalgroup_Email_Model_Campaign::SENT,
125
+ 'sent_at' => $now
126
+ );
127
+ $conn = $this->_getWriteAdapter();
128
+ $conn->update(
129
+ $this->getMainTable(),
130
+ $bind,
131
+ array('send_id = ?' => $sendId)
132
+ );
133
+ } catch (Exception $e) {
134
+ Mage::logException($e);
135
+ }
136
+ }
137
+
138
+ /**
139
+ * Set processing
140
+ *
141
+ * @param $campaignId
142
+ * @param bool $sendId
143
+ */
144
+ public function setProcessing($campaignId, $sendId)
145
+ {
146
+ try {
147
+ $bind = array(
148
+ 'send_status' => Dotdigitalgroup_Email_Model_Campaign::PROCESSING,
149
+ 'send_id' => $sendId
150
+ );
151
+ $conn = $this->_getWriteAdapter();
152
+ $conn->update(
153
+ $this->getMainTable(),
154
+ $bind,
155
+ array('campaign_id = ?' => $campaignId)
156
+ );
157
+ } catch (Exception $e) {
158
+ Mage::logException($e);
159
+ }
160
+ }
161
  }
app/code/community/Dotdigitalgroup/Email/Model/Resource/Contact.php CHANGED
@@ -125,7 +125,7 @@ class Dotdigitalgroup_Email_Model_Resource_Contact
125
  //remove dotmailer code from core_resource table
126
  $cond = $conn->quoteInto('code = ?', 'email_connector_setup');
127
  $conn->delete(
128
- $this->getReadConnection()->getTableName('core_resource'), $cond
129
  );
130
 
131
  //clean cache
@@ -295,9 +295,14 @@ class Dotdigitalgroup_Email_Model_Resource_Contact
295
  );
296
 
297
  }
298
-
299
  public function unsubscribe($data)
300
  {
 
 
 
 
 
301
  $write = $this->_getWriteAdapter();
302
  $emails = "'" . implode("','", $data) . "'";
303
 
@@ -317,10 +322,8 @@ class Dotdigitalgroup_Email_Model_Resource_Contact
317
  ->getCollection()
318
  ->addFieldToFilter('subscriber_email', array('in' => $data));
319
 
320
-
321
- Mage::register('unsubscribeEmails', $data);
322
-
323
  foreach ($newsletterCollection as $subscriber) {
 
324
  $subscriber->setSubscriberStatus(
325
  Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED
326
  )
@@ -332,4 +335,20 @@ class Dotdigitalgroup_Email_Model_Resource_Contact
332
  Mage::logException($e);
333
  }
334
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  }
125
  //remove dotmailer code from core_resource table
126
  $cond = $conn->quoteInto('code = ?', 'email_connector_setup');
127
  $conn->delete(
128
+ Mage::getSingleton('core/resource')->getTableName('core_resource'), $cond
129
  );
130
 
131
  //clean cache
295
  );
296
 
297
  }
298
+
299
  public function unsubscribe($data)
300
  {
301
+ //if empty return null
302
+ if (empty($data)) {
303
+ return;
304
+ }
305
+
306
  $write = $this->_getWriteAdapter();
307
  $emails = "'" . implode("','", $data) . "'";
308
 
322
  ->getCollection()
323
  ->addFieldToFilter('subscriber_email', array('in' => $data));
324
 
 
 
 
325
  foreach ($newsletterCollection as $subscriber) {
326
+ Mage::register('unsubscribeEmail', $subscriber->getSubscriberEmail());
327
  $subscriber->setSubscriberStatus(
328
  Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED
329
  )
335
  Mage::logException($e);
336
  }
337
  }
338
+
339
+ /**
340
+ * insert multiple contacts to table
341
+ *
342
+ * @param $data
343
+ */
344
+ public function insert($data)
345
+ {
346
+ try {
347
+ $write = $this->_getWriteAdapter();
348
+ $write->insertMultiple($this->getMainTable(), $data);
349
+ } catch (Exception $e) {
350
+ Mage::throwException($e->getMessage());
351
+ Mage::logException($e);
352
+ }
353
+ }
354
  }
app/code/community/Dotdigitalgroup/Email/Model/Resource/Coupon.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Dotdigitalgroup_Email_Model_Resource_Coupon extends Mage_SalesRule_Model_Resource_Coupon
4
+ {
5
+
6
+ /**
7
+ * Update auto generated Specific Coupon if it's rule changed
8
+ *
9
+ * @param Mage_SalesRule_Model_Rule $rule
10
+ * @return Mage_SalesRule_Model_Resource_Coupon
11
+ */
12
+ public function updateSpecificCoupons(Mage_SalesRule_Model_Rule $rule)
13
+ {
14
+
15
+ if (!$rule || !$rule->getId() || !$rule->hasDataChanges()) {
16
+ return $this;
17
+ }
18
+
19
+ $updateArray = array();
20
+ if ($rule->dataHasChangedFor('uses_per_coupon')) {
21
+ $updateArray['usage_limit'] = $rule->getUsesPerCoupon();
22
+ }
23
+
24
+ if ($rule->dataHasChangedFor('uses_per_customer')) {
25
+ $updateArray['usage_per_customer'] = $rule->getUsesPerCustomer();
26
+ }
27
+
28
+ $ruleNewDate = new Zend_Date($rule->getToDate());
29
+ $ruleOldDate = new Zend_Date($rule->getOrigData('to_date'));
30
+
31
+ if ($ruleNewDate->compare($ruleOldDate)) {
32
+ $updateArray['expiration_date'] = $rule->getToDate();
33
+ }
34
+
35
+ if (!empty($updateArray)) {
36
+ $this->_getWriteAdapter()->update(
37
+ $this->getTable('salesrule/coupon'),
38
+ $updateArray,
39
+ array('rule_id = ?' => $rule->getId(), 'generated_by_dotmailer is null')
40
+ );
41
+ }
42
+
43
+ //update coupons added by dotmailer. not to change expiration date
44
+ $dotmailerUpdateArray = $updateArray;
45
+ unset($dotmailerUpdateArray['expiration_date']);
46
+ if (!empty($dotmailerUpdateArray)) {
47
+ $this->_getWriteAdapter()->update(
48
+ $this->getTable('salesrule/coupon'),
49
+ $dotmailerUpdateArray,
50
+ array('rule_id = ?' => $rule->getId(), 'generated_by_dotmailer is 1')
51
+ );
52
+ }
53
+
54
+ return $this;
55
+ }
56
+ }
app/code/community/Dotdigitalgroup/Email/Model/Resource/Rule/Collection.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Dotdigitalgroup_Email_Model_Resource_Rule_Collection extends Mage_SalesRule_Model_Resource_Rule_Collection
4
+ {
5
+
6
+ /**
7
+ * Filter collection by specified website, customer group, coupon code, date.
8
+ * Filter collection to use only active rules.
9
+ * Involved sorting by sort_order column.
10
+ *
11
+ * @param int $websiteId
12
+ * @param int $customerGroupId
13
+ * @param string $couponCode
14
+ * @param string|null $now
15
+ * @use $this->addWebsiteGroupDateFilter()
16
+ *
17
+ * @return Mage_SalesRule_Model_Resource_Rule_Collection
18
+ */
19
+ public function setValidationFilter($websiteId, $customerGroupId, $couponCode = '', $now = null)
20
+ {
21
+ if (!$this->getFlag('validation_filter')) {
22
+
23
+ if (is_null($now)) {
24
+ $now = Mage::getModel('core/date')->date('Y-m-d');
25
+ }
26
+
27
+
28
+ /* We need to overwrite joinLeft if coupon is applied */
29
+ $this->getSelect()->reset();
30
+ Mage_Rule_Model_Resource_Rule_Collection_Abstract::_initSelect();
31
+
32
+ $this->addWebsiteGroupDateFilter($websiteId, $customerGroupId, $now);
33
+ $select = $this->getSelect();
34
+
35
+ $connection = $this->getConnection();
36
+ if (strlen($couponCode)) {
37
+ $select->joinLeft(
38
+ array('rule_coupons' => $this->getTable('salesrule/coupon')),
39
+ $connection->quoteInto(
40
+ 'main_table.rule_id = rule_coupons.rule_id AND main_table.coupon_type != ?',
41
+ Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON
42
+ ),
43
+ array('code')
44
+ );
45
+
46
+ $noCouponCondition = $connection->quoteInto(
47
+ 'main_table.coupon_type = ? ',
48
+ Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON
49
+ );
50
+
51
+ $orWhereConditions = array(
52
+ $connection->quoteInto(
53
+ '(main_table.coupon_type = ? AND rule_coupons.type = 0)',
54
+ Mage_SalesRule_Model_Rule::COUPON_TYPE_AUTO
55
+ ),
56
+ $connection->quoteInto(
57
+ '(main_table.coupon_type = ? AND main_table.use_auto_generation = 1 AND rule_coupons.type = 1)',
58
+ Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC
59
+ ),
60
+ $connection->quoteInto(
61
+ '(main_table.coupon_type = ? AND main_table.use_auto_generation = 0 AND rule_coupons.type = 0)',
62
+ Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC
63
+ ),
64
+ );
65
+ $orWhereCondition = implode(' OR ', $orWhereConditions);
66
+ $select->where(
67
+ $noCouponCondition . ' OR ((' . $orWhereCondition . ') AND rule_coupons.code = ?)', $couponCode
68
+ );
69
+
70
+ $select->where('(rule_coupons.expiration_date IS NULL) AND
71
+ (to_date is null or to_date >= ?)
72
+ OR
73
+ (rule_coupons.expiration_date IS NOT NULL) AND
74
+ (rule_coupons.expiration_date >= ?) ', $now);
75
+ } else {
76
+ $this->addFieldToFilter('main_table.coupon_type', Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON);
77
+ }
78
+
79
+ $select->where('
80
+ (main_table.to_date IS NULL) OR
81
+ (main_table.to_date >= ?)
82
+ ', $now);
83
+
84
+ $this->setOrder('sort_order', self::SORT_ORDER_ASC);
85
+ $this->setFlag('validation_filter', true);
86
+ }
87
+
88
+ return $this;
89
+ }
90
+
91
+ /**
92
+ * Filter collection by website(s), customer group(s) and date.
93
+ * Filter collection to only active rules.
94
+ * Sorting is not involved
95
+ *
96
+ * @param int $websiteId
97
+ * @param int $customerGroupId
98
+ * @param string|null $now
99
+ * @use $this->addWebsiteFilter()
100
+ *
101
+ * @return Mage_SalesRule_Model_Mysql4_Rule_Collection
102
+ */
103
+ public function addWebsiteGroupDateFilter($websiteId, $customerGroupId, $now = null)
104
+ {
105
+
106
+ if (!$this->getFlag('website_group_date_filter')) {
107
+ if (is_null($now)) {
108
+ $now = Mage::getModel('core/date')->date('Y-m-d');
109
+ }
110
+
111
+ $this->addWebsiteFilter($websiteId);
112
+
113
+ $entityInfo = $this->_getAssociatedEntityInfo('customer_group');
114
+ $connection = $this->getConnection();
115
+ $this->getSelect()
116
+ ->joinInner(
117
+ array('customer_group_ids' => $this->getTable($entityInfo['associations_table'])),
118
+ $connection->quoteInto(
119
+ 'main_table.' . $entityInfo['rule_id_field']
120
+ . ' = customer_group_ids.' . $entityInfo['rule_id_field']
121
+ . ' AND customer_group_ids.' . $entityInfo['entity_id_field'] . ' = ?',
122
+ (int)$customerGroupId
123
+ ),
124
+ array()
125
+ )
126
+ ->where('from_date is null or from_date <= ?', $now);
127
+
128
+
129
+ $this->addIsActiveFilter();
130
+
131
+ $this->setFlag('website_group_date_filter', true);
132
+ }
133
+
134
+ return $this;
135
+ }
136
+
137
+ }
app/code/community/Dotdigitalgroup/Email/Model/Rules.php CHANGED
@@ -1,5 +1,8 @@
1
  <?php
2
 
 
 
 
3
  class Dotdigitalgroup_Email_Model_Rules extends Mage_Core_Model_Abstract
4
  {
5
  const ABANDONED = 1;
@@ -13,24 +16,23 @@ class Dotdigitalgroup_Email_Model_Rules extends Mage_Core_Model_Abstract
13
  protected $_used = array();
14
 
15
  /**
16
- * constructor
17
  */
18
  public function _construct()
19
  {
20
  $this->_defaultOptions = Mage::getModel('ddg_automation/adminhtml_source_rules_type')->defaultOptions();
21
- $this->_conditionMap =
22
- array(
23
  'eq' => 'neq',
24
  'neq' => 'eq',
25
- 'gteq' => 'lteq',
26
- 'lteq' => 'gteq',
27
- 'gt' => 'lt',
28
- 'lt' => 'gt',
29
  'like' => 'nlike',
30
  'nlike' => 'like'
31
  );
32
- $this->_attributeMapForQuote =
33
- array(
34
  'method' => 'method',
35
  'shipping_method' => 'shipping_method',
36
  'country_id' => 'country_id',
@@ -43,8 +45,7 @@ class Dotdigitalgroup_Email_Model_Rules extends Mage_Core_Model_Abstract
43
  'items_qty' => 'main_table.items_qty',
44
  'customer_email' => 'main_table.customer_email',
45
  );
46
- $this->_attributeMapForOrder =
47
- array(
48
  'method' => 'method',
49
  'shipping_method' => 'main_table.shipping_method',
50
  'country_id' => 'country_id',
@@ -164,26 +165,31 @@ class Dotdigitalgroup_Email_Model_Rules extends Mage_Core_Model_Abstract
164
  if ($type == self::ABANDONED) {
165
  $collection->getSelect()
166
  ->joinLeft(
167
- array('quote_address' => 'sales_flat_quote_address'),
 
168
  "main_table.entity_id = quote_address.quote_id",
169
  array('shipping_method', 'country_id', 'city', 'region_id')
170
  )->joinLeft(
171
- array('quote_payment' => 'sales_flat_quote_payment'),
 
172
  "main_table.entity_id = quote_payment.quote_id",
173
  array('method')
174
  )->where('address_type = ?', 'shipping');
175
  } elseif ($type == self::REVIEW) {
176
  $collection->getSelect()
177
  ->join(
178
- array('order_address' => 'sales_flat_order_address'),
 
179
  "main_table.entity_id = order_address.parent_id",
180
  array('country_id', 'city', 'region_id')
181
  )->join(
182
- array('order_payment' => 'sales_flat_order_payment'),
 
183
  "main_table.entity_id = order_payment.parent_id",
184
  array('method')
185
  )->join(
186
- array('quote' => 'sales_flat_quote'),
 
187
  "main_table.quote_id = quote.entity_id",
188
  array('items_qty')
189
  )->where('order_address.address_type = ?', 'shipping');
1
  <?php
2
 
3
+ /**
4
+ * Class Dotdigitalgroup_Email_Model_Rules
5
+ */
6
  class Dotdigitalgroup_Email_Model_Rules extends Mage_Core_Model_Abstract
7
  {
8
  const ABANDONED = 1;
16
  protected $_used = array();
17
 
18
  /**
19
+ * Constructor.
20
  */
21
  public function _construct()
22
  {
23
  $this->_defaultOptions = Mage::getModel('ddg_automation/adminhtml_source_rules_type')->defaultOptions();
24
+
25
+ $this->_conditionMap = array(
26
  'eq' => 'neq',
27
  'neq' => 'eq',
28
+ 'gteq' => 'lt',
29
+ 'lteq' => 'gt',
30
+ 'gt' => 'lteq',
31
+ 'lt' => 'gteq',
32
  'like' => 'nlike',
33
  'nlike' => 'like'
34
  );
35
+ $this->_attributeMapForQuote = array(
 
36
  'method' => 'method',
37
  'shipping_method' => 'shipping_method',
38
  'country_id' => 'country_id',
45
  'items_qty' => 'main_table.items_qty',
46
  'customer_email' => 'main_table.customer_email',
47
  );
48
+ $this->_attributeMapForOrder = array(
 
49
  'method' => 'method',
50
  'shipping_method' => 'main_table.shipping_method',
51
  'country_id' => 'country_id',
165
  if ($type == self::ABANDONED) {
166
  $collection->getSelect()
167
  ->joinLeft(
168
+ array('quote_address' => Mage::getSingleton('core/resource')
169
+ ->getTableName('sales_flat_quote_address')),
170
  "main_table.entity_id = quote_address.quote_id",
171
  array('shipping_method', 'country_id', 'city', 'region_id')
172
  )->joinLeft(
173
+ array('quote_payment' => Mage::getSingleton('core/resource')
174
+ ->getTableName('sales_flat_quote_payment')),
175
  "main_table.entity_id = quote_payment.quote_id",
176
  array('method')
177
  )->where('address_type = ?', 'shipping');
178
  } elseif ($type == self::REVIEW) {
179
  $collection->getSelect()
180
  ->join(
181
+ array('order_address' => Mage::getSingleton('core/resource')
182
+ ->getTableName('sales_flat_order_address')),
183
  "main_table.entity_id = order_address.parent_id",
184
  array('country_id', 'city', 'region_id')
185
  )->join(
186
+ array('order_payment' => Mage::getSingleton('core/resource')
187
+ ->getTableName('sales_flat_order_payment')),
188
  "main_table.entity_id = order_payment.parent_id",
189
  array('method')
190
  )->join(
191
+ array('quote' => Mage::getSingleton('core/resource')
192
+ ->getTableName('sales_flat_quote')),
193
  "main_table.quote_id = quote.entity_id",
194
  array('items_qty')
195
  )->where('order_address.address_type = ?', 'shipping');
app/code/community/Dotdigitalgroup/Email/Model/Sales/Observer.php CHANGED
@@ -142,37 +142,73 @@ class Dotdigitalgroup_Email_Model_Sales_Observer
142
  $programType = 'XML_PATH_CONNECTOR_AUTOMATION_STUDIO_ORDER';
143
  $automationType
144
  = Dotdigitalgroup_Email_Model_Automation::AUTOMATION_TYPE_NEW_ORDER;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  }
146
 
147
  $programId = Mage::helper('ddg')->getAutomationIdByType(
148
  $programType, $order->getWebsiteId()
149
  );
150
 
151
- //the program is not mappped
152
- if ( ! $programId) {
153
- Mage::log(
154
- 'automation type : ' . $automationType . ' program id not found'
 
 
 
 
 
 
 
155
  );
156
-
157
- return $this;
158
  }
 
 
 
 
 
 
159
  try {
160
  $automation = Mage::getModel('ddg_automation/automation');
161
- $automation->setEmail($email)
162
- ->setAutomationType($automationType)
163
  ->setEnrolmentStatus(
164
  Dotdigitalgroup_Email_Model_Automation::AUTOMATION_STATUS_PENDING
165
  )
166
- ->setTypeId($order->getId())
167
- ->setWebsiteId($website->getId())
168
- ->setStoreName($storeName)
169
- ->setProgramId($programId)
170
  ->save();
171
  } catch (Exception $e) {
172
  Mage::logException($e);
173
  }
174
-
175
- return $this;
176
  }
177
 
178
  /**
142
  $programType = 'XML_PATH_CONNECTOR_AUTOMATION_STUDIO_ORDER';
143
  $automationType
144
  = Dotdigitalgroup_Email_Model_Automation::AUTOMATION_TYPE_NEW_ORDER;
145
+
146
+ if ($order->getCustomerId()) {
147
+ //If customer's first order
148
+ $orders = Mage::getModel('sales/order')
149
+ ->getCollection()
150
+ ->addFieldToFilter('customer_id', $order->getCustomerId());
151
+
152
+ if ($orders->getSize() == 1) {
153
+ $automationTypeNewOrder
154
+ = Dotdigitalgroup_Email_Model_Automation::AUTOMATION_TYPE_CUSTOMER_FIRST_ORDER;
155
+ $programIdNewOrder = Mage::helper('ddg')->getAutomationIdByType(
156
+ 'XML_PATH_CONNECTOR_AUTOMATION_STUDIO_NEW_ORDER', $order->getWebsiteId()
157
+ );
158
+
159
+ //send to automation queue
160
+ $this->_doAutomationEnrolment(
161
+ array(
162
+ 'programId' => $programIdNewOrder,
163
+ 'automationType' => $automationTypeNewOrder,
164
+ 'email' => $email,
165
+ 'order_id' => $order->getId(),
166
+ 'website_id' => $website->getId(),
167
+ 'store_name' => $storeName
168
+ )
169
+ );
170
+ }
171
+ }
172
  }
173
 
174
  $programId = Mage::helper('ddg')->getAutomationIdByType(
175
  $programType, $order->getWebsiteId()
176
  );
177
 
178
+ if ($programId) {
179
+ //send to automation queue
180
+ $this->_doAutomationEnrolment(
181
+ array(
182
+ 'programId' => $programId,
183
+ 'automationType' => $automationType,
184
+ 'email' => $email,
185
+ 'order_id' => $order->getId(),
186
+ 'website_id' => $website->getId(),
187
+ 'store_name' => $storeName
188
+ )
189
  );
 
 
190
  }
191
+
192
+ return $this;
193
+ }
194
+
195
+ protected function _doAutomationEnrolment($data)
196
+ {
197
  try {
198
  $automation = Mage::getModel('ddg_automation/automation');
199
+ $automation->setEmail($data['email'])
200
+ ->setAutomationType($data['automationType'])
201
  ->setEnrolmentStatus(
202
  Dotdigitalgroup_Email_Model_Automation::AUTOMATION_STATUS_PENDING
203
  )
204
+ ->setTypeId($data['order_id'])
205
+ ->setWebsiteId($data['website_id'])
206
+ ->setStoreName($data['store_name'])
207
+ ->setProgramId($data['programId'])
208
  ->save();
209
  } catch (Exception $e) {
210
  Mage::logException($e);
211
  }
 
 
212
  }
213
 
214
  /**
app/code/community/Dotdigitalgroup/Email/Model/Sales/Order.php CHANGED
@@ -26,6 +26,7 @@ class Dotdigitalgroup_Email_Model_Sales_Order
26
  protected $_orderIds;
27
  protected $_orderReminderReviewArray = array();
28
  protected $_orderIdsForSingleSync;
 
29
 
30
  /**
31
  * initial sync the transactional data
@@ -92,6 +93,12 @@ class Dotdigitalgroup_Email_Model_Sales_Order
92
  }
93
  unset($this->_accounts[$account->getApiUsername()]);
94
  }
 
 
 
 
 
 
95
 
96
  if ($this->_countOrders) {
97
  $response['message'] = 'Number of updated orders : '
@@ -217,11 +224,17 @@ class Dotdigitalgroup_Email_Model_Sales_Order
217
  $storeId = $order->getStoreId();
218
  $websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
219
  /**
220
- * Add guest to contacts table.
221
  */
222
- if ($order->getCustomerIsGuest()) {
223
- $this->_createGuestContact(
224
- $order->getCustomerEmail(), $websiteId, $storeId
 
 
 
 
 
 
225
  );
226
  }
227
  if ($order->getId()) {
@@ -244,86 +257,6 @@ class Dotdigitalgroup_Email_Model_Sales_Order
244
  return $orders;
245
  }
246
 
247
- /**
248
- * Create a guest contact.
249
- *
250
- * @param $email
251
- * @param $websiteId
252
- * @param $storeId
253
- *
254
- * @return bool
255
- */
256
- protected function _createGuestContact($email, $websiteId, $storeId)
257
- {
258
-
259
- try {
260
- $client = Mage::helper('ddg')->getWebsiteApiClient($websiteId);
261
- //no api credentials or the guest has no been mapped
262
- if ( ! $client
263
- || ! $addressBookId = Mage::helper('ddg')->getGuestAddressBook(
264
- $websiteId
265
- )
266
- ) {
267
- return false;
268
- }
269
-
270
- $contactModel = Mage::getModel('ddg_automation/contact')
271
- ->loadByCustomerEmail($email, $websiteId);
272
-
273
- //check if contact is not suppressed
274
- if ( ! $contactModel->getSuppressed()) {
275
- //check if contact exists, create if not
276
- $contactApi = $client->postContacts($email);
277
-
278
- //contact is suppressed cannot add to address book, mark as suppressed.
279
- if (isset($contactApi->message)
280
- && $contactApi->message
281
- == 'Contact is suppressed. ERROR_CONTACT_SUPPRESSED'
282
- ) {
283
- //mark new contacts as guest.
284
- if ($contactModel->isObjectNew()) {
285
- $contactModel->setIsGuest(1);
286
- }
287
- $contactModel->setSuppressed(1);
288
- $contactModel->save();
289
-
290
- return false;
291
- }
292
- //add guest to address book
293
- $response = $client->postAddressBookContacts(
294
- $addressBookId, $contactApi
295
- );
296
- //set contact as was found as guest and
297
- $contactModel->setIsGuest(1)
298
- ->setStoreId($storeId)
299
- ->setEmailImported(1);
300
- //contact id
301
- if (isset($contactApi->id)) {
302
- $contactModel->setContactId();
303
- }
304
- //mark the contact as surpressed
305
- if (isset($response->message)
306
- && $response->message
307
- == 'Contact is suppressed. ERROR_CONTACT_SUPPRESSED'
308
- ) {
309
- $contactModel->setSuppressed(1);
310
- }
311
- //save
312
- $contactModel->save();
313
- }
314
-
315
- Mage::helper('ddg')->log(
316
- '-- guest found : ' . $email . ' website : ' . $websiteId
317
- . ' ,store : ' . $storeId
318
- );
319
- } catch (Exception $e) {
320
- Mage::logException($e);
321
- }
322
-
323
- return true;
324
- }
325
-
326
-
327
  /**
328
  * create product reminder campaigns
329
  *
26
  protected $_orderIds;
27
  protected $_orderReminderReviewArray = array();
28
  protected $_orderIdsForSingleSync;
29
+ protected $_guests = array();
30
 
31
  /**
32
  * initial sync the transactional data
93
  }
94
  unset($this->_accounts[$account->getApiUsername()]);
95
  }
96
+ /**
97
+ * Add guest to contacts table.
98
+ */
99
+ if (!empty($this->_guests)) {
100
+ Mage::getResourceModel('ddg_automation/contact')->insert($this->_guests);
101
+ }
102
 
103
  if ($this->_countOrders) {
104
  $response['message'] = 'Number of updated orders : '
224
  $storeId = $order->getStoreId();
225
  $websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
226
  /**
227
+ * Add guest to array to add to contacts table.
228
  */
229
+ if ($order->getCustomerIsGuest()
230
+ && $order->getCustomerEmail()
231
+ ) {
232
+ //add guest to the list
233
+ $this->_guests[] = array(
234
+ 'email' => $order->getCustomerEmail(),
235
+ 'website_id' => $websiteId,
236
+ 'store_id' => $storeId,
237
+ 'is_guest' => 1
238
  );
239
  }
240
  if ($order->getId()) {
257
  return $orders;
258
  }
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  /**
261
  * create product reminder campaigns
262
  *
app/code/community/Dotdigitalgroup/Email/Model/Wishlist.php CHANGED
@@ -3,9 +3,22 @@
3
  class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
4
  {
5
 
 
 
 
6
  protected $_start;
 
 
 
 
7
  protected $_wishlists;
 
 
 
8
  protected $_count = 0;
 
 
 
9
  protected $_wishlistIds;
10
 
11
  /**
@@ -18,7 +31,7 @@ class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
18
  }
19
 
20
  /**
21
- * @return $this|Mage_Core_Model_Abstract
22
  */
23
  protected function _beforeSave()
24
  {
@@ -51,6 +64,11 @@ class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
51
  return false;
52
  }
53
 
 
 
 
 
 
54
  public function sync()
55
  {
56
  $response = array('success' => true, 'message' => '');
@@ -103,13 +121,17 @@ class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
103
  $this->_exportWishlistForWebsiteInSingle($website);
104
  }
105
  }
106
- $response['message'] = "wishlist updated: " . $this->_count;
107
 
108
  return $response;
109
  }
110
 
111
- protected function _exportWishlistForWebsite(Mage_Core_Model_Website $website
112
- )
 
 
 
 
113
  {
114
  //reset wishlists
115
  $this->_wishlists = array();
@@ -131,7 +153,8 @@ class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
131
 
132
  $collection->getSelect()
133
  ->joinLeft(
134
- array('c' => 'customer_entity'),
 
135
  'c.entity_id = customer_id',
136
  array('email', 'store_id')
137
  );
@@ -166,9 +189,15 @@ class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
166
  }
167
  }
168
 
169
- protected function _getWishlistToImport(Mage_Core_Model_Website $website,
170
- $limit = 100
171
- )
 
 
 
 
 
 
172
  {
173
  $collection = $this->getCollection()
174
  ->addFieldToFilter('wishlist_imported', array('null' => true))
@@ -182,8 +211,12 @@ class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
182
  return $collection;
183
  }
184
 
185
- protected function _exportWishlistForWebsiteInSingle(Mage_Core_Model_Website $website
186
- )
 
 
 
 
187
  {
188
  $helper = Mage::helper('ddg');
189
  $limit = $helper->getWebsiteConfig(
@@ -201,7 +234,8 @@ class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
201
  ->addFieldToFilter('wishlist_id', array('in' => $wishlistIds));
202
  $wishlistCollection->getSelect()
203
  ->joinLeft(
204
- array('c' => 'customer_entity'),
 
205
  'c.entity_id = customer_id',
206
  array('email', 'store_id')
207
  );
@@ -262,9 +296,15 @@ class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
262
  }
263
  }
264
 
265
- protected function _getModifiedWishlistToImport(Mage_Core_Model_Website $website,
266
- $limit = 100
267
- )
 
 
 
 
 
 
268
  {
269
  $collection = $this->getCollection()
270
  ->addFieldToFilter('wishlist_modified', 1)
3
  class Dotdigitalgroup_Email_Model_Wishlist extends Mage_Core_Model_Abstract
4
  {
5
 
6
+ /**
7
+ * @var int
8
+ */
9
  protected $_start;
10
+ /**
11
+ *
12
+ * @var array
13
+ */
14
  protected $_wishlists;
15
+ /**
16
+ * @var int
17
+ */
18
  protected $_count = 0;
19
+ /**
20
+ * @var array
21
+ */
22
  protected $_wishlistIds;
23
 
24
  /**
31
  }
32
 
33
  /**
34
+ * @return $this
35
  */
36
  protected function _beforeSave()
37
  {
64
  return false;
65
  }
66
 
67
+ /**
68
+ * Sync wishlists.
69
+ *
70
+ * @return array
71
+ */
72
  public function sync()
73
  {
74
  $response = array('success' => true, 'message' => '');
121
  $this->_exportWishlistForWebsiteInSingle($website);
122
  }
123
  }
124
+ $response['message'] = "Wishlists updated: " . $this->_count;
125
 
126
  return $response;
127
  }
128
 
129
+ /**
130
+ * Sync single wishlist.
131
+ *
132
+ * @param Mage_Core_Model_Website $website
133
+ */
134
+ protected function _exportWishlistForWebsite(Mage_Core_Model_Website $website)
135
  {
136
  //reset wishlists
137
  $this->_wishlists = array();
153
 
154
  $collection->getSelect()
155
  ->joinLeft(
156
+ array('c' => Mage::getSingleton('core/resource')
157
+ ->getTableName('customer/entity')),
158
  'c.entity_id = customer_id',
159
  array('email', 'store_id')
160
  );
189
  }
190
  }
191
 
192
+ /**
193
+ * Get wishlists pending for sync.
194
+ *
195
+ * @param Mage_Core_Model_Website $website
196
+ * @param int $limit
197
+ *
198
+ * @return Mage_Eav_Model_Entity_Collection_Abstract
199
+ */
200
+ protected function _getWishlistToImport(Mage_Core_Model_Website $website, $limit = 100)
201
  {
202
  $collection = $this->getCollection()
203
  ->addFieldToFilter('wishlist_imported', array('null' => true))
211
  return $collection;
212
  }
213
 
214
+ /**
215
+ * Get wishlists pending for sync.
216
+ *
217
+ * @param Mage_Core_Model_Website $website
218
+ */
219
+ protected function _exportWishlistForWebsiteInSingle(Mage_Core_Model_Website $website)
220
  {
221
  $helper = Mage::helper('ddg');
222
  $limit = $helper->getWebsiteConfig(
234
  ->addFieldToFilter('wishlist_id', array('in' => $wishlistIds));
235
  $wishlistCollection->getSelect()
236
  ->joinLeft(
237
+ array('c' => Mage::getSingleton('core/resource')
238
+ ->getTableName('customer/entity')),
239
  'c.entity_id = customer_id',
240
  array('email', 'store_id')
241
  );
296
  }
297
  }
298
 
299
+ /**
300
+ * Get wishlists marked as modified.
301
+ *
302
+ * @param Mage_Core_Model_Website $website
303
+ * @param int $limit
304
+ *
305
+ * @return mixed
306
+ */
307
+ protected function _getModifiedWishlistToImport(Mage_Core_Model_Website $website, $limit = 100)
308
  {
309
  $collection = $this->getCollection()
310
  ->addFieldToFilter('wishlist_modified', 1)
app/code/community/Dotdigitalgroup/Email/controllers/Adminhtml/ConnectorController.php CHANGED
@@ -151,7 +151,7 @@ class Dotdigitalgroup_Email_Adminhtml_ConnectorController extends Mage_Adminhtml
151
  //api client for this website
152
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
153
  //only if all data is available
154
- if ($name && $type && $access) {
155
  //create datafield
156
  $response = $client->postDataFields($name, $type, $access, $default);
157
  //error creating datafield message
@@ -179,7 +179,7 @@ class Dotdigitalgroup_Email_Adminhtml_ConnectorController extends Mage_Adminhtml
179
  $visibility = $this->getRequest()->getParam('visibility');
180
  $website = $this->getRequest()->getParam('website', 0);
181
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
182
- if (strlen($addressBookName)) {
183
  $response = $client->postAddressBooks($addressBookName, $visibility);
184
  if (isset($response->message))
185
  Mage::getSingleton('adminhtml/session')->addError($response->message);
151
  //api client for this website
152
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
153
  //only if all data is available
154
+ if ($name && $type && $access && $client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
155
  //create datafield
156
  $response = $client->postDataFields($name, $type, $access, $default);
157
  //error creating datafield message
179
  $visibility = $this->getRequest()->getParam('visibility');
180
  $website = $this->getRequest()->getParam('website', 0);
181
  $client = Mage::helper('ddg')->getWebsiteApiClient($website);
182
+ if (strlen($addressBookName) && $client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
183
  $response = $client->postAddressBooks($addressBookName, $visibility);
184
  if (isset($response->message))
185
  Mage::getSingleton('adminhtml/session')->addError($response->message);
app/code/community/Dotdigitalgroup/Email/controllers/Adminhtml/Email/CampaignController.php CHANGED
@@ -117,4 +117,14 @@ class Dotdigitalgroup_Email_Adminhtml_Email_CampaignController
117
  );
118
  }
119
 
 
 
 
 
 
 
 
 
 
 
120
  }
117
  );
118
  }
119
 
120
+ public function exportCsvAction()
121
+ {
122
+ $fileName = 'campaign.csv';
123
+ $content = $this->getLayout()->createBlock(
124
+ 'ddg_automation/adminhtml_campaign_grid'
125
+ )
126
+ ->getCsvFile();
127
+ $this->_prepareDownloadResponse($fileName, $content);
128
+ }
129
+
130
  }
app/code/community/Dotdigitalgroup/Email/controllers/Adminhtml/System/Email/TemplateController.php CHANGED
@@ -42,11 +42,13 @@ class Dotdigitalgroup_Email_Adminhtml_System_Email_TemplateController
42
  $client = Mage::helper('ddg')->getWebsiteApiClient(
43
  Mage::app()->getWebsite()
44
  );
45
- $connectorTemplate = $client->getApiTemplate($connectorTemplateId);
46
- if (isset($connectorTemplate->id)) {
47
- $template->setTemplateText($connectorTemplate->htmlContent);
 
 
 
48
  }
49
- $template->setTemplateStyles('');
50
  }
51
 
52
  $this->getResponse()->setBody(
42
  $client = Mage::helper('ddg')->getWebsiteApiClient(
43
  Mage::app()->getWebsite()
44
  );
45
+ if ($client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {
46
+ $connectorTemplate = $client->getApiTemplate($connectorTemplateId);
47
+ if (isset($connectorTemplate->id)) {
48
+ $template->setTemplateText($connectorTemplate->htmlContent);
49
+ }
50
+ $template->setTemplateStyles('');
51
  }
 
52
  }
53
 
54
  $this->getResponse()->setBody(
app/code/community/Dotdigitalgroup/Email/etc/adminhtml.xml CHANGED
@@ -60,12 +60,12 @@
60
  <action>adminhtml/email_importer</action>
61
  </email_connector_importer>
62
  <email_connector_campaign translate="title">
63
- <title>Email Status</title>
64
  <sort_order>80</sort_order>
65
  <action>adminhtml/email_campaign</action>
66
  </email_connector_campaign>
67
  <email_connector_automation translate="title">
68
- <title>Automation Status</title>
69
  <sort_order>90</sort_order>
70
  <action>adminhtml/email_automation</action>
71
  </email_connector_automation>
60
  <action>adminhtml/email_importer</action>
61
  </email_connector_importer>
62
  <email_connector_campaign translate="title">
63
+ <title>Campaign Sends</title>
64
  <sort_order>80</sort_order>
65
  <action>adminhtml/email_campaign</action>
66
  </email_connector_campaign>
67
  <email_connector_automation translate="title">
68
+ <title>Automation Enrolments</title>
69
  <sort_order>90</sort_order>
70
  <action>adminhtml/email_automation</action>
71
  </email_connector_automation>
app/code/community/Dotdigitalgroup/Email/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Dotdigitalgroup_Email>
5
- <version>6.1.0</version>
6
  </Dotdigitalgroup_Email>
7
  </modules>
8
  <frontend>
@@ -122,6 +122,12 @@
122
  <email>Dotdigitalgroup_Email_Model_Email</email>
123
  </rewrite>
124
  </core>
 
 
 
 
 
 
125
  </models>
126
  <helpers>
127
  <ddg>
@@ -341,6 +347,15 @@
341
  </updates>
342
  </layout>
343
  <events>
 
 
 
 
 
 
 
 
 
344
  <controller_action_predispatch>
345
  <observers>
346
  <ddg_feed>
@@ -495,6 +510,7 @@
495
  <guest_order_automation>0</guest_order_automation>
496
  <review_automation>0</review_automation>
497
  <wishlist_automation>0</wishlist_automation>
 
498
  </visitor_automation>
499
  <order_status_automation>
500
  <status_to_automation></status_to_automation>
@@ -518,19 +534,19 @@
518
  <connector_dynamic_content>
519
  <products>
520
  <related_display_type>grid</related_display_type>
521
- <related_items_to_display>2</related_items_to_display>
522
  <upsell_display_type>grid</upsell_display_type>
523
- <upsell_items_to_display>2</upsell_items_to_display>
524
  <crosssell_display_type>grid</crosssell_display_type>
525
- <crosssell_items_to_display>2</crosssell_items_to_display>
526
  <bestsellers_display_type>grid</bestsellers_display_type>
527
- <bestsellers_items_to_display>2</bestsellers_items_to_display>
528
  <bestsellers_time_period></bestsellers_time_period>
529
  <most_viewed_display_type>grid</most_viewed_display_type>
530
- <most_viewed_items_to_display>2</most_viewed_items_to_display>
531
  <most_viewed_time_period></most_viewed_time_period>
532
  <recently_viewed_display_type>grid</recently_viewed_display_type>
533
- <recently_viewed_items_to_display>2</recently_viewed_items_to_display>
534
  <review_display_type>grid</review_display_type>
535
  <wishlist_display_type>grid</wishlist_display_type>
536
  </products>
@@ -567,7 +583,7 @@
567
  </external_dynamic_content_urls>
568
  <manual_product_search>
569
  <display_type>list</display_type>
570
- <items_to_display>2</items_to_display>
571
  <products_push_items></products_push_items>
572
  </manual_product_search>
573
  <fallback_products>
@@ -628,6 +644,7 @@
628
  <coupon_style></coupon_style>
629
  <coupon_font_picker><![CDATA[Arial, Helvetica, sans-serif]]></coupon_font_picker>
630
  <coupon_doc_color><![CDATA[#FFFFFF]]></coupon_doc_color>
 
631
  </dynamic_content_style>
632
  <dynamic_content_edit>
633
  <link_text></link_text>
@@ -759,7 +776,7 @@
759
  <test_connect></test_connect>
760
  </oauth>
761
  <ip_restriction>
762
- <ip_addresses>94.143.111.2, 94.143.111.3</ip_addresses>
763
  </ip_restriction>
764
  <cron_schedules>
765
  <importer>*/5 * * * *</importer>
2
  <config>
3
  <modules>
4
  <Dotdigitalgroup_Email>
5
+ <version>6.2.0</version>
6
  </Dotdigitalgroup_Email>
7
  </modules>
8
  <frontend>
122
  <email>Dotdigitalgroup_Email_Model_Email</email>
123
  </rewrite>
124
  </core>
125
+ <salesrule_resource>
126
+ <rewrite>
127
+ <rule_collection>Dotdigitalgroup_Email_Model_Resource_Rule_Collection</rule_collection>
128
+ <coupon>Dotdigitalgroup_Email_Model_Resource_Coupon</coupon>
129
+ </rewrite>
130
+ </salesrule_resource>
131
  </models>
132
  <helpers>
133
  <ddg>
347
  </updates>
348
  </layout>
349
  <events>
350
+ <core_block_abstract_to_html_before>
351
+ <observers>
352
+ <ddg_add_column_expiration_date>
353
+ <type>singleton</type>
354
+ <class>ddg_automation/observer</class>
355
+ <method>beforeBlockToHtml</method>
356
+ </ddg_add_column_expiration_date>
357
+ </observers>
358
+ </core_block_abstract_to_html_before>
359
  <controller_action_predispatch>
360
  <observers>
361
  <ddg_feed>
510
  <guest_order_automation>0</guest_order_automation>
511
  <review_automation>0</review_automation>
512
  <wishlist_automation>0</wishlist_automation>
513
+ <first_order_automation>0</first_order_automation>
514
  </visitor_automation>
515
  <order_status_automation>
516
  <status_to_automation></status_to_automation>
534
  <connector_dynamic_content>
535
  <products>
536
  <related_display_type>grid</related_display_type>
537
+ <related_items_to_display>4</related_items_to_display>
538
  <upsell_display_type>grid</upsell_display_type>
539
+ <upsell_items_to_display>4</upsell_items_to_display>
540
  <crosssell_display_type>grid</crosssell_display_type>
541
+ <crosssell_items_to_display>4</crosssell_items_to_display>
542
  <bestsellers_display_type>grid</bestsellers_display_type>
543
+ <bestsellers_items_to_display>4</bestsellers_items_to_display>
544
  <bestsellers_time_period></bestsellers_time_period>
545
  <most_viewed_display_type>grid</most_viewed_display_type>
546
+ <most_viewed_items_to_display>4</most_viewed_items_to_display>
547
  <most_viewed_time_period></most_viewed_time_period>
548
  <recently_viewed_display_type>grid</recently_viewed_display_type>
549
+ <recently_viewed_items_to_display>4</recently_viewed_items_to_display>
550
  <review_display_type>grid</review_display_type>
551
  <wishlist_display_type>grid</wishlist_display_type>
552
  </products>
583
  </external_dynamic_content_urls>
584
  <manual_product_search>
585
  <display_type>list</display_type>
586
+ <items_to_display>4</items_to_display>
587
  <products_push_items></products_push_items>
588
  </manual_product_search>
589
  <fallback_products>
644
  <coupon_style></coupon_style>
645
  <coupon_font_picker><![CDATA[Arial, Helvetica, sans-serif]]></coupon_font_picker>
646
  <coupon_doc_color><![CDATA[#FFFFFF]]></coupon_doc_color>
647
+ <product_image>0</product_image>
648
  </dynamic_content_style>
649
  <dynamic_content_edit>
650
  <link_text></link_text>
776
  <test_connect></test_connect>
777
  </oauth>
778
  <ip_restriction>
779
+ <ip_addresses>94.143.111.1, 94.143.111.2, 94.143.111.3, 104.208.235.109, 52.174.92.164</ip_addresses>
780
  </ip_restriction>
781
  <cron_schedules>
782
  <importer>*/5 * * * *</importer>
app/code/community/Dotdigitalgroup/Email/etc/system.xml CHANGED
@@ -1331,8 +1331,17 @@
1331
  <show_in_website>1</show_in_website>
1332
  <show_in_store>0</show_in_store>
1333
  </subscriber_automation>
 
 
 
 
 
 
 
 
 
1334
  <order_automation>
1335
- <label>New Customer Order</label>
1336
  <frontend_type>select</frontend_type>
1337
  <source_model>ddg_automation/adminhtml_source_automation_programme</source_model>
1338
  <sort_order>120</sort_order>
@@ -1341,7 +1350,7 @@
1341
  <show_in_store>0</show_in_store>
1342
  </order_automation>
1343
  <guest_order_automation>
1344
- <label>New Guest Order</label>
1345
  <frontend_type>select</frontend_type>
1346
  <source_model>ddg_automation/adminhtml_source_automation_programme</source_model>
1347
  <sort_order>130</sort_order>
@@ -2383,6 +2392,16 @@
2383
  <show_in_store>0</show_in_store>
2384
  <comment><![CDATA[Please provide the link text. If no text provided then default text will be used.]]></comment>
2385
  </link_text>
 
 
 
 
 
 
 
 
 
 
2386
  <name_title title="label" module="ddg">
2387
  <label>Product Name</label>
2388
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
@@ -3140,8 +3159,8 @@
3140
  <show_in_default>1</show_in_default>
3141
  <show_in_website>1</show_in_website>
3142
  <show_in_store>0</show_in_store>
3143
- <comment>Enter ip addresses separated by comma (,). Always keep these ip's 94.143.111.2, 94.143.111.3 to stay secure,
3144
- empty list will ignore security check.</comment>
3145
  </ip_addresses>
3146
  </fields>
3147
  </ip_restriction>
1331
  <show_in_website>1</show_in_website>
1332
  <show_in_store>0</show_in_store>
1333
  </subscriber_automation>
1334
+ <first_order_automation>
1335
+ <label>First Customer Order</label>
1336
+ <frontend_type>select</frontend_type>
1337
+ <source_model>ddg_automation/adminhtml_source_automation_programme</source_model>
1338
+ <sort_order>115</sort_order>
1339
+ <show_in_default>1</show_in_default>
1340
+ <show_in_website>1</show_in_website>
1341
+ <show_in_store>0</show_in_store>
1342
+ </first_order_automation>
1343
  <order_automation>
1344
+ <label>Customer Order</label>
1345
  <frontend_type>select</frontend_type>
1346
  <source_model>ddg_automation/adminhtml_source_automation_programme</source_model>
1347
  <sort_order>120</sort_order>
1350
  <show_in_store>0</show_in_store>
1351
  </order_automation>
1352
  <guest_order_automation>
1353
+ <label>Guest Order</label>
1354
  <frontend_type>select</frontend_type>
1355
  <source_model>ddg_automation/adminhtml_source_automation_programme</source_model>
1356
  <sort_order>130</sort_order>
2392
  <show_in_store>0</show_in_store>
2393
  <comment><![CDATA[Please provide the link text. If no text provided then default text will be used.]]></comment>
2394
  </link_text>
2395
+ <product_image translate="label" module="ddg">
2396
+ <label>Image Source For Configurable Child Product</label>
2397
+ <frontend_type>select</frontend_type>
2398
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2399
+ <sort_order>30</sort_order>
2400
+ <show_in_default>1</show_in_default>
2401
+ <show_in_website>1</show_in_website>
2402
+ <show_in_store>0</show_in_store>
2403
+ <comment><![CDATA[Fetch image for simple product from configurable product if selected Yes. Otherwise image will be fetched from simple product.]]></comment>
2404
+ </product_image>
2405
  <name_title title="label" module="ddg">
2406
  <label>Product Name</label>
2407
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
3159
  <show_in_default>1</show_in_default>
3160
  <show_in_website>1</show_in_website>
3161
  <show_in_store>0</show_in_store>
3162
+ <comment><![CDATA[Enter IP addresses separated by comma (,). An empty list will ignore any security check. Please ensure you keep the latest dotmailer IP ranges included
3163
+ <a href="https://support.dotmailer.com/hc/en-gb/articles/216282318-Security-settings#ip" target="_blank"> here</a>.]]></comment>
3164
  </ip_addresses>
3165
  </fields>
3166
  </ip_restriction>
app/code/community/Dotdigitalgroup/Email/sql/email_connector_setup/mysql4-install-5.0.0.php CHANGED
@@ -431,6 +431,29 @@ $insertArray = array('email', 'is_subscriber', 'subscriber_status', 'store_id');
431
  $sqlQuery = $select->insertFromSelect($contactTable, $insertArray, false);
432
  $installer->getConnection()->query($sqlQuery);
433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
  //Insert and populate email order the table
435
  $select = $installer->getConnection()->select()
436
  ->from(
431
  $sqlQuery = $select->insertFromSelect($contactTable, $insertArray, false);
432
  $installer->getConnection()->query($sqlQuery);
433
 
434
+
435
+ //Update contacts with customers that are subscribers
436
+ $select = $installer->getConnection()->select();
437
+
438
+ //join
439
+ $select->joinLeft(
440
+ array('ns' => $installer->getTable('newsletter/subscriber')),
441
+ "dc.customer_id = ns.customer_id",
442
+ array(
443
+ 'is_subscriber' => new Zend_Db_Expr('1'),
444
+ 'subscriber_status' => new Zend_Db_Expr('1')
445
+ )
446
+ )
447
+ ->where('ns.subscriber_status =?', 1);
448
+
449
+ //update query from select
450
+ $updateSql = $select->crossUpdateFromSelect(array('dc' => $contactTable));
451
+
452
+ //run query
453
+ $installer->getConnection()->query($updateSql);
454
+
455
+
456
+
457
  //Insert and populate email order the table
458
  $select = $installer->getConnection()->select()
459
  ->from(
app/code/community/Dotdigitalgroup/Email/sql/email_connector_setup/mysql4-install-6.0.0.php ADDED
@@ -0,0 +1,1521 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /** @var Mage_Eav_Model_Entity_Setup $installer */
4
+
5
+ $installer = $this;
6
+ $installer->startSetup();
7
+
8
+ /**
9
+ * create Contact table.
10
+ */
11
+ $contactTable = $installer->getTable('ddg_automation/contact');
12
+
13
+ if ($installer->getConnection()->isTableExists($contactTable)) {
14
+ $installer->getConnection()->dropTable($contactTable);
15
+ }
16
+
17
+ $table = $installer->getConnection()->newTable($contactTable);
18
+ $table->addColumn(
19
+ 'email_contact_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
20
+ 'primary' => true,
21
+ 'identity' => true,
22
+ 'unsigned' => true,
23
+ 'nullable' => false
24
+ ), 'Primary Key'
25
+ )
26
+ ->addColumn(
27
+ 'is_guest', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
28
+ 'unsigned' => true,
29
+ 'nullable' => true,
30
+ ), 'Is Guest'
31
+ )
32
+ ->addColumn(
33
+ 'contact_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
34
+ 'unsigned' => true,
35
+ 'nullable' => true,
36
+ ), 'Connector Contact ID'
37
+ )
38
+ ->addColumn(
39
+ 'customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
40
+ 'unsigned' => true,
41
+ 'nullable' => false,
42
+ ), 'Customer ID'
43
+ )
44
+ ->addColumn(
45
+ 'website_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
46
+ 'unsigned' => true,
47
+ 'nullable' => false,
48
+ 'default' => '0'
49
+ ), 'Website ID'
50
+ )
51
+ ->addColumn(
52
+ 'store_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
53
+ 'unsigned' => true,
54
+ 'nullable' => false,
55
+ 'default' => '0'
56
+ ), 'Store ID'
57
+ )
58
+ ->addColumn(
59
+ 'email', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
60
+ 'nullable' => false,
61
+ 'default' => ''
62
+ ), 'Customer Email'
63
+ )
64
+ ->addColumn(
65
+ 'is_subscriber', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
66
+ 'unsigned' => true,
67
+ 'nullable' => true,
68
+ ), 'Is Subscriber'
69
+ )
70
+ ->addColumn(
71
+ 'subscriber_status', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
72
+ 'unsigned' => true,
73
+ 'nullable' => true,
74
+ ), 'Subscriber status'
75
+ )
76
+ ->addColumn(
77
+ 'email_imported', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
78
+ 'unsigned' => true,
79
+ 'nullable' => true,
80
+ ), 'Is Imported'
81
+ )
82
+ ->addColumn(
83
+ 'subscriber_imported', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
84
+ 'unsigned' => true,
85
+ 'nullable' => true,
86
+ ), 'Subscriber Imported'
87
+ )
88
+ ->addColumn(
89
+ 'suppressed', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
90
+ 'unsigned' => true,
91
+ 'nullable' => true,
92
+ ), 'Is Suppressed'
93
+ )
94
+ ->addIndex(
95
+ $installer->getIdxName($contactTable, array('email_contact_id')),
96
+ array('email_contact_id')
97
+ )
98
+ ->addIndex(
99
+ $installer->getIdxName($contactTable, array('is_guest')),
100
+ array('is_guest')
101
+ )
102
+ ->addIndex(
103
+ $installer->getIdxName($contactTable, array('customer_id')),
104
+ array('customer_id')
105
+ )
106
+ ->addIndex(
107
+ $installer->getIdxName($contactTable, array('website_id')),
108
+ array('website_id')
109
+ )
110
+ ->addIndex(
111
+ $installer->getIdxName($contactTable, array('is_subscriber')),
112
+ array('is_subscriber')
113
+ )
114
+ ->addIndex(
115
+ $installer->getIdxName($contactTable, array('subscriber_status')),
116
+ array('subscriber_status')
117
+ )
118
+ ->addIndex(
119
+ $installer->getIdxName($contactTable, array('email_imported')),
120
+ array('email_imported')
121
+ )
122
+ ->addIndex(
123
+ $installer->getIdxName($contactTable, array('subscriber_imported')),
124
+ array('subscriber_imported')
125
+ )
126
+ ->addIndex(
127
+ $installer->getIdxName($contactTable, array('suppressed')),
128
+ array('suppressed')
129
+ )
130
+ ->addIndex(
131
+ $installer->getIdxName($contactTable, array('email')),
132
+ array('email')
133
+ )
134
+ ->addForeignKey(
135
+ $installer->getFkName(
136
+ $contactTable, 'website_id', 'core/website', 'website_id'
137
+ ),
138
+ 'website_id', $installer->getTable('core/website'), 'website_id',
139
+ Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE
140
+ )
141
+ ->setComment('Connector Contacts');
142
+ $installer->getConnection()->createTable($table);
143
+
144
+ /**
145
+ * Order table
146
+ */
147
+ $orderTable = $installer->getTable('ddg_automation/order');
148
+
149
+ if ($installer->getConnection()->isTableExists($orderTable)) {
150
+ $installer->getConnection()->dropTable($orderTable);
151
+ }
152
+
153
+ $table = $installer->getConnection()->newTable($orderTable);
154
+ $table->addColumn(
155
+ 'email_order_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
156
+ 'primary' => true,
157
+ 'identity' => true,
158
+ 'unsigned' => true,
159
+ 'nullable' => false
160
+ ), 'Primary Key'
161
+ )
162
+ ->addColumn(
163
+ 'order_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
164
+ 'unsigned' => true,
165
+ 'nullable' => false,
166
+ ), 'Order ID'
167
+ )
168
+ ->addColumn(
169
+ 'order_status', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
170
+ 'unsigned' => true,
171
+ 'nullable' => false,
172
+ ), 'Order Status'
173
+ )
174
+ ->addColumn(
175
+ 'quote_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
176
+ 'unsigned' => true,
177
+ 'nullable' => false,
178
+ ), 'Sales Quote ID'
179
+ )
180
+ ->addColumn(
181
+ 'store_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
182
+ 'unsigned' => true,
183
+ 'nullable' => false,
184
+ 'default' => '0'
185
+ ), 'Store ID'
186
+ )
187
+ ->addColumn(
188
+ 'email_imported', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
189
+ 'unsigned' => true,
190
+ 'nullable' => true,
191
+ ), 'Is Order Imported'
192
+ )
193
+ ->addColumn(
194
+ 'modified', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
195
+ 'unsigned' => true,
196
+ 'nullable' => true,
197
+ ), 'Is Order Modified'
198
+ )
199
+ ->addColumn(
200
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
201
+ 'Creation Time'
202
+ )
203
+ ->addColumn(
204
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
205
+ 'Update Time'
206
+ )
207
+ ->addIndex(
208
+ $installer->getIdxName($orderTable, array('store_id')),
209
+ array('store_id')
210
+ )
211
+ ->addIndex(
212
+ $installer->getIdxName($orderTable, array('quote_id')),
213
+ array('quote_id')
214
+ )
215
+ ->addIndex(
216
+ $installer->getIdxName($orderTable, array('email_imported')),
217
+ array('email_imported')
218
+ )
219
+ ->addIndex(
220
+ $installer->getIdxName($orderTable, array('order_status')),
221
+ array('order_status')
222
+ )
223
+ ->addIndex(
224
+ $installer->getIdxName($orderTable, array('modified')),
225
+ array('modified')
226
+ )
227
+ ->addIndex(
228
+ $installer->getIdxName($orderTable, array('updated_at')),
229
+ array('updated_at')
230
+ )
231
+ ->addIndex(
232
+ $installer->getIdxName($orderTable, array('created_at')),
233
+ array('created_at')
234
+ )
235
+ ->addForeignKey(
236
+ $installer->getFkName(
237
+ $orderTable, 'store_id', 'core/store', 'store_id'
238
+ ),
239
+ 'store_id', $installer->getTable('core/store'), 'store_id',
240
+ Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE
241
+ )
242
+ ->setComment('Transactional Orders Data');
243
+ $installer->getConnection()->createTable($table);
244
+
245
+ /**
246
+ * Campaign table.
247
+ */
248
+ $campaignTable = $installer->getTable('ddg_automation/campaign');
249
+
250
+ if ($installer->getConnection()->isTableExists($campaignTable)) {
251
+ $installer->getConnection()->dropTable($campaignTable);
252
+ }
253
+
254
+ $table = $installer->getConnection()->newTable($campaignTable);
255
+ $table->addColumn(
256
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
257
+ 'primary' => true,
258
+ 'identity' => true,
259
+ 'unsigned' => true,
260
+ 'nullable' => false
261
+ ), 'Primary Key'
262
+ )
263
+ ->addColumn(
264
+ 'campaign_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
265
+ 'unsigned' => true,
266
+ 'nullable' => false,
267
+ ), 'Campaign ID'
268
+ )
269
+ ->addColumn(
270
+ 'email', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
271
+ 'nullable' => false,
272
+ 'default' => ''
273
+ ), 'Contact Email'
274
+ )
275
+ ->addColumn(
276
+ 'customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
277
+ 'unsigned' => true,
278
+ 'nullable' => false,
279
+ ), 'Customer ID'
280
+ )
281
+ ->addColumn(
282
+ 'is_sent', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
283
+ 'unsigned' => true,
284
+ 'nullable' => true,
285
+ ), 'Is Sent'
286
+ )
287
+ ->addColumn(
288
+ 'sent_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
289
+ 'Send Date'
290
+ )
291
+ ->addColumn(
292
+ 'order_increment_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
293
+ 'unsigned' => true,
294
+ 'nullable' => false,
295
+ ), 'Order Increment ID'
296
+ )
297
+ ->addColumn(
298
+ 'quote_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
299
+ 'unsigned' => true,
300
+ 'nullable' => false,
301
+ ), 'Sales Quote ID'
302
+ )
303
+ ->addColumn(
304
+ 'message', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
305
+ 'nullable' => false,
306
+ 'default' => ''
307
+ ), 'Errror Message'
308
+ )
309
+ ->addColumn(
310
+ 'checkout_method', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
311
+ 'nullable' => false,
312
+ 'default' => ''
313
+ ), 'Checkout Method Used'
314
+ )
315
+ ->addColumn(
316
+ 'store_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
317
+ 'unsigned' => true,
318
+ 'nullable' => false,
319
+ 'default' => '0'
320
+ ), 'Store ID'
321
+ )
322
+ ->addColumn(
323
+ 'event_name', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
324
+ 'nullable' => false,
325
+ 'default' => ''
326
+ ), 'Event Name'
327
+ )
328
+ ->addColumn(
329
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
330
+ 'Creation Time'
331
+ )
332
+ ->addColumn(
333
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
334
+ 'Update Time'
335
+ )
336
+ ->addIndex(
337
+ $installer->getIdxName($campaignTable, array('store_id')),
338
+ array('store_id')
339
+ )
340
+ ->addIndex(
341
+ $installer->getIdxName($campaignTable, array('campaign_id')),
342
+ array('campaign_id')
343
+ )
344
+ ->addIndex(
345
+ $installer->getIdxName($campaignTable, array('email')),
346
+ array('email')
347
+ )
348
+ ->addIndex(
349
+ $installer->getIdxName($campaignTable, array('is_sent')),
350
+ array('is_sent')
351
+ )
352
+ ->addIndex(
353
+ $installer->getIdxName($campaignTable, array('created_at')),
354
+ array('created_at')
355
+ )
356
+ ->addIndex(
357
+ $installer->getIdxName($campaignTable, array('updated_at')),
358
+ array('updated_at')
359
+ )
360
+ ->addIndex(
361
+ $installer->getIdxName($campaignTable, array('sent_at')),
362
+ array('sent_at')
363
+ )
364
+ ->addIndex(
365
+ $installer->getIdxName($campaignTable, array('quote_id')),
366
+ array('quote_id')
367
+ )
368
+ ->addIndex(
369
+ $installer->getIdxName($campaignTable, array('event_name')),
370
+ array('event_name')
371
+ )
372
+ ->addIndex(
373
+ $installer->getIdxName($campaignTable, array('message')),
374
+ array('message')
375
+ )
376
+ ->addIndex(
377
+ $installer->getIdxName($campaignTable, array('customer_id')),
378
+ array('customer_id')
379
+ )
380
+ ->addForeignKey(
381
+ $installer->getFkName(
382
+ $campaignTable, 'store_id', 'core/store', 'store_id'
383
+ ),
384
+ 'store_id', $installer->getTable('core/store'), 'store_id',
385
+ Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE
386
+ )
387
+ ->setComment('Connector Campaigns');
388
+ $installer->getConnection()->createTable($table);
389
+
390
+ /**
391
+ * Admin notification message
392
+ */
393
+ $adminData = array();
394
+ $adminData[] = array(
395
+ 'severity' => 4,
396
+ 'date_added' => gmdate('Y-m-d H:i:s', time()),
397
+ 'title' => 'Email Connector Was Installed. Please Enter Your API Credentials & Ensure Cron Jobs Are Running On Your Site (Find Out More)',
398
+ 'description' => 'Email Connector Was Installed. Please Enter Your API Credentials & Ensure Cron Jobs Are Running On Your Site.',
399
+ 'url' => 'http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job'
400
+ );
401
+
402
+ Mage::getModel('adminnotification/inbox')->parse($adminData);
403
+
404
+ /**
405
+ * Populate tables
406
+ */
407
+ $select = $installer->getConnection()->select()
408
+ ->from(
409
+ array('customer' => $this->getTable('customer_entity')),
410
+ array('customer_id' => 'entity_id', 'email', 'website_id', 'store_id')
411
+ );
412
+
413
+ $insertArray = array('customer_id', 'email', 'website_id', 'store_id');
414
+ $sqlQuery = $select->insertFromSelect($contactTable, $insertArray, false);
415
+ $installer->getConnection()->query($sqlQuery);
416
+
417
+ // subscribers that are not customers
418
+ $select = $installer->getConnection()->select()
419
+ ->from(
420
+ array('subscriber' => $installer->getTable('newsletter/subscriber')),
421
+ array(
422
+ 'email' => 'subscriber_email',
423
+ 'col2' => new Zend_Db_Expr('1'),
424
+ 'col3' => new Zend_Db_Expr('1'),
425
+ 'store_id'
426
+ )
427
+ )
428
+ ->where('customer_id =?', 0)
429
+ ->where('subscriber_status =?', 1);
430
+ $insertArray = array('email', 'is_subscriber', 'subscriber_status', 'store_id');
431
+ $sqlQuery = $select->insertFromSelect($contactTable, $insertArray, false);
432
+ $installer->getConnection()->query($sqlQuery);
433
+
434
+
435
+ //Update contacts with customers that are subscribers
436
+ $select = $installer->getConnection()->select();
437
+
438
+ //join
439
+ $select->joinLeft(
440
+ array('ns' => $installer->getTable('newsletter/subscriber')),
441
+ "dc.customer_id = ns.customer_id",
442
+ array(
443
+ 'is_subscriber' => new Zend_Db_Expr('1'),
444
+ 'subscriber_status' => new Zend_Db_Expr('1')
445
+ )
446
+ )
447
+ ->where('ns.subscriber_status =?', 1);
448
+
449
+ //update query from select
450
+ $updateSql = $select->crossUpdateFromSelect(array('dc' => $contactTable));
451
+
452
+ //run query
453
+ $installer->getConnection()->query($updateSql);
454
+
455
+
456
+ //Insert and populate email order the table
457
+ $select = $installer->getConnection()->select()
458
+ ->from(
459
+ $installer->getTable('sales/order'),
460
+ array(
461
+ 'order_id' => 'entity_id',
462
+ 'quote_id',
463
+ 'store_id',
464
+ 'created_at',
465
+ 'updated_at',
466
+ 'order_status' => 'status'
467
+ )
468
+ );
469
+ $insertArray = array(
470
+ 'order_id',
471
+ 'quote_id',
472
+ 'store_id',
473
+ 'created_at',
474
+ 'updated_at',
475
+ 'order_status'
476
+ );
477
+
478
+ $sqlQuery = $select->insertFromSelect($orderTable, $insertArray, false);
479
+ $installer->getConnection()->query($sqlQuery);
480
+
481
+ //Save all order statuses as string
482
+ $source = Mage::getModel('adminhtml/system_config_source_order_status');
483
+ $statuses = $source->toOptionArray();
484
+
485
+ if (count($statuses) > 0 && $statuses[0]['value'] == '') {
486
+ array_shift($statuses);
487
+ }
488
+
489
+ $options = array();
490
+ foreach ($statuses as $status) {
491
+ $options[] = $status['value'];
492
+ }
493
+ $statusString = implode(',', $options);
494
+
495
+ $configModel = Mage::getModel('core/config');
496
+ $configModel->saveConfig(
497
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_SYNC_ORDER_STATUS,
498
+ $statusString
499
+ );
500
+
501
+ $admin = $installer->getTable('admin/user');
502
+ $installer->getConnection()->addColumn(
503
+ $installer->getTable('admin/user'), 'refresh_token', array(
504
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
505
+ 'length' => 256,
506
+ 'nullable' => true,
507
+ 'default' => null,
508
+ 'comment' => 'Email connector refresh token'
509
+ )
510
+ );
511
+
512
+ $campaignTable = $installer->getTable('ddg_automation/campaign');
513
+ $installer->getConnection()->modifyColumn(
514
+ $campaignTable, 'order_increment_id', 'VARCHAR(50)'
515
+ );
516
+
517
+ //Insert status column to email_order table
518
+ $orderTable = $installer->getTable('ddg_automation/order');
519
+
520
+ $installer->getConnection()->addColumn(
521
+ $orderTable, 'order_status', array(
522
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
523
+ 'length' => 256,
524
+ 'nullable' => false,
525
+ 'default' => null,
526
+ 'comment' => 'Order Status'
527
+ )
528
+ );
529
+
530
+ //populate order status in email_order table
531
+ $select = $installer->getConnection()->select();
532
+
533
+ //join
534
+ $select->joinLeft(
535
+ array('sfo' => $installer->getTable('sales/order')),
536
+ "eo.order_id = sfo.entity_id",
537
+ array('order_status' => 'sfo.status')
538
+ );
539
+
540
+ //update query from select
541
+ $updateSql = $select->crossUpdateFromSelect(array('eo' => $orderTable));
542
+
543
+ //run query
544
+ $installer->getConnection()->query($updateSql);
545
+
546
+ //Save all order statuses as string to extension's config value
547
+ $source = Mage::getModel('adminhtml/system_config_source_order_status');
548
+ $statuses = $source->toOptionArray();
549
+
550
+ if (count($statuses) > 0 && $statuses[0]['value'] == '') {
551
+ array_shift($statuses);
552
+ }
553
+
554
+ $options = array();
555
+ foreach ($statuses as $status) {
556
+ $options[] = $status['value'];
557
+ }
558
+ $statusString = implode(',', $options);
559
+
560
+ $configModel = Mage::getModel('core/config');
561
+ $configModel->saveConfig(
562
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_SYNC_ORDER_STATUS,
563
+ $statusString
564
+ );
565
+
566
+ //add columns to table
567
+ $campaignTable = $installer->getTable('ddg_automation/campaign');
568
+ $installer->getConnection()->addColumn(
569
+ $campaignTable, 'subject', array(
570
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
571
+ 'unsigned' => true,
572
+ 'nullable' => false,
573
+ 'default' => '',
574
+ 'comment' => 'Email Subject'
575
+ )
576
+ );
577
+ $installer->getConnection()->addColumn(
578
+ $campaignTable, 'html_content', array(
579
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
580
+ 'unsigned' => true,
581
+ 'nullable' => false,
582
+ 'default' => '',
583
+ 'comment' => 'Email Html Content'
584
+ )
585
+ );
586
+ $installer->getConnection()->addColumn(
587
+ $campaignTable, 'plain_text_content', array(
588
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
589
+ 'unsigned' => true,
590
+ 'nullable' => false,
591
+ 'default' => '',
592
+ 'comment' => 'Email Plain Text Content'
593
+ )
594
+ );
595
+ $installer->getConnection()->addColumn(
596
+ $campaignTable, 'from_name', array(
597
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
598
+ 'unsigned' => true,
599
+ 'nullable' => false,
600
+ 'default' => '',
601
+ 'comment' => 'Email From Name'
602
+ )
603
+ );
604
+ $installer->getConnection()->addColumn(
605
+ $campaignTable, 'create_message', array(
606
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
607
+ 'unsigned' => true,
608
+ 'nullable' => false,
609
+ 'default' => '',
610
+ 'comment' => 'Create Campaign Message'
611
+ )
612
+ );
613
+ $installer->getConnection()->addColumn(
614
+ $campaignTable, 'contact_message', array(
615
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
616
+ 'unsigned' => true,
617
+ 'nullable' => false,
618
+ 'default' => '',
619
+ 'comment' => 'Contact Message'
620
+ )
621
+ );
622
+ $installer->getConnection()->addColumn(
623
+ $campaignTable, 'is_created', array(
624
+ 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
625
+ 'unsigned' => true,
626
+ 'nullable' => true,
627
+ 'comment' => 'Is Campaign Created'
628
+ )
629
+ );
630
+ $installer->getConnection()->addColumn(
631
+ $campaignTable, 'is_copy', array(
632
+ 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
633
+ 'unsigned' => true,
634
+ 'nullable' => true,
635
+ 'comment' => 'Is Copy'
636
+ )
637
+ );
638
+ $installer->getConnection()->addColumn(
639
+ $campaignTable, 'type', array(
640
+ 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
641
+ 'unsigned' => true,
642
+ 'nullable' => false,
643
+ 'default' => '1',
644
+ 'comment' => 'Type. 1: Campaign, 2: Create'
645
+ )
646
+ );
647
+ $installer->getConnection()->addColumn(
648
+ $campaignTable, 'website_id', array(
649
+ 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
650
+ 'unsigned' => true,
651
+ 'nullable' => false,
652
+ 'default' => '0',
653
+ 'comment' => 'Website Id'
654
+ )
655
+ );
656
+
657
+
658
+ /**
659
+ * create Config table.
660
+ */
661
+ $configTable = $installer->getTable('ddg_automation/config');
662
+
663
+ if ($installer->getConnection()->isTableExists($configTable)) {
664
+ $installer->getConnection()->dropTable($configTable);
665
+ }
666
+
667
+ $table = $installer->getConnection()->newTable($configTable);
668
+ $table->addColumn(
669
+ 'email_config_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
670
+ 'primary' => true,
671
+ 'identity' => true,
672
+ 'unsigned' => true,
673
+ 'nullable' => false
674
+ ), 'Primary Key'
675
+ )
676
+ ->addColumn(
677
+ 'path', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
678
+ 'nullable' => true,
679
+ ), 'Config Path'
680
+ )
681
+ ->addColumn(
682
+ 'scope', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
683
+ 'nullable' => true,
684
+ ), 'Config Scope'
685
+ )
686
+ ->addColumn(
687
+ 'value', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
688
+ 'nullable' => false,
689
+ 'default' => ''
690
+ ), 'Config Value'
691
+ )
692
+ ->addColumn(
693
+ 'is_api', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
694
+ 'unsigned' => true,
695
+ 'nullable' => true,
696
+ ), 'Only For Api Calls'
697
+ )
698
+ ->addColumn(
699
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
700
+ 'Creation Time'
701
+ )
702
+ ->addColumn(
703
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
704
+ 'Update Time'
705
+ )
706
+ ->setComment('Connector Config Data');
707
+ $installer->getConnection()->createTable($table);
708
+
709
+ /**
710
+ * create review table
711
+ */
712
+ $reviewTable = $installer->getTable('ddg_automation/review');
713
+
714
+ //drop table if exist
715
+ if ($installer->getConnection()->isTableExists($reviewTable)) {
716
+ $installer->getConnection()->dropTable($reviewTable);
717
+ }
718
+
719
+ $table = $installer->getConnection()->newTable($reviewTable);
720
+ $table->addColumn(
721
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
722
+ 'primary' => true,
723
+ 'identity' => true,
724
+ 'unsigned' => true,
725
+ 'nullable' => false
726
+ ), 'Primary Key'
727
+ )
728
+ ->addColumn(
729
+ 'review_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
730
+ 'unsigned' => true,
731
+ 'nullable' => false,
732
+ ), 'Review Id'
733
+ )
734
+ ->addColumn(
735
+ 'customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
736
+ 'unsigned' => true,
737
+ 'nullable' => false,
738
+ ), 'Customer ID'
739
+ )
740
+ ->addColumn(
741
+ 'store_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
742
+ 'unsigned' => true,
743
+ 'nullable' => false,
744
+ ), 'Store Id'
745
+ )
746
+ ->addColumn(
747
+ 'review_imported', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
748
+ 'unsigned' => true,
749
+ 'nullable' => true,
750
+ ), 'Review Imported'
751
+ )
752
+ ->addColumn(
753
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
754
+ 'Creation Time'
755
+ )
756
+ ->addColumn(
757
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
758
+ 'Update Time'
759
+ )
760
+ ->addIndex(
761
+ $installer->getIdxName($reviewTable, array('review_id')),
762
+ array('review_id')
763
+ )
764
+ ->addIndex(
765
+ $installer->getIdxName($reviewTable, array('customer_id')),
766
+ array('customer_id')
767
+ )
768
+ ->addIndex(
769
+ $installer->getIdxName($reviewTable, array('store_id')),
770
+ array('store_id')
771
+ )
772
+ ->addIndex(
773
+ $installer->getIdxName($reviewTable, array('review_imported')),
774
+ array('review_imported')
775
+ )
776
+ ->addIndex(
777
+ $installer->getIdxName($reviewTable, array('created_at')),
778
+ array('created_at')
779
+ )
780
+ ->addIndex(
781
+ $installer->getIdxName($reviewTable, array('updated_at')),
782
+ array('updated_at')
783
+ )
784
+ ->setComment('Connector Reviews');
785
+ $installer->getConnection()->createTable($table);
786
+
787
+ //populate review table
788
+ $inCond = $installer->getConnection()->prepareSqlCondition(
789
+ 'review_detail.customer_id', array('notnull' => true)
790
+ );
791
+ $select = $installer->getConnection()->select()
792
+ ->from(
793
+ array('review' => $installer->getTable('review/review')),
794
+ array(
795
+ 'review_id' => 'review.review_id',
796
+ 'created_at' => 'review.created_at'
797
+ )
798
+ )
799
+ ->joinLeft(
800
+ array('review_detail' => $installer->getTable('review/review_detail')),
801
+ "review_detail.review_id = review.review_id",
802
+ array(
803
+ 'store_id' => 'review_detail.store_id',
804
+ 'customer_id' => 'review_detail.customer_id'
805
+ )
806
+ )
807
+ ->where($inCond);
808
+
809
+ $insertArray = array('review_id', 'created_at', 'store_id', 'customer_id');
810
+ $sqlQuery = $select->insertFromSelect($reviewTable, $insertArray, false);
811
+ $installer->getConnection()->query($sqlQuery);
812
+
813
+ //add columns to table
814
+ $campaignTable = $installer->getTable('ddg_automation/campaign');
815
+ $installer->getConnection()->addColumn(
816
+ $campaignTable, 'from_address', array(
817
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
818
+ 'unsigned' => true,
819
+ 'nullable' => true,
820
+ 'default' => null,
821
+ 'comment' => 'Email From Address'
822
+ )
823
+ );
824
+ $installer->getConnection()->addColumn(
825
+ $campaignTable, 'attachment_id', array(
826
+ 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
827
+ 'unsigned' => true,
828
+ 'nullable' => true,
829
+ 'default' => null,
830
+ 'comment' => 'Attachment Id'
831
+ )
832
+ );
833
+
834
+ /**
835
+ * create wishlist table
836
+ */
837
+ $wishlistTable = $installer->getTable('ddg_automation/wishlist');
838
+ //drop table if exist
839
+ if ($installer->getConnection()->isTableExists($wishlistTable)) {
840
+ $installer->getConnection()->dropTable($wishlistTable);
841
+ }
842
+
843
+ $table = $installer->getConnection()->newTable($wishlistTable);
844
+ $table->addColumn(
845
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
846
+ 'primary' => true,
847
+ 'identity' => true,
848
+ 'unsigned' => true,
849
+ 'nullable' => false
850
+ ), 'Primary Key'
851
+ )
852
+ ->addColumn(
853
+ 'wishlist_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
854
+ 'unsigned' => true,
855
+ 'nullable' => false,
856
+ ), 'Wishlist Id'
857
+ )
858
+ ->addColumn(
859
+ 'item_count', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
860
+ 'unsigned' => true,
861
+ 'nullable' => false,
862
+ ), 'Item Count'
863
+ )
864
+ ->addColumn(
865
+ 'customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
866
+ 'unsigned' => true,
867
+ 'nullable' => false,
868
+ ), 'Customer ID'
869
+ )
870
+ ->addColumn(
871
+ 'store_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
872
+ 'unsigned' => true,
873
+ 'nullable' => false,
874
+ ), 'Store Id'
875
+ )
876
+ ->addColumn(
877
+ 'wishlist_imported', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
878
+ 'unsigned' => true,
879
+ 'nullable' => true,
880
+ ), 'Wishlist Imported'
881
+ )
882
+ ->addColumn(
883
+ 'wishlist_modified', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
884
+ 'unsigned' => true,
885
+ 'nullable' => true,
886
+ ), 'Wishlist Modified'
887
+ )
888
+ ->addColumn(
889
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
890
+ 'Creation Time'
891
+ )
892
+ ->addColumn(
893
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
894
+ 'Update Time'
895
+ )
896
+ ->addIndex(
897
+ $installer->getIdxName($wishlistTable, array('wishlist_id')),
898
+ array('wishlist_id')
899
+ )
900
+ ->addIndex(
901
+ $installer->getIdxName($wishlistTable, array('item_count')),
902
+ array('item_count')
903
+ )
904
+ ->addIndex(
905
+ $installer->getIdxName($wishlistTable, array('customer_id')),
906
+ array('customer_id')
907
+ )
908
+ ->addIndex(
909
+ $installer->getIdxName($wishlistTable, array('wishlist_modified')),
910
+ array('wishlist_modified')
911
+ )
912
+ ->addIndex(
913
+ $installer->getIdxName($wishlistTable, array('wishlist_imported')),
914
+ array('wishlist_imported')
915
+ )
916
+ ->addIndex(
917
+ $installer->getIdxName($wishlistTable, array('created_at')),
918
+ array('created_at')
919
+ )
920
+ ->addIndex(
921
+ $installer->getIdxName($wishlistTable, array('updated_at')),
922
+ array('updated_at')
923
+ )
924
+ ->setComment('Connector Wishlist');
925
+ $installer->getConnection()->createTable($table);
926
+
927
+ //wishlist populate
928
+ $select = $installer->getConnection()->select()
929
+ ->from(
930
+ array('wishlist' => $installer->getTable('wishlist/wishlist')),
931
+ array('wishlist_id', 'customer_id', 'created_at' => 'updated_at')
932
+ )->joinLeft(
933
+ array('ce' => $installer->getTable('customer_entity')),
934
+ "wishlist.customer_id = ce.entity_id",
935
+ array('store_id')
936
+ )->joinInner(
937
+ array('wi' => $installer->getTable('wishlist/item')),
938
+ "wishlist.wishlist_id = wi.wishlist_id",
939
+ array('item_count' => 'count(wi.wishlist_id)')
940
+ )->group('wi.wishlist_id');
941
+
942
+ $insertArray = array(
943
+ 'wishlist_id',
944
+ 'customer_id',
945
+ 'created_at',
946
+ 'store_id',
947
+ 'item_count'
948
+ );
949
+ $sqlQuery = $select->insertFromSelect($wishlistTable, $insertArray, false);
950
+ $installer->getConnection()->query($sqlQuery);
951
+
952
+
953
+ /**
954
+ * create quote table.
955
+ */
956
+ $quoteTable = $installer->getTable('ddg_automation/quote');
957
+ //drop table if exist
958
+ if ($installer->getConnection()->isTableExists($quoteTable)) {
959
+ $installer->getConnection()->dropTable($quoteTable);
960
+ }
961
+
962
+ $table = $installer->getConnection()->newTable($quoteTable);
963
+ $table->addColumn(
964
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
965
+ 'primary' => true,
966
+ 'identity' => true,
967
+ 'unsigned' => true,
968
+ 'nullable' => false
969
+ ), 'Primary Key'
970
+ )
971
+ ->addColumn(
972
+ 'quote_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
973
+ 'unsigned' => true,
974
+ 'nullable' => false,
975
+ ), 'Quote Id'
976
+ )
977
+ ->addColumn(
978
+ 'customer_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
979
+ 'unsigned' => true,
980
+ 'nullable' => false,
981
+ ), 'Customer ID'
982
+ )
983
+ ->addColumn(
984
+ 'store_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
985
+ 'unsigned' => true,
986
+ 'nullable' => false,
987
+ ), 'Store Id'
988
+ )
989
+ ->addColumn(
990
+ 'imported', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
991
+ 'unsigned' => true,
992
+ 'nullable' => true,
993
+ ), 'Quote Imported'
994
+ )
995
+ ->addColumn(
996
+ 'modified', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
997
+ 'unsigned' => true,
998
+ 'nullable' => true,
999
+ ), 'Quote Modified'
1000
+ )
1001
+ ->addColumn(
1002
+ 'converted_to_order', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
1003
+ 'unsigned' => true,
1004
+ 'nullable' => true,
1005
+ ), 'Quote Converted To Order'
1006
+ )
1007
+ ->addColumn(
1008
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1009
+ 'Creation Time'
1010
+ )
1011
+ ->addColumn(
1012
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1013
+ 'Update Time'
1014
+ )
1015
+ ->addIndex(
1016
+ $installer->getIdxName($quoteTable, array('quote_id')),
1017
+ array('quote_id')
1018
+ )
1019
+ ->addIndex(
1020
+ $installer->getIdxName($quoteTable, array('customer_id')),
1021
+ array('customer_id')
1022
+ )
1023
+ ->addIndex(
1024
+ $installer->getIdxName($quoteTable, array('store_id')),
1025
+ array('store_id')
1026
+ )
1027
+ ->addIndex(
1028
+ $installer->getIdxName($quoteTable, array('imported')),
1029
+ array('imported')
1030
+ )
1031
+ ->addIndex(
1032
+ $installer->getIdxName($quoteTable, array('modified')),
1033
+ array('modified')
1034
+ )
1035
+ ->addIndex(
1036
+ $installer->getIdxName($quoteTable, array('created_at')),
1037
+ array('created_at')
1038
+ )
1039
+ ->addIndex(
1040
+ $installer->getIdxName($quoteTable, array('updated_at')),
1041
+ array('updated_at')
1042
+ )
1043
+ ->setComment('Connector Quotes');
1044
+ $installer->getConnection()->createTable($table);
1045
+
1046
+ //populate quote table
1047
+ $select = $installer->getConnection()->select()
1048
+ ->from(
1049
+ $installer->getTable('sales/quote'),
1050
+ array(
1051
+ 'quote_id' => 'entity_id',
1052
+ 'store_id',
1053
+ 'customer_id',
1054
+ 'created_at'
1055
+ )
1056
+ )
1057
+ ->where('customer_id !=?', null)
1058
+ ->where('is_active =?', 1)
1059
+ ->where('items_count >?', 0);
1060
+
1061
+ $insertArray = array('quote_id', 'store_id', 'customer_id', 'created_at');
1062
+ $sqlQuery = $select->insertFromSelect($quoteTable, $insertArray, false);
1063
+ $installer->getConnection()->query($sqlQuery);
1064
+
1065
+ /**
1066
+ * Enterprise customer segmentation.
1067
+ */
1068
+ if (Mage::helper('ddg')->isEnterprise()) {
1069
+
1070
+ //contact table
1071
+ $contactTable = $installer->getTable('ddg_automation/contact');
1072
+ //customer segment table
1073
+ $segmentTable = $installer->getTable('enterprise_customersegment/customer');
1074
+ //add additional column with segment ids
1075
+ $installer->getConnection()->addColumn(
1076
+ $contactTable,
1077
+ 'segment_ids',
1078
+ 'mediumtext'
1079
+ );
1080
+
1081
+ //update contact table with customer segment ids
1082
+ $result = $installer->run(
1083
+ "update`{$contactTable}` c,(select customer_id, website_id, group_concat(`segment_id` separator ',') as segmentids
1084
+ from `{$segmentTable}` group by customer_id) as s set c.segment_ids = segmentids, c.email_imported = null WHERE s.customer_id= c.customer_id and s.website_id = c.website_id"
1085
+ );
1086
+
1087
+ }
1088
+
1089
+ $campaignTable = $installer->getTable('ddg_automation/campaign');
1090
+
1091
+ $installer->getConnection()->dropColumn($campaignTable, 'from_address');
1092
+ $installer->getConnection()->dropColumn($campaignTable, 'attachment_id');
1093
+ $installer->getConnection()->dropColumn($campaignTable, 'subject');
1094
+ $installer->getConnection()->dropColumn($campaignTable, 'html_content');
1095
+ $installer->getConnection()->dropColumn($campaignTable, 'plain_text_content');
1096
+ $installer->getConnection()->dropColumn($campaignTable, 'from_name');
1097
+ $installer->getConnection()->dropColumn($campaignTable, 'is_created');
1098
+ $installer->getConnection()->dropColumn($campaignTable, 'is_copy');
1099
+ $installer->getConnection()->dropColumn($campaignTable, 'type');
1100
+ $installer->getConnection()->dropColumn($campaignTable, 'website_id');
1101
+ $installer->getConnection()->dropColumn($campaignTable, 'create_message');
1102
+ $installer->getConnection()->dropColumn($campaignTable, 'contact_message');
1103
+
1104
+ /**
1105
+ * create catalog table.
1106
+ */
1107
+ $catalogTable = $installer->getTable('ddg_automation/catalog');
1108
+
1109
+ if ($installer->getConnection()->isTableExists($catalogTable)) {
1110
+ $installer->getConnection()->dropTable($catalogTable);
1111
+ }
1112
+ $table = $installer->getConnection()->newTable($catalogTable);
1113
+ $table->addColumn(
1114
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
1115
+ 'primary' => true,
1116
+ 'identity' => true,
1117
+ 'unsigned' => true,
1118
+ 'nullable' => false
1119
+ ), 'Primary Key'
1120
+ )
1121
+ ->addColumn(
1122
+ 'product_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
1123
+ 'unsigned' => true,
1124
+ 'nullable' => false,
1125
+ ), 'Product Id'
1126
+ )
1127
+ ->addColumn(
1128
+ 'imported', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
1129
+ 'unsigned' => true,
1130
+ 'nullable' => true,
1131
+ ), 'Product Imported'
1132
+ )
1133
+ ->addColumn(
1134
+ 'modified', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
1135
+ 'unsigned' => true,
1136
+ 'nullable' => true,
1137
+ ), 'Product Modified'
1138
+ )
1139
+ ->addColumn(
1140
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1141
+ 'Creation Time'
1142
+ )
1143
+ ->addColumn(
1144
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1145
+ 'Update Time'
1146
+ )
1147
+ ->addIndex(
1148
+ $installer->getIdxName($catalogTable, array('product_id')),
1149
+ array('product_id')
1150
+ )
1151
+ ->addIndex(
1152
+ $installer->getIdxName($catalogTable, array('imported')),
1153
+ array('imported')
1154
+ )
1155
+ ->addIndex(
1156
+ $installer->getIdxName($catalogTable, array('modified')),
1157
+ array('modified')
1158
+ )
1159
+ ->addIndex(
1160
+ $installer->getIdxName($catalogTable, array('created_at')),
1161
+ array('created_at')
1162
+ )
1163
+ ->addIndex(
1164
+ $installer->getIdxName($catalogTable, array('updated_at')),
1165
+ array('updated_at')
1166
+ )
1167
+ ->setComment('Connector Catalog');
1168
+ $installer->getConnection()->createTable($table);
1169
+
1170
+ /**
1171
+ * Populate catalog table
1172
+ */
1173
+ $select = $installer->getConnection()->select()
1174
+ ->from(
1175
+ array('catalog' => $installer->getTable('catalog/product')),
1176
+ array(
1177
+ 'product_id' => 'catalog.entity_id',
1178
+ 'created_at' => 'catalog.created_at'
1179
+ )
1180
+ );
1181
+ $insertArray = array('product_id', 'created_at');
1182
+ $sqlQuery = $select->insertFromSelect($catalogTable, $insertArray, false);
1183
+ $installer->getConnection()->query($sqlQuery);
1184
+
1185
+ /**
1186
+ * create rules table.
1187
+ */
1188
+ $rulesTable = $installer->getTable('ddg_automation/rules');
1189
+
1190
+ if ($installer->getConnection()->isTableExists($rulesTable)) {
1191
+ $installer->getConnection()->dropTable($rulesTable);
1192
+ }
1193
+ $table = $installer->getConnection()->newTable($rulesTable);
1194
+ $table->addColumn(
1195
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
1196
+ 'primary' => true,
1197
+ 'identity' => true,
1198
+ 'unsigned' => true,
1199
+ 'nullable' => false
1200
+ ), 'Primary Key'
1201
+ )
1202
+ ->addColumn(
1203
+ 'name', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
1204
+ 'nullable' => false,
1205
+ 'default' => ''
1206
+ ), 'Rule Name'
1207
+ )
1208
+ ->addColumn(
1209
+ 'website_ids', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
1210
+ 'nullable' => false,
1211
+ 'default' => '0'
1212
+ ), 'Website Id'
1213
+ )
1214
+ ->addColumn(
1215
+ 'type', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
1216
+ 'nullable' => false,
1217
+ 'default' => 0
1218
+ ), 'Rule Type'
1219
+ )
1220
+ ->addColumn(
1221
+ 'status', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
1222
+ 'nullable' => false,
1223
+ 'default' => 0
1224
+ ), 'Status'
1225
+ )
1226
+ ->addColumn(
1227
+ 'combination', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
1228
+ 'nullable' => false,
1229
+ 'default' => '1'
1230
+ ), 'Rule Condition'
1231
+ )
1232
+ ->addColumn(
1233
+ 'condition', Varien_Db_Ddl_Table::TYPE_BLOB, null, array(
1234
+ 'nullable' => false,
1235
+ 'default' => ''
1236
+ ), 'Rule Condition'
1237
+ )
1238
+ ->addColumn(
1239
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1240
+ 'Creation Time'
1241
+ )
1242
+ ->addColumn(
1243
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1244
+ 'Update Time'
1245
+ )
1246
+ ->setComment('Connector Rules');
1247
+ $installer->getConnection()->createTable($table);
1248
+
1249
+ $configModel = Mage::getModel('core/config');
1250
+ //Save all product types as string to extension's config value
1251
+ $types = Mage::getModel('ddg_automation/adminhtml_source_sync_catalog_type')
1252
+ ->toOptionArray();
1253
+ $options = array();
1254
+ foreach ($types as $type) {
1255
+ $options[] = $type['value'];
1256
+ }
1257
+ $typeString = implode(',', $options);
1258
+
1259
+ //Save all product visibilities as string to extension's config value
1260
+ $visibilities = Mage::getModel(
1261
+ 'ddg_automation/adminhtml_source_sync_catalog_visibility'
1262
+ )->toOptionArray();
1263
+ $options = array();
1264
+ foreach ($visibilities as $visibility) {
1265
+ $options[] = $visibility['value'];
1266
+ }
1267
+ $visibilityString = implode(',', $options);
1268
+
1269
+ //save config value
1270
+ $configModel->saveConfig(
1271
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_SYNC_CATALOG_TYPE,
1272
+ $typeString
1273
+ );
1274
+ $configModel->saveConfig(
1275
+ Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_SYNC_CATALOG_VISIBILITY,
1276
+ $visibilityString
1277
+ );
1278
+
1279
+
1280
+ /**
1281
+ * create email importer table.
1282
+ */
1283
+ $importerTable = $installer->getTable('ddg_automation/importer');
1284
+
1285
+ if ($installer->getConnection()->isTableExists($importerTable)) {
1286
+ $installer->getConnection()->dropTable($importerTable);
1287
+ }
1288
+ $table = $installer->getConnection()->newTable($importerTable);
1289
+ $table->addColumn(
1290
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
1291
+ 'primary' => true,
1292
+ 'identity' => true,
1293
+ 'unsigned' => true,
1294
+ 'nullable' => false
1295
+ ), 'Primary Key'
1296
+ )
1297
+ ->addColumn(
1298
+ 'import_type', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
1299
+ 'nullable' => false,
1300
+ 'default' => ''
1301
+ ), 'Import Type'
1302
+ )
1303
+ ->addColumn(
1304
+ 'website_id', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
1305
+ 'nullable' => false,
1306
+ 'default' => '0'
1307
+ ), 'Website Id'
1308
+ )
1309
+ ->addColumn(
1310
+ 'import_status', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
1311
+ 'nullable' => false,
1312
+ 'default' => 0
1313
+ ), 'Import Status'
1314
+ )
1315
+ ->addColumn(
1316
+ 'import_id', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
1317
+ 'nullable' => false,
1318
+ 'default' => ''
1319
+ ), 'Import Id'
1320
+ )
1321
+ ->addColumn(
1322
+ 'import_data', Varien_Db_Ddl_Table::TYPE_BLOB, '2M', array(
1323
+ 'nullable' => false,
1324
+ 'default' => ''
1325
+ ), 'Import Data'
1326
+ )
1327
+ ->addColumn(
1328
+ 'import_mode', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
1329
+ 'nullable' => false,
1330
+ 'default' => ''
1331
+ ), 'Import Mode'
1332
+ )
1333
+ ->addColumn(
1334
+ 'import_file', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
1335
+ 'nullable' => false,
1336
+ 'default' => ''
1337
+ ), 'Import File'
1338
+ )
1339
+ ->addColumn(
1340
+ 'message', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
1341
+ 'nullable' => false,
1342
+ 'default' => ''
1343
+ ), 'Error Message'
1344
+ )
1345
+ ->addColumn(
1346
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1347
+ 'Creation Time'
1348
+ )
1349
+ ->addColumn(
1350
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1351
+ 'Update Time'
1352
+ )
1353
+ ->addColumn(
1354
+ 'import_started', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1355
+ 'Import Started'
1356
+ )
1357
+ ->addColumn(
1358
+ 'import_finished', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1359
+ 'Import Finished'
1360
+ )
1361
+ ->addIndex(
1362
+ $installer->getIdxName($importerTable, array('import_type')),
1363
+ array('import_type')
1364
+ )
1365
+ ->addIndex(
1366
+ $installer->getIdxName($importerTable, array('website_id')),
1367
+ array('website_id')
1368
+ )
1369
+ ->addIndex(
1370
+ $installer->getIdxName($importerTable, array('import_status')),
1371
+ array('import_status')
1372
+ )
1373
+ ->addIndex(
1374
+ $installer->getIdxName($importerTable, array('import_mode')),
1375
+ array('import_mode')
1376
+ )
1377
+ ->addIndex(
1378
+ $installer->getIdxName($importerTable, array('created_at')),
1379
+ array('created_at')
1380
+ )
1381
+ ->addIndex(
1382
+ $installer->getIdxName($importerTable, array('updated_at')),
1383
+ array('updated_at')
1384
+ )
1385
+ ->addIndex(
1386
+ $installer->getIdxName($importerTable, array('message')),
1387
+ array('message')
1388
+ )
1389
+ ->addIndex(
1390
+ $installer->getIdxName($importerTable, array('import_started')),
1391
+ array('import_started')
1392
+ )
1393
+ ->addIndex(
1394
+ $installer->getIdxName($importerTable, array('import_finished')),
1395
+ array('import_finished')
1396
+ )
1397
+ ->setComment('Email Importer');
1398
+ $installer->getConnection()->createTable($table);
1399
+
1400
+ /**
1401
+ * drop config table
1402
+ */
1403
+ $configTable = $installer->getTable('ddg_automation/config');
1404
+
1405
+ //drop config table if exist
1406
+ if ($installer->getConnection()->isTableExists($configTable)) {
1407
+ $installer->getConnection()->dropTable($configTable);
1408
+ }
1409
+
1410
+ /**
1411
+ * modify email_quote table
1412
+ */
1413
+ $quoteTable = $installer->getTable('ddg_automation/quote');
1414
+ //remove column
1415
+ $installer->getConnection()->dropColumn($quoteTable, 'converted_to_order');
1416
+
1417
+
1418
+ $automationTable = $installer->getTable('ddg_automation/automation');
1419
+
1420
+ //drop table if exist
1421
+ if ($installer->getConnection()->isTableExists($automationTable)) {
1422
+ $installer->getConnection()->dropTable($automationTable);
1423
+ }
1424
+ $table = $installer->getConnection()->newTable($automationTable);
1425
+ $table->addColumn(
1426
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
1427
+ 'primary' => true,
1428
+ 'identity' => true,
1429
+ 'unsigned' => true,
1430
+ 'nullable' => false
1431
+ ), 'Primary Key'
1432
+ )
1433
+ ->addColumn(
1434
+ 'automation_type', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
1435
+ 'nullable' => true,
1436
+ ), 'Automation Type'
1437
+ )
1438
+ ->addColumn(
1439
+ 'store_name', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
1440
+ 'nullable' => true,
1441
+ ), 'Automation Type'
1442
+ )
1443
+ ->addColumn(
1444
+ 'enrolment_status', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
1445
+ 'nullable' => false,
1446
+ ), 'Entrolment Status'
1447
+ )
1448
+ ->addColumn(
1449
+ 'email', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
1450
+ 'nullable' => true,
1451
+ ), 'Email'
1452
+ )
1453
+ ->addColumn(
1454
+ 'type_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
1455
+ 'nullable' => true,
1456
+ ), 'Type ID'
1457
+ )
1458
+ ->addColumn(
1459
+ 'program_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
1460
+ 'nullable' => true,
1461
+ ), 'Program ID'
1462
+ )
1463
+ ->addColumn(
1464
+ 'website_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
1465
+ 'unsigned' => true,
1466
+ 'nullable' => false,
1467
+ ), 'Website Id'
1468
+ )
1469
+ ->addColumn(
1470
+ 'message', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
1471
+ 'nullable' => false,
1472
+ ), 'Message'
1473
+ )
1474
+ ->addColumn(
1475
+ 'created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1476
+ 'Creation Time'
1477
+ )
1478
+ ->addColumn(
1479
+ 'updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(),
1480
+ 'Update Time'
1481
+ )
1482
+ ->addIndex(
1483
+ $installer->getIdxName($automationTable, array('automation_type')),
1484
+ array('automation_type')
1485
+ )->addIndex(
1486
+ $installer->getIdxName($automationTable, array('enrolment_status')),
1487
+ array('enrolment_status')
1488
+ )
1489
+ ->addIndex(
1490
+ $installer->getIdxName($automationTable, array('type_id')),
1491
+ array('type_id')
1492
+ )
1493
+ ->addIndex(
1494
+ $installer->getIdxName($automationTable, array('email')),
1495
+ array('email')
1496
+ )
1497
+ ->addIndex(
1498
+ $installer->getIdxName($automationTable, array('program_id')),
1499
+ array('program_id')
1500
+ )
1501
+ ->addIndex(
1502
+ $installer->getIdxName($automationTable, array('message')),
1503
+ array('message')
1504
+ )
1505
+ ->addIndex(
1506
+ $installer->getIdxName($automationTable, array('created_at')),
1507
+ array('created_at')
1508
+ )
1509
+ ->addIndex(
1510
+ $installer->getIdxName($automationTable, array('updated_at')),
1511
+ array('updated_at')
1512
+ )
1513
+ ->addIndex(
1514
+ $installer->getIdxName($automationTable, array('website_id')),
1515
+ array('website_id')
1516
+ )
1517
+ ->setComment('Automation Status');
1518
+ $installer->getConnection()->createTable($table);
1519
+
1520
+
1521
+ $installer->endSetup();
app/code/community/Dotdigitalgroup/Email/sql/email_connector_setup/mysql4-upgrade-6.1.0-6.1.1.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /** @var Mage_Eav_Model_Entity_Setup $installer */
4
+
5
+ $installer = $this;
6
+ $installer->startSetup();
7
+
8
+ /**
9
+ * modify email_campaign table
10
+ */
11
+ $campaignTable = $installer->getTable('ddg_automation/campaign');
12
+
13
+ //add columns
14
+ $installer->getConnection()->addColumn(
15
+ $campaignTable, 'send_id', array(
16
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
17
+ 'nullable' => false,
18
+ 'default' => '',
19
+ 'comment' => 'Campaign Send Id'
20
+ )
21
+ );
22
+ $installer->getConnection()->addColumn(
23
+ $campaignTable, 'send_status', array(
24
+ 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
25
+ 'nullable' => false,
26
+ 'default' => 0,
27
+ 'comment' => 'Send Status'
28
+ )
29
+ );
30
+
31
+ //update table with historical send values
32
+ $select = $installer->getConnection()->select();
33
+
34
+ //join
35
+ $select->joinLeft(
36
+ array('oc' => $campaignTable),
37
+ "oc.id = nc.id",
38
+ array(
39
+ 'send_status' => new Zend_Db_Expr(Dotdigitalgroup_Email_Model_Campaign::SENT)
40
+ )
41
+ )
42
+ ->where('oc.is_sent =?', 1);
43
+
44
+ //update query from select
45
+ $updateSql = $select->crossUpdateFromSelect(array('nc' => $campaignTable));
46
+
47
+ //run query
48
+ $installer->getConnection()->query($updateSql);
49
+
50
+ //remove column
51
+ $installer->getConnection()->dropColumn($campaignTable, 'is_sent');
52
+
53
+ $installer->getConnection()->addIndex(
54
+ $campaignTable,
55
+ $installer->getIdxName($campaignTable, array('send_status')),
56
+ array('send_status')
57
+ );
58
+
59
+ $installer->getConnection()->addColumn(
60
+ $installer->getTable('salesrule/coupon'), 'generated_by_dotmailer', array(
61
+ 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
62
+ 'nullable' => true,
63
+ 'default' => null,
64
+ 'comment' => '1 = Generated by dotmailer',
65
+ )
66
+ );
67
+
68
+ //clear cache
69
+ Mage::app()->cleanCache();
70
+
71
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/connector/email.xml CHANGED
@@ -158,7 +158,8 @@
158
  </adminhtml_system_config_edit>
159
  <default>
160
  <reference name="content">
161
- <block type="core/template" name="ddg-appcues-admin" template="connector/appcues.phtml"/>
 
162
  </reference>
163
  </default>
164
  <adminhtml_email_rules_index>
158
  </adminhtml_system_config_edit>
159
  <default>
160
  <reference name="content">
161
+ <block type="ddg_automation/adminhtml_system_appcues" name="ddg-appcues-admin"
162
+ template="connector/appcues.phtml"/>
163
  </reference>
164
  </default>
165
  <adminhtml_email_rules_index>
app/design/adminhtml/default/default/template/connector/appcues.phtml CHANGED
@@ -1,2 +1,5 @@
1
- <link rel="stylesheet" type="text/css" href="//fast.appcues.com/appcues.min.css" />
2
- <script src="//fast.appcues.com/568.js" data-user-id="<?php echo (Mage::getSingleton('admin/session')->getUser())? Mage::getSingleton('admin/session')->getUser()->getEmail() : ''; ?>"></script>
 
 
 
1
+ <?php if ($this->canRunScript()): ?>
2
+ <link rel="stylesheet" type="text/css" href="//fast.appcues.com/appcues.min.css"/>
3
+ <script src="//fast.appcues.com/568.js"
4
+ data-user-id="<?php echo (Mage::getSingleton('admin/session')->getUser()) ? Mage::getSingleton('admin/session')->getUser()->getEmail() : ''; ?>"></script>
5
+ <?php endif; ?>
app/design/frontend/base/default/template/connector/basket.phtml CHANGED
@@ -2,6 +2,9 @@
2
  <?php if($items): ?>
3
  <?php $dynamicStyle = $this->getDynamicStyle(); ?>
4
  <style>
 
 
 
5
  .product-name{
6
  color: <?php echo $dynamicStyle['nameColor'];?>;
7
  font-size: <?php echo $dynamicStyle['fontSize'];?>;
@@ -133,7 +136,9 @@
133
  <tr>
134
  <td style="padding: 5px; border-bottom: 1px solid #cbd3d4; border-right: 1px solid #cbd3d4;">
135
  <img alt="<?php echo $this->stripTags($this->getImageLabel($item['product'], 'small_image'), null, true) ?>"
136
- src="<?php echo $this->helper('catalog/image')->init($item['product'], 'small_image')->resize(85);?>" width="85" height="85" align="middle" border="0">
 
 
137
  </td>
138
  <td class="product-name" style="padding: 1px; border-bottom: 1px solid #cbd3d4; border-right: 1px solid #cbd3d4;">
139
  <a class="product-url" href="<?php echo $item['productUrl'];?>"><?php echo
2
  <?php if($items): ?>
3
  <?php $dynamicStyle = $this->getDynamicStyle(); ?>
4
  <style>
5
+ .price-box p {
6
+ margin: 0;
7
+ }
8
  .product-name{
9
  color: <?php echo $dynamicStyle['nameColor'];?>;
10
  font-size: <?php echo $dynamicStyle['fontSize'];?>;
136
  <tr>
137
  <td style="padding: 5px; border-bottom: 1px solid #cbd3d4; border-right: 1px solid #cbd3d4;">
138
  <img alt="<?php echo $this->stripTags($this->getImageLabel($item['product'], 'small_image'), null, true) ?>"
139
+ src="<?php echo $this->getProductImage($item['product']); ?>" width="85" height="85"
140
+ align="middle"
141
+ border="0">
142
  </td>
143
  <td class="product-name" style="padding: 1px; border-bottom: 1px solid #cbd3d4; border-right: 1px solid #cbd3d4;">
144
  <a class="product-url" href="<?php echo $item['productUrl'];?>"><?php echo
app/design/frontend/base/default/template/connector/product/bundle_price.phtml ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @var $this Mage_Bundle_Block_Catalog_Product_Price
30
+ */
31
+ /**
32
+ * @var $_coreHelper Mage_Core_Helper_Data
33
+ * @var $_weeeHelper Mage_Weee_Helper_Data
34
+ * @var $_taxHelper Mage_Tax_Helper_Data
35
+ */
36
+ $_coreHelper = $this->helper('core');
37
+ $_weeeHelper = $this->helper('weee');
38
+ $_taxHelper = $this->helper('tax');
39
+
40
+ /**
41
+ * @var $_product Mage_Catalog_Model_Product
42
+ * @var $_priceModel Mage_Bundle_Model_Product_Price
43
+ */
44
+ $_product = $this->getProduct();
45
+ $_priceModel = $_product->getPriceModel();
46
+
47
+ list($_minimalPriceTax, $_maximalPriceTax) = $_priceModel->getTotalPrices($_product, null, null, false);
48
+ list($_minimalPriceInclTax, $_maximalPriceInclTax) = $_priceModel->getTotalPrices($_product, null, true, false);
49
+
50
+ $_weeeTaxAmount = 0;
51
+ ?>
52
+ <?php
53
+ if ($_product->getPriceType() == 1) {
54
+ $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product);
55
+ $_weeeTaxAmountInclTaxes = $_weeeTaxAmount;
56
+ if ($_weeeHelper->isTaxable()) {
57
+ $_attributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
58
+ $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_attributes);
59
+ }
60
+ if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) {
61
+ $_minimalPriceTax += $_weeeTaxAmount;
62
+ $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes;
63
+ $_maximalPriceTax += $_weeeTaxAmount;
64
+ $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes;
65
+ }
66
+ if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)) {
67
+ $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes;
68
+ $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes;
69
+ }
70
+
71
+ if ($_weeeHelper->typeOfDisplay($_product, array(1, 2, 4))) {
72
+ $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
73
+ }
74
+ }
75
+ ?>
76
+
77
+ <div class="price-box">
78
+ <?php if ($_product->getPriceView()): ?>
79
+ <p class="minimal-price">
80
+ <span class="price-label"><?php echo $this->__('As low as') ?>:</span>
81
+ <?php if ($_taxHelper->displayBothPrices()): ?>
82
+ <span class="price-excluding-tax">
83
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
84
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
85
+ </span>
86
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product,
87
+ array(2, 1, 4))
88
+ ): ?>
89
+ <span class="weee">(<small>
90
+ <?php $_weeeSeparator = '';
91
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
92
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
93
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
94
+ <?php else: ?>
95
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
96
+ <?php endif; ?>
97
+
98
+ <?php echo $_weeeSeparator; ?>
99
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount,
100
+ true, true); ?>
101
+ <?php $_weeeSeparator = ' + '; ?>
102
+ <?php endforeach; ?>
103
+ </small>)</span>
104
+ <?php endif; ?>
105
+ <span class="price-including-tax">
106
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
107
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
108
+ </span>
109
+ <?php else: ?>
110
+ <?php if ($_taxHelper->displayPriceIncludingTax()): ?>
111
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
112
+ <?php else: ?>
113
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
114
+ <?php endif; ?>
115
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product,
116
+ array(2, 1, 4))
117
+ ): ?>
118
+ <span class="weee">(<small>
119
+ <?php $_weeeSeparator = '';
120
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
121
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
122
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
123
+ <?php else: ?>
124
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
125
+ <?php endif; ?>
126
+
127
+ <?php echo $_weeeSeparator; ?>
128
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount,
129
+ true, true); ?>
130
+ <?php $_weeeSeparator = ' + '; ?>
131
+ <?php endforeach; ?>
132
+ </small>)</span>
133
+ <?php endif; ?>
134
+ <?php if ($_weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
135
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
136
+ <?php endif; ?>
137
+ <?php endif; ?>
138
+ </p>
139
+ <?php else: ?>
140
+ <?php if ($_minimalPriceTax <> $_maximalPriceTax): ?>
141
+ <p class="price-from">
142
+ <span class="price-label"><?php echo $this->__('From') ?>:</span>
143
+ <?php if ($_taxHelper->displayBothPrices()): ?>
144
+ <span class="price-excluding-tax">
145
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
146
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
147
+ </span>
148
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product,
149
+ array(2, 1, 4))
150
+ ): ?>
151
+ <span class="weee">(<small>
152
+ <?php $_weeeSeparator = '';
153
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
154
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
155
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
156
+ <?php else: ?>
157
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
158
+ <?php endif; ?>
159
+
160
+ <?php echo $_weeeSeparator; ?>
161
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount,
162
+ true, true); ?>
163
+ <?php $_weeeSeparator = ' + '; ?>
164
+ <?php endforeach; ?>
165
+ </small>)</span>
166
+ <?php endif; ?>
167
+ <span class="price-including-tax">
168
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
169
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
170
+ </span>
171
+ <?php else: ?>
172
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
173
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
174
+ <?php else: ?>
175
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
176
+ <?php endif; ?>
177
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product,
178
+ array(2, 1, 4))
179
+ ): ?>
180
+ <span class="weee">(<small>
181
+ <?php $_weeeSeparator = '';
182
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
183
+ <?php if ($_taxHelper->displayPriceIncludingTax() || $_weeeHelper->typeOfDisplay($_product,
184
+ array(2, 4))
185
+ ): ?>
186
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
187
+ <?php else: ?>
188
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
189
+ <?php endif; ?>
190
+
191
+ <?php echo $_weeeSeparator; ?>
192
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount,
193
+ true, true); ?>
194
+ <?php $_weeeSeparator = ' + '; ?>
195
+ <?php endforeach; ?>
196
+ </small>)</span>
197
+ <?php endif; ?>
198
+ <?php if ($_weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
199
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
200
+ <?php endif; ?>
201
+ <?php endif; ?>
202
+ </p>
203
+ <p class="price-to">
204
+ <span class="price-label"><?php echo $this->__('To') ?>:</span>
205
+ <?php if ($_taxHelper->displayBothPrices()): ?>
206
+ <span class="price-excluding-tax">
207
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
208
+ <?php echo $_coreHelper->currency($_maximalPriceTax) ?>
209
+ </span>
210
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product,
211
+ array(2, 1, 4))
212
+ ): ?>
213
+ <span class="weee">(<small>
214
+ <?php $_weeeSeparator = '';
215
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
216
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
217
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
218
+ <?php else: ?>
219
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
220
+ <?php endif; ?>
221
+
222
+ <?php echo $_weeeSeparator; ?>
223
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount,
224
+ true, true); ?>
225
+ <?php $_weeeSeparator = ' + '; ?>
226
+ <?php endforeach; ?>
227
+ </small>)</span>
228
+ <?php endif; ?>
229
+ <span class="price-including-tax">
230
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax') ?></span>
231
+ <?php echo $_coreHelper->currency($_maximalPriceInclTax) ?>
232
+ </span>
233
+ <?php else: ?>
234
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
235
+ <?php echo $_coreHelper->currency($_maximalPriceInclTax) ?>
236
+ <?php else: ?>
237
+ <?php echo $_coreHelper->currency($_maximalPriceTax) ?>
238
+ <?php endif; ?>
239
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product,
240
+ array(2, 1, 4))
241
+ ): ?>
242
+ <span class="weee">(<small>
243
+ <?php $_weeeSeparator = '';
244
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
245
+ <?php if ($_taxHelper->displayPriceIncludingTax() || $_weeeHelper->typeOfDisplay($_product,
246
+ array(2, 4))
247
+ ): ?>
248
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
249
+ <?php else: ?>
250
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
251
+ <?php endif; ?>
252
+
253
+ <?php echo $_weeeSeparator; ?>
254
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount,
255
+ true, true); ?>
256
+ <?php $_weeeSeparator = ' + '; ?>
257
+ <?php endforeach; ?>
258
+ </small>)</span>
259
+ <?php endif; ?>
260
+ <?php if ($_weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
261
+ <?php echo $_coreHelper->currency($_maximalPriceInclTax) ?>
262
+ <?php endif; ?>
263
+ <?php endif; ?>
264
+ </p>
265
+ <?php else: ?>
266
+ <?php if ($_taxHelper->displayBothPrices()): ?>
267
+ <span class="price-excluding-tax">
268
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
269
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
270
+ </span>
271
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product,
272
+ array(2, 1, 4))
273
+ ): ?>
274
+ <span class="weee">(<small>
275
+ <?php $_weeeSeparator = '';
276
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
277
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
278
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
279
+ <?php else: ?>
280
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
281
+ <?php endif; ?>
282
+
283
+ <?php echo $_weeeSeparator; ?>
284
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount,
285
+ true, true); ?>
286
+ <?php $_weeeSeparator = ' + '; ?>
287
+ <?php endforeach; ?>
288
+ </small>)</span>
289
+ <?php endif; ?>
290
+ <span class="price-including-tax">
291
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
292
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
293
+ </span>
294
+ <?php else: ?>
295
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
296
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product,
297
+ array(2, 1, 4))
298
+ ): ?>
299
+ <span class="weee">(<small>
300
+ <?php $_weeeSeparator = '';
301
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
302
+ <?php if ($_taxHelper->displayPriceIncludingTax()): ?>
303
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
304
+ <?php else: ?>
305
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
306
+ <?php endif; ?>
307
+
308
+ <?php echo $_weeeSeparator; ?>
309
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount,
310
+ true, true); ?>
311
+ <?php $_weeeSeparator = ' + '; ?>
312
+ <?php endforeach; ?>
313
+ </small>)</span>
314
+ <?php endif; ?>
315
+ <?php if ($_weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
316
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
317
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
318
+ <?php else: ?>
319
+ <?php echo $_coreHelper->currency($_minimalPriceTax + $_weeeTaxAmount) ?>
320
+ <?php endif; ?>
321
+ <?php endif; ?>
322
+ <?php endif; ?>
323
+ <?php endif; ?>
324
+ <?php endif; ?>
325
+ </div>
app/design/frontend/base/default/template/connector/product/list.phtml CHANGED
@@ -9,6 +9,9 @@ $products = $this->getLoadedProductCollection();
9
  $dynamicStyle = Mage::helper('ddg')->getDynamicStyles();
10
  ?>
11
  <style>
 
 
 
12
  .product-name{
13
  color: <?php echo $dynamicStyle['nameColor'];?>;
14
  font-size: <?php echo $dynamicStyle['fontSize'];?>;
@@ -103,8 +106,10 @@ $products = $this->getLoadedProductCollection();
103
 
104
  <td style="vertical-align: text-top; padding-right: 2px;">
105
  <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"
106
- class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>"
107
- width="140" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" align="middle" /></a>
 
 
108
 
109
  <div class="product-name" align="center"><b><?php echo $this->escapeHtml(substr($_product->getName(), 0, 40));?></b></div>
110
  <div class="product-price" align="center"><?php echo $this->getPriceHtml($_product, true) ?></div>
9
  $dynamicStyle = Mage::helper('ddg')->getDynamicStyles();
10
  ?>
11
  <style>
12
+ .price-box p {
13
+ margin: 0;
14
+ }
15
  .product-name{
16
  color: <?php echo $dynamicStyle['nameColor'];?>;
17
  font-size: <?php echo $dynamicStyle['fontSize'];?>;
106
 
107
  <td style="vertical-align: text-top; padding-right: 2px;">
108
  <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"
109
+ class="product-image"><img src="<?php echo $this->getProductImage($_product) ?>"
110
+ width="85" height="85"
111
+ alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'),
112
+ null, true) ?>" align="middle"/></a>
113
 
114
  <div class="product-name" align="center"><b><?php echo $this->escapeHtml(substr($_product->getName(), 0, 40));?></b></div>
115
  <div class="product-price" align="center"><?php echo $this->getPriceHtml($_product, true) ?></div>
app/design/frontend/base/default/template/connector/product/price.phtml CHANGED
@@ -394,7 +394,7 @@ $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simpleP
394
  $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
395
  $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
396
  ?>
397
- <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
398
  <div class="price-box">
399
  <p class="minimal-price">
400
  <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
394
  $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
395
  $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
396
  ?>
397
+ <?php if ($_minimalPriceValue): ?>
398
  <div class="price-box">
399
  <p class="minimal-price">
400
  <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
app/design/frontend/base/default/template/connector/wishlist.phtml CHANGED
@@ -6,6 +6,9 @@
6
  <?php if($items): ?>
7
  <?php $dynamicStyle = Mage::helper('ddg')->getDynamicStyles();?>
8
  <style>
 
 
 
9
  .product-name{
10
  color: <?php echo $dynamicStyle['nameColor'];?>;
11
  font-size: <?php echo $dynamicStyle['fontSize'];?>;
@@ -98,7 +101,11 @@
98
  <?php endif;?>
99
 
100
  <td style="vertical-align: text-top; padding-right: 2px;">
101
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="140" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" align="middle" /></a>
 
 
 
 
102
  <div class="product-name" align="center"><b><?php echo Mage::helper('core')->jsQuoteEscape(substr($_product->getName(), 0, 40));?></b></div>
103
  <div class="product-price" align="center"><?php echo $this->getPriceHtml($_product, true) ?></div>
104
  <div align="center">
6
  <?php if($items): ?>
7
  <?php $dynamicStyle = Mage::helper('ddg')->getDynamicStyles();?>
8
  <style>
9
+ .price-box p {
10
+ margin: 0;
11
+ }
12
  .product-name{
13
  color: <?php echo $dynamicStyle['nameColor'];?>;
14
  font-size: <?php echo $dynamicStyle['fontSize'];?>;
101
  <?php endif;?>
102
 
103
  <td style="vertical-align: text-top; padding-right: 2px;">
104
+ <a href="<?php echo $_product->getProductUrl() ?>"
105
+ title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"
106
+ class="product-image"><img src="<?php echo $this->getProductImage($_product); ?>" width="85"
107
+ height="85" alt="<?php echo $this->stripTags($this->getImageLabel($_product,
108
+ 'small_image'), null, true) ?>" align="middle"/></a>
109
  <div class="product-name" align="center"><b><?php echo Mage::helper('core')->jsQuoteEscape(substr($_product->getName(), 0, 40));?></b></div>
110
  <div class="product-price" align="center"><?php echo $this->getPriceHtml($_product, true) ?></div>
111
  <div align="center">
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>dotmailermagento</name>
4
- <version>6.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -25,10 +25,10 @@ Release Highlights:&#xD;
25
  + Dynamic Content Styling: Apply custom CSS to all dynamic content pages e.g. font size, colour and type.&#xD;
26
  &#xD;
27
  + Reporting: Now within the Newsletter section in Magento you can view the import status of contacts and orders, as well as the sending status of transactional and lost basket emails.</notes>
28
- <authors><author><name>Calin Diacon</name><user>cdiacon</user><email>calin.diacon@dotmailer.com</email></author><author><name>Adeel Qamar</name><user>adeel</user><email>adeel.qamar@dotmailer.com</email></author></authors>
29
- <date>2016-06-24</date>
30
- <time>10:34:01</time>
31
- <contents><target name="magecommunity"><dir name="Dotdigitalgroup"><dir name="Email"><dir name="Block"><dir name="Adminhtml"><dir name="Automation"><file name="Grid.php" hash="969e3da8dad7476afc7f2fe7f98b874a"/></dir><file name="Automation.php" hash="0063603cbf59e05c239f7dd87eac26e3"/><dir name="Campaign"><file name="Grid.php" hash="2e6c74c0de63a5eafc5bc75ef19a0f80"/></dir><file name="Campaign.php" hash="347b6b5d4de5feef62279626f3a7bb41"/><dir name="Catalog"><file name="Grid.php" hash="ea10d2cd26b6c126d43f2b507f911358"/></dir><file name="Catalog.php" hash="ba132a8dae85cb95135967908dac7c7d"/><dir name="Column"><dir name="Renderer"><file name="Imported.php" hash="9aeda38ab80ccc032ceda90d10c58d12"/><file name="Sync.php" hash="78246271f3c05f8d10677ce54a225207"/></dir></dir><dir name="Config"><dir name="Automation"><file name="Customdatafields.php" hash="e65b7448d1806268af48ed45437dc885"/></dir><file name="Customdatafields.php" hash="56cb173fc1b418a60f5b2d9bd9d05b85"/><dir name="Rules"><file name="Customdatafields.php" hash="1d688bf01dd141cecbeb8f86cc16175f"/></dir><file name="Select.php" hash="80fa3ca2d228511d0e580bfb9c56c904"/></dir><dir name="Contact"><dir name="Edit"><file name="Form.php" hash="57f41d2b6512ce3243f7639544b9195d"/></dir><file name="Edit.php" hash="2a8ed80298241140514b30bb99fbca77"/><file name="Grid.php" hash="d8139eeb81fd4c400ff3fb6ccc6262da"/></dir><file name="Contact.php" hash="edfdac40a8b166204c64efed8a7b3cd7"/><dir name="Customer"><dir name="Tab"><file name="Stats.php" hash="df80b08010045e10abfd42bf5156cd42"/></dir><file name="Tab.php" hash="99f85175855c852e5cead91500c49123"/></dir><dir name="Dashboard"><file name="Switcher.php" hash="fd4a2f78970870000ba8151da1c5f8d2"/><dir name="Tabs"><dir name="Analysis"><file name="Abandonedcarts.php" hash="0d86abf18c415b66ad09c6eb8f3ed7c0"/><file name="Customer.php" hash="acef3702082538eb5495cc3286e7dcc4"/><file name="Rfm.php" hash="5e8225bbb23929a4bb7957f940dd8927"/><file name="Sales.php" hash="b7ea7b521fc8915b33fb3d182eb9076b"/><file name="Subscriber.php" hash="5a4d0a5ec38f476ded288330b8b6a63d"/></dir><file name="Analysis.php" hash="afc77df2ed2b5994d53e768389221147"/><dir name="General"><file name="Data.php" hash="4a2466f3cbf4cef32a4c3aeba83c00aa"/></dir><file name="General.php" hash="aae7fb6cade08cb72ffc5f29515acc24"/><file name="Logs.php" hash="c9c69cfa7b0ed2e9d8f6a849999ba4a2"/><file name="Status.php" hash="15fb6c4ec0a19fc0feb3033661d14f9b"/></dir><file name="Tabs.php" hash="2f94a2700413024439e92b5d5874cd26"/></dir><file name="Dashboard.php" hash="3dadaa26eb69843b1e73647908467b06"/><dir name="Importer"><file name="Grid.php" hash="3344ba8791ed557bc77f7ad0c38e5676"/></dir><file name="Importer.php" hash="c7d5cf1afae2546bbc114a231c34b373"/><dir name="Order"><file name="Grid.php" hash="011484a8e430ca39dd3439ede5c27b82"/></dir><file name="Order.php" hash="8af36ac2d34d6f5059c5d3091fcf9099"/><dir name="Quote"><file name="Grid.php" hash="d412035c25abc9b563079836d8c52393"/></dir><file name="Quote.php" hash="38e4f7e02cab1d108abe1ba68130d7ec"/><dir name="Review"><file name="Grid.php" hash="ca947aae4a098fc172d180b4981a9830"/></dir><file name="Review.php" hash="c1fb596394c72b23199ba7a94f49f584"/><dir name="Rules"><dir name="Edit"><file name="Form.php" hash="3ad3dcabf324fbc368038ef5fbd869e3"/><dir name="Tab"><file name="Conditions.php" hash="f3b94da60251d1283b3ec680ad0c73a0"/><file name="Main.php" hash="79463e81837aa719c5f5c9d452729ed0"/></dir><file name="Tabs.php" hash="1fedda822f2705410ac87f75eb1ce4a9"/></dir><file name="Edit.php" hash="7e2b2b1a0b6befe00103862687f4599b"/><file name="Grid.php" hash="ef1b88f6af37ab89aa669c0a03a59f54"/></dir><file name="Rules.php" hash="8102a99fcc953b293c3cc70735ddbffb"/><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="View.php" hash="a71f518c762cb60181d33cd45b62e221"/></dir></dir></dir><dir name="System"><dir name="Advanced"><file name="Deletecontactids.php" hash="ae204cf633fd60b036b0970cc6d1c313"/><file name="Notification.php" hash="3d410572b473a81776fcf1e6efce753b"/><file name="Reimportcatalog.php" hash="d567f975071b67dac1e63660c8804fa2"/><file name="Reimportorders.php" hash="4bdc573907230de41face688c5d5bfbd"/><file name="Reimportquotes.php" hash="64321cf856dcb9b593875be3283330b9"/><file name="Reimportreviews.php" hash="8d50677d1198766a99eacb2d097d1982"/><file name="Reimportsubscribers.php" hash="e0f52ee8b1ac7fb95b03e4fb3e4c05bb"/><file name="Reimportwishlists.php" hash="046b124aea89e65bba6927092b2ef67f"/><file name="Reset.php" hash="8ec42415ec01c600181f6c82f5d5d421"/><file name="Resetcustomersimport.php" hash="c66c71a01bfd39438933235a80d0cf44"/><file name="Runcatalogsync.php" hash="cd41886e7346ca303d0f15a9b2d481f6"/><file name="Runcontactsync.php" hash="f2f11b4306eb3e2df5d4a596d7e54281"/><file name="Runimportersync.php" hash="3f48f8e1fde3a9f9bcd48f6a286958a1"/><file name="Runordersync.php" hash="160aba9a307eb9646c95ddb0bf63d9be"/><file name="Runquotesync.php" hash="562ce40bf0e2eef6e8a51475a0239189"/><file name="Runreviewsync.php" hash="c90c6f2d995abc5eb0d5f1933a0e529f"/><file name="Runsubscribersync.php" hash="5a1080c74437fbfd28f5397bff864080"/><file name="Runwishlistsync.php" hash="713c46c8cd6edac9a7611210b486df45"/><file name="Setupdatafields.php" hash="9021c32f11989db9a7691cbaa550e39c"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name="Ajaxvalidate.php" hash="4c52db7b597abee9773477bc3cbd2420"/><dir name="Automation"><file name="Connect.php" hash="adc4b0cbc18ec3261a28edbe3fbfc207"/></dir><dir name="Config"><file name="Addressbook.php" hash="fa7b146dd064951bc7483a13efb0e88d"/><file name="Colorpicker.php" hash="8ac984c68b6da790acb989d4cb7a1cc0"/><file name="Datafield.php" hash="917bbf064a83435d8fd951b08464f97a"/><file name="Enterprisevalidator.php" hash="df83aec19d0069c33be94ff2cf11c689"/><file name="Resetcontacts.php" hash="54349d335b374bee599a3e9118726033"/><file name="Resetguests.php" hash="eaea7c05bf2cfc81b9544f397280a436"/><file name="Resetsubscribers.php" hash="9d894ca04784a9cf559a184512408755"/><file name="Trial.php" hash="c86ce78bd4c9198706858fd102c9ca86"/><file name="Validator.php" hash="120c52c0a7f6d213deb2c681eb12c3a3"/></dir><dir name="Dynamic"><file name="Addressbookbutton.php" hash="9e5fef0bb60be0889120a3d9aaf4b8a6"/><dir name="Basket"><file name="Crosssell.php" hash="65d80e55bf42895af66639e6f0a3b664"/><file name="Related.php" hash="da310776a099053040e040e54a057679"/><file name="Upsell.php" hash="501e7dfab1ba2f52b2fad45f77ae4fbb"/></dir><file name="Bestsellers.php" hash="a351f4d1d977734733fdd95d7ed51620"/><file name="Couponinfo.php" hash="8dd7ee6852f8e6f9736c893ed8b9990d"/><file name="Creditmemonew.php" hash="912443f1d700e1a5ac8b2ef97adcd29a"/><file name="Crosssell.php" hash="e9f47c61d045489e7279349a42578e48"/><file name="Datafieldbutton.php" hash="bc050ed88c229ec76323a56821343b72"/><file name="Fallbackchooser.php" hash="87a26abe64947d76a440284b7a3dd491"/><file name="Fallbackcontainer.php" hash="1e3c11748bdc3c7a69002357474f65b2"/><dir name="Feefo"><file name="Reviews.php" hash="bc6df4f80f921392c2807a7649b29fb3"/><file name="Score.php" hash="3b527ac29e1f665f20b88edf3a41fb02"/></dir><file name="Gridlist.php" hash="eee12062d19dd7b9f1ddc098ae5e5af0"/><file name="Lostbasket.php" hash="a2d8afd78f8f6fa3fb3d7f2b322ca1e3"/><file name="Manualchooser.php" hash="913423e8b6e0f7949cf44ab624fa557d"/><file name="Manualcontainer.php" hash="18c8457fe96ffdf9b38194701cb732ed"/><file name="Mostviewed.php" hash="92e6ba3537b7c9a2804a05fe58fc1fbc"/><file name="Productpush.php" hash="39ef02233e3f0b05eb9c951f12120bf5"/><file name="Recentlyviewed.php" hash="aa70d914a338d8cd45c2d706c249602a"/><file name="Related.php" hash="a9caeb9da456801b135f2ba28ef84560"/><file name="Review.php" hash="55afdd0e2d1c728b9ec8810377548927"/><file name="Upsell.php" hash="b235292096f49eca3fc494dedc3b1150"/><dir name="Wishlist"><file name="Crosssell.php" hash="d400de6e9c87f8b4efea75c1cc7a34b1"/><file name="Related.php" hash="0f2c8ff231a1afdd92579d19b59f86e6"/><file name="Upsell.php" hash="82798c15b6735a4f407973fedeac00ea"/></dir><file name="Wishlist.php" hash="f19c40ff58ae7b32b89ecbc9f25ff3ca"/></dir><file name="Emailapivalidate.php" hash="b9ef6b5f86aa1d0df0f34d7b4c906805"/><file name="Installation.php" hash="1e0c4e83cd606b4d51eb9c8c863e567b"/><dir name="Url"><file name="Creditmemoupdate.php" hash="120b1641a325d018cd6655fdfc1af9bc"/><file name="Creditmemoupdateguest.php" hash="a86c2ffa71106996ec3d1a25c3814b9b"/><file name="Customerconfirmation.php" hash="ec96c64b875d8e3a1ac217ec1f7c79dd"/><file name="Customerconfirmed.php" hash="e8e46bf388978c4d20ca18d71774e73e"/><file name="Customernew.php" hash="b3aa5d5bc1a01a6d244552f5901dcd64"/><file name="Invoiceupdate.php" hash="f9d7dacc3ff96c5e81b5a217668589f1"/><file name="Invoiceupdateguest.php" hash="67b460efb813b49f028fd782fcad8985"/><file name="Newcreditmemo.php" hash="9aca49a4a6b84dae238eea7d018bf312"/><file name="Newcreditmemoguest.php" hash="a1f2d5a2cc744d0d9d49c7fa975831a5"/><file name="Newinvoice.php" hash="95880c74bad2a032070bc53d45a9ee24"/><file name="Newinvoiceguest.php" hash="5ddd8bedf19750e4e1ef744cf71ef669"/><file name="Neworder.php" hash="b78734d6c080136a2f0f8250ebacac47"/><file name="Neworderguest.php" hash="6cbf5f53ac2784ab24dca8c6e35944d4"/><file name="Newshipment.php" hash="b0ef0bbeade98fb4c0a1a5cab13a407e"/><file name="Newshipmentguest.php" hash="fae2ca4fb86580106e9e15e9c1581bad"/><file name="Orderupdate.php" hash="cc184fc84dec1ef6f37a2abcfae1eaad"/><file name="Orderupdateguest.php" hash="7d9a8f9f453aa8033434930b375a8ea8"/><file name="Shipmentupdate.php" hash="0f361e9f61906a9c5af78602e677505b"/><file name="Shipmentupdateguest.php" hash="b7b14768d8a0262c679b3069f2aa3fcc"/></dir></dir><dir name="Widget"><dir name="Chooser"><file name="Product.php" hash="692d7d63f3e7498dbb5138a0ca403083"/></dir></dir><dir name="Wishlist"><file name="Grid.php" hash="c6d6108f6de3f905ab2bb3096b7837f2"/></dir><file name="Wishlist.php" hash="48281253c790ccaf6b58c6a34c803f6b"/></dir><file name="Basket.php" hash="47cbdc12c1ac13dd6f34867f2b351c43"/><file name="Coupon.php" hash="9887617dc7d4c9ad6a9fe11f6d0b7574"/><dir name="Customer"><dir name="Account"><file name="Books.php" hash="df5bd58466bb614ea6651f427457e1d4"/></dir></dir><file name="Edc.php" hash="dabfb5d702f321ec854a327443346e21"/><file name="Feefo.php" hash="ed76c7571972e2c4bf69bc79c8beef31"/><dir name="Order"><file name="Creditmemo.php" hash="05fd539acb65b1118b10f5ccce2ef897"/><file name="Invoice.php" hash="99d4b99d7c336528e51990f759a32481"/><file name="Shipping.php" hash="ab075ef7700f6599019c97013192dad1"/></dir><file name="Order.php" hash="ab2afb327f7688e29e926792ccfb886d"/><file name="Products.php" hash="ce576a13278dfbbd0ac6c668238f03ea"/><dir name="Recommended"><file name="Products.php" hash="5363e4be85ade66f35ba7bfe36ee26b4"/><file name="Wishlistproducts.php" hash="944a278f20bdf54bde292097094863c9"/></dir><file name="Wishlist.php" hash="f98c9a81a8cbbf5b42b622a20dcc5ce0"/></dir><dir name="Helper"><file name="Config.php" hash="c7a02b58693d61434b1edaba957d160f"/><file name="Dashboard.php" hash="0e4ac39938b4abb1a9523e7e23f68885"/><file name="Data.php" hash="bd0d265f9f6e5f23ecde149073ec2342"/><file name="File.php" hash="bffaa30b8d7d355854ca7d72a15a8b89"/><file name="Recommended.php" hash="c9497a8a504dba535675493a88b6bb5c"/><file name="Transactional.php" hash="9602a0d87b4d0f26d218939b1e91b2ea"/></dir><dir name="Model"><dir name="Abstract"><file name="Rest.php" hash="6b237f3c8767fac6ddd6cf8a9feed13e"/></dir><dir name="Adminhtml"><dir name="Dashboard"><file name="Content.php" hash="5cabc9e5f9f3b2136251acc7023cdd5c"/><dir name="Tabs"><dir name="Analysis"><file name="Abandoned.php" hash="ca774e2d604743bc97999cec2f0c29a9"/><file name="Customer.php" hash="f6e6d31746cf3fd43bf1ae02e639c3d3"/><file name="Orders.php" hash="cd8f1692cbe4929a08136e237d576be3"/><file name="Rfm.php" hash="ffe6dbdf67d7985f47c7c9f4b28914dd"/><file name="Subscriber.php" hash="66696dfa3bf31db6aabb133f7976c239"/></dir></dir></dir><file name="Observer.php" hash="a847eab45ba16c9cac57a2fbf3d02caa"/><dir name="Source"><file name="Addressbooks.php" hash="5394d7d4e644bc3b1dbb52fa76bb6d18"/><file name="Addressbookspref.php" hash="e2bcd703e3bf554dfaf5880ba50eac01"/><dir name="Advanced"><file name="Abandonedlimit.php" hash="8512e23594f6128f745a9eef575a4df1"/><file name="Attributes.php" hash="edf2c69202eabf3576cb24077feb71bd"/><file name="Cronexpressionsone.php" hash="9ef4ab9fa407dc5e47e037cbe53ec429"/><file name="Cronexpressionstwo.php" hash="b7f1ba1e39dbffa049d15da9cd0a8f11"/><file name="Frequency.php" hash="bfdc4474762661561b2ed35b91a5df8e"/><file name="Quoteattributes.php" hash="bf1e255402020b758c5af9e1f8cefbdc"/><file name="Transdata.php" hash="9a0875a16947f0b7acbf34ccd5b89b15"/></dir><file name="Attributes.php" hash="9e62bcd0e2d42c857349deae86f714bd"/><dir name="Automation"><file name="Programme.php" hash="765a4d8d1f4a80e11755669dc085f992"/></dir><file name="Campaigns.php" hash="1e972ab52dafb2672bb9cd3343de25ac"/><dir name="Contact"><file name="Imported.php" hash="30c0d301ebb1357fa4ca7ac04ee9d653"/><file name="Modified.php" hash="e25cb9a7550b60cf7a5ff29287260a53"/></dir><dir name="Customer"><dir name="Attributes"><file name="Select.php" hash="46befe2d61623268aa507250f4fad7c2"/></dir></dir><file name="Datafields.php" hash="d288e3e5dc8f9e742696047877aef947"/><dir name="Datamapping"><file name="Datafieldaccess.php" hash="498aab828a8dfe868866ab48ced7988c"/><file name="Datafieldtype.php" hash="1f0b0da49bc2c33e6e3b8421790da12c"/></dir><dir name="Dynamic"><file name="Displaytype.php" hash="2a2285588f9cc40b05e7fc1dd271c606"/><file name="Gridview.php" hash="211d2711c8f368cc567cc87b9aeaf86e"/></dir><file name="Fontpicker.php" hash="69dafecee7ce6d1c5bb72c4adf39ac49"/><file name="Fontsize.php" hash="ef30bccf6ebd9600df751818fb6cfc32"/><dir name="Importer"><file name="Bulklimit.php" hash="a813367f827c6baf85484b650a542bd3"/><file name="Mode.php" hash="680be6f378e07dad5618c654b8d11fb2"/><file name="Status.php" hash="e4fb3e1e3ebf9a00beb99bd73cacdcfd"/></dir><dir name="Lostbaskets"><file name="Interval.php" hash="120d1107adb856ad5d33bf5d8fcfb46a"/><file name="Intervalminute.php" hash="998c0966fc9d22ff302a437bdab50d50"/></dir><file name="Orderstatus.php" hash="c5ab65f9fe21c6fbd205032aa0b72184"/><file name="Publicdatafields.php" hash="25cc3d787e2584127bcaf1a1d0da0cd8"/><dir name="Reviews"><file name="Delay.php" hash="e9feab3951916ba48a7c54a38b4d9372"/></dir><dir name="Rules"><file name="Condition.php" hash="58007de4be2a57df28eac4e26273f2bd"/><file name="Type.php" hash="3f8ff233dbb4e14d93faceaafe8f3a7d"/><file name="Value.php" hash="dacaa61244be5e01b8705c40341c7e27"/></dir><file name="Styling.php" hash="3d120feceaec08056af3bd7e3e8205f3"/><dir name="Sweettooth"><file name="Yesno.php" hash="bd34c6210934e5cbec2b0f700c4888be"/></dir><dir name="Sync"><dir name="Catalog"><file name="Attributes.php" hash="246d7dda56e2bf5419b9260c5875dd5a"/><file name="Type.php" hash="85581a4d7e7b651e13283495a8c91780"/><file name="Values.php" hash="5d825375747e552a97e60caf816daa65"/><file name="Visibility.php" hash="d7267ed8c7648fdc0a15837ea611659c"/></dir></dir><dir name="Transactional"><file name="Mode.php" hash="20cb80da2b78d3d35c4b63a5cec803c7"/><file name="Port.php" hash="7a6f6133c408e432fb960b27cc829d5d"/></dir></dir></dir><dir name="Api2"><dir name="Subscriber"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="ab35beafbd50e5bd7e687eec560cb767"/></dir></dir></dir></dir><dir name="Apiconnector"><file name="Client.php" hash="81af0933b665cfb7bf7e50d964e391c6"/><file name="Contact.php" hash="72f5059db738c35a2577b6e52c78c247"/><file name="Customer.php" hash="03cb537c251c331639d6c532e9b51d2e"/><file name="Test.php" hash="a3e7f09adf4a90018a6a480a65be1c94"/></dir><file name="Automation.php" hash="9934048d1ddd41886b4e0a8d1466bed4"/><file name="Campaign.php" hash="05536df2b5e01e6c729a6ed30efd1384"/><file name="Catalog.php" hash="521c8e1da0e0d42409a405bb14dc29cc"/><dir name="Connector"><file name="Account.php" hash="7ff81e63f716ecb28bd7713ca861d042"/><file name="Campaign.php" hash="e00a324b0f14689c221824eac00690fb"/><file name="Datafield.php" hash="f6e9f6c3e279c5fefed1430ff62668f3"/><file name="Order.php" hash="a5c105a495b01a8604a097a9dd1c3ba9"/><file name="Product.php" hash="dbebc8abda7d2fd3633d92ca4c899b98"/><file name="Quote.php" hash="b4460dbf5b6e6829532a3110a4872de2"/></dir><file name="Contact.php" hash="13910c22e55c1eeda2a402a6a2fa6bbf"/><dir name="Controller"><file name="Observer.php" hash="b1768578871a43c3456e80dd6099cda1"/></dir><file name="Cron.php" hash="ec49eaf74fb75f807ea63f403d925652"/><dir name="Customer"><file name="Guest.php" hash="89096877fbc2582ae33f1bff50ac3480"/><file name="Observer.php" hash="29b5226434c4e05f7912bf59a89e06c3"/><dir name="Review"><file name="Rating.php" hash="d4e94ca13596414e07a80ab298228c18"/></dir><file name="Review.php" hash="d6c6bee5eadeb0136d3ea7f3e21d1b8a"/><dir name="Wishlist"><file name="Item.php" hash="44364b2846280c38ed455b484ad7e652"/></dir><file name="Wishlist.php" hash="efa6f42e16f423db6f6508b6f199b767"/></dir><file name="Customer.php" hash="c787b7d537a66c63ede1fd04732fbdeb"/><dir name="Email"><file name="Template.php" hash="4594040c518bac98d52bc5c704cce520"/></dir><file name="Email.php" hash="bad91a3317ca76ead059448569894d3b"/><file name="Feed.php" hash="4c16da63c0b1b4bf9bc1ba349defad42"/><file name="Importer.php" hash="da15ecdd78965870157d872c88bda29e"/><dir name="Newsletter"><file name="Observer.php" hash="d217c911d6c1857658af67902b86a8a4"/><file name="Sub.php" hash="61d950b6202ea079d298c715c1019f47"/><file name="Subscriber.php" hash="4ca6b274470813743d4fd96bb88887be"/></dir><file name="Order.php" hash="2bb1bdfcfe9c6e8420fcab82b5432e86"/><file name="Quote.php" hash="2d90dfdec2442badee64787fb1d2cf8d"/><dir name="Resource"><dir name="Automation"><file name="Collection.php" hash="2a9354a080c443b8b02f5aee8c3ddd87"/></dir><file name="Automation.php" hash="01c46e747b80c517d788c1b8eae83bce"/><dir name="Campaign"><file name="Collection.php" hash="f67f9c082e4ee89a818a35dbdfa49f2f"/></dir><file name="Campaign.php" hash="85f742743cc15bd29438685d83a75495"/><dir name="Catalog"><file name="Collection.php" hash="8020dcb3ed0382d700a3837f509777a2"/></dir><file name="Catalog.php" hash="5bae8b6c8d4996f3db3c3adc1679423c"/><dir name="Contact"><file name="Collection.php" hash="0d5872f49558c8ccfc858f3e70db3b26"/></dir><file name="Contact.php" hash="02cb4dcc39d2b5cfbb2bd721fa4f76f5"/><dir name="Importer"><file name="Collection.php" hash="4ab03aac095a51fa774f96b8f4a97a3c"/></dir><file name="Importer.php" hash="fbba704ca55dd91ba3b4d54cd057d771"/><dir name="Order"><file name="Collection.php" hash="bd082b888b632f02db6125b5015952ec"/></dir><file name="Order.php" hash="c90bd34df1dbac17246ca4ea291c3262"/><dir name="Quote"><file name="Collection.php" hash="994bebb28a619b54a9023fe047a86ec4"/></dir><file name="Quote.php" hash="3739534cf1dadcce79eab527eb6f002b"/><dir name="Review"><file name="Collection.php" hash="677c8d174de1016b377627e71033a3f4"/></dir><file name="Review.php" hash="d7d572757e5e1be85f44a29fc65a5476"/><dir name="Rules"><file name="Collection.php" hash="0aa0e9b6176382163826b3041fd58854"/></dir><file name="Rules.php" hash="a72965cd8cc76afc004e4893605291ee"/><file name="Segment.php" hash="556d39c92ed2bfea6f8405d95e56bfed"/><file name="Setup.php" hash="5cbe51eb21e76eb56e5f7c23722694eb"/><dir name="Wishlist"><file name="Collection.php" hash="d00f2e0fc2433fedbbe6b931fc860d26"/></dir><file name="Wishlist.php" hash="c1f188274a3a7a07bd932b6fc777b860"/></dir><file name="Review.php" hash="c9fc0f77d4a387bff5bc534373e256d8"/><file name="Rules.php" hash="003614cb8d4a1fa2d4d94a98ef5c6493"/><dir name="Sales"><file name="Observer.php" hash="c0eb5e309f177454324f523ae27bfc93"/><file name="Order.php" hash="8f61f0817b19f94e24a9ef4d85389608"/><file name="Quote.php" hash="bfef5842c45cf94721aedacc22f6fb92"/></dir><dir name="Sweettooth"><file name="Observer.php" hash="ef6a31e38303c8218847d30fb7ffe1f8"/></dir><dir name="Sync"><dir name="Contact"><file name="Bulk.php" hash="efabaf6ac3756627531808f94b92c213"/><file name="Delete.php" hash="780fb918618b640027e84bf8e2b7a1b1"/><file name="Update.php" hash="4c4044c088c6074f889ed0ebf2490035"/></dir><dir name="Td"><file name="Bulk.php" hash="2f24c5f797d42515282ec174b29b7f1a"/><file name="Delete.php" hash="0a84181ba867183506114cd88fed90ff"/><file name="Update.php" hash="791839798a75e30c60c14ad6ad57e032"/></dir></dir><file name="Wishlist.php" hash="183f2fe7c55a25db724d459eea0e070e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConnectorController.php" hash="9d26ba75ac8d63177d471bb4d806e668"/><dir name="Email"><file name="AutomationController.php" hash="02eb2602dff9c4c01eea0605843135f5"/><file name="CampaignController.php" hash="d762a6ead5079f13d188f580b3d02ca0"/><file name="CatalogController.php" hash="9d09067f1317e212ac9ab3adb0853927"/><file name="ContactController.php" hash="ced306941537f1a96b6a958ad7ecd52c"/><file name="DashboardController.php" hash="d659c12500413365ca50e961ecdc5b69"/><file name="ImporterController.php" hash="373c5fe6a997b6bce726907c0181ddaa"/><file name="OrderController.php" hash="adaab40cc2145dbe0fcee4086e1f10f8"/><file name="QuoteController.php" hash="f8dfdc228bc9db5b3df7e9469b2d06cd"/><file name="ReviewController.php" hash="189a1a722a5cd6be5b598177db5467d8"/><file name="RulesController.php" hash="3f9bb8b87ebbfc64a5c8ec1f6e747cbd"/><file name="StudioController.php" hash="181a5959094dbfe6a055d877cfc43c4d"/><file name="WishlistController.php" hash="f8f44f4c91c029134b269fa7892a9e9a"/></dir><file name="RulesController.php" hash="2c5208a4ec7015cc2618a5e115e8163c"/><dir name="System"><dir name="Email"><file name="TemplateController.php" hash="9b7655b454910a8b0740b1f21c0d405c"/></dir></dir><dir name="Widget"><file name="ChooserController.php" hash="cfc60115875e9a278eb4a467d6ab7f61"/></dir></dir><file name="AjaxController.php" hash="e299ce9e5ba60eb46c20fdf57fc307b7"/><dir name="Customer"><file name="AccountController.php" hash="66803c15d031799d7ed65204ce3a0ed8"/><file name="NewsletterController.php" hash="a633e0b9e49a0c55b3fce767db85ed57"/></dir><file name="DynamicContentController.php" hash="59b9424f9af06c92383f1cd439179b6b"/><file name="EmailController.php" hash="e47fff299d33099a0299e9b98693fe1b"/><file name="FeefoController.php" hash="6e434f512aac4722478b6ecbe114b50a"/><file name="ProductsController.php" hash="40862b602e89cd9eae3578b2c4f56fe8"/><file name="QuoteproductsController.php" hash="88f1449ffa1f159e0c83dc2f6cd32377"/><file name="ReportController.php" hash="22da418ab9601da06e116ab7ae6c0703"/><file name="ResponseController.php" hash="6657d2d8ac6f6acc325af83caa7adae3"/><file name="TrialController.php" hash="a5b1d5d885d00e07fa5be9ed0a56ae19"/><file name="WishlistController.php" hash="1105ff613d0514f30a079b9f1d37d9b6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="934f345566d0e68cebda4a7ff5134812"/><file name="api2.xml" hash="e6be0fdc4206cb242f22b2335476b497"/><file name="config.xml" hash="2b7c0a5e4a9ebebe93a01e21d6451165"/><file name="files.yaml" hash="5892d4742243f1dd9ec0f7a904ff834e"/><file name="system.xml" hash="e992ef377621849acda33e144b5559e6"/></dir><dir name="sql"><dir name="email_connector_setup"><file name="mysql4-install-0.1.0.php" hash="f3d6db792b934b3eb39a48668ca61f26"/><file name="mysql4-install-3.0.0.php" hash="46fc31218ecc8efe7fddd3bf73afe391"/><file name="mysql4-install-4.0.0.php" hash="4e37164404c938b3ca9f192c48ffe320"/><file name="mysql4-install-5.0.0.php" hash="562f67a014e8c3e1889efe93f38fe86c"/><file name="mysql4-upgrade-1.1.1-1.1.2.php" hash="80a0a28ac5634c8cab4b07697cd17d15"/><file name="mysql4-upgrade-1.1.2-1.5.0.php" hash="34ac896f6e681c56d8d2dd6bf411215e"/><file name="mysql4-upgrade-1.5.0-2.0.0.php" hash="cc4358563618d1e99af2f20140b20896"/><file name="mysql4-upgrade-2.0.0-2.0.1.php" hash="2f71a10d19eddd97c9eba9af840e4f09"/><file name="mysql4-upgrade-2.0.1-2.0.2.php" hash="377e04eabc2be7341c722c660c9a90e7"/><file name="mysql4-upgrade-2.0.3-2.0.4.php" hash="24fa79e2081e5e7443d0a8d972bae706"/><file name="mysql4-upgrade-2.0.4-2.0.5.php" hash="f2080852fd1e0512da9bf1074767a9b3"/><file name="mysql4-upgrade-2.0.5-2.0.6.php" hash="af72eaa784e18cfd7e9cbe435a91c377"/><file name="mysql4-upgrade-3.0.1-3.0.2.php" hash="f0e202a9c3478082f37002b18f11bbb8"/><file name="mysql4-upgrade-3.0.3-3.0.4.php" hash="07b6da531301c969ba4da67968f9e972"/><file name="mysql4-upgrade-3.0.4-3.0.5.php" hash="27869fe86167c23111a31eba2c8e155a"/><file name="mysql4-upgrade-3.1.2-3.1.3.php" hash="d6b86c9cf5d3e0db816587db863e1adb"/><file name="mysql4-upgrade-3.2.1-3.3.0.php" hash="5171981e00cbe495ffa3c877320a5ae9"/><file name="mysql4-upgrade-3.3.0-3.3.1.php" hash="5171981e00cbe495ffa3c877320a5ae9"/><file name="mysql4-upgrade-3.3.2-3.3.3.php" hash="5fb9d165aeaea645246e7e5ecde8266e"/><file name="mysql4-upgrade-3.4.0-4.0.0.php" hash="ff793758950de7926b7997b3f20dfcae"/><file name="mysql4-upgrade-4.0.0-4.1.0.php" hash="d9bc43694dd5aab27a0a580cb40f93f9"/><file name="mysql4-upgrade-4.1.3-5.0.0.php" hash="d5d915f99d1e5dc30d3d5b09fc9ea955"/><file name="mysql4-upgrade-5.0.0-5.0.1.php" hash="cb3fd589ac446135c34a0d501195de71"/><file name="mysql4-upgrade-5.0.4-5.1.0.php" hash="40648862a5273d67b7e4130a3ab8eafb"/></dir></dir></dir><dir name="Mailcheck"><dir name="Helper"><file name="Data.php" hash="589b8909f08143ad44234f05911488df"/></dir><dir name="etc"><file name="config.xml" hash="841542418fa8e50cb53a3bde50ce38f4"/><file name="jstranslator.xml" hash="d0f175944d2c14badd2cade8d4a40585"/><file name="system.xml" hash="7d64665436e5eb104a1316c32338ec72"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="connector.xml" hash="b8128e43a55af744b09856624ee7e5e2"/><file name="mailcheck.xml" hash="ff97a71e8124f8e6e55d951124addace"/></dir><dir name="template"><dir name="connector"><file name="additional-newsletter-pref.phtml" hash="db1251a0475c0947fd8e5854da4fd9ae"/><file name="basket.phtml" hash="e880eb33bf3061f5210949654c742d44"/><file name="coupon.phtml" hash="aee5dd843d100228a51bd1b82ae62b59"/><dir><dir name="customer"><file name="stats.phtml" hash="b26f6331faa6b3e662b14e5bde8c66d8"/></dir><dir name="feefo"><file name="reviews.phtml" hash="cd1dc08242588b1427534326eb7525ab"/><file name="score.phtml" hash="74d48f68f5d0ec044a8c067fa7f3c631"/></dir><dir name="product"><file name="list.phtml" hash="46dbd832182739db91a38aaa8c1af656"/><file name="price.phtml" hash="9dd8b3ca28e06ca9a5b50e76bb40a87a"/></dir></dir><file name="email_capture.phtml" hash="faf17eaeb824877f5998f1e3ab91504d"/><file name="email_capture_init.phtml" hash="f485003272b78400308d3af73574f4a7"/><file name="review.phtml" hash="7964555b22e0e7584b1ed3a6f55145c0"/><file name="roi_code.phtml" hash="6a10d66154bd92b0191989af2a87d815"/><file name="tracking_code.phtml" hash="1bbccb72db1a769ef8e14e0df2c9febd"/><file name="wishlist.phtml" hash="57a19d289832c70ad0bf2b601fb49003"/></dir><dir name="page"><file name="blank.phtml" hash="0715b94134ba2d74df363c51b1b8a62c"/></dir><dir name="mailcheck"><file name="scripts.phtml" hash="adbf073bb2cb944c44b11d79bcca1eb5"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="connector"><file name="email.xml" hash="9b5fc457c9a1a3fdde0126e839cc17bd"/></dir></dir><dir name="template"><dir name="connector"><file name="appcues.phtml" hash="11bb1143b5334bbcbf182d17a118f281"/><file name="beacon.phtml" hash="16adad769c2e3d8365189ed84c4055a6"/><dir><dir name="customer"><file name="stats.phtml" hash="0b842d3ccaa1cc33098be44a7935f97f"/></dir><dir name="dashboard"><file name="accountbar.phtml" hash="e01c432f6690613fd2845769777830cf"/><file name="content.phtml" hash="9e5c843b6323ea80c410662fb4f39793"/><file name="logs.phtml" hash="0a06f9e56b4113e8face6ce325f4b0d1"/><file name="status.phtml" hash="7762544e3cb5b838695a4e2bb1b63fc0"/><dir name="tabs"><dir name="analysis"><file name="index.phtml" hash="a9ef11d470dae139ad5243fc1bc91431"/><file name="rfm.phtml" hash="ba40514bd39c3c582eb1b141b71c6158"/></dir><file name="data.phtml" hash="bd7952625a3697cf4e5ef3cd0feb0a80"/><dir name="general"><file name="index.phtml" hash="68fa10c2aeef745d80b60317c9461a94"/></dir></dir><file name="tabs.phtml" hash="8df8befdd2f2300b177aacaca5d8a278"/></dir><dir name="system"><dir name="config"><file name="createdatafield.phtml" hash="a1a571fa0957d7fadf346d1b89c5a0b0"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Dotdigitalgroup_Email.xml" hash="8745c0b2eae08783b6203a613acdbcb8"/><file name="Dotdigitalgroup_Mailcheck.xml" hash="247272e2cc981e8b91af95962b0f0470"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="connector"><file name="banner.png" hash="5a2ad97cd75f0160228a7a0d6a8520ed"/><file name="config.css" hash="433bf71f40517a667ee9aba495f1746c"/><file name="dashboard.css" hash="08e2c6ae799757fd68a85781311f2b97"/><dir><dir name="fancybox"><dir name="images"><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancybox_loading.gif" hash="328cc0f6c78211485058d460e80f4fa8"/><file name="fancybox_loading@2x.gif" hash="f92938639fa894a0e8ded1c3368abe98"/><file name="fancybox_overlay.png" hash="77aeaa52715b898b73c74d68c630330e"/><file name="fancybox_sprite.png" hash="783d4031fe50c3d83c960911e1fbc705"/><file name="fancybox_sprite@2x.png" hash="ed9970ce22242421e66ff150aa97fe5f"/></dir><file name="jquery.fancybox.css" hash="25ec82c1c5fe3748421fff035cb53bd7"/></dir></dir><file name="trialerror.png" hash="2d4647acd83536f941c65c2641b61c17"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="mailcheck"><file name="init.js" hash="585e518d5d2dd2d0f50243f51a3c881b"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Dotdigitalgroup_Email.csv" hash="d7296c4cf7c874141184edfa8a9602a7"/></dir></target><target name="mageweb"><dir name="lib"><dir name="Raygun4php"><dir><dir name="Exception"><file name="UnsatisfiedDependencyException.php" hash="c8a3a3d93aab111851a87df7ae72b3ff"/><file name="UnsupportedOperationException.php" hash="64fdf1aa3f4c3eacd5611076b38ee91f"/></dir></dir><file name="README.md" hash="0aed7c6a52f358016b2c1b8f5e4e35ed"/><file name="Raygun4PhpException.php" hash="4ca2d2d70bdcc80c69fa2407c7da59a3"/><file name="RaygunClient.php" hash="799328dcd7412029b6de7833ac6efb04"/><file name="RaygunClientMessage.php" hash="29fbae8dd4c018c8afa20482c77404db"/><file name="RaygunEnvironmentMessage.php" hash="01a7f0e37ce34531270d95a9863d8477"/><file name="RaygunExceptionMessage.php" hash="0269e694b5a7591126565c0a5c9d2086"/><file name="RaygunExceptionTraceLineMessage.php" hash="1cbfbdce6ec7f47afd98021bae85e4d1"/><file name="RaygunIdentifier.php" hash="9656811317ae26b492194ccfc4c2c27e"/><file name="RaygunMessage.php" hash="dca4b5de6a6701bd454a1ab1bf51a7d7"/><file name="RaygunMessageDetails.php" hash="5a3e0eace0c9019b266a8c81ede2f4d4"/><file name="RaygunRequestMessage.php" hash="46ace410e10edd56f58f34b93f836c9d"/><file name="Uuid.php" hash="19a17225a4dddd2ce79c38771b771f81"/><file name="cacert.crt" hash="47961e7ef15667c93cd99be01b51f00a"/></dir><dir name="connector"><dir><dir name="feefo"><file name="feedback-no-th.xsl" hash="239c40764293a65b85d9f86479ced8b6"/><file name="feedback.xsl" hash="7167570192e48fdf57baa9c2cf56986b"/></dir></dir></dir></dir><dir name="js"><dir name="connector"><file name="jquery-1.10.1.min.js" hash="6575db3ffd3c31a034a4efdecba15c36"/><file name="jquery.fancybox.js" hash="f839315034b46bdea0b2ea4e1fda21b8"/><file name="jquery.fancybox.pack.js" hash="2346f5b36c3bfd08cc648704f33264f6"/><dir><dir name="procolor-1.0"><dir name="img"><file name="procolor_win_bars.png" hash="a8e41fdddd2253309e0b3e5154668c24"/><file name="procolor_win_bg.gif" hash="c0558cecd0e0ffb9ca89efe00f422261"/><file name="procolor_win_bg.png" hash="4e2a34cc64888fe264fcf6249dfe40da"/><file name="procolor_win_boxes.png" hash="e971c1ca87a0cb52d32408270d00a0da"/><file name="procolor_win_close.png" hash="20a8bb9433157962ab25d86d28d088a3"/><file name="procolor_win_drop.png" hash="9ddce741de330573f082ffe83005d691"/><file name="procolor_win_palette_raw.png" hash="ea98dde528e987029af6e24dbef53922"/><file name="procolor_win_sel_circle.gif" hash="3674b62db5a6eaa4dcedb0749dde4106"/><file name="procolor_win_sel_circle.png" hash="d76195d1777e9a14ebc1a242ab712037"/><file name="procolor_win_sel_rect.gif" hash="b74a72aaf1ea21d55b8751079f283537"/><file name="procolor_win_sel_rect.png" hash="5513589e2b6dc1a980a4e65a746005d0"/><file name="procolor_win_wheel_black.png" hash="62353005bb70bbfa8ffd700112d72582"/><file name="procolor_win_wheel_rgb.jpg" hash="afdd3852c3788a58794ddf1de9557fd8"/></dir><file name="procolor.compressed.js" hash="79e463efad21212e4096d40b9e17d96c"/><file name="procolor.js" hash="48810d2afe806b04180f0e331134c07b"/></dir></dir><file name="selector.js" hash="5dc1900967679a41c70ed5f1755240e2"/></dir><dir name="mailcheck"><file name="magentoMailcheck.js" hash="6809380b384fe432ee73305c04f3526e"/><file name="mailcheck.min.js" hash="25966edf6e585822063b48dd34bcee9b"/></dir></dir></target></contents>
32
  <compatible/>
33
  <dependencies><required><php><min>1.5.2</min><max>6.0.0</max></php><extension><name>curl</name><min>7.15.1</min><max>7.30.0</max></extension></required></dependencies>
34
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>dotmailermagento</name>
4
+ <version>6.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
25
  + Dynamic Content Styling: Apply custom CSS to all dynamic content pages e.g. font size, colour and type.&#xD;
26
  &#xD;
27
  + Reporting: Now within the Newsletter section in Magento you can view the import status of contacts and orders, as well as the sending status of transactional and lost basket emails.</notes>
28
+ <authors><author><name>Calin Diacon</name><user>cdiacon</user><email>calin.diacon@dotmailer.com</email></author><author><name>Adeel Qamar</name><user>adeel</user><email>adeel.qamar@dotmailer.com</email></author><author><name>Zygimantas Simkus</name><user>zygimantas</user><email>zygimantas.simkus@dotmailer.com</email></author></authors>
29
+ <date>2016-10-12</date>
30
+ <time>09:55:36</time>
31
+ <contents><target name="magecommunity"><dir name="Dotdigitalgroup"><dir name="Email"><dir name="Block"><dir name="Adminhtml"><dir name="Automation"><file name="Grid.php" hash="969e3da8dad7476afc7f2fe7f98b874a"/></dir><file name="Automation.php" hash="0063603cbf59e05c239f7dd87eac26e3"/><dir name="Campaign"><file name="Grid.php" hash="d8f4cd00715324980a0dd0ec74d5eba6"/></dir><file name="Campaign.php" hash="347b6b5d4de5feef62279626f3a7bb41"/><dir name="Catalog"><file name="Grid.php" hash="ea10d2cd26b6c126d43f2b507f911358"/></dir><file name="Catalog.php" hash="ba132a8dae85cb95135967908dac7c7d"/><dir name="Column"><dir name="Renderer"><file name="Imported.php" hash="9aeda38ab80ccc032ceda90d10c58d12"/><file name="Sync.php" hash="78246271f3c05f8d10677ce54a225207"/></dir></dir><dir name="Config"><dir name="Automation"><file name="Customdatafields.php" hash="e65b7448d1806268af48ed45437dc885"/></dir><file name="Customdatafields.php" hash="56cb173fc1b418a60f5b2d9bd9d05b85"/><dir name="Rules"><file name="Customdatafields.php" hash="1d688bf01dd141cecbeb8f86cc16175f"/></dir><file name="Select.php" hash="80fa3ca2d228511d0e580bfb9c56c904"/></dir><dir name="Contact"><dir name="Edit"><file name="Form.php" hash="57f41d2b6512ce3243f7639544b9195d"/></dir><file name="Edit.php" hash="2a8ed80298241140514b30bb99fbca77"/><file name="Grid.php" hash="d8139eeb81fd4c400ff3fb6ccc6262da"/></dir><file name="Contact.php" hash="edfdac40a8b166204c64efed8a7b3cd7"/><dir name="Customer"><dir name="Tab"><file name="Stats.php" hash="57a670b3d9e778e4481a5cf667551afd"/></dir><file name="Tab.php" hash="99f85175855c852e5cead91500c49123"/></dir><dir name="Dashboard"><file name="Switcher.php" hash="fd4a2f78970870000ba8151da1c5f8d2"/><dir name="Tabs"><dir name="Analysis"><file name="Abandonedcarts.php" hash="0d86abf18c415b66ad09c6eb8f3ed7c0"/><file name="Customer.php" hash="acef3702082538eb5495cc3286e7dcc4"/><file name="Rfm.php" hash="5e8225bbb23929a4bb7957f940dd8927"/><file name="Sales.php" hash="b7ea7b521fc8915b33fb3d182eb9076b"/><file name="Subscriber.php" hash="5a4d0a5ec38f476ded288330b8b6a63d"/></dir><file name="Analysis.php" hash="afc77df2ed2b5994d53e768389221147"/><dir name="General"><file name="Data.php" hash="4a2466f3cbf4cef32a4c3aeba83c00aa"/></dir><file name="General.php" hash="aae7fb6cade08cb72ffc5f29515acc24"/><file name="Logs.php" hash="c9c69cfa7b0ed2e9d8f6a849999ba4a2"/><file name="Status.php" hash="672a965aa2c30bced1ef855b7bcddcb6"/></dir><file name="Tabs.php" hash="2f94a2700413024439e92b5d5874cd26"/></dir><file name="Dashboard.php" hash="3dadaa26eb69843b1e73647908467b06"/><dir name="Importer"><file name="Grid.php" hash="3344ba8791ed557bc77f7ad0c38e5676"/></dir><file name="Importer.php" hash="c7d5cf1afae2546bbc114a231c34b373"/><dir name="Order"><file name="Grid.php" hash="011484a8e430ca39dd3439ede5c27b82"/></dir><file name="Order.php" hash="8af36ac2d34d6f5059c5d3091fcf9099"/><dir name="Quote"><file name="Grid.php" hash="d412035c25abc9b563079836d8c52393"/></dir><file name="Quote.php" hash="38e4f7e02cab1d108abe1ba68130d7ec"/><dir name="Review"><file name="Grid.php" hash="ca947aae4a098fc172d180b4981a9830"/></dir><file name="Review.php" hash="c1fb596394c72b23199ba7a94f49f584"/><dir name="Rules"><dir name="Edit"><file name="Form.php" hash="3ad3dcabf324fbc368038ef5fbd869e3"/><dir name="Tab"><file name="Conditions.php" hash="f3b94da60251d1283b3ec680ad0c73a0"/><file name="Main.php" hash="79463e81837aa719c5f5c9d452729ed0"/></dir><file name="Tabs.php" hash="1fedda822f2705410ac87f75eb1ce4a9"/></dir><file name="Edit.php" hash="7e2b2b1a0b6befe00103862687f4599b"/><file name="Grid.php" hash="ef1b88f6af37ab89aa669c0a03a59f54"/></dir><file name="Rules.php" hash="8102a99fcc953b293c3cc70735ddbffb"/><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="View.php" hash="a71f518c762cb60181d33cd45b62e221"/></dir></dir></dir><dir name="System"><dir name="Advanced"><file name="Deletecontactids.php" hash="ae204cf633fd60b036b0970cc6d1c313"/><file name="Notification.php" hash="3d410572b473a81776fcf1e6efce753b"/><file name="Reimportcatalog.php" hash="d567f975071b67dac1e63660c8804fa2"/><file name="Reimportorders.php" hash="4bdc573907230de41face688c5d5bfbd"/><file name="Reimportquotes.php" hash="64321cf856dcb9b593875be3283330b9"/><file name="Reimportreviews.php" hash="8d50677d1198766a99eacb2d097d1982"/><file name="Reimportsubscribers.php" hash="e0f52ee8b1ac7fb95b03e4fb3e4c05bb"/><file name="Reimportwishlists.php" hash="046b124aea89e65bba6927092b2ef67f"/><file name="Reset.php" hash="8ec42415ec01c600181f6c82f5d5d421"/><file name="Resetcustomersimport.php" hash="c66c71a01bfd39438933235a80d0cf44"/><file name="Runcatalogsync.php" hash="cd41886e7346ca303d0f15a9b2d481f6"/><file name="Runcontactsync.php" hash="f2f11b4306eb3e2df5d4a596d7e54281"/><file name="Runimportersync.php" hash="3f48f8e1fde3a9f9bcd48f6a286958a1"/><file name="Runordersync.php" hash="160aba9a307eb9646c95ddb0bf63d9be"/><file name="Runquotesync.php" hash="562ce40bf0e2eef6e8a51475a0239189"/><file name="Runreviewsync.php" hash="c90c6f2d995abc5eb0d5f1933a0e529f"/><file name="Runsubscribersync.php" hash="5a1080c74437fbfd28f5397bff864080"/><file name="Runwishlistsync.php" hash="713c46c8cd6edac9a7611210b486df45"/><file name="Setupdatafields.php" hash="9021c32f11989db9a7691cbaa550e39c"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name="Ajaxvalidate.php" hash="4c52db7b597abee9773477bc3cbd2420"/><file name="Appcues.php" hash="7146985f11e35a3b7b98a496f361047d"/><dir name="Automation"><file name="Connect.php" hash="adc4b0cbc18ec3261a28edbe3fbfc207"/></dir><dir name="Config"><file name="Addressbook.php" hash="fa7b146dd064951bc7483a13efb0e88d"/><file name="Colorpicker.php" hash="8ac984c68b6da790acb989d4cb7a1cc0"/><file name="Datafield.php" hash="917bbf064a83435d8fd951b08464f97a"/><file name="Enterprisevalidator.php" hash="df83aec19d0069c33be94ff2cf11c689"/><file name="Resetcontacts.php" hash="54349d335b374bee599a3e9118726033"/><file name="Resetguests.php" hash="eaea7c05bf2cfc81b9544f397280a436"/><file name="Resetsubscribers.php" hash="9d894ca04784a9cf559a184512408755"/><file name="Trial.php" hash="c86ce78bd4c9198706858fd102c9ca86"/><file name="Validator.php" hash="120c52c0a7f6d213deb2c681eb12c3a3"/></dir><dir name="Dynamic"><file name="Addressbookbutton.php" hash="9e5fef0bb60be0889120a3d9aaf4b8a6"/><dir name="Basket"><file name="Crosssell.php" hash="65d80e55bf42895af66639e6f0a3b664"/><file name="Related.php" hash="da310776a099053040e040e54a057679"/><file name="Upsell.php" hash="501e7dfab1ba2f52b2fad45f77ae4fbb"/></dir><file name="Bestsellers.php" hash="a351f4d1d977734733fdd95d7ed51620"/><file name="Couponinfo.php" hash="dbf0dbb77b2382fd0970be78c936c374"/><file name="Creditmemonew.php" hash="912443f1d700e1a5ac8b2ef97adcd29a"/><file name="Crosssell.php" hash="e9f47c61d045489e7279349a42578e48"/><file name="Datafieldbutton.php" hash="bc050ed88c229ec76323a56821343b72"/><file name="Fallbackchooser.php" hash="87a26abe64947d76a440284b7a3dd491"/><file name="Fallbackcontainer.php" hash="1e3c11748bdc3c7a69002357474f65b2"/><dir name="Feefo"><file name="Reviews.php" hash="bc6df4f80f921392c2807a7649b29fb3"/><file name="Score.php" hash="3b527ac29e1f665f20b88edf3a41fb02"/></dir><file name="Gridlist.php" hash="eee12062d19dd7b9f1ddc098ae5e5af0"/><file name="Lostbasket.php" hash="a2d8afd78f8f6fa3fb3d7f2b322ca1e3"/><file name="Manualchooser.php" hash="913423e8b6e0f7949cf44ab624fa557d"/><file name="Manualcontainer.php" hash="18c8457fe96ffdf9b38194701cb732ed"/><file name="Mostviewed.php" hash="92e6ba3537b7c9a2804a05fe58fc1fbc"/><file name="Productpush.php" hash="39ef02233e3f0b05eb9c951f12120bf5"/><file name="Recentlyviewed.php" hash="aa70d914a338d8cd45c2d706c249602a"/><file name="Related.php" hash="a9caeb9da456801b135f2ba28ef84560"/><file name="Review.php" hash="55afdd0e2d1c728b9ec8810377548927"/><file name="Upsell.php" hash="b235292096f49eca3fc494dedc3b1150"/><dir name="Wishlist"><file name="Crosssell.php" hash="d400de6e9c87f8b4efea75c1cc7a34b1"/><file name="Related.php" hash="0f2c8ff231a1afdd92579d19b59f86e6"/><file name="Upsell.php" hash="82798c15b6735a4f407973fedeac00ea"/></dir><file name="Wishlist.php" hash="f19c40ff58ae7b32b89ecbc9f25ff3ca"/></dir><file name="Emailapivalidate.php" hash="b9ef6b5f86aa1d0df0f34d7b4c906805"/><file name="Installation.php" hash="1e0c4e83cd606b4d51eb9c8c863e567b"/><dir name="Url"><file name="Creditmemoupdate.php" hash="120b1641a325d018cd6655fdfc1af9bc"/><file name="Creditmemoupdateguest.php" hash="a86c2ffa71106996ec3d1a25c3814b9b"/><file name="Customerconfirmation.php" hash="ec96c64b875d8e3a1ac217ec1f7c79dd"/><file name="Customerconfirmed.php" hash="e8e46bf388978c4d20ca18d71774e73e"/><file name="Customernew.php" hash="b3aa5d5bc1a01a6d244552f5901dcd64"/><file name="Invoiceupdate.php" hash="f9d7dacc3ff96c5e81b5a217668589f1"/><file name="Invoiceupdateguest.php" hash="67b460efb813b49f028fd782fcad8985"/><file name="Newcreditmemo.php" hash="9aca49a4a6b84dae238eea7d018bf312"/><file name="Newcreditmemoguest.php" hash="a1f2d5a2cc744d0d9d49c7fa975831a5"/><file name="Newinvoice.php" hash="95880c74bad2a032070bc53d45a9ee24"/><file name="Newinvoiceguest.php" hash="5ddd8bedf19750e4e1ef744cf71ef669"/><file name="Neworder.php" hash="b78734d6c080136a2f0f8250ebacac47"/><file name="Neworderguest.php" hash="6cbf5f53ac2784ab24dca8c6e35944d4"/><file name="Newshipment.php" hash="b0ef0bbeade98fb4c0a1a5cab13a407e"/><file name="Newshipmentguest.php" hash="fae2ca4fb86580106e9e15e9c1581bad"/><file name="Orderupdate.php" hash="cc184fc84dec1ef6f37a2abcfae1eaad"/><file name="Orderupdateguest.php" hash="7d9a8f9f453aa8033434930b375a8ea8"/><file name="Shipmentupdate.php" hash="0f361e9f61906a9c5af78602e677505b"/><file name="Shipmentupdateguest.php" hash="b7b14768d8a0262c679b3069f2aa3fcc"/></dir></dir><dir name="Widget"><dir name="Chooser"><file name="Product.php" hash="692d7d63f3e7498dbb5138a0ca403083"/></dir></dir><dir name="Wishlist"><file name="Grid.php" hash="c6d6108f6de3f905ab2bb3096b7837f2"/></dir><file name="Wishlist.php" hash="48281253c790ccaf6b58c6a34c803f6b"/></dir><file name="Basket.php" hash="17221e5f232bbd45833beb8c1749f087"/><file name="Coupon.php" hash="6ab9755f072bda85e6584f2bf621ecbd"/><dir name="Customer"><dir name="Account"><file name="Books.php" hash="ff0bc9a71a48331a6af37b0a1246fc6e"/></dir></dir><file name="Edc.php" hash="213ad35e7662456ab432455828c04c1a"/><file name="Feefo.php" hash="ed76c7571972e2c4bf69bc79c8beef31"/><dir name="Order"><file name="Creditmemo.php" hash="05fd539acb65b1118b10f5ccce2ef897"/><file name="Invoice.php" hash="99d4b99d7c336528e51990f759a32481"/><file name="Shipping.php" hash="ab075ef7700f6599019c97013192dad1"/></dir><file name="Order.php" hash="ab2afb327f7688e29e926792ccfb886d"/><file name="Products.php" hash="ce576a13278dfbbd0ac6c668238f03ea"/><dir name="Recommended"><file name="Products.php" hash="e2bdac0278a9414d7af81d5657c578f2"/><file name="Wishlistproducts.php" hash="944a278f20bdf54bde292097094863c9"/></dir><file name="Wishlist.php" hash="f98c9a81a8cbbf5b42b622a20dcc5ce0"/></dir><dir name="Helper"><file name="Config.php" hash="a7937cf68d21e4048a4c5333b9d1b053"/><file name="Dashboard.php" hash="0e4ac39938b4abb1a9523e7e23f68885"/><file name="Data.php" hash="b01de083ee800d45021761d1ce7c92fc"/><file name="File.php" hash="bffaa30b8d7d355854ca7d72a15a8b89"/><file name="Recommended.php" hash="c9497a8a504dba535675493a88b6bb5c"/><file name="Transactional.php" hash="9602a0d87b4d0f26d218939b1e91b2ea"/></dir><dir name="Model"><dir name="Abstract"><file name="Rest.php" hash="6b237f3c8767fac6ddd6cf8a9feed13e"/></dir><dir name="Adminhtml"><dir name="Dashboard"><file name="Content.php" hash="5cabc9e5f9f3b2136251acc7023cdd5c"/><dir name="Tabs"><dir name="Analysis"><file name="Abandoned.php" hash="ca774e2d604743bc97999cec2f0c29a9"/><file name="Customer.php" hash="f6e6d31746cf3fd43bf1ae02e639c3d3"/><file name="Orders.php" hash="cd8f1692cbe4929a08136e237d576be3"/><file name="Rfm.php" hash="ffe6dbdf67d7985f47c7c9f4b28914dd"/><file name="Subscriber.php" hash="66696dfa3bf31db6aabb133f7976c239"/></dir></dir></dir><file name="Observer.php" hash="a847eab45ba16c9cac57a2fbf3d02caa"/><dir name="Source"><file name="Addressbooks.php" hash="5394d7d4e644bc3b1dbb52fa76bb6d18"/><file name="Addressbookspref.php" hash="e2bcd703e3bf554dfaf5880ba50eac01"/><dir name="Advanced"><file name="Abandonedlimit.php" hash="8512e23594f6128f745a9eef575a4df1"/><file name="Attributes.php" hash="edf2c69202eabf3576cb24077feb71bd"/><file name="Cronexpressionsone.php" hash="9ef4ab9fa407dc5e47e037cbe53ec429"/><file name="Cronexpressionstwo.php" hash="b7f1ba1e39dbffa049d15da9cd0a8f11"/><file name="Frequency.php" hash="bfdc4474762661561b2ed35b91a5df8e"/><file name="Quoteattributes.php" hash="bf1e255402020b758c5af9e1f8cefbdc"/><file name="Transdata.php" hash="9a0875a16947f0b7acbf34ccd5b89b15"/></dir><file name="Attributes.php" hash="9e62bcd0e2d42c857349deae86f714bd"/><dir name="Automation"><file name="Programme.php" hash="bafa400021da047d25fd9b4ef82b64be"/></dir><file name="Campaigns.php" hash="cf4672327e1d6090516053ed0eef56e2"/><dir name="Contact"><file name="Imported.php" hash="30c0d301ebb1357fa4ca7ac04ee9d653"/><file name="Modified.php" hash="e25cb9a7550b60cf7a5ff29287260a53"/></dir><dir name="Customer"><dir name="Attributes"><file name="Select.php" hash="46befe2d61623268aa507250f4fad7c2"/></dir></dir><file name="Datafields.php" hash="cbdea1b65e9159cca64ad710548f9735"/><dir name="Datamapping"><file name="Datafieldaccess.php" hash="498aab828a8dfe868866ab48ced7988c"/><file name="Datafieldtype.php" hash="1f0b0da49bc2c33e6e3b8421790da12c"/></dir><dir name="Dynamic"><file name="Displaytype.php" hash="2a2285588f9cc40b05e7fc1dd271c606"/><file name="Gridview.php" hash="211d2711c8f368cc567cc87b9aeaf86e"/></dir><file name="Fontpicker.php" hash="69dafecee7ce6d1c5bb72c4adf39ac49"/><file name="Fontsize.php" hash="ef30bccf6ebd9600df751818fb6cfc32"/><dir name="Importer"><file name="Bulklimit.php" hash="a813367f827c6baf85484b650a542bd3"/><file name="Mode.php" hash="680be6f378e07dad5618c654b8d11fb2"/><file name="Status.php" hash="e4fb3e1e3ebf9a00beb99bd73cacdcfd"/></dir><dir name="Lostbaskets"><file name="Interval.php" hash="120d1107adb856ad5d33bf5d8fcfb46a"/><file name="Intervalminute.php" hash="998c0966fc9d22ff302a437bdab50d50"/></dir><file name="Orderstatus.php" hash="c5ab65f9fe21c6fbd205032aa0b72184"/><file name="Publicdatafields.php" hash="520b43565d8e72056378ac3912cbb9c1"/><dir name="Reviews"><file name="Delay.php" hash="e9feab3951916ba48a7c54a38b4d9372"/></dir><dir name="Rules"><file name="Condition.php" hash="58007de4be2a57df28eac4e26273f2bd"/><file name="Type.php" hash="3f8ff233dbb4e14d93faceaafe8f3a7d"/><file name="Value.php" hash="dacaa61244be5e01b8705c40341c7e27"/></dir><file name="Styling.php" hash="3d120feceaec08056af3bd7e3e8205f3"/><dir name="Sweettooth"><file name="Yesno.php" hash="bd34c6210934e5cbec2b0f700c4888be"/></dir><dir name="Sync"><dir name="Catalog"><file name="Attributes.php" hash="246d7dda56e2bf5419b9260c5875dd5a"/><file name="Type.php" hash="85581a4d7e7b651e13283495a8c91780"/><file name="Values.php" hash="5d825375747e552a97e60caf816daa65"/><file name="Visibility.php" hash="d7267ed8c7648fdc0a15837ea611659c"/></dir></dir><dir name="Transactional"><file name="Mode.php" hash="20cb80da2b78d3d35c4b63a5cec803c7"/><file name="Port.php" hash="7a6f6133c408e432fb960b27cc829d5d"/></dir></dir></dir><dir name="Api2"><dir name="Subscriber"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="ab35beafbd50e5bd7e687eec560cb767"/></dir></dir></dir></dir><dir name="Apiconnector"><file name="Client.php" hash="916a7628902b415307d61c5d03e5e088"/><file name="Contact.php" hash="72f5059db738c35a2577b6e52c78c247"/><file name="Customer.php" hash="03cb537c251c331639d6c532e9b51d2e"/><file name="Test.php" hash="a3e7f09adf4a90018a6a480a65be1c94"/></dir><file name="Automation.php" hash="a972ec0b41f255cbb7733a8a544aa300"/><file name="Campaign.php" hash="caa124be1bd943af0ff9963899a4889d"/><file name="Catalog.php" hash="521c8e1da0e0d42409a405bb14dc29cc"/><dir name="Connector"><file name="Account.php" hash="7ff81e63f716ecb28bd7713ca861d042"/><file name="Campaign.php" hash="e00a324b0f14689c221824eac00690fb"/><file name="Datafield.php" hash="f6e9f6c3e279c5fefed1430ff62668f3"/><file name="Order.php" hash="bb77cc925f458d656f772f5d5a82335e"/><file name="Product.php" hash="dbebc8abda7d2fd3633d92ca4c899b98"/><file name="Quote.php" hash="b4460dbf5b6e6829532a3110a4872de2"/></dir><file name="Contact.php" hash="13910c22e55c1eeda2a402a6a2fa6bbf"/><dir name="Controller"><file name="Observer.php" hash="b1768578871a43c3456e80dd6099cda1"/></dir><file name="Cron.php" hash="ec49eaf74fb75f807ea63f403d925652"/><dir name="Customer"><file name="Guest.php" hash="89096877fbc2582ae33f1bff50ac3480"/><file name="Observer.php" hash="29b5226434c4e05f7912bf59a89e06c3"/><dir name="Review"><file name="Rating.php" hash="d4e94ca13596414e07a80ab298228c18"/></dir><file name="Review.php" hash="d6c6bee5eadeb0136d3ea7f3e21d1b8a"/><dir name="Wishlist"><file name="Item.php" hash="3545b0eae3f2dbd28d13d93f33742d94"/></dir><file name="Wishlist.php" hash="efa6f42e16f423db6f6508b6f199b767"/></dir><file name="Customer.php" hash="c787b7d537a66c63ede1fd04732fbdeb"/><dir name="Email"><file name="Template.php" hash="4594040c518bac98d52bc5c704cce520"/></dir><file name="Email.php" hash="bad91a3317ca76ead059448569894d3b"/><file name="Feed.php" hash="4c16da63c0b1b4bf9bc1ba349defad42"/><file name="Importer.php" hash="2facf651021f3d3f3cf2abfce3451646"/><dir name="Newsletter"><file name="Observer.php" hash="c0529ce551397e24605df97a08da42f1"/><file name="Sub.php" hash="61d950b6202ea079d298c715c1019f47"/><file name="Subscriber.php" hash="4ca6b274470813743d4fd96bb88887be"/></dir><file name="Observer.php" hash="be72c21538540e175888a09e823936d2"/><file name="Order.php" hash="2bb1bdfcfe9c6e8420fcab82b5432e86"/><file name="Quote.php" hash="2d90dfdec2442badee64787fb1d2cf8d"/><dir name="Resource"><dir name="Automation"><file name="Collection.php" hash="2a9354a080c443b8b02f5aee8c3ddd87"/></dir><file name="Automation.php" hash="01c46e747b80c517d788c1b8eae83bce"/><dir name="Campaign"><file name="Collection.php" hash="f67f9c082e4ee89a818a35dbdfa49f2f"/></dir><file name="Campaign.php" hash="949138ac108e4440bb92cd5b58d143e2"/><dir name="Catalog"><file name="Collection.php" hash="8020dcb3ed0382d700a3837f509777a2"/></dir><file name="Catalog.php" hash="5bae8b6c8d4996f3db3c3adc1679423c"/><dir name="Contact"><file name="Collection.php" hash="0d5872f49558c8ccfc858f3e70db3b26"/></dir><file name="Contact.php" hash="6bbda373dfd43a3f6a9715bfc779475a"/><file name="Coupon.php" hash="8e87810fbd5c770e32651c0f90e08e4a"/><dir name="Importer"><file name="Collection.php" hash="4ab03aac095a51fa774f96b8f4a97a3c"/></dir><file name="Importer.php" hash="fbba704ca55dd91ba3b4d54cd057d771"/><dir name="Order"><file name="Collection.php" hash="bd082b888b632f02db6125b5015952ec"/></dir><file name="Order.php" hash="c90bd34df1dbac17246ca4ea291c3262"/><dir name="Quote"><file name="Collection.php" hash="994bebb28a619b54a9023fe047a86ec4"/></dir><file name="Quote.php" hash="3739534cf1dadcce79eab527eb6f002b"/><dir name="Review"><file name="Collection.php" hash="677c8d174de1016b377627e71033a3f4"/></dir><file name="Review.php" hash="d7d572757e5e1be85f44a29fc65a5476"/><dir name="Rule"><file name="Collection.php" hash="10b14c4b637ddfb78ae0bcf352ac9dbf"/></dir><dir name="Rules"><file name="Collection.php" hash="0aa0e9b6176382163826b3041fd58854"/></dir><file name="Rules.php" hash="a72965cd8cc76afc004e4893605291ee"/><file name="Segment.php" hash="556d39c92ed2bfea6f8405d95e56bfed"/><file name="Setup.php" hash="5cbe51eb21e76eb56e5f7c23722694eb"/><dir name="Wishlist"><file name="Collection.php" hash="d00f2e0fc2433fedbbe6b931fc860d26"/></dir><file name="Wishlist.php" hash="c1f188274a3a7a07bd932b6fc777b860"/></dir><file name="Review.php" hash="c9fc0f77d4a387bff5bc534373e256d8"/><file name="Rules.php" hash="f88827a600fada39e7531d71247811ae"/><dir name="Sales"><file name="Observer.php" hash="a1f8a2c6b94c657d93e88a8f6634ff8e"/><file name="Order.php" hash="9a992e051f98fa86aa9794225c682e5d"/><file name="Quote.php" hash="bfef5842c45cf94721aedacc22f6fb92"/></dir><dir name="Sweettooth"><file name="Observer.php" hash="ef6a31e38303c8218847d30fb7ffe1f8"/></dir><dir name="Sync"><dir name="Contact"><file name="Bulk.php" hash="efabaf6ac3756627531808f94b92c213"/><file name="Delete.php" hash="780fb918618b640027e84bf8e2b7a1b1"/><file name="Update.php" hash="4c4044c088c6074f889ed0ebf2490035"/></dir><dir name="Td"><file name="Bulk.php" hash="2f24c5f797d42515282ec174b29b7f1a"/><file name="Delete.php" hash="0a84181ba867183506114cd88fed90ff"/><file name="Update.php" hash="791839798a75e30c60c14ad6ad57e032"/></dir></dir><file name="Wishlist.php" hash="46176aefa12f28d3cb13836f9da5811e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConnectorController.php" hash="6322b006247604c11998fd363369e7b5"/><dir name="Email"><file name="AutomationController.php" hash="02eb2602dff9c4c01eea0605843135f5"/><file name="CampaignController.php" hash="afd802d0d444bb294c62171e194c77f7"/><file name="CatalogController.php" hash="9d09067f1317e212ac9ab3adb0853927"/><file name="ContactController.php" hash="ced306941537f1a96b6a958ad7ecd52c"/><file name="DashboardController.php" hash="d659c12500413365ca50e961ecdc5b69"/><file name="ImporterController.php" hash="373c5fe6a997b6bce726907c0181ddaa"/><file name="OrderController.php" hash="adaab40cc2145dbe0fcee4086e1f10f8"/><file name="QuoteController.php" hash="f8dfdc228bc9db5b3df7e9469b2d06cd"/><file name="ReviewController.php" hash="189a1a722a5cd6be5b598177db5467d8"/><file name="RulesController.php" hash="3f9bb8b87ebbfc64a5c8ec1f6e747cbd"/><file name="StudioController.php" hash="181a5959094dbfe6a055d877cfc43c4d"/><file name="WishlistController.php" hash="f8f44f4c91c029134b269fa7892a9e9a"/></dir><file name="RulesController.php" hash="2c5208a4ec7015cc2618a5e115e8163c"/><dir name="System"><dir name="Email"><file name="TemplateController.php" hash="bb848aeec15beb09af2b014a86a3b69b"/></dir></dir><dir name="Widget"><file name="ChooserController.php" hash="cfc60115875e9a278eb4a467d6ab7f61"/></dir></dir><file name="AjaxController.php" hash="e299ce9e5ba60eb46c20fdf57fc307b7"/><dir name="Customer"><file name="AccountController.php" hash="66803c15d031799d7ed65204ce3a0ed8"/><file name="NewsletterController.php" hash="a633e0b9e49a0c55b3fce767db85ed57"/></dir><file name="DynamicContentController.php" hash="59b9424f9af06c92383f1cd439179b6b"/><file name="EmailController.php" hash="e47fff299d33099a0299e9b98693fe1b"/><file name="FeefoController.php" hash="6e434f512aac4722478b6ecbe114b50a"/><file name="ProductsController.php" hash="40862b602e89cd9eae3578b2c4f56fe8"/><file name="QuoteproductsController.php" hash="88f1449ffa1f159e0c83dc2f6cd32377"/><file name="ReportController.php" hash="22da418ab9601da06e116ab7ae6c0703"/><file name="ResponseController.php" hash="6657d2d8ac6f6acc325af83caa7adae3"/><file name="TrialController.php" hash="a5b1d5d885d00e07fa5be9ed0a56ae19"/><file name="WishlistController.php" hash="1105ff613d0514f30a079b9f1d37d9b6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="27c500721c959fa6b971e5d66fa1f2a8"/><file name="api2.xml" hash="e6be0fdc4206cb242f22b2335476b497"/><file name="config.xml" hash="6720163eece20f6f9fe3dfca4ea6331c"/><file name="files.yaml" hash="5892d4742243f1dd9ec0f7a904ff834e"/><file name="system.xml" hash="7571f1f18e7615cbbe371a1940e23dc0"/></dir><dir name="sql"><dir name="email_connector_setup"><file name="mysql4-install-0.1.0.php" hash="f3d6db792b934b3eb39a48668ca61f26"/><file name="mysql4-install-3.0.0.php" hash="46fc31218ecc8efe7fddd3bf73afe391"/><file name="mysql4-install-4.0.0.php" hash="4e37164404c938b3ca9f192c48ffe320"/><file name="mysql4-install-5.0.0.php" hash="043243c1a54626aeb69a5a9b43d31d92"/><file name="mysql4-install-6.0.0.php" hash="b7677ef453385a18361398aef7b67fee"/><file name="mysql4-upgrade-1.1.1-1.1.2.php" hash="80a0a28ac5634c8cab4b07697cd17d15"/><file name="mysql4-upgrade-1.1.2-1.5.0.php" hash="34ac896f6e681c56d8d2dd6bf411215e"/><file name="mysql4-upgrade-1.5.0-2.0.0.php" hash="cc4358563618d1e99af2f20140b20896"/><file name="mysql4-upgrade-2.0.0-2.0.1.php" hash="2f71a10d19eddd97c9eba9af840e4f09"/><file name="mysql4-upgrade-2.0.1-2.0.2.php" hash="377e04eabc2be7341c722c660c9a90e7"/><file name="mysql4-upgrade-2.0.3-2.0.4.php" hash="24fa79e2081e5e7443d0a8d972bae706"/><file name="mysql4-upgrade-2.0.4-2.0.5.php" hash="f2080852fd1e0512da9bf1074767a9b3"/><file name="mysql4-upgrade-2.0.5-2.0.6.php" hash="af72eaa784e18cfd7e9cbe435a91c377"/><file name="mysql4-upgrade-3.0.1-3.0.2.php" hash="f0e202a9c3478082f37002b18f11bbb8"/><file name="mysql4-upgrade-3.0.3-3.0.4.php" hash="07b6da531301c969ba4da67968f9e972"/><file name="mysql4-upgrade-3.0.4-3.0.5.php" hash="27869fe86167c23111a31eba2c8e155a"/><file name="mysql4-upgrade-3.1.2-3.1.3.php" hash="d6b86c9cf5d3e0db816587db863e1adb"/><file name="mysql4-upgrade-3.2.1-3.3.0.php" hash="5171981e00cbe495ffa3c877320a5ae9"/><file name="mysql4-upgrade-3.3.0-3.3.1.php" hash="5171981e00cbe495ffa3c877320a5ae9"/><file name="mysql4-upgrade-3.3.2-3.3.3.php" hash="5fb9d165aeaea645246e7e5ecde8266e"/><file name="mysql4-upgrade-3.4.0-4.0.0.php" hash="ff793758950de7926b7997b3f20dfcae"/><file name="mysql4-upgrade-4.0.0-4.1.0.php" hash="d9bc43694dd5aab27a0a580cb40f93f9"/><file name="mysql4-upgrade-4.1.3-5.0.0.php" hash="d5d915f99d1e5dc30d3d5b09fc9ea955"/><file name="mysql4-upgrade-5.0.0-5.0.1.php" hash="cb3fd589ac446135c34a0d501195de71"/><file name="mysql4-upgrade-5.0.4-5.1.0.php" hash="40648862a5273d67b7e4130a3ab8eafb"/><file name="mysql4-upgrade-6.1.0-6.1.1.php" hash="8f2a5eff9c003ec2005fd9655211cfa6"/></dir></dir></dir><dir name="Mailcheck"><dir name="Helper"><file name="Data.php" hash="589b8909f08143ad44234f05911488df"/></dir><dir name="etc"><file name="config.xml" hash="841542418fa8e50cb53a3bde50ce38f4"/><file name="jstranslator.xml" hash="d0f175944d2c14badd2cade8d4a40585"/><file name="system.xml" hash="7d64665436e5eb104a1316c32338ec72"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="connector.xml" hash="b8128e43a55af744b09856624ee7e5e2"/><file name="mailcheck.xml" hash="ff97a71e8124f8e6e55d951124addace"/></dir><dir name="template"><dir name="connector"><file name="additional-newsletter-pref.phtml" hash="db1251a0475c0947fd8e5854da4fd9ae"/><file name="basket.phtml" hash="de84f0e490ddb61a953775665a21df4d"/><file name="coupon.phtml" hash="aee5dd843d100228a51bd1b82ae62b59"/><dir><dir name="customer"><file name="stats.phtml" hash="b26f6331faa6b3e662b14e5bde8c66d8"/></dir><dir name="feefo"><file name="reviews.phtml" hash="cd1dc08242588b1427534326eb7525ab"/><file name="score.phtml" hash="74d48f68f5d0ec044a8c067fa7f3c631"/></dir><dir name="product"><file name="bundle_price.phtml" hash="38e93c85eb3937a357d77c1ee4211919"/><file name="list.phtml" hash="2d1572e1ccea82afd794a75b0744350e"/><file name="price.phtml" hash="54c55194bb0fd642d0262e4485feb37e"/></dir></dir><file name="email_capture.phtml" hash="faf17eaeb824877f5998f1e3ab91504d"/><file name="email_capture_init.phtml" hash="f485003272b78400308d3af73574f4a7"/><file name="review.phtml" hash="7964555b22e0e7584b1ed3a6f55145c0"/><file name="roi_code.phtml" hash="6a10d66154bd92b0191989af2a87d815"/><file name="tracking_code.phtml" hash="1bbccb72db1a769ef8e14e0df2c9febd"/><file name="wishlist.phtml" hash="43c4d37d7aaa079e115bde799b10fac3"/></dir><dir name="page"><file name="blank.phtml" hash="0715b94134ba2d74df363c51b1b8a62c"/></dir><dir name="mailcheck"><file name="scripts.phtml" hash="adbf073bb2cb944c44b11d79bcca1eb5"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="connector"><file name="email.xml" hash="fb6d4d76c9388ddfaa6bc4468fad423f"/></dir></dir><dir name="template"><dir name="connector"><file name="appcues.phtml" hash="72b19ac107c63bb719efc0072f50d524"/><file name="beacon.phtml" hash="16adad769c2e3d8365189ed84c4055a6"/><dir><dir name="customer"><file name="stats.phtml" hash="0b842d3ccaa1cc33098be44a7935f97f"/></dir><dir name="dashboard"><file name="accountbar.phtml" hash="e01c432f6690613fd2845769777830cf"/><file name="content.phtml" hash="9e5c843b6323ea80c410662fb4f39793"/><file name="logs.phtml" hash="0a06f9e56b4113e8face6ce325f4b0d1"/><file name="status.phtml" hash="7762544e3cb5b838695a4e2bb1b63fc0"/><dir name="tabs"><dir name="analysis"><file name="index.phtml" hash="a9ef11d470dae139ad5243fc1bc91431"/><file name="rfm.phtml" hash="ba40514bd39c3c582eb1b141b71c6158"/></dir><file name="data.phtml" hash="bd7952625a3697cf4e5ef3cd0feb0a80"/><dir name="general"><file name="index.phtml" hash="68fa10c2aeef745d80b60317c9461a94"/></dir></dir><file name="tabs.phtml" hash="8df8befdd2f2300b177aacaca5d8a278"/></dir><dir name="system"><dir name="config"><file name="createdatafield.phtml" hash="a1a571fa0957d7fadf346d1b89c5a0b0"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Dotdigitalgroup_Email.xml" hash="8745c0b2eae08783b6203a613acdbcb8"/><file name="Dotdigitalgroup_Mailcheck.xml" hash="247272e2cc981e8b91af95962b0f0470"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="connector"><file name="banner.png" hash="5a2ad97cd75f0160228a7a0d6a8520ed"/><file name="config.css" hash="433bf71f40517a667ee9aba495f1746c"/><file name="dashboard.css" hash="08e2c6ae799757fd68a85781311f2b97"/><dir><dir name="fancybox"><dir name="images"><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancybox_loading.gif" hash="328cc0f6c78211485058d460e80f4fa8"/><file name="fancybox_loading@2x.gif" hash="f92938639fa894a0e8ded1c3368abe98"/><file name="fancybox_overlay.png" hash="77aeaa52715b898b73c74d68c630330e"/><file name="fancybox_sprite.png" hash="783d4031fe50c3d83c960911e1fbc705"/><file name="fancybox_sprite@2x.png" hash="ed9970ce22242421e66ff150aa97fe5f"/></dir><file name="jquery.fancybox.css" hash="25ec82c1c5fe3748421fff035cb53bd7"/></dir></dir><file name="trialerror.png" hash="2d4647acd83536f941c65c2641b61c17"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="mailcheck"><file name="init.js" hash="585e518d5d2dd2d0f50243f51a3c881b"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Dotdigitalgroup_Email.csv" hash="d7296c4cf7c874141184edfa8a9602a7"/></dir></target><target name="mageweb"><dir name="lib"><dir name="Raygun4php"><dir><dir name="Exception"><file name="UnsatisfiedDependencyException.php" hash="c8a3a3d93aab111851a87df7ae72b3ff"/><file name="UnsupportedOperationException.php" hash="64fdf1aa3f4c3eacd5611076b38ee91f"/></dir></dir><file name="README.md" hash="0aed7c6a52f358016b2c1b8f5e4e35ed"/><file name="Raygun4PhpException.php" hash="4ca2d2d70bdcc80c69fa2407c7da59a3"/><file name="RaygunClient.php" hash="799328dcd7412029b6de7833ac6efb04"/><file name="RaygunClientMessage.php" hash="29fbae8dd4c018c8afa20482c77404db"/><file name="RaygunEnvironmentMessage.php" hash="01a7f0e37ce34531270d95a9863d8477"/><file name="RaygunExceptionMessage.php" hash="0269e694b5a7591126565c0a5c9d2086"/><file name="RaygunExceptionTraceLineMessage.php" hash="1cbfbdce6ec7f47afd98021bae85e4d1"/><file name="RaygunIdentifier.php" hash="9656811317ae26b492194ccfc4c2c27e"/><file name="RaygunMessage.php" hash="dca4b5de6a6701bd454a1ab1bf51a7d7"/><file name="RaygunMessageDetails.php" hash="5a3e0eace0c9019b266a8c81ede2f4d4"/><file name="RaygunRequestMessage.php" hash="46ace410e10edd56f58f34b93f836c9d"/><file name="Uuid.php" hash="19a17225a4dddd2ce79c38771b771f81"/><file name="cacert.crt" hash="47961e7ef15667c93cd99be01b51f00a"/></dir><dir name="connector"><dir><dir name="feefo"><file name="feedback-no-th.xsl" hash="239c40764293a65b85d9f86479ced8b6"/><file name="feedback.xsl" hash="7167570192e48fdf57baa9c2cf56986b"/></dir></dir></dir></dir><dir name="js"><dir name="connector"><file name="jquery-1.10.1.min.js" hash="6575db3ffd3c31a034a4efdecba15c36"/><file name="jquery.fancybox.js" hash="f839315034b46bdea0b2ea4e1fda21b8"/><file name="jquery.fancybox.pack.js" hash="2346f5b36c3bfd08cc648704f33264f6"/><dir><dir name="procolor-1.0"><dir name="img"><file name="procolor_win_bars.png" hash="a8e41fdddd2253309e0b3e5154668c24"/><file name="procolor_win_bg.gif" hash="c0558cecd0e0ffb9ca89efe00f422261"/><file name="procolor_win_bg.png" hash="4e2a34cc64888fe264fcf6249dfe40da"/><file name="procolor_win_boxes.png" hash="e971c1ca87a0cb52d32408270d00a0da"/><file name="procolor_win_close.png" hash="20a8bb9433157962ab25d86d28d088a3"/><file name="procolor_win_drop.png" hash="9ddce741de330573f082ffe83005d691"/><file name="procolor_win_palette_raw.png" hash="ea98dde528e987029af6e24dbef53922"/><file name="procolor_win_sel_circle.gif" hash="3674b62db5a6eaa4dcedb0749dde4106"/><file name="procolor_win_sel_circle.png" hash="d76195d1777e9a14ebc1a242ab712037"/><file name="procolor_win_sel_rect.gif" hash="b74a72aaf1ea21d55b8751079f283537"/><file name="procolor_win_sel_rect.png" hash="5513589e2b6dc1a980a4e65a746005d0"/><file name="procolor_win_wheel_black.png" hash="62353005bb70bbfa8ffd700112d72582"/><file name="procolor_win_wheel_rgb.jpg" hash="afdd3852c3788a58794ddf1de9557fd8"/></dir><file name="procolor.compressed.js" hash="79e463efad21212e4096d40b9e17d96c"/><file name="procolor.js" hash="48810d2afe806b04180f0e331134c07b"/></dir></dir><file name="selector.js" hash="5dc1900967679a41c70ed5f1755240e2"/></dir><dir name="mailcheck"><file name="magentoMailcheck.js" hash="6809380b384fe432ee73305c04f3526e"/><file name="mailcheck.min.js" hash="25966edf6e585822063b48dd34bcee9b"/></dir></dir></target></contents>
32
  <compatible/>
33
  <dependencies><required><php><min>1.5.2</min><max>6.0.0</max></php><extension><name>curl</name><min>7.15.1</min><max>7.30.0</max></extension></required></dependencies>
34
  </package>