Campaign_Commander_Transactional_Email_1_5 - Version 2.0.3

Version Notes

Send your transactional e-mails through the Campaign Commander NMP platform

Download this release

Release Info

Developer Magento Core Team
Extension Campaign_Commander_Transactional_Email_1_5
Version 2.0.3
Comparing to
See all releases


Code changes from version 1.3.1 to 2.0.3

Files changed (43) hide show
  1. app/code/community/Emv/CartAlert/Block/Cart/Items.php +22 -0
  2. app/code/community/Emv/CartAlert/Block/Customer/Abandonment.php +25 -0
  3. app/code/community/Emv/CartAlert/Constants.php +26 -0
  4. app/code/community/Emv/CartAlert/Helper/Data.php +104 -0
  5. app/code/community/Emv/CartAlert/Model/Abandonedcart.php +68 -0
  6. app/code/community/Emv/CartAlert/Model/Abandonedcartitem.php +43 -0
  7. app/code/community/Emv/CartAlert/Model/Abandonment.php +15 -0
  8. app/code/community/Emv/CartAlert/Model/Mysql4/Abandonment.php +26 -0
  9. app/code/community/Emv/CartAlert/Model/Mysql4/Abandonment/Collection.php +10 -0
  10. app/code/community/Emv/CartAlert/Model/Observer.php +281 -0
  11. app/code/community/Emv/CartAlert/Model/Resource/Setup.php +75 -0
  12. app/code/community/Emv/CartAlert/controllers/CustomerController.php +92 -0
  13. app/code/community/Emv/CartAlert/controllers/GuestController.php +123 -0
  14. app/code/community/Emv/CartAlert/etc/adminhtml.xml +26 -0
  15. app/code/community/Emv/CartAlert/etc/config.xml +127 -0
  16. app/code/community/Emv/CartAlert/etc/system.xml +153 -0
  17. app/code/community/Emv/CartAlert/sql/abandonment_setup/mysql4-install-0.1.0.php +15 -0
  18. app/code/community/Emv/CartAlert/sql/abandonment_setup/mysql4-upgrade-0.1.0-0.2.0.php +22 -0
  19. app/code/community/Emv/Core/Model/Service/Soap/Api.php +8 -9
  20. app/code/community/Emv/Core/Model/Service/Soap/Config.php +16 -4
  21. app/code/community/Emv/Core/etc/system.xml +36 -3
  22. app/code/community/Emv/Emt/Block/Adminhtml/Emt/Edit/Form.php +5 -5
  23. app/code/community/Emv/Emt/Block/Adminhtml/Emt/Grid.php +2 -1
  24. app/code/community/Emv/Emt/Block/Adminhtml/Emt/Grid/Renderer/Emvname.php +18 -0
  25. app/code/community/Emv/Emt/Constants.php +4 -0
  26. app/code/community/Emv/Emt/Helper/Emvtemplate.php +37 -0
  27. app/code/community/Emv/Emt/Model/Mage/Core/Email/Template.php +16 -19
  28. app/code/community/Emv/Emt/Model/Mysql4/Emt/Collection.php +0 -45
  29. app/code/community/Emv/Emt/controllers/Adminhtml/EmtController.php +4 -4
  30. app/design/frontend/default/default/layout/abandonment.xml +23 -0
  31. app/design/frontend/default/default/template/abandonment/customer.phtml +23 -0
  32. app/design/frontend/emv/template/abandonment/reminder/items.phtml +51 -0
  33. app/design/frontend/enterprise/default/layout/abandonment.xml +23 -0
  34. app/design/frontend/enterprise/default/template/abandonment/customer.phtml +23 -0
  35. app/etc/modules/Emv_CartAlert.xml +13 -0
  36. app/locale/en_US/Emv_CartAlert.csv +32 -0
  37. app/locale/en_US/Emv_Core.csv +5 -1
  38. app/locale/en_US/template/email/abandonment/template1.html +41 -0
  39. app/locale/en_US/template/email/abandonment/template2.html +41 -0
  40. app/locale/en_US/template/email/abandonment/template3.html +41 -0
  41. app/locale/fr_FR/Emv_CartAlert.csv +32 -0
  42. app/locale/fr_FR/Emv_Core.csv +5 -1
  43. package.xml +6 -6
app/code/community/Emv/CartAlert/Block/Cart/Items.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Block included in abandoned carts reminder e-mails
4
+ */
5
+ class Emv_CartAlert_Block_Cart_Items extends Mage_Sales_Block_Items_Abstract
6
+ {
7
+ public function __construct()
8
+ {
9
+ parent::__construct();
10
+ /*
11
+ * The template path is hard-coded because while sending a mail by cron,
12
+ * Magento does not take active themes into account, and searches for
13
+ * the template in /app/design/frontend/base/default.
14
+ *
15
+ * We want to avoid placing this new template in
16
+ * /app/design/frontend/base/default, which is not supposed to contain
17
+ * other templates that those which come with Magento by default.
18
+ */
19
+ $this->setTemplate('..'.DS.'..'.DS.'..'.DS.'emv'.DS.
20
+ 'template'.DS.'abandonment'.DS.'reminder'.DS.'items.phtml');
21
+ }
22
+ }
app/code/community/Emv/CartAlert/Block/Customer/Abandonment.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_CartAlert_Block_Customer_Abandonment extends Mage_Customer_Block_Account_Dashboard // Mage_Core_Block_Template
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setTemplate('customer/form/newsletter.phtml');
10
+ }
11
+
12
+ public function getIsSubscribed()
13
+ {
14
+ $isSubscribed = Mage::getSingleton('customer/session')->getCustomer()
15
+ ->getAbandonmentSubscribed();
16
+
17
+ return $isSubscribed;
18
+ }
19
+
20
+ public function getAction()
21
+ {
22
+ return $this->getUrl('*/*/save');
23
+ }
24
+
25
+ }
app/code/community/Emv/CartAlert/Constants.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ interface Emv_CartAlert_Constants
3
+ {
4
+ const XML_PATH_FIRST_ALERT_ENABLED = 'abandonment/first_alert_config/enabled';
5
+ const XML_PATH_FIRST_ALERT_TEMPLATE = 'abandonment/first_alert_config/template';
6
+ const XML_PATH_FIRST_ALERT_DELAY = 'abandonment/first_alert_config/delay';
7
+
8
+ const XML_PATH_SECOND_ALERT_ENABLED = 'abandonment/second_alert_config/enabled';
9
+ const XML_PATH_SECOND_ALERT_TEMPLATE = 'abandonment/second_alert_config/template';
10
+ const XML_PATH_SECOND_ALERT_DELAY = 'abandonment/second_alert_config/delay';
11
+
12
+ const XML_PATH_THIRD_ALERT_ENABLED = 'abandonment/third_alert_config/enabled';
13
+ const XML_PATH_THIRD_ALERT_TEMPLATE = 'abandonment/third_alert_config/template';
14
+ const XML_PATH_THIRD_ALERT_DELAY = 'abandonment/third_alert_config/delay';
15
+
16
+ const XML_PATH_ALERT_SENDER_IDENTITY = 'abandonment/alert_identity/email_identity';
17
+
18
+ const FIRST_ALERT_FLAG = 'first_alert';
19
+ const SECOND_ALERT_FLAG = 'second_alert';
20
+ const THIRD_ALERT_FLAG = 'third_alert';
21
+
22
+ const OUTDATED_FLAG = 'outdated';
23
+ const TO_BE_PROCESSED_FLAG = 'to_be_processed';
24
+
25
+ const OUTDATED_CART_DELAY = 168; // hour = 7 days
26
+ }
app/code/community/Emv/CartAlert/Helper/Data.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Emv_CartAlert_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+
5
+ /**
6
+ * Detect whether the quote is associated with a registered customer
7
+ *
8
+ * @param Mage_Sales_Model_Quote $quote Quote
9
+ * @return bool TRUE is quote associated with a registered customer, FALSE otherwise
10
+ */
11
+ protected function _isFromRegisteredCustomer(Mage_Sales_Model_Quote $quote)
12
+ {
13
+ return !is_null($quote->getCustomerId());
14
+ }
15
+
16
+ /**
17
+ * Get the link used to unsubscribe from the reminders.
18
+ * The quote is used to determine whether the link is for a registered customer or a guest.
19
+ *
20
+ * @param Mage_Sales_Model_Quote $quote Quote
21
+ * @return string the unsubscribe link
22
+ */
23
+ public function getUnsubscribeLink(Mage_Sales_Model_Quote $quote)
24
+ {
25
+ if ($this->_isFromRegisteredCustomer($quote))
26
+ {
27
+ return Mage::getUrl('abandonment/customer/unsubscribe');
28
+ }
29
+ else
30
+ {
31
+ $hash = Mage::helper('core')->getHash($quote->getCustomerEmail());
32
+ return Mage::getUrl('abandonment/guest/unsubscribe', Array('quote' => $quote->getId(), 'key' => $hash));
33
+ }
34
+ }
35
+
36
+ /**
37
+ * Get the link used to view the cart.
38
+ * The quote is used to determine whether the link is for a registered customer or a guest.
39
+ *
40
+ * @param Mage_Sales_Model_Quote $quote Quote
41
+ * @return string the view cart/checkout link
42
+ */
43
+ public function getCartLink(Mage_Sales_Model_Quote $quote)
44
+ {
45
+ if ($this->_isFromRegisteredCustomer($quote))
46
+ {
47
+ return Mage::getUrl('abandonment/customer/cart');
48
+ }
49
+ else
50
+ {
51
+ $hash = Mage::helper('core')->getHash($quote->getCustomerEmail());
52
+ return Mage::getUrl('abandonment/guest/cart', Array('quote' => $quote->getId(), 'key' => $hash));
53
+ }
54
+ }
55
+
56
+ /**
57
+ * Send a reminder
58
+ *
59
+ * @param Array $abandoned_cart Data extracted from the abandoned quote
60
+ * @param string $template_code Config path from which the template to use is fetched
61
+ */
62
+ protected function _sendReminder($abandoned_cart, $template_code, $storeId)
63
+ {
64
+ /* @var $template Emv_Emt_Model_Mage_Core_Email_Template */
65
+ $template = Mage::getModel('core/email_template');
66
+
67
+ $model = Mage::getStoreConfig($template_code, $storeId);
68
+
69
+ $mode = $this->getTemplateSendMode($model, $storeId);
70
+
71
+ // Force emv send mode
72
+ if($mode == null || $mode == Emv_Emt_Constants::CLASSIC_FLAG)
73
+ {
74
+ $template->setEmvSend(true);
75
+ }
76
+
77
+ return $template->sendTransactional($model,
78
+ Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_ALERT_SENDER_IDENTITY, $storeId),
79
+ $abandoned_cart->getEmail(), $abandoned_cart->getCustomerName(),
80
+ Array('cart' => $abandoned_cart), $storeId);
81
+ }
82
+
83
+ public function sendFirstReminder($abandoned_cart, $storeId)
84
+ {
85
+ return $this->_sendReminder($abandoned_cart, Emv_CartAlert_Constants::XML_PATH_FIRST_ALERT_TEMPLATE, $storeId);
86
+ }
87
+
88
+ public function sendSecondReminder($abandoned_cart, $storeId)
89
+ {
90
+ return $this->_sendReminder($abandoned_cart, Emv_CartAlert_Constants::XML_PATH_SECOND_ALERT_TEMPLATE, $storeId);
91
+ }
92
+
93
+ public function sendThirdReminder($abandoned_cart, $storeId)
94
+ {
95
+ return $this->_sendReminder($abandoned_cart, Emv_CartAlert_Constants::XML_PATH_THIRD_ALERT_TEMPLATE, $storeId);
96
+ }
97
+
98
+ protected function getTemplateSendMode($templateId, $storeId)
99
+ {
100
+ /* @var $emt Emv_Emt_Model_Emt */
101
+ $emt = Mage::getModel('emvemt/emt');
102
+ return $emt->getMode($templateId, $storeId);
103
+ }
104
+ }
app/code/community/Emv/CartAlert/Model/Abandonedcart.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_CartAlert_Model_Abandonedcart extends Mage_Core_Model_Abstract {
4
+
5
+ public $items;
6
+ private $id;
7
+ private $cid;
8
+ private $cname;
9
+ private $total;
10
+ private $email;
11
+ private $template;
12
+ private $unsub_link;
13
+ private $cart_link;
14
+
15
+ public function __construct($attr) {
16
+ $this->_init('abandonment/abandonedcart');
17
+ $this->id = $attr['id'];
18
+ $this->cid = $attr['cid'];
19
+ $this->cname = $attr['cname'];
20
+ $this->items = $attr['items'];
21
+ $this->total = $attr['total'];
22
+ $this->email = $attr['email'];
23
+ $this->template = $attr['template'];
24
+ $this->unsubLink = $attr['unsub_link'];
25
+ $this->cartLink = $attr['cart_link'];
26
+ }
27
+
28
+ public function __destruct() {}
29
+
30
+ public function getId() {
31
+ return $this->id;
32
+ }
33
+
34
+ public function getCustomerId() {
35
+ return $this->cid;
36
+ }
37
+
38
+ public function getCustomerName() {
39
+ return $this->cname;
40
+ }
41
+
42
+ public function getTotalPrice($formatted = false) {
43
+ return $formatted ? number_format($this->total, 2) : $this->total;
44
+ }
45
+
46
+ public function getEmail() {
47
+ return $this->email;
48
+ }
49
+
50
+ public function getTemplate() {
51
+ return $this->template;
52
+ }
53
+
54
+ public function getUnsubLink()
55
+ {
56
+ return $this->unsubLink;
57
+ }
58
+
59
+ public function getCartLink()
60
+ {
61
+ return $this->cartLink;
62
+ }
63
+
64
+ public function getItems()
65
+ {
66
+ return $this->items;
67
+ }
68
+ }
app/code/community/Emv/CartAlert/Model/Abandonedcartitem.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_CartAlert_Model_Abandonedcartitem extends Mage_Core_Model_Abstract {
4
+
5
+ private $attr;
6
+
7
+ public function __construct($attr) {
8
+ $this->_init('abandonment/abandonedcartitem');
9
+ $this->attr = $attr;
10
+ }
11
+
12
+ /**
13
+ * Accessors
14
+ */
15
+ public function getAttr() {
16
+ return $this->attr;
17
+ }
18
+
19
+ public function getImage() {
20
+ return $this->attr['image'];
21
+ }
22
+
23
+ public function getBasePrice() {
24
+ return $this->attr['base_price'];
25
+ }
26
+
27
+ public function getTotalPrice() {
28
+ return $this->attr['total_price'];
29
+ }
30
+
31
+ public function getName() {
32
+ return $this->attr['name'];
33
+ }
34
+
35
+ public function getQuantity() {
36
+ return $this->attr['quantity'];
37
+ }
38
+
39
+ public function getUrl() {
40
+ return $this->attr['url'];
41
+ }
42
+
43
+ }
app/code/community/Emv/CartAlert/Model/Abandonment.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_CartAlert_Model_Abandonment extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ $this->_init('abandonment/abandonment'); // this is location of the resource file.
8
+ }
9
+
10
+ public function loadByQuoteId($quote_id)
11
+ {
12
+ $this->setData($this->getResource()->loadByQuoteId($quote_id));
13
+ return $this;
14
+ }
15
+ }
app/code/community/Emv/CartAlert/Model/Mysql4/Abandonment.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_CartAlert_Model_Mysql4_Abandonment extends Mage_Core_Model_Mysql4_Abstract {
4
+
5
+ public function _construct() {
6
+ $this->_init('abandonment/abandonment', 'abandonment_id');
7
+ }
8
+
9
+ public function loadByQuoteId($quote_id)
10
+ {
11
+ $adapter = $this->_getReadAdapter();
12
+
13
+ $select = $adapter->select()
14
+ ->from($this->getMainTable())
15
+ ->where('entity_id=:entity_id');
16
+
17
+ $binds = array(
18
+ 'entity_id' => $quote_id
19
+ );
20
+
21
+ $result = $adapter->fetchRow($select, $binds);
22
+
23
+ return count($result) ? $result : Array();
24
+ }
25
+ }
26
+
app/code/community/Emv/CartAlert/Model/Mysql4/Abandonment/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_CartAlert_Model_Mysql4_Abandonment_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct() {
6
+ //parent::__construct();
7
+ $this->_init('abandonment/abandonment');
8
+ }
9
+ }
10
+
app/code/community/Emv/CartAlert/Model/Observer.php ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Observer - checks for abandoned carts and sends the data to campaign commander
5
+ *
6
+ */
7
+ class Emv_CartAlert_Model_Observer extends Mage_Core_Model_Abstract
8
+ {
9
+
10
+ /**
11
+ * Observer to check for abandoned shopping carts
12
+ *
13
+ * @return null
14
+ */
15
+ public function processAbandonedCarts ()
16
+ {
17
+ if(Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_FIRST_ALERT_ENABLED) == 1||
18
+ Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_SECOND_ALERT_ENABLED) == 1 ||
19
+ Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_THIRD_ALERT_ENABLED) == 1)
20
+ {
21
+ /* @var $helper Emv_CartAlert_Helper_Data */
22
+ $helper = Mage::helper('abandonment');
23
+
24
+ // prepare query for abandoned quotes
25
+ $minHour = Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_FIRST_ALERT_DELAY);
26
+
27
+ /* @var $date Zend_Date */
28
+ $date = new Zend_Date();
29
+
30
+ $date->sub($minHour, Zend_Date::HOUR);
31
+
32
+ $from = $date->toString('YYYY-MM-dd HH:mm:ss');
33
+
34
+ // get abandoned quotes
35
+ /* @var $quotes Mage_Sales_Model_Mysql4_Quote_Collection */
36
+ $quotes = Mage::getModel('sales/quote')->getCollection();
37
+ $quotes
38
+ ->addFieldToFilter('updated_at', array('to' => $from))
39
+ ->addFieldToFilter('items_count', array('gt' => 0))
40
+ ->addFieldToFilter('customer_email', array('notnull' => 1))
41
+ ->addFieldToFilter('is_active', 1)
42
+ ->setOrder('updated_at')
43
+ ->getSelect()->joinLeft( array('a' => $quotes->getTable('abandonment/abandonment')),
44
+ 'main_table.entity_id = a.entity_id', array('template'))
45
+ ->where('a.customer_abandonment_subscribed = ? OR a.customer_abandonment_subscribed IS NULL', 1)
46
+ ->where('a.template <> ? OR a.template IS NULL', Emv_CartAlert_Constants::OUTDATED_FLAG)
47
+ ->where('a.template <> ? OR a.template IS NULL', Emv_CartAlert_Constants::THIRD_ALERT_FLAG);
48
+
49
+ /* @var $quote Mage_Sales_Model_Quote */
50
+ foreach ($quotes as $quote)
51
+ {
52
+
53
+ // search abandoned carts for this particular quote
54
+ $abandonment = Mage::getModel('abandonment/abandonment')->loadByQuoteId($quote->getEntityId());
55
+ $data = $abandonment->getData();
56
+
57
+ if (! $abandonment->getId())
58
+ {
59
+ $abandonment->setEntityId($quote->getId())
60
+ ->setCustomerAbandonmentSubscribed($quote->getCustomer()->getAbandonmentSubscribed());
61
+ $data = $abandonment->getData();
62
+ }
63
+
64
+ // parameters for abandoned cart
65
+ $cart['items'] = array();
66
+ $cart['email'] = $quote->getCustomerEmail();
67
+ $cart['cid'] = $quote->getCustomerId();
68
+ $cart['id'] = $quote->getEntityId();
69
+ $cart['total'] = $quote->getGrandTotal();
70
+ $cart['unsub_link'] = $helper->getUnsubscribeLink($quote); // get the unsubscription link (depends on whether the user was logged in)
71
+ $cart['cart_link'] = $helper->getCartLink($quote); // get the cart link (depends on whether the user was logged in)
72
+ $cart['updated'] = $quote->getUpdatedAt();
73
+ $cart['count'] = $quote->getItemsCount();
74
+ $cart['cname'] = ($quote->getCustomerPrefix() ? $quote->getCustomerPrefix() . ' ' : '') .
75
+ $quote->getCustomerFirstname() . ' ' .
76
+ ($quote->getCustomerMiddlename() ? $quote->getCustomerMiddlename() . ' ' : '') .
77
+ $quote->getCustomerLastname() .
78
+ ($quote->getCustomerSuffix() ? ' ' . $quote->getCustomerSuffix() : '');
79
+
80
+ // if the quote has not yet been processed for abandonment, set it up for processing
81
+ if (empty($data))
82
+ {
83
+ $previous_template = Emv_CartAlert_Constants::TO_BE_PROCESSED_FLAG;
84
+ }
85
+ else
86
+ {
87
+ // set up the cart for updating
88
+ $previous_template = $abandonment->getTemplate();
89
+ }
90
+
91
+ // get updated template
92
+ $updated_template = $this->getUpdatedTemplate(
93
+ $this->getTimeAbandoned($quote->getUpdatedAt()), $previous_template,
94
+ $quote->getStoreId());
95
+
96
+ if($updated_template != null)
97
+ {
98
+ if ($previous_template != $updated_template)
99
+ {
100
+ // insert/update the abandoned cart
101
+ $abandonment->setTemplate($updated_template)->save();
102
+ }
103
+
104
+ $cart['template'] = $updated_template;
105
+
106
+ // get items in quote
107
+ $items = $quote->getAllVisibleItems();
108
+
109
+ // for each item in quote
110
+ foreach ($items as $item)
111
+ {
112
+ // get item attributes
113
+ $item = $this->getItemAttributes($item);
114
+
115
+ // create a new Abandoned Cart Item
116
+ $cart['items'][] = Mage::getModel('abandonment/abandonedcartitem', $item);
117
+ }
118
+
119
+ // create a new Abandoned Cart
120
+ $recent_cart = Mage::getModel('abandonment/abandonedcart', $cart);
121
+
122
+ // decide which email to send
123
+ switch ($recent_cart->getTemplate()) {
124
+
125
+ case Emv_CartAlert_Constants::FIRST_ALERT_FLAG:
126
+ $helper->sendFirstReminder($recent_cart, $quote->getStoreId());
127
+ break;
128
+
129
+ case Emv_CartAlert_Constants::SECOND_ALERT_FLAG:
130
+ $helper->sendSecondReminder($recent_cart, $quote->getStoreId());
131
+ break;
132
+
133
+ case Emv_CartAlert_Constants::THIRD_ALERT_FLAG:
134
+ $helper->sendThirdReminder($recent_cart, $quote->getStoreId());
135
+ break;
136
+
137
+ default:
138
+ break;
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Get the item attributes we need
147
+ */
148
+ public function getItemAttributes ($item)
149
+ {
150
+
151
+ $item_attr = array();
152
+
153
+ // get the product image
154
+ $item_attr['image'] = $this->_getProductImageUrl($item->getProduct());
155
+
156
+ // get the item name
157
+ $item_attr['name'] = $item->getName();
158
+
159
+ // get the item URL
160
+ $item_attr['url'] = Mage::getUrl() . $item->getProduct()->getUrlPath();
161
+
162
+ // get the item base price
163
+ $item_attr['base_price'] = $item->getBasePrice();
164
+
165
+ // get the item total price
166
+ $item_attr['total_price'] = $item->getBaseRowTotal();
167
+
168
+ // get the item quantity
169
+ $item_attr['quantity'] = $item->getQty();
170
+
171
+ return $item_attr;
172
+ }
173
+
174
+ /**
175
+ * Convert time abandoned to minutes
176
+ * @return Zend_Date
177
+ */
178
+ public function getTimeAbandoned($from)
179
+ {
180
+ return new Zend_Date($from , Zend_Date::ISO_8601);
181
+ }
182
+
183
+ /**
184
+ * Get the updated template
185
+ * Returns the same template if time frame hasn't changed
186
+ */
187
+ public function getUpdatedTemplate(Zend_Date $lastUpdate, $template, $store = null)
188
+ {
189
+ $updated_template = $template;
190
+
191
+ $firstAlertDelay = Zend_Date::now()->subHour(Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_FIRST_ALERT_DELAY, $store));
192
+ $secondAlertDelay = Zend_Date::now()->subHour(Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_SECOND_ALERT_DELAY, $store));
193
+ $thirdAlertDelay = Zend_Date::now()->subHour(Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_THIRD_ALERT_DELAY, $store));
194
+ $outdatedDelay = Zend_Date::now()->subHour(Emv_CartAlert_Constants::OUTDATED_CART_DELAY);
195
+
196
+ if ($lastUpdate->isEarlier($firstAlertDelay) && $lastUpdate->isLater($secondAlertDelay) &&
197
+ $template != Emv_CartAlert_Constants::FIRST_ALERT_FLAG &&
198
+ Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_FIRST_ALERT_ENABLED))
199
+ {
200
+ $updated_template = Emv_CartAlert_Constants::FIRST_ALERT_FLAG;
201
+ }
202
+ else if ($lastUpdate->isEarlier($secondAlertDelay) && $lastUpdate->isLater($thirdAlertDelay) &&
203
+ $template != Emv_CartAlert_Constants::SECOND_ALERT_FLAG &&
204
+ Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_SECOND_ALERT_ENABLED))
205
+ {
206
+ $updated_template = Emv_CartAlert_Constants::SECOND_ALERT_FLAG;
207
+ }
208
+ else if ($lastUpdate->isEarlier($thirdAlertDelay) && $lastUpdate->isLater($outdatedDelay)
209
+ && $template != Emv_CartAlert_Constants::THIRD_ALERT_FLAG &&
210
+ Mage::getStoreConfig(Emv_CartAlert_Constants::XML_PATH_THIRD_ALERT_ENABLED))
211
+ {
212
+ $updated_template = Emv_CartAlert_Constants::THIRD_ALERT_FLAG;
213
+ }else if ($lastUpdate->isEarlier($outdatedDelay))
214
+ {
215
+ $updated_template = Emv_CartAlert_Constants::OUTDATED_FLAG;
216
+ }
217
+ else
218
+ {
219
+ $updated_template = null;
220
+ }
221
+
222
+ return $updated_template;
223
+ }
224
+
225
+ /**
226
+ * Upon saving a customer, synchronise the "subscribed from abandoned cart notifications" attribute with the quote.
227
+ * While Magento natively does it, it only synchronizes the attributes when the customer views the cart.
228
+ * While the customer is redirected to his cart upon unsubscribing, updating the quote, it is not immediately
229
+ * synchronized when done in back-office.
230
+ *
231
+ * event: customer_save_after
232
+ *
233
+ * @param Varien_Event_Observer $observer
234
+ */
235
+ public function handleCustomerSaveAfter (Varien_Event_Observer $observer)
236
+ {
237
+ /* @var $customer Mage_Customer_Model_Customer */
238
+ $customer = $observer->getEvent()->getCustomer();
239
+ $isSubscribed = $customer->getAbandonmentSubscribed();
240
+
241
+ /* @var $abandonments Emv_CartAlert_Model_Mysql4_Abandonment_Collection */
242
+ $abandonments = Mage::getResourceModel('abandonment/abandonment_collection');
243
+ $abandonments->getSelect()->join(Array('quote' => $abandonments->getTable('sales/quote')),
244
+ 'quote.entity_id = main_table.entity_id', 'customer_id');
245
+ $abandonments->addFieldToFilter('customer_id', $customer->getId())
246
+ ->addFieldToFilter('customer_abandonment_subscribed', Array('eq' => $isSubscribed));
247
+
248
+ $abandonments->setDataToAll('customer_abandonment_subscribed', $isSubscribed)->save();
249
+
250
+ return $this;
251
+ }
252
+
253
+ /**
254
+ * Retrieves an image URL for the product, if it exists.
255
+ * The priority is: thumbnail -> small image -> image -> Magento's placeholder.
256
+ *
257
+ * @param Mage_Catalog_Model_Product $product
258
+ * @return string the image's URL
259
+ */
260
+ protected function _getProductImageUrl ($product)
261
+ {
262
+ if (($product->getThumbnail() != 'no_selection'))
263
+ {
264
+ return Mage::helper('catalog/image')->init($product, 'thumbnail')
265
+ ->resize(265)
266
+ ->__toString();
267
+ }
268
+ elseif (($product->getSmallImage() != 'no_selection'))
269
+ {
270
+ return Mage::helper('catalog/image')->init($product, 'small_image')
271
+ ->resize(265)
272
+ ->__toString();
273
+ }
274
+ else
275
+ {
276
+ return Mage::helper('catalog/image')->init($product, 'image')
277
+ ->resize(265)
278
+ ->__toString();
279
+ }
280
+ }
281
+ }
app/code/community/Emv/CartAlert/Model/Resource/Setup.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Emv_CartAlert_Model_Resource_Setup extends Mage_Eav_Model_Entity_Setup
3
+ {
4
+ public function getDefaultEntities()
5
+ {
6
+ $entities = parent::getDefaultEntities();
7
+ $entites = array_merge_recursive($entities, $this->getAdditionalEntities());
8
+ return $entities;
9
+ }
10
+
11
+ public function getAdditionalEntities()
12
+ {
13
+ return Array(
14
+ 'customer' => Array(
15
+ 'attributes' => Array(
16
+
17
+ 'abandonment_subscribed' => Array(
18
+ 'label' => 'Subscribed from abandonned cart notifications',
19
+ 'type' => 'int',
20
+ 'input' => 'select',
21
+ 'is_visible' => true,
22
+ 'source' => 'eav/entity_attribute_source_boolean',
23
+ 'required' => true,
24
+ 'user_defined' => true,
25
+ 'default' => true,
26
+ 'sort_order' => 1000,
27
+ 'system' => false,
28
+ 'position' => 1000,
29
+ 'adminhtml_only' => 0,
30
+ ),
31
+ )
32
+ )
33
+ );
34
+ }
35
+
36
+ /**
37
+ * Update customer form with additional attributes
38
+ */
39
+ public function updateCustomerForms()
40
+ {
41
+ $entities = $this->getAdditionalEntities();
42
+ $attributes = $entities['customer']['attributes'];
43
+ foreach ($attributes as $attributeCode => $data)
44
+ {
45
+ $eavConfig = Mage::getSingleton('eav/config');
46
+ $attribute = $eavConfig->getAttribute('customer', $attributeCode);
47
+ if (!$attribute)
48
+ {
49
+ continue;
50
+ }
51
+ if (false === ($attribute->getData('is_system') == 1 && $attribute->getData('is_visible') == 0))
52
+ {
53
+ $usedInForms = array(
54
+ 'customer_account_create',
55
+ 'customer_account_edit',
56
+ 'checkout_register',
57
+ );
58
+ if (!empty($data['adminhtml_only']))
59
+ {
60
+ $usedInForms = array('adminhtml_customer');
61
+ } else
62
+ {
63
+ $usedInForms[] = 'adminhtml_customer';
64
+ }
65
+ if (!empty($data['admin_checkout']))
66
+ {
67
+ $usedInForms[] = 'adminhtml_checkout';
68
+ }
69
+ $attribute->setData('used_in_forms', $usedInForms);
70
+ }
71
+
72
+ $attribute->save();
73
+ }
74
+ }
75
+ }
app/code/community/Emv/CartAlert/controllers/CustomerController.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_CartAlert_CustomerController extends Mage_Core_Controller_Front_Action
4
+ {
5
+ /**
6
+ * Both actions require the customer to be logged in
7
+ * (non-PHPdoc)
8
+ * @see Mage_Core_Controller_Front_Action::preDispatch()
9
+ */
10
+ public function preDispatch()
11
+ {
12
+ parent::preDispatch();
13
+
14
+ if (!Mage::getSingleton('customer/session')->authenticate($this)) {
15
+ $this->setFlag('', 'no-dispatch', true);
16
+ }
17
+ }
18
+
19
+ /**
20
+ * Unsubscribe the customer from the abandoned carts notification.
21
+ */
22
+ public function unsubscribeAction()
23
+ {
24
+ /* @var $helper Emv_CartAlert_Helper_Data */
25
+ $helper = Mage::helper('abandonment');
26
+
27
+ /* @var $session Mage_Customer_Model_Session */
28
+ $session = Mage::getSingleton('customer/session');
29
+
30
+ // No need to test if the customer is logged in: guests are automatically redirected to the login page
31
+
32
+ /* @var $customer Mage_Customer_Model_Customer */
33
+ $customer = $session->getCustomer();
34
+
35
+ /* @var $session Mage_Checkout_Model_Session */
36
+ $session = Mage::getSingleton('checkout/session');
37
+ if (!$customer->getAbandonmentSubscribed())
38
+ {
39
+ $message = $helper->__('You are already unsubscribed from abandoned carts notifications.');
40
+ $session->addError($message);
41
+ }
42
+ else
43
+ {
44
+ $customer->setAbandonmentSubscribed(0)->save();
45
+ $message = $helper->__('You were successfully unsubscribed from abandoned carts notifications.');
46
+ $session->addSuccess($message);
47
+ }
48
+ $this->_redirect('checkout/cart/index');
49
+ }
50
+
51
+ public function manageAction()
52
+ {
53
+ $this->loadLayout();
54
+ $this->_initLayoutMessages('customer/session');
55
+ $this->_initLayoutMessages('catalog/session');
56
+
57
+ if ($block = $this->getLayout()->getBlock('customer_abandonment')) {
58
+ $block->setRefererUrl($this->_getRefererUrl());
59
+ }
60
+ $this->getLayout()->getBlock('head')->setTitle($this->__('Cart Reminder Subscription'));
61
+ $this->renderLayout();
62
+ }
63
+
64
+ public function saveAction()
65
+ {
66
+ if (!$this->_validateFormKey()) {
67
+ return $this->_redirect('customer/account/');
68
+ }
69
+ try {
70
+ Mage::getSingleton('customer/session')->getCustomer()
71
+ ->setAbandonmentSubscribed((boolean)$this->getRequest()->getParam('is_subscribed', false))
72
+ ->save();
73
+ if ((boolean)$this->getRequest()->getParam('is_subscribed', false)) {
74
+ Mage::getSingleton('customer/session')->addSuccess($this->__('The subscription has been saved.'));
75
+ } else {
76
+ Mage::getSingleton('customer/session')->addSuccess($this->__('The subscription has been removed.'));
77
+ }
78
+ }
79
+ catch (Exception $e) {
80
+ Mage::getSingleton('customer/session')->addError($this->__('An error occurred while saving your subscription.'));
81
+ }
82
+ $this->_redirect('customer/account/');
83
+ }
84
+
85
+ /**
86
+ * Redirect the user to the cart
87
+ */
88
+ public function cartAction()
89
+ {
90
+ $this->_redirect('checkout/cart/index');
91
+ }
92
+ }
app/code/community/Emv/CartAlert/controllers/GuestController.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_CartAlert_GuestController extends Mage_Core_Controller_Front_Action
4
+ {
5
+ /**
6
+ * Current quote ID
7
+ * @var int
8
+ */
9
+ protected $_quoteId = null;
10
+
11
+ /**
12
+ *
13
+ * Current quote
14
+ * @var Mage_Sales_Model_Quote
15
+ */
16
+ protected $_quote = null;
17
+
18
+ /**
19
+ * Checks if the customer is logged in. In order for this controller to run properly, the
20
+ * customer must be logged out.
21
+ * Causes an error message to be displayed if the customer is logged in.
22
+ * @return boolean
23
+ */
24
+ protected function _isCustomerLoggedIn()
25
+ {
26
+ $loggedIn = Mage::getSingleton('customer/session')->authenticate($this);
27
+
28
+ if ($loggedIn)
29
+ {
30
+ /* @var $session Mage_Checkout_Model_Session */
31
+ $session = Mage::getSingleton('checkout/session');
32
+ $message = Mage::helper('abandonment')->__('The link cannot be used by registered customers.');
33
+ $session->addError($message);
34
+ }
35
+ return $loggedIn;
36
+ }
37
+
38
+ /**
39
+ * Checks if the parameters ("quote" and "key") are valid.
40
+ * Stores the quote ID and the quote itself as class properties if the parameters are valid.
41
+ * Causes an error message to be displayed if the parameters are invalid.
42
+ * @return boolean
43
+ */
44
+ protected function _validateParameters()
45
+ {
46
+ /* @var $session Mage_Checkout_Model_Session */
47
+ $session = Mage::getSingleton('checkout/session');
48
+
49
+ $quoteId = $this->getRequest()->getParam('quote');
50
+ $hash = $this->getRequest()->getParam('key', '');
51
+ /* @var $quote Mage_Sales_Model_Quote */
52
+ $quote = Mage::getModel('sales/quote')->load($quoteId);
53
+ $validHash = false;
54
+ if ($quote->getId())
55
+ {
56
+ $this->_quoteId = $quote->getId();
57
+ $this->_quote = $quote;
58
+ if (!$quote->getCustomerId())
59
+ {
60
+ $validHash = Mage::helper('core')->validateHash($quote->getCustomerEmail(), $hash);
61
+ }
62
+ }
63
+ if (!$validHash)
64
+ {
65
+ $message = Mage::helper('abandonment')->__('The link is invalid.');
66
+ $session->addError($message);
67
+ }
68
+ return $validHash;
69
+ }
70
+
71
+ /**
72
+ * Unsubscribe the customer from the abandoned carts notification.
73
+ */
74
+ public function unsubscribeAction()
75
+ {
76
+ if ($this->_isCustomerLoggedIn() || (!$this->_validateParameters()))
77
+ {
78
+ $this->_redirect('checkout/cart/index');
79
+ }
80
+ else
81
+ {
82
+ /* @var $helper Emv_CartAlert_Helper_Data */
83
+ $helper = Mage::helper('abandonment');
84
+
85
+ /* @var $session Mage_Customer_Model_Session */
86
+ $session = Mage::getSingleton('checkout/session');
87
+
88
+ $abandonment = Mage::getModel('abandonment/abandonment')->loadByQuoteId($this->_quote->getId());
89
+ if ($abandonment->getId())
90
+ {
91
+ if ($abandonment->getCustomerAbandonmentSubscribed())
92
+ {
93
+ $abandonment->setCustomerAbandonmentSubscribed(0)->save();
94
+ $message = $helper->__('You were successfully unsubscribed from abandoned carts notifications.');
95
+ $session->addSuccess($message);
96
+ }
97
+ else
98
+ {
99
+ $message = $helper->__('You are already unsubscribed from abandoned carts notifications.');
100
+ $session->addError($message);
101
+ }
102
+ }
103
+ Mage::getSingleton('checkout/session')->setQuote($this->_quote);
104
+ Mage::getSingleton('checkout/cart')->setQuote($this->_quote);
105
+ Mage::getSingleton('checkout/session')->setQuoteId($this->_quote->getId());
106
+ $this->_redirect('checkout/cart/index');
107
+ }
108
+ }
109
+
110
+ /**
111
+ * After checking the session, and the provided parameters, redirect the user to the cart
112
+ */
113
+ public function cartAction()
114
+ {
115
+ if (!$this->_isCustomerLoggedIn() && ($this->_validateParameters()))
116
+ {
117
+ Mage::getSingleton('checkout/cart')->setQuote($this->_quote);
118
+ Mage::getSingleton('checkout/session')->setQuote($this->_quote);
119
+ Mage::getSingleton('checkout/session')->setQuoteId($this->_quote->getId());
120
+ }
121
+ $this->_redirect('checkout/cart/index');
122
+ }
123
+ }
app/code/community/Emv/CartAlert/etc/adminhtml.xml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <abandonment translate="title" module="abandonment">
10
+ <title>Emailvision abandonment cart config</title>
11
+ <sort_order>1000</sort_order>
12
+ </abandonment>
13
+ <config>
14
+ <children>
15
+ <abandonment translate="title" module="abandonment">
16
+ <title>Emailvision section</title>
17
+ </abandonment>
18
+ </children>
19
+ </config>
20
+ </children>
21
+ </system>
22
+ </children>
23
+ </admin>
24
+ </resources>
25
+ </acl>
26
+ </config>
app/code/community/Emv/CartAlert/etc/config.xml ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <modules>
3
+ <Emv_CartAlert>
4
+ <version>0.4.0</version>
5
+ </Emv_CartAlert>
6
+ </modules>
7
+ <global>
8
+ <models>
9
+ <abandonment>
10
+ <class>Emv_CartAlert_Model</class>
11
+ <resourceModel>abandonment_mysql4</resourceModel>
12
+ </abandonment>
13
+ <abandonment_mysql4>
14
+ <class>Emv_CartAlert_Model_Mysql4</class>
15
+ <entities>
16
+ <abandonment>
17
+ <table>abandonment</table>
18
+ </abandonment>
19
+ </entities>
20
+ </abandonment_mysql4>
21
+ </models>
22
+ <helpers>
23
+ <abandonment>
24
+ <class>Emv_CartAlert_Helper</class>
25
+ </abandonment>
26
+ </helpers>
27
+ <blocks>
28
+ <abandonment>
29
+ <class>Emv_CartAlert_Block</class>
30
+ </abandonment>
31
+ </blocks>
32
+ <resources>
33
+ <abandonment_setup>
34
+ <setup>
35
+ <module>Emv_CartAlert</module>
36
+ <class>Emv_CartAlert_Model_Resource_Setup</class>
37
+ </setup>
38
+ </abandonment_setup>
39
+ </resources>
40
+ <template>
41
+ <email>
42
+ <abandonment_first_email_template translate="label" module="abandonment">
43
+ <label>Abandoned Cart 1</label>
44
+ <file>abandonment/template1.html</file>
45
+ <type>html</type>
46
+ </abandonment_first_email_template>
47
+ <abandonment_second_email_template translate="label" module="abandonment">
48
+ <label>Abandoned Cart 2</label>
49
+ <file>abandonment/template2.html</file>
50
+ <type>html</type>
51
+ </abandonment_second_email_template>
52
+ <abandonment_third_email_template translate="label" module="abandonment">
53
+ <label>Abandoned Cart 3</label>
54
+ <file>abandonment/template3.html</file>
55
+ <type>html</type>
56
+ </abandonment_third_email_template>
57
+ </email>
58
+ </template>
59
+ <events>
60
+ <customer_save_after>
61
+ <observers>
62
+ <abandonment>
63
+ <class>abandonment/observer</class>
64
+ <method>handleCustomerSaveAfter</method>
65
+ </abandonment>
66
+ </observers>
67
+ </customer_save_after>
68
+ </events>
69
+ <layout>
70
+ <updates>
71
+ <abandonment module="Emv_CartAlert">
72
+ <file>abandonment.xml</file>
73
+ </abandonment>
74
+ </updates>
75
+ </layout>
76
+ </global>
77
+ <frontend>
78
+ <routers>
79
+ <abandonment>
80
+ <use>standard</use>
81
+ <args>
82
+ <module>Emv_CartAlert</module>
83
+ <frontName>abandonment</frontName>
84
+ </args>
85
+ </abandonment>
86
+ </routers>
87
+ <layout>
88
+ <updates>
89
+ <abandonment module="Emv_CartAlert">
90
+ <file>abandonment.xml</file>
91
+ </abandonment>
92
+ </updates>
93
+ </layout>
94
+ <translate>
95
+ <modules>
96
+ <Emv_CartAlert>
97
+ <files>
98
+ <default>Emv_CartAlert.csv</default>
99
+ </files>
100
+ </Emv_CartAlert>
101
+ </modules>
102
+ </translate>
103
+ </frontend>
104
+ <adminhtml>
105
+ <translate>
106
+ <modules>
107
+ <Emv_CartAlert>
108
+ <files>
109
+ <default>Emv_CartAlert.csv</default>
110
+ </files>
111
+ </Emv_CartAlert>
112
+ </modules>
113
+ </translate>
114
+ </adminhtml>
115
+ <crontab>
116
+ <jobs>
117
+ <process_abandoned_carts>
118
+ <schedule>
119
+ <cron_expr>*/5 * * * *</cron_expr>
120
+ </schedule>
121
+ <run>
122
+ <model>abandonment/observer::processAbandonedCarts</model>
123
+ </run>
124
+ </process_abandoned_carts>
125
+ </jobs>
126
+ </crontab>
127
+ </config>
app/code/community/Emv/CartAlert/etc/system.xml ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <sections>
4
+ <abandonment translate="label" module="abandonment">
5
+ <label>Abandonment Cart Alert</label>
6
+ <tab>emailvision</tab>
7
+ <frontend_type>text</frontend_type>
8
+ <sort_order>500</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>0</show_in_website>
11
+ <show_in_store>0</show_in_store>
12
+ <groups>
13
+ <first_alert_config translate="label" module="abandonment">
14
+ <label>First Alert Configuration</label>
15
+ <expanded>1</expanded>
16
+ <frontend_type>text</frontend_type>
17
+ <sort_order>1</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>0</show_in_website>
20
+ <show_in_store>0</show_in_store>
21
+ <fields>
22
+ <enabled translate="label" module="abandonment">
23
+ <label>First Email Alert Enable</label>
24
+ <frontend_type>select</frontend_type>
25
+ <source_model>adminhtml/system_config_source_yesno</source_model>
26
+ <sort_order>10</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>0</show_in_website>
29
+ <show_in_store>0</show_in_store>
30
+ </enabled>
31
+ <delay translate="label" module="abandonment">
32
+ <label>First Email Alert Delay (in hour)</label>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>20</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>0</show_in_website>
37
+ <show_in_store>0</show_in_store>
38
+ </delay>
39
+ <template translate="label" module="abandonment">
40
+ <label>First Email Alert Template</label>
41
+ <frontend_type>select</frontend_type>
42
+ <source_model>adminhtml/system_config_source_email_template</source_model>
43
+ <sort_order>30</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>0</show_in_website>
46
+ <show_in_store>0</show_in_store>
47
+ </template>
48
+ </fields>
49
+ </first_alert_config>
50
+ </groups>
51
+ <groups>
52
+ <second_alert_config translate="label" module="abandonment">
53
+ <label>Second Alert Configuration</label>
54
+ <expanded>1</expanded>
55
+ <frontend_type>text</frontend_type>
56
+ <sort_order>10</sort_order>
57
+ <show_in_default>1</show_in_default>
58
+ <show_in_website>0</show_in_website>
59
+ <show_in_store>0</show_in_store>
60
+ <fields>
61
+ <enabled translate="label" module="abandonment">
62
+ <label>Second Email Alert Enable</label>
63
+ <frontend_type>select</frontend_type>
64
+ <source_model>adminhtml/system_config_source_yesno</source_model>
65
+ <sort_order>10</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>0</show_in_website>
68
+ <show_in_store>0</show_in_store>
69
+ </enabled>
70
+ <delay translate="label" module="abandonment">
71
+ <label>Second Email Alert Delay (in hour)</label>
72
+ <frontend_type>text</frontend_type>
73
+ <sort_order>20</sort_order>
74
+ <show_in_default>1</show_in_default>
75
+ <show_in_website>0</show_in_website>
76
+ <show_in_store>0</show_in_store>
77
+ </delay>
78
+ <template translate="label" module="abandonment">
79
+ <label>Second Email Template</label>
80
+ <frontend_type>select</frontend_type>
81
+ <source_model>adminhtml/system_config_source_email_template</source_model>
82
+ <sort_order>30</sort_order>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>0</show_in_website>
85
+ <show_in_store>0</show_in_store>
86
+ </template>
87
+ </fields>
88
+ </second_alert_config>
89
+ </groups>
90
+ <groups>
91
+ <third_alert_config translate="label" module="abandonment">
92
+ <label>Third Alert Configuration</label>
93
+ <expanded>1</expanded>
94
+ <frontend_type>text</frontend_type>
95
+ <sort_order>20</sort_order>
96
+ <show_in_default>1</show_in_default>
97
+ <show_in_website>0</show_in_website>
98
+ <show_in_store>0</show_in_store>
99
+ <fields>
100
+ <enabled translate="label" module="abandonment">
101
+ <label>Third Email Alert Enable</label>
102
+ <frontend_type>select</frontend_type>
103
+ <source_model>adminhtml/system_config_source_yesno</source_model>
104
+ <sort_order>10</sort_order>
105
+ <show_in_default>1</show_in_default>
106
+ <show_in_website>0</show_in_website>
107
+ <show_in_store>0</show_in_store>
108
+ </enabled>
109
+ <delay translate="label" module="abandonment">
110
+ <label>Third Email Alert Delay (in hour)</label>
111
+ <frontend_type>text</frontend_type>
112
+ <sort_order>20</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>0</show_in_website>
115
+ <show_in_store>0</show_in_store>
116
+ </delay>
117
+ <template translate="label" module="abandonment">
118
+ <label>Third Email Alert Template</label>
119
+ <frontend_type>select</frontend_type>
120
+ <source_model>adminhtml/system_config_source_email_template</source_model>
121
+ <sort_order>30</sort_order>
122
+ <show_in_default>1</show_in_default>
123
+ <show_in_website>0</show_in_website>
124
+ <show_in_store>0</show_in_store>
125
+ </template>
126
+ </fields>
127
+ </third_alert_config>
128
+ </groups>
129
+ <groups>
130
+ <alert_identity translate="label" module="abandonment">
131
+ <label>Sender Identity</label>
132
+ <expanded>1</expanded>
133
+ <frontend_type>text</frontend_type>
134
+ <sort_order>50</sort_order>
135
+ <show_in_default>1</show_in_default>
136
+ <show_in_website>0</show_in_website>
137
+ <show_in_store>0</show_in_store>
138
+ <fields>
139
+ <email_identity translate="label" module="abandonment">
140
+ <label>Email Sender</label>
141
+ <frontend_type>select</frontend_type>
142
+ <source_model>adminhtml/system_config_source_email_identity</source_model>
143
+ <sort_order>10</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>0</show_in_website>
146
+ <show_in_store>0</show_in_store>
147
+ </email_identity>
148
+ </fields>
149
+ </alert_identity>
150
+ </groups>
151
+ </abandonment>
152
+ </sections>
153
+ </config>
app/code/community/Emv/CartAlert/sql/abandonment_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+ $installer->run("
6
+ -- DROP TABLE IF EXISTS {$this->getTable('abandonment')};
7
+ CREATE TABLE {$this->getTable('abandonment')} (
8
+ `abandonment_id` int(11) unsigned NOT NULL auto_increment,
9
+ `entity_id` varchar(30) NOT NULL default '',
10
+ `template` varchar(30) NOT NULL default '',
11
+ PRIMARY KEY (`abandonment_id`)
12
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
13
+ ");
14
+ $installer->endSetup();
15
+
app/code/community/Emv/CartAlert/sql/abandonment_setup/mysql4-upgrade-0.1.0-0.2.0.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @var $installer Emv_CartAlert_Model_Resource_Setup */
3
+ $installer = $this;
4
+
5
+ $installer->addAttribute('customer', 'abandonment_subscribed', array(
6
+ 'label' => 'Subscribed from abandonned cart notifications',
7
+ 'type' => 'int',
8
+ 'input' => 'select',
9
+ 'visible' => true,
10
+ 'source' => 'eav/entity_attribute_source_boolean',
11
+ 'required' => false,
12
+ 'user_defined' => false,
13
+ 'nullable' => false,
14
+ 'default' => '1',
15
+ 'sort_order' => 1000
16
+ ));
17
+
18
+ $installer->getConnection()
19
+ ->addColumn($installer->getTable('abandonment/abandonment'), 'customer_abandonment_subscribed', 'TINYINT(1) NOT NULL DEFAULT 1');
20
+
21
+ $installer->updateCustomerForms();
22
+ $installer->endSetup();
app/code/community/Emv/Core/Model/Service/Soap/Api.php CHANGED
@@ -92,7 +92,6 @@ class Emv_Core_Model_Service_Soap_Api
92
  $this->_sessionId = $wsResult->return;
93
  } catch (Exception $e) {
94
  Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
95
- Mage::log($e, null, Mage::helper('emvcore')->LOG_FILE);
96
  if($e->getMessage() === 'Could not connect to host' ||
97
  $e->getMessage() === 'Service Temporarily Unavailable' )
98
  {
@@ -127,7 +126,7 @@ class Emv_Core_Model_Service_Soap_Api
127
  $this->closeApiConnection();
128
 
129
  } catch ( Exception $e) {
130
- Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
131
  throw Mage::exception('Emv_Core', $e->getMessage());
132
  }
133
 
@@ -151,7 +150,7 @@ class Emv_Core_Model_Service_Soap_Api
151
  $wsResult = $this->_transactionalService->getTemplate($params);
152
 
153
  } catch ( Exception $e) {
154
- Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
155
  throw Mage::exception('Emv_Core', $e->getMessage());
156
  }
157
 
@@ -197,7 +196,7 @@ class Emv_Core_Model_Service_Soap_Api
197
  $wsResult = $this->_transactionalService->createTemplate($params);
198
  $templateId = $wsResult->return;
199
  } catch ( Exception $e) {
200
- Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
201
  throw Mage::exception('Emv_Core', $e->getMessage());
202
  }
203
 
@@ -226,7 +225,7 @@ class Emv_Core_Model_Service_Soap_Api
226
  $emvTemplate = $this->getTemplateById($wsResult->return);
227
 
228
  } catch ( Exception $e) {
229
- Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
230
  throw Mage::exception('Emv_Core', $e->getMessage());
231
  }
232
 
@@ -290,7 +289,7 @@ class Emv_Core_Model_Service_Soap_Api
290
  $returnString = $this->sendEmv($emvTemplate, $varDynWS, $email, $varContentWS);
291
 
292
  } catch ( Exception $e) {
293
- Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
294
  throw Mage::exception('Emv_Core', $e->getMessage());
295
  }
296
 
@@ -340,7 +339,7 @@ class Emv_Core_Model_Service_Soap_Api
340
  $this->closeApiConnection();
341
 
342
  } catch ( Exception $e) {
343
- Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
344
  throw Mage::exception('Emv_Core', $e->getMessage());
345
  }
346
 
@@ -354,13 +353,13 @@ class Emv_Core_Model_Service_Soap_Api
354
  * @param string $sessionId
355
  * @throws Emv_Core_Exception
356
  */
357
- public function closeApiConnection ()
358
  {
359
  try {
360
  $wsResult = $this->_transactionalService->closeApiConnection(array( 'token' => $this->_sessionId));
361
  $this->_sessionId = null;
362
  } catch (Exception $e) {
363
- Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
364
  throw Mage::exception('Emv_Core', $e->getMessage());
365
  }
366
  return $wsResult->return === 'connection closed';
92
  $this->_sessionId = $wsResult->return;
93
  } catch (Exception $e) {
94
  Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE);
 
95
  if($e->getMessage() === 'Could not connect to host' ||
96
  $e->getMessage() === 'Service Temporarily Unavailable' )
97
  {
126
  $this->closeApiConnection();
127
 
128
  } catch ( Exception $e) {
129
+ Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE, true);
130
  throw Mage::exception('Emv_Core', $e->getMessage());
131
  }
132
 
150
  $wsResult = $this->_transactionalService->getTemplate($params);
151
 
152
  } catch ( Exception $e) {
153
+ Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE, true);
154
  throw Mage::exception('Emv_Core', $e->getMessage());
155
  }
156
 
196
  $wsResult = $this->_transactionalService->createTemplate($params);
197
  $templateId = $wsResult->return;
198
  } catch ( Exception $e) {
199
+ Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE, true);
200
  throw Mage::exception('Emv_Core', $e->getMessage());
201
  }
202
 
225
  $emvTemplate = $this->getTemplateById($wsResult->return);
226
 
227
  } catch ( Exception $e) {
228
+ Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE, true);
229
  throw Mage::exception('Emv_Core', $e->getMessage());
230
  }
231
 
289
  $returnString = $this->sendEmv($emvTemplate, $varDynWS, $email, $varContentWS);
290
 
291
  } catch ( Exception $e) {
292
+ Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE, true);
293
  throw Mage::exception('Emv_Core', $e->getMessage());
294
  }
295
 
339
  $this->closeApiConnection();
340
 
341
  } catch ( Exception $e) {
342
+ Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE, true);
343
  throw Mage::exception('Emv_Core', $e->getMessage());
344
  }
345
 
353
  * @param string $sessionId
354
  * @throws Emv_Core_Exception
355
  */
356
+ public function closeApiConnection()
357
  {
358
  try {
359
  $wsResult = $this->_transactionalService->closeApiConnection(array( 'token' => $this->_sessionId));
360
  $this->_sessionId = null;
361
  } catch (Exception $e) {
362
+ Mage::log($e->getMessage(), null, Mage::helper('emvcore')->LOG_FILE, true);
363
  throw Mage::exception('Emv_Core', $e->getMessage());
364
  }
365
  return $wsResult->return === 'connection closed';
app/code/community/Emv/Core/Model/Service/Soap/Config.php CHANGED
@@ -32,8 +32,14 @@ class Emv_Core_Model_Service_Soap_Config
32
  */
33
  public function getTransactionalServiceWsdl()
34
  {
35
- $node = $this->_wsdl->transactional_service;
36
- return $node?$node->asArray():null;
 
 
 
 
 
 
37
  }
38
 
39
  /**
@@ -41,7 +47,13 @@ class Emv_Core_Model_Service_Soap_Config
41
  */
42
  public function getNotificationServiceWsdl()
43
  {
44
- $node = $this->_wsdl->notification_service;
45
- return $node?$node->asArray():null;
 
 
 
 
 
 
46
  }
47
  }
32
  */
33
  public function getTransactionalServiceWsdl()
34
  {
35
+ $wsdl = Mage::getStoreConfig('emvcore/emv_services/transactional');
36
+
37
+ if($wsdl == null || $wsdl == '')
38
+ {
39
+ $node = $this->_wsdl->transactional_service;
40
+ $wsdl = $node ? $node->asArray():null;
41
+ }
42
+ return $wsdl;
43
  }
44
 
45
  /**
47
  */
48
  public function getNotificationServiceWsdl()
49
  {
50
+ $wsdl = Mage::getStoreConfig('emvcore/emv_services/notification');
51
+
52
+ if($wsdl == null || $wsdl == '')
53
+ {
54
+ $node = $this->_wsdl->notification_service;
55
+ $wsdl = $node ? $node->asArray():null;
56
+ }
57
+ return $wsdl;
58
  }
59
  }
app/code/community/Emv/Core/etc/system.xml CHANGED
@@ -1,11 +1,17 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <config>
 
 
 
 
 
 
3
  <sections>
4
  <emvcore translate="label" module="emvcore">
5
  <label>Campaign Commander</label>
6
- <tab>general</tab>
7
  <frontend_type>text</frontend_type>
8
- <sort_order>500</sort_order>
9
  <show_in_default>1</show_in_default>
10
  <show_in_website>1</show_in_website>
11
  <show_in_store>1</show_in_store>
@@ -14,7 +20,7 @@
14
  <label>Campaign Commander Account</label>
15
  <expanded>1</expanded>
16
  <frontend_type>text</frontend_type>
17
- <sort_order>0</sort_order>
18
  <show_in_default>1</show_in_default>
19
  <show_in_website>1</show_in_website>
20
  <show_in_store>1</show_in_store>
@@ -30,6 +36,33 @@
30
  </account>
31
  </fields>
32
  </emv_account>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  </groups>
34
  </emvcore>
35
  </sections>
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <config>
3
+ <tabs>
4
+ <emailvision translate="label" module="emvcore">
5
+ <label>Emailvision</label>
6
+ <sort_order>150</sort_order>
7
+ </emailvision>
8
+ </tabs>
9
  <sections>
10
  <emvcore translate="label" module="emvcore">
11
  <label>Campaign Commander</label>
12
+ <tab>emailvision</tab>
13
  <frontend_type>text</frontend_type>
14
+ <sort_order>100</sort_order>
15
  <show_in_default>1</show_in_default>
16
  <show_in_website>1</show_in_website>
17
  <show_in_store>1</show_in_store>
20
  <label>Campaign Commander Account</label>
21
  <expanded>1</expanded>
22
  <frontend_type>text</frontend_type>
23
+ <sort_order>10</sort_order>
24
  <show_in_default>1</show_in_default>
25
  <show_in_website>1</show_in_website>
26
  <show_in_store>1</show_in_store>
36
  </account>
37
  </fields>
38
  </emv_account>
39
+ <emv_services translate="label">
40
+ <label>Campaign Commander Services</label>
41
+ <expanded>1</expanded>
42
+ <frontend_type>text</frontend_type>
43
+ <sort_order>0</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ <fields>
48
+ <transactional translate="label" module="emvcore">
49
+ <label>Transactional Service Adress</label>
50
+ <frontend_type>text</frontend_type>
51
+ <sort_order>1</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ <show_in_store>1</show_in_store>
55
+ </transactional>
56
+ <notification translate="label" module="emvcore">
57
+ <label>Notification Service Adress</label>
58
+ <frontend_type>text</frontend_type>
59
+ <sort_order>1</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </notification>
64
+ </fields>
65
+ </emv_services>
66
  </groups>
67
  </emvcore>
68
  </sections>
app/code/community/Emv/Emt/Block/Adminhtml/Emt/Edit/Form.php CHANGED
@@ -115,8 +115,8 @@ class Emv_Emt_Block_Adminhtml_Emt_Edit_Form extends Mage_Adminhtml_Block_Widget_
115
  'values' => $mailModesArray,
116
  ));
117
 
118
- $classicModeId = Mage::getModel('emvemt/mailmode')->getIdByName('classic');
119
- $sendModeId = Mage::getModel('emvemt/mailmode')->getIdByName('emv send');
120
 
121
  if(null === $emtModel->getEmvTemplateId() ||
122
  $emtModel->getEmvSendMailModeId() === $classicModeId)
@@ -200,8 +200,8 @@ class Emv_Emt_Block_Adminhtml_Emt_Edit_Form extends Mage_Adminhtml_Block_Widget_
200
  'note' => '<script type="text/javascript">
201
  function hideField(mailMode)
202
  {
203
- if(mailMode == '.Mage::getModel('emvemt/mailmode')->getIdByName('classic').
204
- ' || mailMode == '.Mage::getModel('emvemt/mailmode')->getIdByName('emv send').')
205
  {
206
  $("emv_template_id").parentNode.parentNode.style.display = "none";
207
  $("to_date").parentNode.parentNode.style.display = "none";
@@ -211,7 +211,7 @@ class Emv_Emt_Block_Adminhtml_Emt_Edit_Form extends Mage_Adminhtml_Block_Widget_
211
  }
212
  else
213
  {
214
- if (mailMode == '.Mage::getModel('emvemt/mailmode')->getIdByName('emv create').')
215
  {
216
  $("emtTemplateButtonContainer").style.display = "";
217
  $("emv_template_id").parentNode.parentNode.style.display = "";
115
  'values' => $mailModesArray,
116
  ));
117
 
118
+ $classicModeId = Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::CLASSIC_FLAG);
119
+ $sendModeId = Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::EMV_SEND_FLAG);
120
 
121
  if(null === $emtModel->getEmvTemplateId() ||
122
  $emtModel->getEmvSendMailModeId() === $classicModeId)
200
  'note' => '<script type="text/javascript">
201
  function hideField(mailMode)
202
  {
203
+ if(mailMode == '.Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::CLASSIC_FLAG).
204
+ ' || mailMode == '.Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::EMV_SEND_FLAG).')
205
  {
206
  $("emv_template_id").parentNode.parentNode.style.display = "none";
207
  $("to_date").parentNode.parentNode.style.display = "none";
211
  }
212
  else
213
  {
214
+ if (mailMode == '.Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::EMV_CREATE_FLAG).')
215
  {
216
  $("emtTemplateButtonContainer").style.display = "";
217
  $("emv_template_id").parentNode.parentNode.style.display = "";
app/code/community/Emv/Emt/Block/Adminhtml/Emt/Grid.php CHANGED
@@ -15,7 +15,7 @@ class Emv_Emt_Block_Adminhtml_Emt_Grid extends Mage_Adminhtml_Block_Widget_Grid
15
  protected function _prepareCollection()
16
  {
17
  $collection = Mage::getResourceModel('emvemt/emt_collection');
18
- $collection->getMagentoEMTName()->getEmvTemplateName();
19
  $this->setCollection($collection);
20
  parent::_prepareCollection();
21
  }
@@ -61,6 +61,7 @@ class Emv_Emt_Block_Adminhtml_Emt_Grid extends Mage_Adminhtml_Block_Widget_Grid
61
  'index' => 'emv_template_id_and_name',
62
  'type' => 'varchar',
63
  'filter' => false,
 
64
  ));
65
 
66
  $this->addColumn('action', array(
15
  protected function _prepareCollection()
16
  {
17
  $collection = Mage::getResourceModel('emvemt/emt_collection');
18
+ $collection->getMagentoEMTName();
19
  $this->setCollection($collection);
20
  parent::_prepareCollection();
21
  }
61
  'index' => 'emv_template_id_and_name',
62
  'type' => 'varchar',
63
  'filter' => false,
64
+ 'renderer' => 'emvemt/adminhtml_emt_grid_renderer_emvname',
65
  ));
66
 
67
  $this->addColumn('action', array(
app/code/community/Emv/Emt/Block/Adminhtml/Emt/Grid/Renderer/Emvname.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Emv_Emt_Block_Adminhtml_Emt_Grid_Renderer_Emvname extends
4
+ Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
5
+ {
6
+ /**
7
+ * Render mode
8
+ *
9
+ * @param Varien_Object $row
10
+ * @return string
11
+ */
12
+ public function render(Varien_Object $row)
13
+ {
14
+ $helper = Mage::helper('emvemt/emvtemplate');
15
+ return $helper->getEMVTemplateName($row->getEmvTemplateId(), $row->getEmvAccountId());
16
+ }
17
+
18
+ }
app/code/community/Emv/Emt/Constants.php CHANGED
@@ -4,4 +4,8 @@ interface Emv_Emt_Constants
4
  const ATTRIBUTE_TYPE_EMV_CONTENT = 'EMV_CONTENT';
5
 
6
  const ATTRIBUTE_TYPE_EMV_DYN = 'EMV_DYN';
 
 
 
 
7
  }
4
  const ATTRIBUTE_TYPE_EMV_CONTENT = 'EMV_CONTENT';
5
 
6
  const ATTRIBUTE_TYPE_EMV_DYN = 'EMV_DYN';
7
+
8
+ const EMV_CREATE_FLAG = 'emv create';
9
+ const EMV_SEND_FLAG = 'emv send';
10
+ const CLASSIC_FLAG = 'classic';
11
  }
app/code/community/Emv/Emt/Helper/Emvtemplate.php CHANGED
@@ -37,4 +37,41 @@ class Emv_Emt_Helper_Emvtemplate extends Mage_Core_Helper_Abstract
37
 
38
  return array('entry' => $wsArray);
39
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
37
 
38
  return array('entry' => $wsArray);
39
  }
40
+
41
+ public function getEMVTemplateName($emvTemplateId, $emvAccountId)
42
+ {
43
+ $name = '';
44
+ if($emvTemplateId !== null)
45
+ {
46
+ try {
47
+
48
+ /* @var $account Emv_Core_Model_Account */
49
+ $account = Mage::getModel('emvcore/account')->load($emvAccountId);
50
+
51
+ /* @var $soap Emv_Core_Model_Service_Soap_Api */
52
+ $soap = Mage::getModel('emvcore/service_soap_api', $account);
53
+
54
+ $EMVTemplate = $soap->getTemplateById($emvTemplateId);
55
+
56
+ if(isset($EMVTemplate->name))
57
+ {
58
+ $name = $emvTemplateId. ' / ' . $EMVTemplate->name;
59
+ }
60
+ else
61
+ {
62
+ $name = $emvTemplateId. ' / No Name';
63
+ }
64
+
65
+ } catch (Exception $e) {
66
+ // if we couln't connect to the WS we just display the Id
67
+ $name = $emvTemplateId;
68
+ }
69
+ }
70
+ else
71
+ {
72
+ $name = '';
73
+ }
74
+
75
+ return $name;
76
+ }
77
  }
app/code/community/Emv/Emt/Model/Mage/Core/Email/Template.php CHANGED
@@ -2,13 +2,13 @@
2
  class Emv_Emt_Model_Mage_Core_Email_Template extends Mage_Core_Model_Email_Template
3
  {
4
 
5
- private $forceEmvSend = false;
6
 
7
  /**
8
  * Send transactional email to recipient
9
  *
10
  * @param int $templateId
11
- * @param string|array $sender sender information can be declared as part of config path
12
  * @param string $email recipient email
13
  * @param string $name recipient name
14
  * @param array $vars varianles which can be used in template
@@ -30,20 +30,20 @@ class Emv_Emt_Model_Mage_Core_Email_Template extends Mage_Core_Model_Email_Templ
30
 
31
  if($mode === null)
32
  {
33
- $mode = 'classic';
34
  }
35
 
36
- if($this->forceEmvSend)
37
  {
38
- $mode = 'emv send';
39
  }
40
 
41
  switch($mode)
42
  {
43
- case 'classic':
44
  parent::sendTransactional($templateId, $sender, $email, $name, $vars, $storeId);
45
  break;
46
- case 'emv create':
47
  try {
48
  $accountId = Mage::getStoreConfig('emvcore/emv_account/account', $storeId);
49
  /* @var $account Emv_Emt_Model_Emt */
@@ -80,13 +80,14 @@ class Emv_Emt_Model_Mage_Core_Email_Template extends Mage_Core_Model_Email_Templ
80
  Mage::helper('emvemt/emvtemplate')->_attributesToWebServiceRequest($realValueEmvDynAttributes),
81
  $email, Mage::helper('emvemt/emvtemplate')->_attributesToWebServiceRequest($realValueEmvContentAttributes));
82
  } catch (Exception $e) {
83
- Mage::log('Error with CC trying do send mail in classic mode', null,
84
- Mage::helper('emvcore')->LOG_FILE);
85
  parent::sendTransactional($templateId, $sender, $email, $name, $vars, $storeId);
86
  }
87
  break;
88
- case 'emv send':
89
  try {
 
90
  $this->setTemplateText($this->getProcessedTemplate($vars));
91
  $this->setTemplateSubject($this->getProcessedTemplateSubject($vars));
92
  $accountId = Mage::getStoreConfig('emvcore/emv_account/account', $storeId);
@@ -108,9 +109,10 @@ class Emv_Emt_Model_Mage_Core_Email_Template extends Mage_Core_Model_Email_Templ
108
  $name = $email;
109
  }
110
  $emvApiModel->sendEmvEmt($this, $name, $email);
 
111
  } catch (Exception $e) {
112
- Mage::log('Error with CC trying do send mail in classic mode', null,
113
- Mage::helper('emvcore')->LOG_FILE);
114
  parent::sendTransactional($templateId, $sender, $email, $name, $vars, $storeId);
115
  }
116
  break;
@@ -147,13 +149,8 @@ class Emv_Emt_Model_Mage_Core_Email_Template extends Mage_Core_Model_Email_Templ
147
  return $attributesWithValues;
148
  }
149
 
150
- public function forceEmvSend()
151
- {
152
- $this->forceEmvSend = true;
153
- }
154
-
155
- public function disableForceEmvSend()
156
  {
157
- $this->forceEmvSend = false;
158
  }
159
  }
2
  class Emv_Emt_Model_Mage_Core_Email_Template extends Mage_Core_Model_Email_Template
3
  {
4
 
5
+ private $emvSendMode = false;
6
 
7
  /**
8
  * Send transactional email to recipient
9
  *
10
  * @param int $templateId
11
+ * @param string|array $sender sneder informatio, can be declared as part of config path
12
  * @param string $email recipient email
13
  * @param string $name recipient name
14
  * @param array $vars varianles which can be used in template
30
 
31
  if($mode === null)
32
  {
33
+ $mode = Emv_Emt_Constants::CLASSIC_FLAG;
34
  }
35
 
36
+ if($this->emvSendMode)
37
  {
38
+ $mode = Emv_Emt_Constants::EMV_SEND_FLAG;
39
  }
40
 
41
  switch($mode)
42
  {
43
+ case Emv_Emt_Constants::CLASSIC_FLAG :
44
  parent::sendTransactional($templateId, $sender, $email, $name, $vars, $storeId);
45
  break;
46
+ case Emv_Emt_Constants::EMV_CREATE_FLAG :
47
  try {
48
  $accountId = Mage::getStoreConfig('emvcore/emv_account/account', $storeId);
49
  /* @var $account Emv_Emt_Model_Emt */
80
  Mage::helper('emvemt/emvtemplate')->_attributesToWebServiceRequest($realValueEmvDynAttributes),
81
  $email, Mage::helper('emvemt/emvtemplate')->_attributesToWebServiceRequest($realValueEmvContentAttributes));
82
  } catch (Exception $e) {
83
+ Mage::log('Error with CC (emv create), trying to send mail in classic mode', null,
84
+ Mage::helper('emvcore')->LOG_FILE, true);
85
  parent::sendTransactional($templateId, $sender, $email, $name, $vars, $storeId);
86
  }
87
  break;
88
+ case Emv_Emt_Constants::EMV_SEND_FLAG :
89
  try {
90
+
91
  $this->setTemplateText($this->getProcessedTemplate($vars));
92
  $this->setTemplateSubject($this->getProcessedTemplateSubject($vars));
93
  $accountId = Mage::getStoreConfig('emvcore/emv_account/account', $storeId);
109
  $name = $email;
110
  }
111
  $emvApiModel->sendEmvEmt($this, $name, $email);
112
+
113
  } catch (Exception $e) {
114
+ Mage::log('Error with CC (emv send), trying to send mail in classic mode', null,
115
+ Mage::helper('emvcore')->LOG_FILE, true);
116
  parent::sendTransactional($templateId, $sender, $email, $name, $vars, $storeId);
117
  }
118
  break;
149
  return $attributesWithValues;
150
  }
151
 
152
+ public function setEmvSend($emvSendMode)
 
 
 
 
 
153
  {
154
+ $this->emvSendMode = $emvSendMode;
155
  }
156
  }
app/code/community/Emv/Emt/Model/Mysql4/Emt/Collection.php CHANGED
@@ -48,49 +48,4 @@ class Emv_Emt_Model_Mysql4_Emt_Collection extends Mage_Core_Model_Mysql4_Collect
48
 
49
  return $this;
50
  }
51
-
52
- /**
53
- * Join collection with EMV template name thanks to campaign commander webservices
54
- */
55
- public function getEMVTemplateName()
56
- {
57
- foreach ($this as $emt)
58
- {
59
- $id = $emt->getEmvTemplateId();
60
-
61
- if($id !== null)
62
- {
63
- try {
64
-
65
- /* @var $account Emv_Core_Model_Account */
66
- $account = Mage::getModel('emvcore/account')->load($emt->getEmvAccountId());
67
-
68
- /* @var $soap Emv_Core_Model_Service_Soap_Api */
69
- $soap = Mage::getModel('emvcore/service_soap_api', $account);
70
-
71
- $EMVTemplate = $soap->getTemplateById($id);
72
-
73
- if(isset($EMVTemplate->name))
74
- {
75
- $emt->setEmvTemplateIdAndName( $id. ' / ' . $EMVTemplate->name);
76
- }
77
- else
78
- {
79
- $emt->setEmvTemplateIdAndName( $id. ' / No Name');
80
- }
81
-
82
- } catch (Exception $e) {
83
- // if we couln't connect to the WS we just display the Id
84
- $emt->setEmvTemplateIdAndName( $id );
85
- }
86
- }
87
- else
88
- {
89
- $emt->setEmvTemplateIdAndName( '' );
90
- }
91
- }
92
-
93
- return $this;
94
- }
95
-
96
  }
48
 
49
  return $this;
50
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
app/code/community/Emv/Emt/controllers/Adminhtml/EmtController.php CHANGED
@@ -320,9 +320,9 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
320
 
321
  //reset emt template if user switch mail mode from 'emv create / Campaign Commander Template' to 'emv send' or 'classic'
322
  if($emtModel->getEmvSendMailModeId() ===
323
- Mage::getModel('emvemt/mailmode')->getIdByName('classic') ||
324
  $emtModel->getEmvSendMailModeId() ===
325
- Mage::getModel('emvemt/mailmode')->getIdByName('emv send'))
326
  {
327
  $emtModel->setEmvTemplateId(null);
328
  }
@@ -346,7 +346,7 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
346
  {
347
  // set send mode to classic by default
348
  $emtModel->setEmvSendMailModeId(
349
- Mage::getModel('emvemt/mailmode')->getIdByName('classic'));
350
 
351
  // we're in 1st form
352
  $result = $emtModel->validateNewForm();
@@ -372,7 +372,7 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
372
  $this->_deleteAllEmtAttribute($emtModel->getId());
373
 
374
  if($emtModel->getEmvSendMailModeId() ===
375
- Mage::getModel('emvemt/mailmode')->getIdByName('emv create'))
376
  {
377
  $attributes = $this->getRequest()->getParam('attributes');
378
  if (is_array($attributes))
320
 
321
  //reset emt template if user switch mail mode from 'emv create / Campaign Commander Template' to 'emv send' or 'classic'
322
  if($emtModel->getEmvSendMailModeId() ===
323
+ Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::CLASSIC_FLAG) ||
324
  $emtModel->getEmvSendMailModeId() ===
325
+ Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::EMV_SEND_FLAG))
326
  {
327
  $emtModel->setEmvTemplateId(null);
328
  }
346
  {
347
  // set send mode to classic by default
348
  $emtModel->setEmvSendMailModeId(
349
+ Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::CLASSIC_FLAG));
350
 
351
  // we're in 1st form
352
  $result = $emtModel->validateNewForm();
372
  $this->_deleteAllEmtAttribute($emtModel->getId());
373
 
374
  if($emtModel->getEmvSendMailModeId() ===
375
+ Mage::getModel('emvemt/mailmode')->getIdByName(Emv_Emt_Constants::EMV_CREATE_FLAG))
376
  {
377
  $attributes = $this->getRequest()->getParam('attributes');
378
  if (is_array($attributes))
app/design/frontend/default/default/layout/abandonment.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <!--
4
+ Category layered navigation layout
5
+ -->
6
+
7
+ <customer_account>
8
+ <reference name="customer_account_navigation">
9
+ <action method="addLink" translate="label" module="abandonment"><name>abandonment</name><path>abandonment/customer/manage</path><label>Cart Reminder Subscriptions</label></action>
10
+ </reference>
11
+ <remove name="left.abandonment"/>
12
+ </customer_account>
13
+
14
+ <!--
15
+ Customer account home dashboard layout
16
+ -->
17
+ <abandonment_customer_manage>
18
+ <update handle="customer_account"/>
19
+ <reference name="my.account.wrapper">
20
+ <block type="abandonment/customer_abandonment" name="customer_abandonment" as="info1" template="abandonment/customer.phtml"/>
21
+ </reference>
22
+ </abandonment_customer_manage>
23
+ </layout>
app/design/frontend/default/default/template/abandonment/customer.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Cart Reminder Subscription') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <?php echo $this->getChildHtml('form_before')?>
6
+ <form action="<?php echo $this->getAction() ?>" method="post" id="form-validate">
7
+ <div class="fieldset">
8
+ <?php echo $this->getBlockHtml('formkey')?>
9
+ <h2 class="legend"><?php echo $this->__('Cart Reminder Subscription') ?></h2>
10
+ <ul class="form-list">
11
+ <li class="control"><input type="checkbox" name="is_subscribed" id="subscription" value="1" title="<?php echo $this->__('Cart Reminder Email Subscription') ?>"<?php if($this->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="subscription"><?php echo $this->__('Cart Reminder Email Subscription') ?></label></li>
12
+ </ul>
13
+ </div>
14
+ <div class="buttons-set">
15
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
16
+ <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
17
+ </div>
18
+ </form>
19
+ <script type="text/javascript">
20
+ //<![CDATA[
21
+ var dataForm = new VarienForm('form-validate', true);
22
+ //]]>
23
+ </script>
app/design/frontend/emv/template/abandonment/reminder/items.phtml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $cart = $this->getCart() ?>
2
+ <?php $items = $cart->getItems() ?>
3
+ <table width="680" border="0" align="left" cellpadding="0" cellspacing="0">
4
+ <tbody>
5
+ <?php for($i=0; $i < count($items); $i++): ?>
6
+ <?php $item = $items[$i]; ?>
7
+ <tr>
8
+ <td align="center">
9
+ <table width="680"
10
+ style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 16px; color: #000000"
11
+ border="1" align="center" cellpadding="0" cellspacing="0">
12
+ <tbody>
13
+ <tr>
14
+ <td width="385" height="25">
15
+ <table width="385" border="0" cellspacing="0" cellpadding="0">
16
+ <tbody>
17
+ <tr>
18
+ <td width="85">
19
+ <a
20
+ href="<?php echo $item->getUrl() ?>"
21
+ title="Checkout Now" target="_blank">
22
+ <img
23
+ alt="<?php echo htmlentities($item->getName()) ?>"
24
+ border="0" style="display: block;"
25
+ src="<?php echo $item->getImage() ?>"
26
+ width="85" />
27
+ </a>
28
+ </td>
29
+ <td width="8">&nbsp;</td>
30
+ <td><a
31
+ href="<?php echo $item->getUrl() ?>"
32
+ title="<?php echo htmlentities($item->getName()) ?>"><font
33
+ color="#000000"> <strong><?php echo htmlentities($item->getName()) ?></strong>
34
+ </font>
35
+ </a>
36
+ </td>
37
+ </tr>
38
+ </tbody>
39
+ </table>
40
+ </td>
41
+ <td width="80" height="25" align="center">$<?php echo number_format($item->getBasePrice(), 2) ?></td>
42
+ <td width="59" height="25" align="center"><?php echo floor($item->getQuantity()) ?></td>
43
+ <td width="80" height="25" align="center">$<?php echo number_format($item->getTotalPrice(), 2) ?></td>
44
+ </tr>
45
+ </tbody>
46
+ </table>
47
+ </td>
48
+ </tr>
49
+ <?php endfor; ?>
50
+ </tbody>
51
+ </table>
app/design/frontend/enterprise/default/layout/abandonment.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <!--
4
+ Category layered navigation layout
5
+ -->
6
+
7
+ <customer_account>
8
+ <reference name="customer_account_navigation">
9
+ <action method="addLink" translate="label" module="abandonment"><name>abandonment</name><path>abandonment/customer/manage</path><label>Cart Reminder Subscriptions</label></action>
10
+ </reference>
11
+ <remove name="left.abandonment" />
12
+ </customer_account>
13
+
14
+ <!--
15
+ Customer account home dashboard layout
16
+ -->
17
+ <abandonment_customer_manage>
18
+ <update handle="customer_account" />
19
+ <reference name="my.account.wrapper">
20
+ <block type="abandonment/customer_abandonment" name="customer_abandonment" as="info1" template="abandonment/customer.phtml"/>
21
+ </reference>
22
+ </abandonment_customer_manage>
23
+ </layout>
app/design/frontend/enterprise/default/template/abandonment/customer.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Cart Reminder Subscription') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <?php echo $this->getChildHtml('form_before')?>
6
+ <form action="<?php echo $this->getAction() ?>" method="post" id="form-validate">
7
+ <div class="fieldset">
8
+ <?php echo $this->getBlockHtml('formkey')?>
9
+ <h2 class="legend"><?php echo $this->__('Cart Reminder Subscription') ?></h2>
10
+ <ul class="form-list">
11
+ <li class="control"><input type="checkbox" name="is_subscribed" id="subscription" value="1" title="<?php echo $this->__('Cart Reminder Email Subscription') ?>"<?php if($this->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="subscription"><?php echo $this->__('Cart Reminder Email Subscription') ?></label></li>
12
+ </ul>
13
+ </div>
14
+ <div class="buttons-set">
15
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
16
+ <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
17
+ </div>
18
+ </form>
19
+ <script type="text/javascript">
20
+ //<![CDATA[
21
+ var dataForm = new VarienForm('form-validate', true);
22
+ //]]>
23
+ </script>
app/etc/modules/Emv_CartAlert.xml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Emv_CartAlert>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <depends>
8
+ <Emv_Core />
9
+ <Emv_Emt />
10
+ </depends>
11
+ </Emv_CartAlert>
12
+ </modules>
13
+ </config>
app/locale/en_US/Emv_CartAlert.csv ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "You are already unsubscribed from abandoned carts notifications.","You are already unsubscribed from abandoned carts notifications."
2
+ "You were successfully unsubscribed from abandoned carts notifications.","You were successfully unsubscribed from abandoned carts notifications."
3
+ "Cart Reminder Subscription","Cart Reminder Subscription"
4
+ "The subscription has been saved.","The subscription has been saved."
5
+ "The subscription has been removed.","The subscription has been removed."
6
+ "An error occurred while saving your subscription.","An error occurred while saving your subscription."
7
+ "The link cannot be used by registered customers.","The link cannot be used by registered customers."
8
+ "The link is invalid.","The link is invalid."
9
+ "Emailvision abandonment cart config","Emailvision abandonment cart config"
10
+ "Emailvision section","Emailvision section"
11
+ "Abandoned Cart 1","Abandoned Cart 1"
12
+ "Abandoned Cart 2","Abandoned Cart 2"
13
+ "Abandoned Cart 3","Abandoned Cart 3"
14
+ "Abandonment Cart Alert","Abandonment Cart Alert"
15
+ "First Alert Configuration","First Alert Configuration"
16
+ "First Email Alert Enable","First Email Alert Enable"
17
+ "First Email Alert Delay (in hour)","First Email Alert Delay (in hour)"
18
+ "First Email Alert Template","First Email Alert Template"
19
+ "Second Alert Configuration","Second Alert Configuration"
20
+ "Second Email Alert Enable","Second Email Alert Enable"
21
+ "Second Email Alert Delay (in hour)","Second Email Alert Delay (in hour)"
22
+ "Second Email Template","Second Email Template"
23
+ "Third Alert Configuration","Third Alert Configuration"
24
+ "Third Email Alert Enable","Third Email Alert Enable"
25
+ "Third Email Alert Delay (in hour)","Third Email Alert Delay (in hour)"
26
+ "Third Email Alert Template","Third Email Alert Template"
27
+ "Sender Identity","Sender Identity"
28
+ "Email Sender","Email Sender"
29
+ "Cart Reminder Subscription","Cart Reminder Subscription"
30
+ "Cart Reminder Email Subscription","Cart Reminder Email Subscription"
31
+ "Back","Back"
32
+ "Save","Save"
app/locale/en_US/Emv_Core.csv CHANGED
@@ -36,4 +36,8 @@
36
  "System","System"
37
  "This EMV account is invalid.","This Campaign Commander account is invalid."
38
  "Cound not connect to Campaign Commander WebService.","Cound not connect to Campaign Commander WebService."
39
- "--Please Select--","--Please Select--"
 
 
 
 
36
  "System","System"
37
  "This EMV account is invalid.","This Campaign Commander account is invalid."
38
  "Cound not connect to Campaign Commander WebService.","Cound not connect to Campaign Commander WebService."
39
+ "--Please Select--","--Please Select--"
40
+ "Transactional Service Adress","Transactional Service Adress"
41
+ "Notification Service Adress","Notification Service Adress"
42
+ "Campaign Commander Services","Campaign Commander Services"
43
+ "Emailvision","Emailvision"
app/locale/en_US/template/email/abandonment/template1.html ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject You've got a cart on our store @-->
2
+
3
+ <!--@styles
4
+ body{ color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
5
+ @-->
6
+
7
+ <body>
8
+ <div>Hi {{var cart.getCustomerName()}},</div>
9
+ <br />
10
+
11
+ You have a cart on <a href="{{store url=" }}" title="Our store">our store</a>
12
+ <br />
13
+ <br />
14
+
15
+ <a href="{{var cart.getCartLink()}}" title="COMPLETE YOUR ORDER NOW"
16
+ target="_blank"><font color="#422C1E">View it now</font></a>
17
+ <br />
18
+ <br />
19
+
20
+ Your Cart :
21
+ <br />
22
+ <table border="0">
23
+ <tr>
24
+ <td>{{block type="abandonment/cart_items" name="items" cart=$cart}}</td>
25
+ </tr>
26
+ <tr align="right">
27
+ <td><strong>Your Order Total: ${{var cart.getTotalPrice(true)}}</strong></td>
28
+ </tr>
29
+ <tr>
30
+ <td>&nbsp;</td>
31
+ </tr>
32
+ <tr>
33
+ <td><a href="{{var cart.getCartLink()}}"
34
+ title="COMPLETE YOUR ORDER NOW" target="_blank"><font
35
+ color="#422C1E">GO TO CART</font></a> <br />
36
+ <br />
37
+ Click here to <a href="{{var cart.getUnsubLink()}}" title="Unsubscribe" target="_blank">unsubscribe</a> to these reminders
38
+ </tr>
39
+ </td>
40
+ </table>
41
+ </body>
app/locale/en_US/template/email/abandonment/template2.html ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject You've got a cart on our store, second chance to complete your order @-->
2
+
3
+ <!--@styles
4
+ body{ color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
5
+ @-->
6
+
7
+ <body>
8
+ <div>Hi {{var cart.getCustomerName()}},</div>
9
+ <br />
10
+
11
+ You have a cart on <a href="{{store url=" }}" title="Our store">our store</a>
12
+ <br />
13
+ <br />
14
+
15
+ <a href="{{var cart.getCartLink()}}" title="COMPLETE YOUR ORDER NOW"
16
+ target="_blank"><font color="#422C1E">View it now</font></a>
17
+ <br />
18
+ <br />
19
+
20
+ Your Cart :
21
+ <br />
22
+ <table border="0">
23
+ <tr>
24
+ <td>{{block type="abandonment/cart_items" name="items" cart=$cart}}</td>
25
+ </tr>
26
+ <tr align="right">
27
+ <td><strong>Your Order Total: ${{var cart.getTotalPrice(true)}}</strong></td>
28
+ </tr>
29
+ <tr>
30
+ <td>&nbsp;</td>
31
+ </tr>
32
+ <tr>
33
+ <td><a href="{{var cart.getCartLink()}}"
34
+ title="COMPLETE YOUR ORDER NOW" target="_blank"><font
35
+ color="#422C1E">GO TO CART</font></a> <br />
36
+ <br />
37
+ Click here to <a href="{{var cart.getUnsubLink()}}" title="Unsubscribe" target="_blank">unsubscribe</a> to these reminders
38
+ </tr>
39
+ </td>
40
+ </table>
41
+ </body>
app/locale/en_US/template/email/abandonment/template3.html ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject You've got a cart on our store, last chance to complete your order @-->
2
+
3
+ <!--@styles
4
+ body{ color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
5
+ @-->
6
+
7
+ <body>
8
+ <div>Hi {{var cart.getCustomerName()}},</div>
9
+ <br />
10
+
11
+ You have a cart on <a href="{{store url=" }}" title="Our store">our store</a>
12
+ <br />
13
+ <br />
14
+
15
+ <a href="{{var cart.getCartLink()}}" title="COMPLETE YOUR ORDER NOW"
16
+ target="_blank"><font color="#422C1E">View it now</font></a>
17
+ <br />
18
+ <br />
19
+
20
+ Your Cart :
21
+ <br />
22
+ <table border="0">
23
+ <tr>
24
+ <td>{{block type="abandonment/cart_items" name="items" cart=$cart}}</td>
25
+ </tr>
26
+ <tr align="right">
27
+ <td><strong>Your Order Total: ${{var cart.getTotalPrice(true)}}</strong></td>
28
+ </tr>
29
+ <tr>
30
+ <td>&nbsp;</td>
31
+ </tr>
32
+ <tr>
33
+ <td><a href="{{var cart.getCartLink()}}"
34
+ title="COMPLETE YOUR ORDER NOW" target="_blank"><font
35
+ color="#422C1E">GO TO CART</font></a> <br />
36
+ <br />
37
+ Click here to <a href="{{var cart.getUnsubLink()}}" title="Unsubscribe" target="_blank">unsubscribe</a> to these reminders
38
+ </tr>
39
+ </td>
40
+ </table>
41
+ </body>
app/locale/fr_FR/Emv_CartAlert.csv ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "You are already unsubscribed from abandoned carts notifications.","Vous êtes déjà désinscrit des relances de paniers abandonnés."
2
+ "You were successfully unsubscribed from abandoned carts notifications.","Vous avez été désinscrit des relances de paniers abandonnés avec succès"
3
+ "Cart Reminder Subscription","Inscription Aux Relances Paniers Abandonnés"
4
+ "The subscription has been saved.","L'inscription a été prise en compte."
5
+ "The subscription has been removed.","La désinscription a été prise en compte"
6
+ "An error occurred while saving your subscription.","Une erreur est apparue lors de l'inscription"
7
+ "The link cannot be used by registered customers.","Le lien ne peut pas être utilisé par les utilisateurs enregistrés"
8
+ "The link is invalid.","Le lien est invalide."
9
+ "Emailvision abandonment cart config","Configuration Emailvision relance paniers abandonnés"
10
+ "Emailvision section","Section Emailvision"
11
+ "Abandoned Cart 1","Panier Abandonné 1"
12
+ "Abandoned Cart 2","Panier Abandonné 2"
13
+ "Abandoned Cart 3","Panier Abandonné 3"
14
+ "Abandonment Cart Alert","Relance Panier Abandonné"
15
+ "First Alert Configuration","Configuration Première Relance"
16
+ "First Email Alert Enable","Activation Première Relance"
17
+ "First Email Alert Delay (in hour)","Délai Première Relance (en heure)"
18
+ "First Email Alert Template","Template Première Relance"
19
+ "Second Alert Configuration","Configuration Deuxième Relance"
20
+ "Second Email Alert Enable","Activation Deuxième Relance"
21
+ "Second Email Alert Delay (in hour)","Délai Deuxième Relance (en heure)"
22
+ "Second Email Template","Template Deuxième Relance"
23
+ "Third Alert Configuration","Configuration Troisième Relance"
24
+ "Third Email Alert Enable","Activation Troisième Relance"
25
+ "Third Email Alert Delay (in hour)","Délai Troisième Relance (en heure)"
26
+ "Third Email Alert Template","Template Troisième Relance"
27
+ "Sender Identity","Identité de l'expéditeur"
28
+ "Email Sender","Expéditeur Email"
29
+ "Cart Reminder Subscription","Inscription Aux Relances Paniers Abandonnés"
30
+ "Cart Reminder Email Subscription","Inscription Aux Emails Relances Paniers Abandonnés"
31
+ "Back","Retour"
32
+ "Save","Valider"
app/locale/fr_FR/Emv_Core.csv CHANGED
@@ -36,4 +36,8 @@
36
  "System","Système"
37
  "This EMV account is invalid.","Ce Compte Campaign Commander est invalide."
38
  "Cound not connect to Campaign Commander WebService.","Connexion au webservice Campaign Commander impossible."
39
- "--Please Select--","--Votre choix--"
 
 
 
 
36
  "System","Système"
37
  "This EMV account is invalid.","Ce Compte Campaign Commander est invalide."
38
  "Cound not connect to Campaign Commander WebService.","Connexion au webservice Campaign Commander impossible."
39
+ "--Please Select--","--Votre choix--"
40
+ "Transactional Service Adress","Adresse Service Transactionel"
41
+ "Notification Service Adress","Adresse Service Notification"
42
+ "Campaign Commander Services","Services Campaign Commander"
43
+ "Emailvision","Emailvision"
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Campaign_Commander_Transactional_Email_1_5</name>
4
- <version>1.3.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Send your transactional e-mails through the Campaign Commander NMP platform</summary>
10
- <description>Send your transactional e-mails through the Campaign Commander NMP platform</description>
11
  <notes>Send your transactional e-mails through the Campaign Commander NMP platform</notes>
12
- <authors><author><name>Luis Diaz</name><user>auto-converted</user><email>ldiaz@emailvision.com</email></author></authors>
13
- <date>2012-05-16</date>
14
- <time>14:53:35</time>
15
- <contents><target name="magelocale"><dir name="en_US"><file name="Emv_Core.csv" hash="4a68f62b3bb6003f38632e8726c41d73"/><file name="Emv_Emt.csv" hash="9550fdad59ad6d262f3da8aa09e5b88e"/></dir><dir name="fr_FR"><file name="Emv_Core.csv" hash="5d7c94b493825d9efb5ef60178bdab50"/><file name="Emv_Emt.csv" hash="42e00b78ebb2c8ac9181f98566015506"/></dir></target><target name="mageetc"><dir name="modules"><file name="Emv_Core.xml" hash="e25dd0ea40fad09e0d1f6260f46e65ac"/><file name="Emv_Emt.xml" hash="d1e26edb25bce0b78e6c14792c07ac03"/></dir></target><target name="magecommunity"><dir name="Emv"><dir name="Core"><dir name="Block"><dir name="Adminhtml"><dir name="Account"><dir name="Edit"><file name="Form.php" hash="9e090720d3b7fc7406d2e4d4f95dbc90"/></dir><file name="Edit.php" hash="34bc1566c3693acccaa4c8e40b31cb5c"/><file name="Grid.php" hash="3d175f0e1b7ccc7dec1c9ffa30cacb76"/></dir><file name="Accounts.php" hash="3f35eecb2bf23417c0fab4746bda6d0c"/></dir></dir><dir name="Helper"><file name="Config.php" hash="455cd67728b1e6876e9fd8d55ca3253b"/><file name="Data.php" hash="896b9955cc2d6b27b9eca4d2508b7169"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Account"><file name="Collection.php" hash="39c1a08471b3bdd0563f3002a32a4db8"/></dir><file name="Account.php" hash="cea2093a18291b7dd24e25b6f8ce0da0"/></dir><dir name="Resource"><file name="Setup.php" hash="6fc36453ff6c01ac0534731816355bd0"/></dir><dir name="Service"><dir name="Soap"><file name="Api.php" hash="7c3b56a47f4f08494aca648a7829ac1a"/><file name="Config.php" hash="11eb39167cb8354f2da28215c16476e8"/><file name="SoapClient.php" hash="32117ab80f05f6e15b03edc879f806c1"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Account.php" hash="cbc4ee876efd1abcdaa5c57cc08714c2"/></dir></dir></dir><file name="Account.php" hash="a8a6c2c45ab0979666d09732e8d3eda2"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AccountController.php" hash="91447d74999979c278b65dd85f5c06d8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2e84807c5c503bd91ed673dfb5f579bd"/><file name="config.xml" hash="7bc75acc341d88e151534b02c86512ac"/><file name="system.xml" hash="4e14237f7d69bd20a8f4fd7fded54ba7"/></dir><dir name="sql"><dir name="emvcore_setup"><file name="mysql4-install-0.1.0.php" hash="7bc6d6e7c03398c40008d89ed86e27bc"/></dir></dir><file name="Exception.php" hash="227e1046ebceb99af7bc2b441bb4997d"/></dir><dir name="Emt"><dir name="Block"><dir name="Adminhtml"><dir name="Emt"><dir name="Edit"><file name="Attributes.php" hash="cc2a88773ca64fe7e88b0f460b3b05fc"/><file name="Form.php" hash="7ff998d35df74c4733f06a9fa6ddcae4"/></dir><dir name="New"><file name="Form.php" hash="f2f06b70d36dc2eefe9d4bf7f49ab633"/></dir><file name="Edit.php" hash="be44792b12374f6d6f4c5687fd5e04b0"/><file name="Grid.php" hash="68a88335f6725d1fc818bf4519e01603"/><file name="New.php" hash="6ac499b1064c29fd6893c61cb29209c4"/></dir><file name="Emts.php" hash="b0e91f038bfea92da099a94cb5c232a3"/></dir></dir><dir name="Helper"><file name="Data.php" hash="3bcd2a0563cf4a604cefac0a41884819"/><file name="Emvtemplate.php" hash="5e8ebfdb935fc132917aba8426e9b0cc"/></dir><dir name="Model"><dir name="Mage"><dir name="Core"><dir name="Email"><file name="Template.php" hash="a44ff4883a2762943d2ce4109001e7a5"/></dir></dir></dir><dir name="Mysql4"><dir name="Attribute"><file name="Collection.php" hash="a029255fdb8ccb45250959e08bd7f304"/></dir><dir name="Emt"><file name="Collection.php" hash="5bb76339b2bcf526f440643b367b7682"/></dir><dir name="Mailmode"><file name="Collection.php" hash="98b8005f11a230829c8b1664d9222f2c"/></dir><file name="Attribute.php" hash="13fe2d1ca2efa66b4184da68a629135c"/><file name="Emt.php" hash="9a5e2265b2e5841f07cb175229f79971"/><file name="Mailmode.php" hash="7585af6b9d102fc52788ac0083d338ae"/></dir><dir name="Resource"><file name="Setup.php" hash="62b3de559b3484cec6767a174cda42e9"/></dir><file name="Attribute.php" hash="430f2ba97ded59d319fcd8579555c53c"/><file name="Emt.php" hash="51ad525e79f8d3939bba7b5a5ec69f2f"/><file name="MageTemplate.php" hash="66051e8c63d2012c022d7bf45a3e880b"/><file name="Mailmode.php" hash="d77ce590e7302f0115dcd2075468595c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="EmtController.php" hash="e0d5dcab55e6b147ab8f3e7867f48fb8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="46610ec63dd5443130e59dbc900e3541"/><file name="config.xml" hash="837cdaf661abefaefba7fca6ab421419"/></dir><dir name="sql"><dir name="emvemt_setup"><file name="mysql4-install-0.1.0.php" hash="a7d12df049f2c1377a072fa7899dcb6c"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="34df942808b7609c10077b493e87f2c2"/></dir></dir><file name="Constants.php" hash="89e516eb1ad83482283537dc7911a2c6"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="emt"><file name="attributes.phtml" hash="b6508fa8b577e1fe2ae56c635f2ca923"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Campaign_Commander_Transactional_Email_1_5</name>
4
+ <version>2.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Send your transactional e-mails through the Campaign Commander NMP platform</summary>
10
+ <description>Send your transactional e-mails through the Campaign Commander NMP platform.</description>
11
  <notes>Send your transactional e-mails through the Campaign Commander NMP platform</notes>
12
+ <authors><author><name>emailvision</name><user>auto-converted</user><email>EMVIntegrationsDevelopment@emailvision.com</email></author></authors>
13
+ <date>2012-09-26</date>
14
+ <time>12:55:39</time>
15
+ <contents><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="abandonment"><file name="template1.html" hash="25e61ef30c06a9b1126d4137a8dcf104"/><file name="template2.html" hash="fc203b790cd1bcdeb0ac71a7b5464813"/><file name="template3.html" hash="a29290cb0e4e50a321347f151a3e9590"/></dir></dir></dir><file name="Emv_Core.csv" hash="9f42f92ffc0ebebdcbbd2f78495aab0c"/><file name="Emv_Emt.csv" hash="9550fdad59ad6d262f3da8aa09e5b88e"/><file name="Emv_CartAlert.csv" hash="00c5ee1ce9989ce60afc830261a3b4ec"/></dir><dir name="fr_FR"><file name="Emv_Core.csv" hash="3635d815c6f762945147552f3a92febd"/><file name="Emv_Emt.csv" hash="42e00b78ebb2c8ac9181f98566015506"/><file name="Emv_CartAlert.csv" hash="084921a6278f8c582c90fd57888da7ae"/></dir></target><target name="mageetc"><dir name="modules"><file name="Emv_Core.xml" hash="e25dd0ea40fad09e0d1f6260f46e65ac"/><file name="Emv_Emt.xml" hash="d1e26edb25bce0b78e6c14792c07ac03"/><file name="Emv_CartAlert.xml" hash="7c23ed23c48254c30e4aad7c11db1b62"/></dir></target><target name="magecommunity"><dir name="Emv"><dir name="Core"><dir name="Block"><dir name="Adminhtml"><dir name="Account"><dir name="Edit"><file name="Form.php" hash="9e090720d3b7fc7406d2e4d4f95dbc90"/></dir><file name="Edit.php" hash="34bc1566c3693acccaa4c8e40b31cb5c"/><file name="Grid.php" hash="3d175f0e1b7ccc7dec1c9ffa30cacb76"/></dir><file name="Accounts.php" hash="3f35eecb2bf23417c0fab4746bda6d0c"/></dir></dir><dir name="Helper"><file name="Config.php" hash="455cd67728b1e6876e9fd8d55ca3253b"/><file name="Data.php" hash="896b9955cc2d6b27b9eca4d2508b7169"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Account"><file name="Collection.php" hash="39c1a08471b3bdd0563f3002a32a4db8"/></dir><file name="Account.php" hash="cea2093a18291b7dd24e25b6f8ce0da0"/></dir><dir name="Resource"><file name="Setup.php" hash="6fc36453ff6c01ac0534731816355bd0"/></dir><dir name="Service"><dir name="Soap"><file name="Api.php" hash="27d9e266d1e822594dfe1bcc6b4fe9a9"/><file name="Config.php" hash="c001b05e0004994b2555b7be224ab014"/><file name="SoapClient.php" hash="32117ab80f05f6e15b03edc879f806c1"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Account.php" hash="cbc4ee876efd1abcdaa5c57cc08714c2"/></dir></dir></dir><file name="Account.php" hash="a8a6c2c45ab0979666d09732e8d3eda2"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AccountController.php" hash="91447d74999979c278b65dd85f5c06d8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2e84807c5c503bd91ed673dfb5f579bd"/><file name="config.xml" hash="7bc75acc341d88e151534b02c86512ac"/><file name="system.xml" hash="1785905f6dd6a2bc367318a86391daca"/></dir><dir name="sql"><dir name="emvcore_setup"><file name="mysql4-install-0.1.0.php" hash="7bc6d6e7c03398c40008d89ed86e27bc"/></dir></dir><file name="Exception.php" hash="227e1046ebceb99af7bc2b441bb4997d"/></dir><dir name="Emt"><dir name="Block"><dir name="Adminhtml"><dir name="Emt"><dir name="Edit"><file name="Attributes.php" hash="cc2a88773ca64fe7e88b0f460b3b05fc"/><file name="Form.php" hash="400920f5c2778c9cdda7f70137cd885e"/></dir><dir name="Grid"><dir name="Renderer"><file name="Emvname.php" hash="c520b56f6a806c551336fc67d8c5a487"/></dir></dir><dir name="New"><file name="Form.php" hash="f2f06b70d36dc2eefe9d4bf7f49ab633"/></dir><file name="Edit.php" hash="be44792b12374f6d6f4c5687fd5e04b0"/><file name="Grid.php" hash="e350af4605b4d02558b0e30c13184e3e"/><file name="New.php" hash="6ac499b1064c29fd6893c61cb29209c4"/></dir><file name="Emts.php" hash="b0e91f038bfea92da099a94cb5c232a3"/></dir></dir><dir name="Helper"><file name="Data.php" hash="3bcd2a0563cf4a604cefac0a41884819"/><file name="Emvtemplate.php" hash="2b4c13c664becc8564727c9100c25303"/></dir><dir name="Model"><dir name="Mage"><dir name="Core"><dir name="Email"><file name="Template.php" hash="f1b5d52867dc1b35c406294bb7359891"/></dir></dir></dir><dir name="Mysql4"><dir name="Attribute"><file name="Collection.php" hash="a029255fdb8ccb45250959e08bd7f304"/></dir><dir name="Emt"><file name="Collection.php" hash="40297d68cac532feb2b8eecfa166f6e2"/></dir><dir name="Mailmode"><file name="Collection.php" hash="98b8005f11a230829c8b1664d9222f2c"/></dir><file name="Attribute.php" hash="13fe2d1ca2efa66b4184da68a629135c"/><file name="Emt.php" hash="9a5e2265b2e5841f07cb175229f79971"/><file name="Mailmode.php" hash="7585af6b9d102fc52788ac0083d338ae"/></dir><dir name="Resource"><file name="Setup.php" hash="62b3de559b3484cec6767a174cda42e9"/></dir><file name="Attribute.php" hash="430f2ba97ded59d319fcd8579555c53c"/><file name="Emt.php" hash="51ad525e79f8d3939bba7b5a5ec69f2f"/><file name="MageTemplate.php" hash="66051e8c63d2012c022d7bf45a3e880b"/><file name="Mailmode.php" hash="d77ce590e7302f0115dcd2075468595c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="EmtController.php" hash="c9ef7c5a9e6176b114a767edce51a996"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="46610ec63dd5443130e59dbc900e3541"/><file name="config.xml" hash="837cdaf661abefaefba7fca6ab421419"/></dir><dir name="sql"><dir name="emvemt_setup"><file name="mysql4-install-0.1.0.php" hash="a7d12df049f2c1377a072fa7899dcb6c"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="34df942808b7609c10077b493e87f2c2"/></dir></dir><file name="Constants.php" hash="419073d59d393b684d1f55932b717e26"/></dir><dir name="CartAlert"><dir name="Block"><dir name="Cart"><file name="Items.php" hash="e776828d83029fddafb78ef2d0d095b7"/></dir><dir name="Customer"><file name="Abandonment.php" hash="e4c33c79fec5b4f7873fc426b0810c0a"/></dir></dir><dir name="Helper"><file name="Data.php" hash="7254fa1e10dd0511a7650c97b1f51207"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Abandonment"><file name="Collection.php" hash="45d4e4a5825f99d1fdaccc6aafa37b7b"/></dir><file name="Abandonment.php" hash="f7295df4a2db5cdd0d07ea7c45c471d4"/></dir><dir name="Resource"><file name="Setup.php" hash="252605dd07f4e2d28b8a8a483b28c51e"/></dir><file name="Abandonedcart.php" hash="b33a2507ccd51fb1cc8377e54c10d2a6"/><file name="Abandonedcartitem.php" hash="62299184dadf25b3da790e37ae0a89f9"/><file name="Abandonment.php" hash="d99a5180a449145ef3e902b2ffdfb842"/><file name="Observer.php" hash="07113261fd8cf291375b22a456eb5df3"/></dir><dir name="controllers"><file name="CustomerController.php" hash="14313e496e983685ae354907548065ba"/><file name="GuestController.php" hash="bfb7cdb821a1259e03b16461ae2cb81a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a9f89ee6ca0dd0168cba2eaabec343a7"/><file name="config.xml" hash="6483a1ab443e3804203522e90026b562"/><file name="system.xml" hash="170e847afa9cc636fd4747eb7d079458"/></dir><dir name="sql"><dir name="abandonment_setup"><file name="mysql4-install-0.1.0.php" hash="551c1d869ad2ed536955af4938863aa8"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="444d36d574561450c21117545ad10291"/></dir></dir><file name="Constants.php" hash="a3acc804622c4ac76ff67591bbd447c7"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="emt"><file name="attributes.phtml" hash="b6508fa8b577e1fe2ae56c635f2ca923"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="emv"><dir name="template"><dir name="abandonment"><dir name="reminder"><file name="items.phtml" hash="a4d533a70c78448837d27369b480c6f2"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="abandonment.xml" hash="12838badbe46e199f07b5c0801a97d15"/></dir><dir name="template"><dir name="abandonment"><file name="customer.phtml" hash="d63198ab64858039aa5b23f9964dd6d3"/></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="layout"><file name="abandonment.xml" hash="5c4ba85552b631fefb2b080f858591a0"/></dir><dir name="template"><dir name="abandonment"><file name="customer.phtml" hash="d63198ab64858039aa5b23f9964dd6d3"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>