Version Notes
Version 12.3.5
Download this release
Release Info
Developer | Carson Reinke |
Extension | Autorespondermax_Autorespondermax |
Version | 12.3.5 |
Comparing to | |
See all releases |
Code changes from version 12.0.10 to 12.3.5
- app/code/community/Autorespondermax/.DS_Store +0 -0
- app/code/community/Autorespondermax/Autorespondermax/.DS_Store +0 -0
- app/code/community/Autorespondermax/Autorespondermax/Block/System/Config/ConnectOrDisconnect.php +1 -0
- app/code/community/Autorespondermax/Autorespondermax/Helper/Data.php +3 -0
- app/code/community/Autorespondermax/Autorespondermax/Model/Customer/Api.php +1 -0
- app/code/community/Autorespondermax/Autorespondermax/Model/Mysql4/Subscriber.php +7 -0
- app/code/community/Autorespondermax/Autorespondermax/Model/Mysql4/Subscriber/Collection.php +7 -0
- app/code/community/Autorespondermax/Autorespondermax/Model/Observer.php +12 -0
- app/code/community/Autorespondermax/Autorespondermax/Model/Subscriber.php +28 -0
- app/code/community/Autorespondermax/Autorespondermax/Model/Subscriber/Api.php +43 -0
- app/code/community/Autorespondermax/Autorespondermax/Model/System/Config/ConnectOrDisconnect.php +1 -0
- app/code/community/Autorespondermax/Autorespondermax/etc/api.xml +40 -4
- app/code/community/Autorespondermax/Autorespondermax/etc/config.xml +28 -1
- app/code/community/Autorespondermax/Autorespondermax/sql/autorespondermax_setup/mysql4-data-install-12.3.5.php +22 -0
- app/code/community/Autorespondermax/Autorespondermax/sql/autorespondermax_setup/mysql4-data-upgrade-12.0.10-12.3.5.php +15 -0
- app/code/community/Autorespondermax/Autorespondermax/sql/autorespondermax_setup/mysql4-install-12.3.5.php +74 -0
- app/etc/modules/Autorespondermax_Autorespondermax.xml +1 -0
- package.xml +5 -5
app/code/community/Autorespondermax/.DS_Store
DELETED
Binary file
|
app/code/community/Autorespondermax/Autorespondermax/.DS_Store
DELETED
Binary file
|
app/code/community/Autorespondermax/Autorespondermax/Block/System/Config/ConnectOrDisconnect.php
CHANGED
@@ -38,6 +38,7 @@ class Autorespondermax_Autorespondermax_Block_System_Config_ConnectOrDisconnect
|
|
38 |
|
39 |
try{
|
40 |
$('autorespondermax_settings_connect_disconnect[connecting]').enable();
|
|
|
41 |
} catch(e){}
|
42 |
})($(this));
|
43 |
return true;
|
38 |
|
39 |
try{
|
40 |
$('autorespondermax_settings_connect_disconnect[connecting]').enable();
|
41 |
+
$('autorespondermax_credentials_api_secret').disable();
|
42 |
} catch(e){}
|
43 |
})($(this));
|
44 |
return true;
|
app/code/community/Autorespondermax/Autorespondermax/Helper/Data.php
CHANGED
@@ -28,6 +28,9 @@ class Autorespondermax_Autorespondermax_Helper_Data extends Mage_Core_Helper_Abs
|
|
28 |
'autorespondermax/customer',
|
29 |
'autorespondermax/customer/list',
|
30 |
'autorespondermax/customer/ids',
|
|
|
|
|
|
|
31 |
'autorespondermax/product',
|
32 |
'autorespondermax/product/list',
|
33 |
'autorespondermax/product/ids',
|
28 |
'autorespondermax/customer',
|
29 |
'autorespondermax/customer/list',
|
30 |
'autorespondermax/customer/ids',
|
31 |
+
'autorespondermax/subscriber',
|
32 |
+
'autorespondermax/subscriber/list',
|
33 |
+
'autorespondermax/subscriber/ids',
|
34 |
'autorespondermax/product',
|
35 |
'autorespondermax/product/list',
|
36 |
'autorespondermax/product/ids',
|
app/code/community/Autorespondermax/Autorespondermax/Model/Customer/Api.php
CHANGED
@@ -22,6 +22,7 @@ class Autorespondermax_Autorespondermax_Model_Customer_Api extends Autoresponder
|
|
22 |
$customerResult = $this->_toArray($customer, self::$ATTRIBUTE_FILTERS);
|
23 |
|
24 |
//Subscriber
|
|
|
25 |
$subscriber = Mage::getModel('newsletter/subscriber')->loadByCustomer($customer);
|
26 |
if(!is_null($subscriber)) {
|
27 |
$subscriberResult = $this->_toArray($subscriber, self::$SUBSCRIBER_ATTRIBUTE_FILTERS);
|
22 |
$customerResult = $this->_toArray($customer, self::$ATTRIBUTE_FILTERS);
|
23 |
|
24 |
//Subscriber
|
25 |
+
//Now there is a separate API endpoint to do this, but will be left
|
26 |
$subscriber = Mage::getModel('newsletter/subscriber')->loadByCustomer($customer);
|
27 |
if(!is_null($subscriber)) {
|
28 |
$subscriberResult = $this->_toArray($subscriber, self::$SUBSCRIBER_ATTRIBUTE_FILTERS);
|
app/code/community/Autorespondermax/Autorespondermax/Model/Mysql4/Subscriber.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Autorespondermax_Autorespondermax_Model_Mysql4_Subscriber extends Mage_Core_Model_Mysql4_Abstract {
|
4 |
+
protected function _construct() {
|
5 |
+
$this->_init('autorespondermax/subscriber', 'autorespondermax_subscriber_id');
|
6 |
+
}
|
7 |
+
}
|
app/code/community/Autorespondermax/Autorespondermax/Model/Mysql4/Subscriber/Collection.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Autorespondermax_Autorespondermax_Model_Mysql4_Subscriber_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
4 |
+
public function _construct() {
|
5 |
+
$this->_init('autorespondermax/subscriber');
|
6 |
+
}
|
7 |
+
}
|
app/code/community/Autorespondermax/Autorespondermax/Model/Observer.php
CHANGED
@@ -20,4 +20,16 @@ class Autorespondermax_Autorespondermax_Model_Observer {
|
|
20 |
}
|
21 |
}
|
22 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
20 |
}
|
21 |
}
|
22 |
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Observe changes to `Mage_Newsletter_Model_Subcriber` and record them under `Autorespondermax_Autorespondermax_Model_Subscriber`
|
26 |
+
*
|
27 |
+
* @param Varien_Event_Observer $observer
|
28 |
+
*/
|
29 |
+
public function updateSubscriber($observer) {
|
30 |
+
$subscriber = $observer->getSubscriber();
|
31 |
+
$_subscriber = Mage::getModel('autorespondermax/subscriber')->loadBySubscriber($subscriber);
|
32 |
+
$_subscriber->setUpdatedAt(Mage::getSingleton('core/date')->gmtDate());
|
33 |
+
$_subscriber->save();
|
34 |
+
}
|
35 |
}
|
app/code/community/Autorespondermax/Autorespondermax/Model/Subscriber.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Autorespondermax_Autorespondermax_Model_Subscriber extends Mage_Core_Model_Abstract {
|
4 |
+
protected function _construct() {
|
5 |
+
$this->_init('autorespondermax/subscriber');
|
6 |
+
}
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Find or set Autoresponder Max subscriber based on newsletter subscriber
|
10 |
+
*
|
11 |
+
* @param Mage_Newsletter_Model_Subcriber $subscriber
|
12 |
+
* @return Autorespondermax_Autorespondermax_Model_Subscriber
|
13 |
+
*/
|
14 |
+
public function loadBySubscriber($subscriber) {
|
15 |
+
$matches = $this->getResourceCollection()->addFieldToFilter('subscriber_id', $subscriber->getSubscriberId());
|
16 |
+
foreach ($matches as $match) {
|
17 |
+
return $this->load($match->getId());
|
18 |
+
}
|
19 |
+
return $this->setData('subscriber_id', $subscriber->getSubscriberId())->setData('store_id', $subscriber->getStoreId());
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @return Mage_Newsletter_Model_Subcriber
|
24 |
+
*/
|
25 |
+
public function getSubscriber() {
|
26 |
+
return Mage::getModel('newsletter/subscriber')->load($this->getSubscriberId());
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Autorespondermax/Autorespondermax/Model/Subscriber/Api.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Autorespondermax_Autorespondermax_Model_Subscriber_Api extends Autorespondermax_Autorespondermax_Model_Api {
|
4 |
+
public static $ATTRIBUTE_FILTERS = array('store_id');
|
5 |
+
|
6 |
+
public function items($storeId, $limit = 250, $page = 1, $filters = array()) {
|
7 |
+
$this->_validateStore($storeId);
|
8 |
+
|
9 |
+
$collection = Mage::getModel('autorespondermax/subscriber')
|
10 |
+
->getResourceCollection()
|
11 |
+
->addFieldToFilter('store_id', $storeId)
|
12 |
+
->addFieldToSelect('*')
|
13 |
+
->unshiftOrder('updated_at', Varien_Data_Collection::SORT_ORDER_ASC);
|
14 |
+
$this->_applyFilters($collection, $limit, $page, $filters);
|
15 |
+
|
16 |
+
$result = array();
|
17 |
+
foreach ($collection as $_subscriber) {
|
18 |
+
$subscriber = $_subscriber->getSubscriber();
|
19 |
+
$subscriberResult = $this->_toArray($subscriber, self::$ATTRIBUTE_FILTERS);
|
20 |
+
//Append the Autoresponder Max subscriber data to Newsletter subscriber data
|
21 |
+
$subscriberResult['updated_at'] = $_subscriber->getUpdatedAt();
|
22 |
+
$result[] = $subscriberResult;
|
23 |
+
}
|
24 |
+
|
25 |
+
return $result;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function ids($storeId, $limit = 250, $page = 1) {
|
29 |
+
$this->_validateStore($storeId);
|
30 |
+
|
31 |
+
$collection = Mage::getModel('autorespondermax/subscriber')
|
32 |
+
->getResourceCollection()
|
33 |
+
->addFieldToFilter('store_id', $storeId)
|
34 |
+
->addFieldToSelect('subscriber_id');
|
35 |
+
$this->_applyFilters($collection, $limit, $page);
|
36 |
+
|
37 |
+
$result = array();
|
38 |
+
foreach ($collection as $_subscriber) {
|
39 |
+
$result[] = $_subscriber->getSubscriberId();
|
40 |
+
}
|
41 |
+
return $result;
|
42 |
+
}
|
43 |
+
}
|
app/code/community/Autorespondermax/Autorespondermax/Model/System/Config/ConnectOrDisconnect.php
CHANGED
@@ -91,6 +91,7 @@ class Autorespondermax_Autorespondermax_Model_System_Config_ConnectOrDisconnect
|
|
91 |
|
92 |
$helper->setStoreId($storeId, $store);
|
93 |
$helper->setToken($storeToken, $store);
|
|
|
94 |
$helper->setApiSecret($storeApiSecret, $store);
|
95 |
$helper->setUseTracking(true, $store);
|
96 |
}
|
91 |
|
92 |
$helper->setStoreId($storeId, $store);
|
93 |
$helper->setToken($storeToken, $store);
|
94 |
+
Mage::log($storeApiSecret, Zend_Log::ERR);
|
95 |
$helper->setApiSecret($storeApiSecret, $store);
|
96 |
$helper->setUseTracking(true, $store);
|
97 |
}
|
app/code/community/Autorespondermax/Autorespondermax/etc/api.xml
CHANGED
@@ -14,7 +14,6 @@
|
|
14 |
</info>
|
15 |
</methods>
|
16 |
</autorespondermax_general>
|
17 |
-
|
18 |
<autorespondermax_sales_quote module="autorespondermax" translate="title">
|
19 |
<title>Autoresponder Max</title>
|
20 |
<acl>autorespondermax/sales_quote</acl>
|
@@ -46,7 +45,6 @@
|
|
46 |
</page_out_of_range>
|
47 |
</faults>
|
48 |
</autorespondermax_sales_quote>
|
49 |
-
|
50 |
<autorespondermax_customer module="autorespondermax" translate="title">
|
51 |
<title>Autoresponder Max</title>
|
52 |
<acl>autorespondermax/customer</acl>
|
@@ -78,7 +76,37 @@
|
|
78 |
</page_out_of_range>
|
79 |
</faults>
|
80 |
</autorespondermax_customer>
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
<autorespondermax_product module="autorespondermax" translate="title">
|
83 |
<title>Autoresponder Max</title>
|
84 |
<acl>autorespondermax/product</acl>
|
@@ -110,7 +138,6 @@
|
|
110 |
</page_out_of_range>
|
111 |
</faults>
|
112 |
</autorespondermax_product>
|
113 |
-
|
114 |
<autorespondermax_sales_order module="autorespondermax" translate="title">
|
115 |
<title>Autoresponder Max</title>
|
116 |
<acl>autorespondermax/sales_order</acl>
|
@@ -171,6 +198,15 @@
|
|
171 |
<title>View IDs</title>
|
172 |
</ids>
|
173 |
</customer>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
<product module="autorespondermax" translate="title">
|
175 |
<title>Product</title>
|
176 |
<list module="autorespondermax" translate="title">
|
14 |
</info>
|
15 |
</methods>
|
16 |
</autorespondermax_general>
|
|
|
17 |
<autorespondermax_sales_quote module="autorespondermax" translate="title">
|
18 |
<title>Autoresponder Max</title>
|
19 |
<acl>autorespondermax/sales_quote</acl>
|
45 |
</page_out_of_range>
|
46 |
</faults>
|
47 |
</autorespondermax_sales_quote>
|
|
|
48 |
<autorespondermax_customer module="autorespondermax" translate="title">
|
49 |
<title>Autoresponder Max</title>
|
50 |
<acl>autorespondermax/customer</acl>
|
76 |
</page_out_of_range>
|
77 |
</faults>
|
78 |
</autorespondermax_customer>
|
79 |
+
<autorespondermax_subscriber module="autorespondermax" translate="title">
|
80 |
+
<title>Autoresponder Max</title>
|
81 |
+
<acl>autorespondermax/subscriber</acl>
|
82 |
+
<model>autorespondermax/subscriber_api</model>
|
83 |
+
<methods>
|
84 |
+
<list module="autorespondermax" translate="title">
|
85 |
+
<title>Retrieve subscribers</title>
|
86 |
+
<method>items</method>
|
87 |
+
<acl>autorespondermax/subscriber/list</acl>
|
88 |
+
</list>
|
89 |
+
<ids module="autorespondermax" translate="title">
|
90 |
+
<title>Retrieve IDs</title>
|
91 |
+
<method>ids</method>
|
92 |
+
<acl>autorespondermax/subscriber/ids</acl>
|
93 |
+
</ids>
|
94 |
+
</methods>
|
95 |
+
<faults module="autorespondermax">
|
96 |
+
<store_id_invalid>
|
97 |
+
<code>101</code>
|
98 |
+
<message>Store Id not found</message>
|
99 |
+
</store_id_invalid>
|
100 |
+
<filters_invalid>
|
101 |
+
<code>102</code>
|
102 |
+
<message>Invalid filters specified. Details in error message.</message>
|
103 |
+
</filters_invalid>
|
104 |
+
<page_out_of_range>
|
105 |
+
<code>103</code>
|
106 |
+
<message>Page out of range</message>
|
107 |
+
</page_out_of_range>
|
108 |
+
</faults>
|
109 |
+
</autorespondermax_subscriber>
|
110 |
<autorespondermax_product module="autorespondermax" translate="title">
|
111 |
<title>Autoresponder Max</title>
|
112 |
<acl>autorespondermax/product</acl>
|
138 |
</page_out_of_range>
|
139 |
</faults>
|
140 |
</autorespondermax_product>
|
|
|
141 |
<autorespondermax_sales_order module="autorespondermax" translate="title">
|
142 |
<title>Autoresponder Max</title>
|
143 |
<acl>autorespondermax/sales_order</acl>
|
198 |
<title>View IDs</title>
|
199 |
</ids>
|
200 |
</customer>
|
201 |
+
<subscriber module="autorespondermax" translate="title">
|
202 |
+
<title>Subscriber</title>
|
203 |
+
<list module="autorespondermax" translate="title">
|
204 |
+
<title>View All</title>
|
205 |
+
</list>
|
206 |
+
<ids module="autorespondermax" translate="title">
|
207 |
+
<title>View IDs</title>
|
208 |
+
</ids>
|
209 |
+
</subscriber>
|
210 |
<product module="autorespondermax" translate="title">
|
211 |
<title>Product</title>
|
212 |
<list module="autorespondermax" translate="title">
|
app/code/community/Autorespondermax/Autorespondermax/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Autorespondermax_Autorespondermax>
|
5 |
-
<version>12.
|
6 |
</Autorespondermax_Autorespondermax>
|
7 |
</modules>
|
8 |
<global>
|
@@ -19,8 +19,35 @@
|
|
19 |
<models>
|
20 |
<autorespondermax>
|
21 |
<class>Autorespondermax_Autorespondermax_Model</class>
|
|
|
22 |
</autorespondermax>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
</models>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
</global>
|
25 |
<default>
|
26 |
<autorespondermax>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Autorespondermax_Autorespondermax>
|
5 |
+
<version>12.3.5</version>
|
6 |
</Autorespondermax_Autorespondermax>
|
7 |
</modules>
|
8 |
<global>
|
19 |
<models>
|
20 |
<autorespondermax>
|
21 |
<class>Autorespondermax_Autorespondermax_Model</class>
|
22 |
+
<resourceModel>autorespondermax_resource</resourceModel>
|
23 |
</autorespondermax>
|
24 |
+
<autorespondermax_resource>
|
25 |
+
<class>Autorespondermax_Autorespondermax_Model_Mysql4</class>
|
26 |
+
<entities>
|
27 |
+
<subscriber>
|
28 |
+
<table>autorespondermax_subscriber</table>
|
29 |
+
</subscriber>
|
30 |
+
</entities>
|
31 |
+
</autorespondermax_resource>
|
32 |
</models>
|
33 |
+
<resources>
|
34 |
+
<autorespondermax_setup>
|
35 |
+
<setup>
|
36 |
+
<module>Autorespondermax_Autorespondermax</module>
|
37 |
+
</setup>
|
38 |
+
</autorespondermax_setup>
|
39 |
+
</resources>
|
40 |
+
<events>
|
41 |
+
<newsletter_subscriber_save_commit_after>
|
42 |
+
<observers>
|
43 |
+
<autorespondermax_observer_subscriber>
|
44 |
+
<type>singleton</type>
|
45 |
+
<class>Autorespondermax_Autorespondermax_Model_Observer</class>
|
46 |
+
<method>updateSubscriber</method>
|
47 |
+
</autorespondermax_observer_subscriber>
|
48 |
+
</observers>
|
49 |
+
</newsletter_subscriber_save_commit_after>
|
50 |
+
</events>
|
51 |
</global>
|
52 |
<default>
|
53 |
<autorespondermax>
|
app/code/community/Autorespondermax/Autorespondermax/sql/autorespondermax_setup/mysql4-data-install-12.3.5.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//Find the api role
|
4 |
+
$apiUserRole = Mage::getModel('api/role')->getCollection()->setRolesFilter()->addFieldToFilter('role_name', Autorespondermax_Autorespondermax_Helper_Data::API_ROLE_NAME)->getFirstItem();
|
5 |
+
|
6 |
+
if($apiUserRole->isObjectNew()) {
|
7 |
+
$apiUserRole = $apiUserRole
|
8 |
+
->setRoleName(Autorespondermax_Autorespondermax_Helper_Data::API_ROLE_NAME)
|
9 |
+
->setRoleType('G')
|
10 |
+
->save();
|
11 |
+
}
|
12 |
+
|
13 |
+
Mage::getModel('api/rules')->setRoleId($apiUserRole->getId())
|
14 |
+
->setResources(Autorespondermax_Autorespondermax_Helper_Data::$API_ROLE_RULE_RESOURCES)
|
15 |
+
->saveRel();
|
16 |
+
|
17 |
+
$subscribers = Mage::getModel('newsletter/subscriber')->getCollection();
|
18 |
+
foreach($subscribers as $subscriber) {
|
19 |
+
$_subscriber = Mage::getModel('autorespondermax/subscriber')->loadBySubscriber($subscriber);
|
20 |
+
$_subscriber->setUpdatedAt('1970-01-01 00:00:01');
|
21 |
+
$_subscriber->save();
|
22 |
+
}
|
app/code/community/Autorespondermax/Autorespondermax/sql/autorespondermax_setup/mysql4-data-upgrade-12.0.10-12.3.5.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//Find the api role
|
4 |
+
$apiUserRole = Mage::getModel('api/role')->getCollection()->setRolesFilter()->addFieldToFilter('role_name', Autorespondermax_Autorespondermax_Helper_Data::API_ROLE_NAME)->getFirstItem();
|
5 |
+
|
6 |
+
if($apiUserRole->isObjectNew()) {
|
7 |
+
$apiUserRole = $apiUserRole
|
8 |
+
->setRoleName(Autorespondermax_Autorespondermax_Helper_Data::API_ROLE_NAME)
|
9 |
+
->setRoleType('G')
|
10 |
+
->save();
|
11 |
+
}
|
12 |
+
|
13 |
+
Mage::getModel('api/rules')->setRoleId($apiUserRole->getId())
|
14 |
+
->setResources(Autorespondermax_Autorespondermax_Helper_Data::$API_ROLE_RULE_RESOURCES)
|
15 |
+
->saveRel();
|
app/code/community/Autorespondermax/Autorespondermax/sql/autorespondermax_setup/mysql4-install-12.3.5.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
$table = $installer->getConnection()
|
7 |
+
->newTable($installer->getTable('autorespondermax/subscriber'))
|
8 |
+
->addColumn(
|
9 |
+
'autorespondermax_subscriber_id',
|
10 |
+
Varien_Db_Ddl_Table::TYPE_INTEGER, null,
|
11 |
+
array(
|
12 |
+
'identity' => true,
|
13 |
+
'auto_increment' => true,
|
14 |
+
'unsigned' => true,
|
15 |
+
'nullable' => false,
|
16 |
+
'primary' => true
|
17 |
+
)
|
18 |
+
)
|
19 |
+
->addColumn(
|
20 |
+
'store_id',
|
21 |
+
Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
22 |
+
null,
|
23 |
+
array(
|
24 |
+
'unsigned' => true,
|
25 |
+
'nullable' => false
|
26 |
+
)
|
27 |
+
)
|
28 |
+
->addColumn(
|
29 |
+
'subscriber_id',
|
30 |
+
Varien_Db_Ddl_Table::TYPE_INTEGER,
|
31 |
+
null,
|
32 |
+
array(
|
33 |
+
'unsigned' => true,
|
34 |
+
'nullable' => false
|
35 |
+
)
|
36 |
+
)
|
37 |
+
->addColumn(
|
38 |
+
'updated_at',
|
39 |
+
Varien_Db_Ddl_Table::TYPE_TIMESTAMP, //TYPE_DATETIME
|
40 |
+
null,
|
41 |
+
array(
|
42 |
+
'nullable' => false,
|
43 |
+
'default' => '1970-01-01 00:00:01'
|
44 |
+
)
|
45 |
+
);
|
46 |
+
|
47 |
+
$table->addForeignKey(
|
48 |
+
'FK_ARMAX_SUBSCRIBER_STORE',
|
49 |
+
'store_id',
|
50 |
+
$installer->getTable('core/store'),
|
51 |
+
'store_id',
|
52 |
+
Varien_Db_Ddl_Table::ACTION_CASCADE,
|
53 |
+
Varien_Db_Ddl_Table::ACTION_CASCADE
|
54 |
+
);
|
55 |
+
$table->addForeignKey(
|
56 |
+
'FK_ARMAX_SUBSCRIBER_SUBSCRIBER',
|
57 |
+
'subscriber_id',
|
58 |
+
$installer->getTable('newsletter/subscriber'),
|
59 |
+
'subscriber_id',
|
60 |
+
Varien_Db_Ddl_Table::ACTION_CASCADE,
|
61 |
+
Varien_Db_Ddl_Table::ACTION_CASCADE
|
62 |
+
);
|
63 |
+
$table->addIndex('IDX_ARMAX_SUBSCRIBER_SUBSCRIBER_ID', 'subscriber_id', array('unique' => true));
|
64 |
+
$table->addIndex('IDX_ARMAX_SUBSCRIBER_UPDATED_AT', 'updated_at', array());
|
65 |
+
|
66 |
+
$installer->getConnection()->createTable($table);
|
67 |
+
|
68 |
+
//Need to force auto increment on this column (see http://stackoverflow.com/questions/5341693/add-an-auto-increment-column-in-magento-setup-script-without-using-sql)
|
69 |
+
$installer->run("
|
70 |
+
ALTER TABLE `{$installer->getTable('autorespondermax/subscriber')}`
|
71 |
+
CHANGE COLUMN `autorespondermax_subscriber_id` `autorespondermax_subscriber_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ;
|
72 |
+
");
|
73 |
+
|
74 |
+
$installer->endSetup();
|
app/etc/modules/Autorespondermax_Autorespondermax.xml
CHANGED
@@ -10,6 +10,7 @@
|
|
10 |
<Mage_Customer/>
|
11 |
<Mage_Checkout/>
|
12 |
<Mage_Catalog/>
|
|
|
13 |
</depends>
|
14 |
</Autorespondermax_Autorespondermax>
|
15 |
</modules>
|
10 |
<Mage_Customer/>
|
11 |
<Mage_Checkout/>
|
12 |
<Mage_Catalog/>
|
13 |
+
<Mage_Newsletter/>
|
14 |
</depends>
|
15 |
</Autorespondermax_Autorespondermax>
|
16 |
</modules>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Autorespondermax_Autorespondermax</name>
|
4 |
-
<version>12.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://autorespondermax.com/terms-of-service/">Autoresponder Max Terms Of Service</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Automatic email remarketing made easy</summary>
|
10 |
<description>Provides an integration with Autoresponder Max to send remarketing emails.</description>
|
11 |
-
<notes>Version 12.
|
12 |
<authors><author><name>Carson Reinke</name><user>armax1</user><email>it@autorespondermax.com</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Autorespondermax"><dir name="Autorespondermax"><dir name="Block"><file name="Cart.php" hash="4d400b601aa4da5327ef6addec79e80b"/><dir name="Convert"><file name="Multishipping.php" hash="dc9c73cc1bdf747dcd5fae0a57dc175b"/><file name="Onepage.php" hash="011f0ec852171ca4b8ec84f895edf084"/></dir><dir name="System"><dir name="Config"><file name="AutocompleteOff.php" hash="c97112f20af5feea10c1560e7f21f72a"/><file name="ConnectOrDisconnect.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>8.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Autorespondermax_Autorespondermax</name>
|
4 |
+
<version>12.3.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://autorespondermax.com/terms-of-service/">Autoresponder Max Terms Of Service</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Automatic email remarketing made easy</summary>
|
10 |
<description>Provides an integration with Autoresponder Max to send remarketing emails.</description>
|
11 |
+
<notes>Version 12.3.5</notes>
|
12 |
<authors><author><name>Carson Reinke</name><user>armax1</user><email>it@autorespondermax.com</email></author></authors>
|
13 |
+
<date>2016-03-18</date>
|
14 |
+
<time>19:18:36</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Autorespondermax"><dir name="Autorespondermax"><dir name="Block"><file name="Cart.php" hash="4d400b601aa4da5327ef6addec79e80b"/><dir name="Convert"><file name="Multishipping.php" hash="dc9c73cc1bdf747dcd5fae0a57dc175b"/><file name="Onepage.php" hash="011f0ec852171ca4b8ec84f895edf084"/></dir><dir name="System"><dir name="Config"><file name="AutocompleteOff.php" hash="c97112f20af5feea10c1560e7f21f72a"/><file name="ConnectOrDisconnect.php" hash="a1c238717e96b72597fa51e459eaedae"/><file name="Readonly.php" hash="4856c9b22a42fd258d21e0894aed1347"/></dir></dir></dir><dir name="Helper"><file name="Api.php" hash="3381c0aef723d2a895924363437c45db"/><file name="Curl.php" hash="980a7950f2b61ec981304d6b33139577"/><file name="Dashboard.php" hash="6982a8d8a0b1184aed2b7c1186091cd5"/><file name="Data.php" hash="bb685c1e3d428f162ec7d67e76f7dd06"/><file name="Track.php" hash="74a32e50d94afee5ef87cd23ac1e2acb"/></dir><dir name="Model"><file name="Api.php" hash="7f9db3213149e57adc308c641d7eb1bb"/><dir name="Customer"><file name="Api.php" hash="7041d392fed0bfb1408e4c23b4ee57bc"/></dir><dir name="General"><file name="Api.php" hash="be418a45090aaff6692e16f1ac2621d3"/></dir><dir name="Mysql4"><dir name="Subscriber"><file name="Collection.php" hash="8169eb6cea7bec1bda019c7a8e420da9"/></dir><file name="Subscriber.php" hash="f3a7f827a529fe7f8a725ac6d2ad4b49"/></dir><file name="Observer.php" hash="017b9b968629c9be64389ad23af30952"/><dir name="Product"><file name="Api.php" hash="cbc598d40e048ef98d5830e3b2232509"/></dir><dir name="Sales"><dir name="Order"><file name="Api.php" hash="23c8d41e5e5de6693f50da385b3aea78"/></dir><dir name="Quote"><file name="Api.php" hash="6382889ea9b658060e2b3604d42a7b8b"/></dir></dir><dir name="Subscriber"><file name="Api.php" hash="52af8824eb3f222b8405f8083dbcb60b"/></dir><file name="Subscriber.php" hash="82954c3f680e1318cffd7a7e6ed0ba9b"/><dir name="System"><dir name="Config"><file name="ConnectOrDisconnect.php" hash="ef155f9e0bb7473645377ef262526fb2"/><dir name="Form"><dir name="Field"><file name="Button.php" hash="62196c755745cccdc308f80862f4e1bd"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="59bd9b7e4e9dc58762915abe70a7ff11"/><file name="api.xml" hash="52b65e73a36d26a674d7e2aaa5e532d4"/><file name="config.xml" hash="a7ae2c021f3497c4b0f4a5457785e8d1"/><file name="system.xml" hash="7eefc56112fc5300b8ad677ce8abe413"/></dir><dir name="sql"><dir name="autorespondermax_setup"><file name="mysql4-data-install-12.3.5.php" hash="936cc94f82c6afe72ce7cdad03ad1692"/><file name="mysql4-data-upgrade-12.0.10-12.3.5.php" hash="4915848bfee3d6c6aef0f1f705d56674"/><file name="mysql4-install-12.3.5.php" hash="5a54cf49cdecac1e0c03b7e71df840ea"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="autorespondermax.xml" hash="09e47d31eb920a33ecaded8a93e15b9d"/></dir><dir name="template"><dir name="autorespondermax"><file name="cart.phtml" hash="e4d40ee73e8f493074836235ecc39c89"/><file name="convert.phtml" hash="3f6dbfa1d8ded02fb0bebf2d50cc0ce6"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Autorespondermax_Autorespondermax.xml" hash="29eb8f77a19db490befd7b22ce7f5554"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>8.0.0</max></php></required></dependencies>
|
18 |
</package>
|