TEM_EmailSignup - Version 0.2.1

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.2.1
Comparing to
See all releases


Code changes from version 0.2.0 to 0.2.1

app/code/community/Tem/EmailSignup/Block/Confirmation.php CHANGED
@@ -1,40 +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
- $confirmation = $session->getConfirmation(true);
32
- $tem = Mage::getModel('tem_emailsignup/tem');
33
- if (!$tem->isEnabled() || !$confirmation) {
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
- }
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
+ $confirmation = $session->getConfirmation(true);
32
+ $tem = Mage::getModel('tem_emailsignup/tem');
33
+ if (!$tem->isEnabled() || !$confirmation) {
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 CHANGED
@@ -1,44 +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
- }
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 CHANGED
@@ -1,40 +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
- }
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 CHANGED
@@ -1,41 +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
- }
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 CHANGED
@@ -1,82 +1,81 @@
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
-
26
- if (preg_match('/success/i',str_replace('/','',$_SERVER['REQUEST_URI']))) {
27
- return;
28
- }
29
- try {
30
- $session = Mage::getSingleton('core/session', array('name'=>'frontend'));
31
- $session->setData('confirmation', false);
32
- $id = isset($_GET['id']) ? $_GET['id'] : false;
33
- $key = isset($_GET['key']) ? $_GET['key'] : false;
34
- $code = isset($_GET['code']) ? $_GET['code'] : false;
35
-
36
- if ($id && $key) {
37
- // load customer by id
38
- $customer = Mage::getModel('customer/customer')->load($id);
39
- if ($customer || $customer->getId()) {
40
- // check if it is inactive
41
- if ($customer->getConfirmation()) {
42
- if ($customer->getConfirmation() == $key) {
43
- $session->setData('confirmation', true);
44
- }
45
- }
46
- }
47
- } elseif ($id && $code) {
48
- $subscriber = Mage::getModel('newsletter/subscriber')->load($id);
49
- if($subscriber->getId() && $subscriber->getCode()) {
50
- $session->setData('subscriber_email', $subscriber->getEmail());
51
- $session->setData('confirmation', true);
52
- }
53
- } elseif (count($_POST) == 1 && isset($_POST['email'])) {
54
- $email = $_POST['email'];
55
- if (!Zend_Validate::is($email, 'EmailAddress')) {
56
- return;
57
- }
58
- $customerSession = Mage::getSingleton('customer/session');
59
- if (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_ALLOW_GUEST_SUBSCRIBE_FLAG) != 1 && !$customerSession->isLoggedIn()) {
60
- return;
61
- }
62
- $ownerId = Mage::getModel('customer/customer')
63
- ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
64
- ->loadByEmail($email)
65
- ->getId();
66
- if ($ownerId !== null && $ownerId != $customerSession->getId()) {
67
- return;
68
- }
69
- $isConfirmNeed = (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG) == 1) ? true : false;
70
- if ($isConfirmNeed) {
71
- return;
72
- }
73
- $session->setData('subscriber_email', $email);
74
- $session->setData('confirmation', true);
75
- }
76
- }
77
- catch (Exception $e) {
78
- Mage::getSingleton('customer/session')->addError($e->getMessage());
79
- }
80
- return;
81
- }
82
- }
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
+
26
+ if (preg_match('/success/i',str_replace('/','',$_SERVER['REQUEST_URI']))) {
27
+ return;
28
+ }
29
+ try {
30
+ $session = Mage::getSingleton('core/session', array('name'=>'frontend'));
31
+ $id = isset($_GET['id']) ? $_GET['id'] : false;
32
+ $key = isset($_GET['key']) ? $_GET['key'] : false;
33
+ $code = isset($_GET['code']) ? $_GET['code'] : false;
34
+
35
+ if ($id && $key) {
36
+ // load customer by id
37
+ $customer = Mage::getModel('customer/customer')->load($id);
38
+ if ($customer || $customer->getId()) {
39
+ // check if it is inactive
40
+ if ($customer->getConfirmation()) {
41
+ if ($customer->getConfirmation() == $key) {
42
+ $session->setData('confirmation', true);
43
+ }
44
+ }
45
+ }
46
+ } elseif ($id && $code) {
47
+ $subscriber = Mage::getModel('newsletter/subscriber')->load($id);
48
+ if($subscriber->getId() && $subscriber->getCode()) {
49
+ $session->setData('subscriber_email', $subscriber->getEmail());
50
+ $session->setData('confirmation', true);
51
+ }
52
+ } elseif (count($_POST) == 1 && isset($_POST['email'])) {
53
+ $email = $_POST['email'];
54
+ if (!Zend_Validate::is($email, 'EmailAddress')) {
55
+ return;
56
+ }
57
+ $customerSession = Mage::getSingleton('customer/session');
58
+ if (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_ALLOW_GUEST_SUBSCRIBE_FLAG) != 1 && !$customerSession->isLoggedIn()) {
59
+ return;
60
+ }
61
+ $ownerId = Mage::getModel('customer/customer')
62
+ ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
63
+ ->loadByEmail($email)
64
+ ->getId();
65
+ if ($ownerId !== null && $ownerId != $customerSession->getId()) {
66
+ return;
67
+ }
68
+ $isConfirmNeed = (Mage::getStoreConfig(Mage_Newsletter_Model_Subscriber::XML_PATH_CONFIRMATION_FLAG) == 1) ? true : false;
69
+ if ($isConfirmNeed) {
70
+ return;
71
+ }
72
+ $session->setData('subscriber_email', $email);
73
+ $session->setData('confirmation', true);
74
+ }
75
+ }
76
+ catch (Exception $e) {
77
+ Mage::getSingleton('customer/session')->addError($e->getMessage());
78
+ }
79
+ return;
80
+ }
81
+ }
 
app/code/community/Tem/EmailSignup/Helper/Data.php CHANGED
@@ -1,24 +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
  }
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 CHANGED
@@ -1,195 +1,195 @@
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' => ($customerEmail != '') ? $customerEmail : $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
- $customerEmail = $order->getCustomerEmail();
118
- $subtotal = $order->getSubtotal();
119
- $couponCode = $order->getCouponCode();
120
- } else {
121
- $customerEmail = '';
122
- $subtotal = '';
123
- $couponCode = '';
124
- }
125
-
126
- $conversionParams = array(
127
- 'e' => $customerEmail,
128
- 'c_web' => $subtotal,
129
- 'c_codes' => $couponCode
130
- );
131
-
132
- return $conversionParams;
133
- }
134
-
135
- /**
136
- * Get checkout session namespace
137
- *
138
- * @return Mage_Checkout_Model_Session
139
- */
140
- public function getCheckout()
141
- {
142
- return Mage::getSingleton('checkout/session');
143
- }
144
-
145
- /**
146
- * Get current quote
147
- *
148
- * @return Mage_Sales_Model_Quote
149
- */
150
- public function getQuote()
151
- {
152
- return $this->getCheckout()->getQuote();
153
- }
154
-
155
- /**
156
- * Forming request URL
157
- *
158
- * @param array $params
159
- * @return string
160
- */
161
- protected function formingUrl($orderId, $isMultishipping, $isEmailSignup)
162
- {
163
- if ($isEmailSignup) {
164
- $baseParams = $this->_getBaseParams();
165
- $personalizationParams = $this->_getCustomerInfo();
166
- $params = array_merge($baseParams, $personalizationParams);
167
-
168
- } else {
169
- $baseParams = $this->_getBaseParams();
170
- $conversionParams = $this->_getParams($orderId, $isMultishipping);
171
- $params = array_merge($baseParams, $conversionParams);
172
- }
173
-
174
- foreach ($params as $k=>$v){
175
- $urlParams[] = $k . '=' . urlencode($v);
176
- }
177
- $requestUrl = $this->getConfigData('api_url', self::TEM_CONFIG_EMAIL_SIGNUP_PATH) . '?' . implode('&', $urlParams);
178
-
179
- if ($this->getConfigData('debug_mode', self::TEM_CONFIG_EMAIL_SIGNUP_PATH)){
180
- Mage::log($requestUrl);
181
- }
182
-
183
- return $requestUrl;
184
- }
185
-
186
- /**
187
- * send new information after customer login and merge quotes
188
- */
189
- public function sentUrl($orderId='', $isMultishipping=false, $isEmailSignup=false)
190
- {
191
- $sentUrl = $this->formingUrl($orderId, $isMultishipping, $isEmailSignup);
192
- return $sentUrl;
193
- }
194
-
195
  }
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' => ($customerEmail != '') ? $customerEmail : $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
+ $customerEmail = $order->getCustomerEmail();
118
+ $subtotal = $order->getSubtotal();
119
+ $couponCode = $order->getCouponCode();
120
+ } else {
121
+ $customerEmail = '';
122
+ $subtotal = '';
123
+ $couponCode = '';
124
+ }
125
+
126
+ $conversionParams = array(
127
+ 'e' => $customerEmail,
128
+ 'c_web' => $subtotal,
129
+ 'c_codes' => $couponCode
130
+ );
131
+
132
+ return $conversionParams;
133
+ }
134
+
135
+ /**
136
+ * Get checkout session namespace
137
+ *
138
+ * @return Mage_Checkout_Model_Session
139
+ */
140
+ public function getCheckout()
141
+ {
142
+ return Mage::getSingleton('checkout/session');
143
+ }
144
+
145
+ /**
146
+ * Get current quote
147
+ *
148
+ * @return Mage_Sales_Model_Quote
149
+ */
150
+ public function getQuote()
151
+ {
152
+ return $this->getCheckout()->getQuote();
153
+ }
154
+
155
+ /**
156
+ * Forming request URL
157
+ *
158
+ * @param array $params
159
+ * @return string
160
+ */
161
+ protected function formingUrl($orderId, $isMultishipping, $isEmailSignup)
162
+ {
163
+ if ($isEmailSignup) {
164
+ $baseParams = $this->_getBaseParams();
165
+ $personalizationParams = $this->_getCustomerInfo();
166
+ $params = array_merge($baseParams, $personalizationParams);
167
+
168
+ } else {
169
+ $baseParams = $this->_getBaseParams();
170
+ $conversionParams = $this->_getParams($orderId, $isMultishipping);
171
+ $params = array_merge($baseParams, $conversionParams);
172
+ }
173
+
174
+ foreach ($params as $k=>$v){
175
+ $urlParams[] = $k . '=' . urlencode($v);
176
+ }
177
+ $requestUrl = $this->getConfigData('api_url', self::TEM_CONFIG_EMAIL_SIGNUP_PATH) . '?' . implode('&', $urlParams);
178
+
179
+ if ($this->getConfigData('debug_mode', self::TEM_CONFIG_EMAIL_SIGNUP_PATH)){
180
+ Mage::log($requestUrl);
181
+ }
182
+
183
+ return $requestUrl;
184
+ }
185
+
186
+ /**
187
+ * send new information after customer login and merge quotes
188
+ */
189
+ public function sentUrl($orderId='', $isMultishipping=false, $isEmailSignup=false)
190
+ {
191
+ $sentUrl = $this->formingUrl($orderId, $isMultishipping, $isEmailSignup);
192
+ return $sentUrl;
193
+ }
194
+
195
  }
app/code/community/Tem/EmailSignup/etc/adminhtml.xml CHANGED
@@ -1,22 +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>
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 CHANGED
@@ -1,94 +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>0.2.0</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>
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>0.2.0</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 CHANGED
@@ -1,106 +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>
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 CHANGED
@@ -1,38 +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>
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 CHANGED
@@ -1,38 +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>
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/etc/modules/Tem_EmailSignup.xml CHANGED
@@ -1,29 +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>
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 CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TEM_EmailSignup</name>
4
- <version>0.2.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>
@@ -10,9 +10,9 @@
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-06-28</date>
14
- <time>11:59:49</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="66bb49cfb50126960350c8e02f44f4d5"/></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="07dc77ab09df117367295463bae82465"/><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="cdc1e1428ed30d3c87b098e166f15da9"/></dir><dir name="etc"><file name="adminhtml.xml" hash="498a4312b85738de47b232165b948847"/><file name="config.xml" hash="c6d4abe8e552674c37855f7044548117"/><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="a05d50023dbdf10d53e8653ea199c25f"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TEM_EmailSignup</name>
4
+ <version>0.2.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/afl-3.0.php">AFL 3.0</license>
7
  <channel>community</channel>
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-08-04</date>
14
+ <time>19:47:08</time>
15
+ <contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="tem_emailsignup.xml" hash="f9fb26cc0c51eec0ff5490676ee07ecb"/></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="layout"><file name="tem_emailsignup.xml" hash="f9fb26cc0c51eec0ff5490676ee07ecb"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tem_EmailSignup.xml" hash="d8f557a65535bb53b4df072929174fbc"/></dir></target><target name="magecommunity"><dir name="Tem"><dir name="EmailSignup"><dir name="Block"><file name="Confirmation.php" hash="8b41f7c96263a48df0bc9ff1cd863c33"/><file name="Multishipping.php" hash="5426c25c3a5ea3ec5d5b17f49673be08"/><file name="Onepage.php" hash="3915577f95654641a13bd55d08adab30"/><dir name="Multishipping"><file name="Success.php" hash="8c5648a7da75ef320e5946394fcbeaae"/></dir></dir><dir name="Controller"><file name="Router.php" hash="0f7ce99a3a601d831a56e45578f227ff"/></dir><dir name="etc"><file name="adminhtml.xml" hash="afa0b83f1224a855c1b177618a13cda2"/><file name="config.xml" hash="262632c0b3f2cd38a1dcca456d65b9d3"/><file name="system.xml" hash="ab762046234416090febe6582d9fef02"/></dir><dir name="Helper"><file name="Data.php" hash="24c0a3ababab4f3e766936a8194c9c4b"/></dir><dir name="Model"><file name="Tem.php" hash="1b628d9f2ef8b6f7177507102d0a5a64"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>