Respondr_Ecommerce - Version 1.0.4

Version Notes

- Improvement to the way we query for optin status

Download this release

Release Info

Developer Leroy Ware
Extension Respondr_Ecommerce
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/RespondrMage/RespondrAnalytics/Helper/Data.php CHANGED
@@ -39,13 +39,11 @@ class RespondrMage_RespondrAnalytics_Helper_Data extends Mage_Core_Helper_Abstra
39
  * @return string
40
  */
41
  public function isCustomerSubscribed($email) {
42
- $isSubscribed = 0;
43
- $db = Mage::getSingleton('core/resource')->getConnection('core_read');
44
- $sql = "SELECT * FROM `newsletter_subscriber` WHERE `subscriber_email`='".$email."' AND `subscriber_status`='1' LIMIT 1";
45
- $result = $db->fetchAll($sql);
46
- if($result){
47
- $isSubscribed = 1;
48
  }
49
- return $isSubscribed;
50
  }
51
  }
39
  * @return string
40
  */
41
  public function isCustomerSubscribed($email) {
42
+ $subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
43
+ if($subscriber->getId()) {
44
+ return $subscriber->getData('subscriber_status') == Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED;
45
+ } else {
46
+ return 0;
 
47
  }
 
48
  }
49
  }
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Respondr_Ecommerce</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="@license http://www.gnu.org/licenses/gpl-3.0.html">GPL v3</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Advanced ecommerce marketing automation for Magento retailers.</summary>
10
  <description>Increase your online revenue with automated email, mobile, and social messaging driven by your web analytics. Respondr makes it easy to re-engage your customers and bring them back to your store. Creating and managing abandoned cart, product recommendation, and cross-sell email marketing has never been easier. You can also send coupons and promotions via SMS/MMS, Facebook and more!</description>
11
- <notes>- Minor refactoring.</notes>
12
  <authors><author><name>Leroy Ware</name><user>LeroyWare</user><email>leroy@respondr.io</email></author><author><name>Adrian Speyer</name><user>AdrianSpeyer</user><email>adriansprojects@gmail.com</email></author></authors>
13
- <date>2014-08-25</date>
14
- <time>11:27:42</time>
15
- <contents><target name="magecommunity"><dir name="RespondrMage"><dir name="RespondrAnalytics"><dir name="Block"><file name="Respondr.php" hash="c4a454fc203dd779d46618132b431087"/></dir><dir name="Helper"><file name="Data.php" hash="be7c1f8d2fcdc4d3e7c1eb9612f9d6f8"/></dir><dir name="Model"><file name="Observer.php" hash="7301ca92b1762223cf8228439fa8468e"/></dir><dir name="controllers"><file name="IndexController.php" hash="292571ac2e24956993fb681cdd1d99a2"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b28f4ddc5e0851cff79bdc1624e1192c"/><file name="config.xml" hash="ba0e13559f0515126ea5b169e6fa6ab2"/><file name="system.xml" hash="3d57e604c7b9c2eb4b11b82229531869"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="respondranalytics.xml" hash="27dc170600cb1d71cdcb7bacb6455230"/></dir><dir name="template"><dir name="respondranalytics"><file name="respondr.phtml" hash="ed8662e33db2d7c4c5a9adae72a6b994"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RespondrMage_RespondrAnalytics.xml" hash="9dd32f4b236640c74d1f08f5cb8e344d"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="RespondrMage_RespondrAnalytics.csv" hash="788bc282a1e82ff83d93a70297435376"/></dir><dir name="en_US"><file name="RespondrMage_RespondrAnalytics.csv" hash="464c1c6e0ad748dadc01bf0a1e336287"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Respondr_Ecommerce</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="@license http://www.gnu.org/licenses/gpl-3.0.html">GPL v3</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Advanced ecommerce marketing automation for Magento retailers.</summary>
10
  <description>Increase your online revenue with automated email, mobile, and social messaging driven by your web analytics. Respondr makes it easy to re-engage your customers and bring them back to your store. Creating and managing abandoned cart, product recommendation, and cross-sell email marketing has never been easier. You can also send coupons and promotions via SMS/MMS, Facebook and more!</description>
11
+ <notes>- Improvement to the way we query for optin status</notes>
12
  <authors><author><name>Leroy Ware</name><user>LeroyWare</user><email>leroy@respondr.io</email></author><author><name>Adrian Speyer</name><user>AdrianSpeyer</user><email>adriansprojects@gmail.com</email></author></authors>
13
+ <date>2014-09-03</date>
14
+ <time>21:54:04</time>
15
+ <contents><target name="magecommunity"><dir name="RespondrMage"><dir name="RespondrAnalytics"><dir name="Block"><file name="Respondr.php" hash="c4a454fc203dd779d46618132b431087"/></dir><dir name="Helper"><file name="Data.php" hash="9ddf39026d725f7ee03b577e7981b5c3"/></dir><dir name="Model"><file name="Observer.php" hash="7301ca92b1762223cf8228439fa8468e"/></dir><dir name="controllers"><file name="IndexController.php" hash="292571ac2e24956993fb681cdd1d99a2"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b28f4ddc5e0851cff79bdc1624e1192c"/><file name="config.xml" hash="ba0e13559f0515126ea5b169e6fa6ab2"/><file name="system.xml" hash="3d57e604c7b9c2eb4b11b82229531869"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="respondranalytics.xml" hash="27dc170600cb1d71cdcb7bacb6455230"/></dir><dir name="template"><dir name="respondranalytics"><file name="respondr.phtml" hash="ed8662e33db2d7c4c5a9adae72a6b994"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RespondrMage_RespondrAnalytics.xml" hash="9dd32f4b236640c74d1f08f5cb8e344d"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="RespondrMage_RespondrAnalytics.csv" hash="788bc282a1e82ff83d93a70297435376"/></dir><dir name="en_US"><file name="RespondrMage_RespondrAnalytics.csv" hash="464c1c6e0ad748dadc01bf0a1e336287"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>