ActiveCampaign_Subscriptions - Version 1.5.1

Version Notes

Added Forms selector, so you can control how subscribers receive Opt-in messages.

Also removed the "Reset" and "Delete Connection" buttons, as they are not necessary (you can use "Enabled" or "Disabled" instead).

Download this release

Release Info

Developer ActiveCampaign, Inc.
Extension ActiveCampaign_Subscriptions
Version 1.5.1
Comparing to
See all releases


Code changes from version 1.5.0 to 1.5.1

app/code/community/ActiveCampaign/Subscriptions/Block/Adminhtml/Subscriptions/Edit/Tab/Form.php CHANGED
@@ -25,8 +25,6 @@ class ActiveCampaign_Subscriptions_Block_Adminhtml_Subscriptions_Edit_Tab_Form e
25
  $list_ids = array();
26
  $form_id = 0;
27
 
28
- //$this->dbg($connection_data);
29
-
30
  foreach ($connection_data as $connection) {
31
  // find first one that is enabled
32
  $api_url = $connection["api_url"];
@@ -40,7 +38,8 @@ class ActiveCampaign_Subscriptions_Block_Adminhtml_Subscriptions_Edit_Tab_Form e
40
  foreach ($list_values as $acct_listid) {
41
  // IE: mthommes6.activehosted.com-13
42
  $acct_listid = explode("-", $acct_listid);
43
- $list_ids[] = (int)$acct_listid[1];
 
44
  }
45
  }
46
 
25
  $list_ids = array();
26
  $form_id = 0;
27
 
 
 
28
  foreach ($connection_data as $connection) {
29
  // find first one that is enabled
30
  $api_url = $connection["api_url"];
38
  foreach ($list_values as $acct_listid) {
39
  // IE: mthommes6.activehosted.com-13
40
  $acct_listid = explode("-", $acct_listid);
41
+ end($acct_listid); // go to the last item, which should be the list ID
42
+ $list_ids[] = (int)current($acct_listid);
43
  }
44
  }
45
 
app/code/community/ActiveCampaign/Subscriptions/Model/Observer.php CHANGED
@@ -56,7 +56,8 @@ protected function file_append($content) {
56
  foreach ($list_values as $acct_listid) {
57
  // IE: mthommes6.activehosted.com-13
58
  $acct_listid = explode("-", $acct_listid);
59
- $list_ids[] = (int)$acct_listid[1];
 
60
  }
61
  }
62
 
@@ -174,7 +175,7 @@ protected function file_append($content) {
174
  // add lists
175
  foreach ($connection["list_ids"] as $list_id) {
176
  $subscriber["p[{$list_id}]"] = $list_id;
177
- $subscriber["status[{$list_id}]"] = 1;
178
  }
179
 
180
  $subscriber["form"] = $connection["form_id"];
56
  foreach ($list_values as $acct_listid) {
57
  // IE: mthommes6.activehosted.com-13
58
  $acct_listid = explode("-", $acct_listid);
59
+ end($acct_listid); // go to the last item, which should be the list ID
60
+ $list_ids[] = (int)current($acct_listid);
61
  }
62
  }
63
 
175
  // add lists
176
  foreach ($connection["list_ids"] as $list_id) {
177
  $subscriber["p[{$list_id}]"] = $list_id;
178
+ $subscriber["status[{$list_id}]"] = $list_status;
179
  }
180
 
181
  $subscriber["form"] = $connection["form_id"];
app/design/adminhtml/default/default/template/subscriptions/grid.phtml CHANGED
@@ -4,4 +4,4 @@
4
  ?>
5
  </div>
6
 
7
- <p style="color: gray; font-size: 0.9em; margin-top: 25px;">ActiveCampaign extension version 1.5.0. <a href="http://www.activecampaign.com/help/magento-integration/" target="_blank">Get Help</a></p>
4
  ?>
5
  </div>
6
 
7
+ <p style="color: gray; font-size: 0.9em; margin-top: 25px;">ActiveCampaign extension version 1.5.1. <a href="http://www.activecampaign.com/help/magento-integration/" target="_blank">Get Help</a></p>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ActiveCampaign_Subscriptions</name>
4
- <version>1.5.0</version>
5
  <stability>stable</stability>
6
  <license uri="https://www.activecampaign.com/hosted/terms.php">Commercial/Free</license>
7
  <channel>community</channel>
@@ -18,9 +18,9 @@
18
  &#xD;
19
  Also removed the "Reset" and "Delete Connection" buttons, as they are not necessary (you can use "Enabled" or "Disabled" instead).</notes>
20
  <authors><author><name>ActiveCampaign, Inc.</name><user>activecampaign</user><email>help@activecampaign.com</email></author></authors>
21
- <date>2013-02-12</date>
22
- <time>15:18:28</time>
23
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="subscriptions.xml" hash="18bfe6676477fc84b488277025d42568"/></dir><dir name="template"><dir name="subscriptions"><file name="grid.phtml" hash="79ae0a6dc36363b20f779027eb02dbfc"/><file name="list.phtml" hash="70c40a80ee43596da6ae899f14191e91"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="subscriptions.xml" hash="d0a96f68db976ce1919a664228184e9c"/></dir><dir name="template"><dir name="subscriptions"><file name="subscriptions.phtml" hash="2025758bce03d7b9cfe99029050c7be4"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ActiveCampaign_Subscriptions.xml" hash="14eb3a0c9c06bc847b4e8c6ff691c07d"/></dir></target><target name="magecommunity"><dir name="ActiveCampaign"><dir name="Subscriptions"><dir name="activecampaign-api-php"><file name="Account.class.php" hash="eb5d6e647e0c5d6db2e4291bd2e4c24a"/><file name="ActiveCampaign.class.php" hash="a088e4fb59ae3c5353d43a3d39a2d62f"/><file name="Auth.class.php" hash="6cf45573aaa8aa4b158f88d80bb9ac7d"/><file name="Campaign.class.php" hash="3db78bd78995f6d4c42d80d26300ebe3"/><file name="Connector.class.php" hash="73d01f8f2c29248c79913083b6d58963"/><file name="Design.class.php" hash="113a72a83d979fbe80b5ef3acd085a86"/><file name="Form.class.php" hash="c62e2fc1399d0dfac4532c7e450ff31d"/><file name="Group.class.php" hash="ce0792f8032ec09b8ca6636ffd14cdc3"/><file name="List.class.php" hash="ad045005e67f7724421b98d44b3464bd"/><file name="Message.class.php" hash="da8e027327b10dcbbd18a94a1a9730b0"/><file name="Subscriber.class.php" hash="132a8edd2d571f5064855e467e916d48"/><file name="User.class.php" hash="4732c709aedb1cc0448acafd4c956c29"/><file name="Webhook.class.php" hash="1b9fc3e1524c146f42c81f6d2521a7f9"/></dir><dir name="Block"><file name="Subscriptions.php" hash="79b032b024a0593188258d4fef3fa733"/><dir name="Adminhtml"><file name="Subscriptions.php" hash="7f9fdec5858ef7a30c1fcd129f13fe67"/><dir name="Subscriptions"><file name="Edit.php" hash="3c464d71d1ad78ae035f810a1248f918"/><file name="Grid.php" hash="b51fc9698c21224488c41826489a8177"/><dir name="Edit"><file name="Form.php" hash="b1eda088b2adf03d69bc1aa3cfb2a00a"/><file name="Tabs.php" hash="4c94ebd27bb6bb0a572131d441afa945"/><dir name="Tab"><file name="Connection.php" hash="230d5a8f70b5de930864b25821290efb"/><file name="Export.php" hash="f65aa906629d6a1b4a17f16014488017"/><file name="List.php" hash="4f2cd4ca088cca5bb2ad1b598c9bc486"/><file name="Form.php" hash="200931011a1eb4b053a01a9d69909d55"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="f6e27a764745bdb55f17fdca49a7fa81"/><dir name="Adminhtml"><file name="SubscriptionsController.php" hash="edd787979ac83ea735f8c4cd61340c89"/></dir></dir><dir name="etc"><file name="config.xml" hash="a3bacb007c725735eee61c9a2bae5475"/></dir><dir name="Helper"><file name="Data.php" hash="4b35d91431328ee595132df575a60a2a"/></dir><dir name="Model"><file name="Observer.php" hash="1f4a7a5cdb46c106cc804539dbe045a8"/><file name="Status.php" hash="c35feda8164009341d289074be5612c0"/><file name="Subscriptions.php" hash="76818326ecfd635e574f704003184300"/><dir name="Mysql4"><file name="Subscriptions.php" hash="d112b3f1194a8bb7f329dacb34161941"/><dir name="Subscriptions"><file name="Collection.php" hash="457890390bd29e72dda81d3088ef5a50"/></dir></dir></dir><dir name="sql"><dir name="subscriptions_setup"><file name="mysql4-install-0.1.0.php" hash="9f756eb38486cc878134f07f22f661c0"/></dir></dir></dir></dir></target></contents>
24
  <compatible/>
25
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min>7.19.7</min><max>7.28.0</max></extension></required></dependencies>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ActiveCampaign_Subscriptions</name>
4
+ <version>1.5.1</version>
5
  <stability>stable</stability>
6
  <license uri="https://www.activecampaign.com/hosted/terms.php">Commercial/Free</license>
7
  <channel>community</channel>
18
  &#xD;
19
  Also removed the "Reset" and "Delete Connection" buttons, as they are not necessary (you can use "Enabled" or "Disabled" instead).</notes>
20
  <authors><author><name>ActiveCampaign, Inc.</name><user>activecampaign</user><email>help@activecampaign.com</email></author></authors>
21
+ <date>2013-05-11</date>
22
+ <time>15:33:54</time>
23
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="subscriptions.xml" hash="18bfe6676477fc84b488277025d42568"/></dir><dir name="template"><dir name="subscriptions"><file name="grid.phtml" hash="5d13aea3c7e678f80aa7e72d5337ae9d"/><file name="list.phtml" hash="70c40a80ee43596da6ae899f14191e91"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="subscriptions.xml" hash="d0a96f68db976ce1919a664228184e9c"/></dir><dir name="template"><dir name="subscriptions"><file name="subscriptions.phtml" hash="2025758bce03d7b9cfe99029050c7be4"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ActiveCampaign_Subscriptions.xml" hash="14eb3a0c9c06bc847b4e8c6ff691c07d"/></dir></target><target name="magecommunity"><dir name="ActiveCampaign"><dir name="Subscriptions"><dir name="activecampaign-api-php"><file name="Account.class.php" hash="eb5d6e647e0c5d6db2e4291bd2e4c24a"/><file name="ActiveCampaign.class.php" hash="a088e4fb59ae3c5353d43a3d39a2d62f"/><file name="Auth.class.php" hash="6cf45573aaa8aa4b158f88d80bb9ac7d"/><file name="Campaign.class.php" hash="3db78bd78995f6d4c42d80d26300ebe3"/><file name="Connector.class.php" hash="73d01f8f2c29248c79913083b6d58963"/><file name="Design.class.php" hash="113a72a83d979fbe80b5ef3acd085a86"/><file name="Form.class.php" hash="c62e2fc1399d0dfac4532c7e450ff31d"/><file name="Group.class.php" hash="ce0792f8032ec09b8ca6636ffd14cdc3"/><file name="List.class.php" hash="ad045005e67f7724421b98d44b3464bd"/><file name="Message.class.php" hash="da8e027327b10dcbbd18a94a1a9730b0"/><file name="Subscriber.class.php" hash="132a8edd2d571f5064855e467e916d48"/><file name="User.class.php" hash="4732c709aedb1cc0448acafd4c956c29"/><file name="Webhook.class.php" hash="1b9fc3e1524c146f42c81f6d2521a7f9"/></dir><dir name="Block"><file name="Subscriptions.php" hash="79b032b024a0593188258d4fef3fa733"/><dir name="Adminhtml"><file name="Subscriptions.php" hash="7f9fdec5858ef7a30c1fcd129f13fe67"/><dir name="Subscriptions"><file name="Edit.php" hash="3c464d71d1ad78ae035f810a1248f918"/><file name="Grid.php" hash="b51fc9698c21224488c41826489a8177"/><dir name="Edit"><file name="Form.php" hash="b1eda088b2adf03d69bc1aa3cfb2a00a"/><file name="Tabs.php" hash="4c94ebd27bb6bb0a572131d441afa945"/><dir name="Tab"><file name="Connection.php" hash="230d5a8f70b5de930864b25821290efb"/><file name="Export.php" hash="f65aa906629d6a1b4a17f16014488017"/><file name="List.php" hash="4f2cd4ca088cca5bb2ad1b598c9bc486"/><file name="Form.php" hash="8bf394482cf60f311b8610521888b0d8"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="f6e27a764745bdb55f17fdca49a7fa81"/><dir name="Adminhtml"><file name="SubscriptionsController.php" hash="edd787979ac83ea735f8c4cd61340c89"/></dir></dir><dir name="etc"><file name="config.xml" hash="a3bacb007c725735eee61c9a2bae5475"/></dir><dir name="Helper"><file name="Data.php" hash="4b35d91431328ee595132df575a60a2a"/></dir><dir name="Model"><file name="Observer.php" hash="0333eb2cbbcdedaaf5607f80e3cdcfe9"/><file name="Status.php" hash="c35feda8164009341d289074be5612c0"/><file name="Subscriptions.php" hash="76818326ecfd635e574f704003184300"/><dir name="Mysql4"><file name="Subscriptions.php" hash="d112b3f1194a8bb7f329dacb34161941"/><dir name="Subscriptions"><file name="Collection.php" hash="457890390bd29e72dda81d3088ef5a50"/></dir></dir></dir><dir name="sql"><dir name="subscriptions_setup"><file name="mysql4-install-0.1.0.php" hash="9f756eb38486cc878134f07f22f661c0"/></dir></dir></dir></dir></target></contents>
24
  <compatible/>
25
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min>7.19.7</min><max>7.28.0</max></extension></required></dependencies>
26
  </package>