TEM_EmailSignup - Version 0.1.0

Version Notes

Trigger Email Marketing provides a fully-integrated, sophisticated email sign-up program. Our FREE extension for both Community and Enterprise versions of Magento tracks your performance!

Download this release

Release Info

Developer Magento Core Team
Extension TEM_EmailSignup
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/community/Tem/EmailSignup/Block/Confirmation.php ADDED
@@ -0,0 +1,40 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Tem
16
+ * @package Tem_EmailSignup
17
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
+ */
20
+
21
+ class Tem_EmailSignup_Block_Confirmation extends Mage_Core_Block_Text {
22
+
23
+ /**
24
+ * Prepare and return block's html output
25
+ *
26
+ * @return string
27
+ */
28
+ protected function _toHtml()
29
+ {
30
+ $session = Mage::getSingleton('core/session', array('name'=>'frontend'));
31
+ $confirmmation = $session->getConfirmation(true);
32
+ $tem = Mage::getModel('tem_emailsignup/tem');
33
+ if (!$tem->isEnabled() || !$confirmmation) {
34
+ return '';
35
+ }
36
+ $sentUrl = $tem->sentUrl('', false, true);
37
+ $this->addText('<img src="'.$sentUrl.'" height="0" width="0" border="0" />');
38
+ return parent::_toHtml();
39
+ }
40
+ }
app/code/community/Tem/EmailSignup/Block/Multishipping.php ADDED
@@ -0,0 +1,44 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Tem
16
+ * @package Tem_EmailSignup
17
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
+ */
20
+
21
+ class Tem_EmailSignup_Block_Multishipping extends Mage_Core_Block_Text {
22
+
23
+ /**
24
+ * Prepare and return block's html output
25
+ *
26
+ * @return string
27
+ */
28
+ protected function _toHtml()
29
+ {
30
+ $tem = Mage::getModel('tem_emailsignup/tem');
31
+ if (!$tem->isEnabled()) {
32
+ return '';
33
+ }
34
+ $orderIds = Mage::getSingleton('core/session')->getOrderIds(true);
35
+ if($orderIds && is_array($orderIds)) {
36
+ foreach ($orderIds as $orderId){
37
+ $sentUrl = $tem->sentUrl($orderId, true);
38
+ $this->addText('<img src="'.$sentUrl.'" height="0" width="0" border="0" />');
39
+ }
40
+ }
41
+
42
+ return parent::_toHtml();
43
+ }
44
+ }
app/code/community/Tem/EmailSignup/Block/Multishipping/Success.php ADDED
@@ -0,0 +1,40 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Tem
16
+ * @package Tem_EmailSignup
17
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
+ */
20
+
21
+ /**
22
+ * Multishipping checkout success information
23
+ *
24
+ * @category Mage
25
+ * @package Mage_Checkout
26
+ * @author Magento Core Team <core@magentocommerce.com>
27
+ */
28
+ class Tem_EmailSignup_Block_Multishipping_Success extends Mage_Checkout_Block_Multishipping_Success
29
+ {
30
+ public function getOrderIds()
31
+ {
32
+ $ids = Mage::getSingleton('core/session')->getOrderIds(false);
33
+ // Zend_Debug::dump(Mage::getSingleton('core/session')->getOrderIds());
34
+ if ($ids && is_array($ids)) {
35
+ return $ids;
36
+ return implode(', ', $ids);
37
+ }
38
+ return false;
39
+ }
40
+ }
app/code/community/Tem/EmailSignup/Block/Onepage.php ADDED
@@ -0,0 +1,41 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Tem
16
+ * @package Tem_EmailSignup
17
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
+ */
20
+
21
+ class Tem_EmailSignup_Block_Onepage extends Mage_Core_Block_Text {
22
+
23
+ /**
24
+ * Prepare and return block's html output
25
+ *
26
+ * @return string
27
+ */
28
+ protected function _toHtml()
29
+ {
30
+ $tem = Mage::getModel('tem_emailsignup/tem');
31
+ if (!$tem->isEnabled()) {
32
+ return '';
33
+ }
34
+ $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
35
+ $sentUrl = $tem->sentUrl($orderId);
36
+
37
+ $this->addText('<img src="'.$sentUrl.'" height="0" width="0" border="0" />');
38
+
39
+ return parent::_toHtml();
40
+ }
41
+ }
app/code/community/Tem/EmailSignup/Controller/Router.php ADDED
@@ -0,0 +1,54 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Tem
16
+ * @package Tem_EmailSignup
17
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
+ */
20
+
21
+ class Tem_EmailSignup_Controller_Router extends Mage_Core_Controller_Varien_Router_Standard
22
+ {
23
+ public function confirmEmailSignup()
24
+ {
25
+ try {
26
+ $session = Mage::getSingleton('core/session', array('name'=>'frontend'));
27
+ $id = isset($_GET['id']) ? $_GET['id'] : false;
28
+ $key = isset($_GET['key']) ? $_GET['key'] : false;
29
+ $code = isset($_GET['code']) ? $_GET['code'] : false;
30
+ if ($id && $key) {
31
+ // load customer by id
32
+ $customer = Mage::getModel('customer/customer')->load($id);
33
+ if ($customer || $customer->getId()) {
34
+ // check if it is inactive
35
+ if ($customer->getConfirmation()) {
36
+ if ($customer->getConfirmation() == $key) {
37
+ $session->setData('confirmation', true);
38
+ }
39
+ }
40
+ }
41
+ } elseif ($id && $code) {
42
+ $subscriber = Mage::getModel('newsletter/subscriber')->load($id);
43
+ if($subscriber->getId() && $subscriber->getCode()) {
44
+ $session->setData('subscriber_email', $subscriber->getEmail());
45
+ $session->setData('confirmation', true);
46
+ }
47
+ }
48
+ }
49
+ catch (Exception $e) {
50
+ Mage::getSingleton('customer/session')->addError($e->getMessage());
51
+ }
52
+ return;
53
+ }
54
+ }
app/code/community/Tem/EmailSignup/Helper/Data.php ADDED
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Tem
16
+ * @package Tem_EmailSignup
17
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
+ */
20
+
21
+ class Tem_EmailSignup_Helper_Data extends Mage_Core_Helper_Abstract
22
+ {
23
+
24
+ }
app/code/community/Tem/EmailSignup/Model/Tem.php ADDED
@@ -0,0 +1,192 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Tem
16
+ * @package Tem_EmailSignup
17
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
+ */
20
+
21
+ class Tem_EmailSignup_Model_Tem extends Varien_Object
22
+ {
23
+ // path in configuration
24
+ const TEM_CONFIG_GLOBAL_SETTING_PATH = 'tem/settings/';
25
+ const TEM_CONFIG_EMAIL_SIGNUP_PATH = 'tem/emailsignup/';
26
+
27
+ /**
28
+ * Get information from configuration data
29
+ */
30
+ public function getConfigData($key, $path, $default=false)
31
+ {
32
+ if (!$this->hasData($key)) {
33
+ $value = Mage::getStoreConfig($path . $key);
34
+ if (is_null($value) || false===$value) {
35
+ $value = $default;
36
+ }
37
+ $this->setData($key, $value);
38
+ }
39
+ return $this->getData($key);
40
+ }
41
+
42
+
43
+ /**
44
+ * Check if module is available for using
45
+ * @return bool
46
+ */
47
+ public function isEnabled()
48
+ {
49
+ $isActive = $this->getConfigData('active', self::TEM_CONFIG_EMAIL_SIGNUP_PATH);
50
+ return $isActive;
51
+ }
52
+
53
+ /**
54
+ * Get base parameters that used in each request
55
+ *
56
+ * @return array
57
+ */
58
+ protected function _getBaseParams()
59
+ {
60
+ return array(
61
+ 'c' => $this->getConfigData('client_id', self::TEM_CONFIG_GLOBAL_SETTING_PATH),
62
+ 'ck' => $this->getConfigData('client_key', self::TEM_CONFIG_GLOBAL_SETTING_PATH),
63
+ 'ch' => $this->getConfigData('channel_id', self::TEM_CONFIG_EMAIL_SIGNUP_PATH)
64
+ );
65
+ }
66
+
67
+ /**
68
+ * Get customer information for sending to the TEM
69
+ *
70
+ * @return array with required customer information
71
+ */
72
+ protected function _getCustomerInfo()
73
+ {
74
+ $session = Mage::getSingleton('core/session', array('name'=>'frontend'));
75
+ $customerSession = Mage::getSingleton('customer/session');
76
+ $customerEmail = $session->getSubscriberEmail(true);
77
+ $customerInfo = array();
78
+ if ($customerSession->isLoggedIn()) {
79
+ $customer = $customerSession->getCustomer();
80
+ $customerInfo = array(
81
+ 'e' => $customer->getEmail(),
82
+ 'f_first_name' => $customer->getFirstname(),
83
+ 'f_last_name' => $customer->getLastname()
84
+ );
85
+ if ($isBillingAddress = $customerSession->getCustomer()->getDefaultBilling()) {
86
+ $billingAddress = $customerSession->getCustomer()->getDefaultBillingAddress();
87
+ $customerAddress = array(
88
+ 'f_company' => $billingAddress->getCompany(),
89
+ 'f_addr1' => $billingAddress->getStreet(1),
90
+ 'f_addr2' => $billingAddress->getStreet(2),
91
+ 'f_city' => $billingAddress->getCity(),
92
+ 'f_state' => $billingAddress->getRegion(),
93
+ 'f_zip' => $billingAddress->getPostcode()
94
+ );
95
+ $customerInfo = array_merge($customerInfo, $customerAddress);
96
+ }
97
+ } elseif($customerEmail) {
98
+ $customerInfo = array('e' => $customerEmail);
99
+ }
100
+
101
+ return $customerInfo;
102
+ }
103
+
104
+ /**
105
+ * Get base parameters that used in each request
106
+ *
107
+ * @return array
108
+ */
109
+ protected function _getParams($orderId, $isMultishipping)
110
+ {
111
+ if ($orderId) {
112
+ if ($isMultishipping) {
113
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
114
+ } else {
115
+ $order = Mage::getModel('sales/order')->load($orderId);
116
+ }
117
+ $subtotal = $order->getSubtotal();
118
+ $couponCode = $order->getCouponCode();
119
+ } else {
120
+ $subtotal = '';
121
+ $couponCode = '';
122
+ }
123
+
124
+ $conversionParams = array(
125
+ 'c_web' => $subtotal,
126
+ 'c_codes' => $couponCode
127
+ );
128
+
129
+ return $conversionParams;
130
+ }
131
+
132
+ /**
133
+ * Get checkout session namespace
134
+ *
135
+ * @return Mage_Checkout_Model_Session
136
+ */
137
+ public function getCheckout()
138
+ {
139
+ return Mage::getSingleton('checkout/session');
140
+ }
141
+
142
+ /**
143
+ * Get current quote
144
+ *
145
+ * @return Mage_Sales_Model_Quote
146
+ */
147
+ public function getQuote()
148
+ {
149
+ return $this->getCheckout()->getQuote();
150
+ }
151
+
152
+ /**
153
+ * Forming request URL
154
+ *
155
+ * @param array $params
156
+ * @return string
157
+ */
158
+ protected function formingUrl($orderId, $isMultishipping, $isEmailSignup)
159
+ {
160
+ if ($isEmailSignup) {
161
+ $baseParams = $this->_getBaseParams();
162
+ $personalizationParams = $this->_getCustomerInfo();
163
+ $params = array_merge($baseParams, $personalizationParams);
164
+
165
+ } else {
166
+ $baseParams = $this->_getBaseParams();
167
+ $conversionParams = $this->_getParams($orderId, $isMultishipping);
168
+ $params = array_merge($baseParams, $conversionParams);
169
+ }
170
+
171
+ foreach ($params as $k=>$v){
172
+ $urlParams[] = $k . '=' . urlencode($v);
173
+ }
174
+ $requestUrl = $this->getConfigData('api_url', self::TEM_CONFIG_EMAIL_SIGNUP_PATH) . '?' . implode('&', $urlParams);
175
+
176
+ if ($this->getConfigData('debug_mode', self::TEM_CONFIG_EMAIL_SIGNUP_PATH)){
177
+ Mage::log($requestUrl);
178
+ }
179
+
180
+ return $requestUrl;
181
+ }
182
+
183
+ /**
184
+ * send new information after customer login and merge quotes
185
+ */
186
+ public function sentUrl($orderId='', $isMultishipping=false, $isEmailSignup=false)
187
+ {
188
+ $sentUrl = $this->formingUrl($orderId, $isMultishipping, $isEmailSignup);
189
+ return $sentUrl;
190
+ }
191
+
192
+ }
app/code/community/Tem/EmailSignup/etc/adminhtml.xml ADDED
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <tem translate="title" module="tem_emailsignup">
12
+ <title>TEM</title>
13
+ </tem>
14
+ </children>
15
+ </config>
16
+ </children>
17
+ </system>
18
+ </children>
19
+ </admin>
20
+ </resources>
21
+ </acl>
22
+ </config>
app/code/community/Tem/EmailSignup/etc/config.xml ADDED
@@ -0,0 +1,94 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Tem
17
+ * @package Tem_EmailSignup
18
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
19
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Tem_EmailSignup>
25
+ <version>1.0.6</version>
26
+ </Tem_EmailSignup>
27
+ </modules>
28
+ <global>
29
+ <models>
30
+ <tem_emailsignup><class>Tem_EmailSignup_Model</class></tem_emailsignup>
31
+ </models>
32
+ <blocks>
33
+ <tem_emailsignup><class>Tem_EmailSignup_Block</class></tem_emailsignup>
34
+ <checkout>
35
+ <rewrite>
36
+ <multishipping_success>Tem_EmailSignup_Block_Multishipping_Success</multishipping_success>
37
+ </rewrite>
38
+ </checkout>
39
+ </blocks>
40
+ <helpers>
41
+ <tem_emailsignup><class>Tem_EmailSignup_Helper</class></tem_emailsignup>
42
+ </helpers>
43
+ <events>
44
+ <controller_front_init_routers>
45
+ <observers>
46
+ <emailsignup>
47
+ <type>singleton</type>
48
+ <class>Tem_EmailSignup_Controller_Router</class>
49
+ <method>confirmEmailSignup</method>
50
+ </emailsignup>
51
+ </observers>
52
+ </controller_front_init_routers>
53
+ </events>
54
+ </global>
55
+ <adminhtml>
56
+ <acl>
57
+ <resources>
58
+ <admin>
59
+ <children>
60
+ <system>
61
+ <children>
62
+ <config>
63
+ <children>
64
+ <tem translate="title" module="tem_emailsignup">
65
+ <title>TEM</title>
66
+ </tem>
67
+ </children>
68
+ </config>
69
+ </children>
70
+ </system>
71
+ </children>
72
+ </admin>
73
+ </resources>
74
+ </acl>
75
+ </adminhtml>
76
+ <frontend>
77
+ <routers>
78
+ <Tem_EmailSignup>
79
+ <use>standard</use>
80
+ <args>
81
+ <module>Tem_EmailSignup</module>
82
+ <frontName>tem</frontName>
83
+ </args>
84
+ </Tem_EmailSignup>
85
+ </routers>
86
+ <layout>
87
+ <updates>
88
+ <tem_emailsignup>
89
+ <file>tem_emailsignup.xml</file>
90
+ </tem_emailsignup>
91
+ </updates>
92
+ </layout>
93
+ </frontend>
94
+ </config>
app/code/community/Tem/EmailSignup/etc/system.xml ADDED
@@ -0,0 +1,106 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Tem
17
+ * @package Tem_EmailSignup
18
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
19
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <sections>
24
+ <tem>
25
+ <label>Trigger Email Marketing</label>
26
+ <tab>service</tab>
27
+ <frontend_type>text</frontend_type>
28
+ <sort_order>601</sort_order>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>1</show_in_store>
32
+ <groups>
33
+ <settings>
34
+ <label>Global Settings</label>
35
+ <frontend_type>text</frontend_type>
36
+ <sort_order>1</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ <fields>
41
+ <client_id translate="label">
42
+ <label>Client ID</label>
43
+ <frontend_type>text</frontend_type>
44
+ <sort_order>10</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ </client_id>
49
+ <client_key translate="label">
50
+ <label>Client Key</label>
51
+ <frontend_type>text</frontend_type>
52
+ <sort_order>20</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>1</show_in_store>
56
+ </client_key>
57
+ </fields>
58
+ </settings>
59
+ <emailsignup>
60
+ <label>Email Sign-up Follow-up Program</label>
61
+ <frontend_type>text</frontend_type>
62
+ <sort_order>2</sort_order>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>1</show_in_website>
65
+ <show_in_store>1</show_in_store>
66
+ <fields>
67
+ <active translate="label">
68
+ <label>Enabled</label>
69
+ <frontend_type>select</frontend_type>
70
+ <source_model>adminhtml/system_config_source_yesno</source_model>
71
+ <sort_order>10</sort_order>
72
+ <show_in_default>1</show_in_default>
73
+ <show_in_website>1</show_in_website>
74
+ <show_in_store>0</show_in_store>
75
+ </active>
76
+ <api_url translate="label">
77
+ <label>API URL</label>
78
+ <frontend_type>text</frontend_type>
79
+ <sort_order>20</sort_order>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>1</show_in_store>
83
+ </api_url>
84
+ <channel_id translate="label">
85
+ <label>Channel ID</label>
86
+ <frontend_type>text</frontend_type>
87
+ <sort_order>30</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>1</show_in_store>
91
+ </channel_id>
92
+ <debug_mode translate="label">
93
+ <label>Debug mode</label>
94
+ <frontend_type>select</frontend_type>
95
+ <source_model>adminhtml/system_config_source_yesno</source_model>
96
+ <sort_order>40</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>1</show_in_store>
100
+ </debug_mode>
101
+ </fields>
102
+ </emailsignup>
103
+ </groups>
104
+ </tem>
105
+ </sections>
106
+ </config>
app/design/frontend/default/default/layout/tem_emailsignup.xml ADDED
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Tem
17
+ * @package Tem_EmailSignup
18
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
19
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
+ */
21
+ -->
22
+ <layout version="0.1.0">
23
+ <default>
24
+ <reference name="before_body_end">
25
+ <block type="tem_emailsignup/confirmation" name="emailsignup" as="emailsignup" after="-" />
26
+ </reference>
27
+ </default>
28
+ <checkout_onepage_success>
29
+ <reference name="before_body_end">
30
+ <block type="tem_emailsignup/onepage" name="emailsignup" as="emailsignup" after="-" />
31
+ </reference>
32
+ </checkout_onepage_success>
33
+ <checkout_multishipping_success>
34
+ <reference name="before_body_end">
35
+ <block type="tem_emailsignup/multishipping" name="emailsignup" as="emailsignup" after="-" />
36
+ </reference>
37
+ </checkout_multishipping_success>
38
+ </layout>
app/design/frontend/enterprise/default/layout/tem_emailsignup.xml ADDED
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Tem
17
+ * @package Tem_EmailSignup
18
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
19
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
+ */
21
+ -->
22
+ <layout version="0.1.0">
23
+ <checkout_onepage_success>
24
+ <reference name="before_body_end">
25
+ <block type="tem_emailsignup/onepage" name="emailsignup" as="emailsignup" after="-" />
26
+ </reference>
27
+ </checkout_onepage_success>
28
+ <checkout_multishipping_success>
29
+ <reference name="before_body_end">
30
+ <block type="tem_emailsignup/multishipping" name="emailsignup" as="emailsignup" after="-" />
31
+ </reference>
32
+ </checkout_multishipping_success>
33
+ <customer_account>
34
+ <reference name="before_body_end">
35
+ <block type="tem_emailsignup/confirmation" name="emailsignup" as="emailsignup" after="-" />
36
+ </reference>
37
+ </customer_account>
38
+ <customer_account_index>
39
+ <reference name="before_body_end">
40
+ <block type="tem_emailsignup/confirmation" name="emailsignup" as="emailsignup" after="-" />
41
+ </reference>
42
+ </customer_account_index>
43
+ </layout>
app/etc/modules/Tem_EmailSignup.xml ADDED
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Tem
17
+ * @package Tem_EmailSignup
18
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
19
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Tem_EmailSignup>
25
+ <active>true</active>
26
+ <codePool>community</codePool>
27
+ </Tem_EmailSignup>
28
+ </modules>
29
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>TEM_EmailSignup</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/afl-3.0.php">AFL 3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Trigger Email Marketing is proud to now offer email sign-up deployment services to Magento clients!</summary>
10
+ <description>Trigger Email Marketing provides a fully-integrated, sophisticated email sign-up program. Our FREE extension for both Community and Enterprise versions of Magento tracks your performance!</description>
11
+ <notes>Trigger Email Marketing provides a fully-integrated, sophisticated email sign-up program. Our FREE extension for both Community and Enterprise versions of Magento tracks your performance!</notes>
12
+ <authors><author><name>Trigger Emails</name><user>auto-converted</user><email>info@triggeremails.com</email></author></authors>
13
+ <date>2011-01-28</date>
14
+ <time>11:14:19</time>
15
+ <contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="tem_emailsignup.xml" hash="66bb49cfb50126960350c8e02f44f4d5"/></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="layout"><file name="tem_emailsignup.xml" hash="0eebcef6599c85309d9eba5511414b29"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tem_EmailSignup.xml" hash="2f2ff3777867fd83ef5835ee3894efaf"/></dir></target><target name="magecommunity"><dir name="Tem"><dir name="EmailSignup"><dir name="Block"><file name="Confirmation.php" hash="ec5969e68513b9d5461d9841d61a5999"/><file name="Multishipping.php" hash="1b2f843af6c9ebcec50ec336d621295b"/><file name="Onepage.php" hash="a946511d0347594dc1c12fe428b8c6ae"/><dir name="Multishipping"><file name="Success.php" hash="f22e190472b60df6123465f3a090219b"/></dir></dir><dir name="Controller"><file name="Router.php" hash="02075fcc950452878d4449477962088d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="498a4312b85738de47b232165b948847"/><file name="config.xml" hash="bb1c7468fc1db72b629105660895a9a3"/><file name="system.xml" hash="4230dae4e3d9a585ec2ab02acd87971a"/></dir><dir name="Helper"><file name="Data.php" hash="2a3f3d2c0c523c17ac98a334732737d3"/></dir><dir name="Model"><file name="Tem.php" hash="5f495318c3ee8723df5d7b76410d9708"/></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>