Mage_Laposta_Connect - Version 1.0.19

Version Notes

- Import non-customer newsletter subscribers

Download this release

Release Info

Developer Merten van Gerven
Extension Mage_Laposta_Connect
Version 1.0.19
Comparing to
See all releases


Code changes from version 1.0.18 to 1.0.19

app/code/community/Laposta/Connect/Helper/Subscribe.php CHANGED
@@ -19,8 +19,15 @@ class Laposta_Connect_Helper_Subscribe extends Mage_Core_Helper_Abstract
19
  $customerId = $nativeSubscriber->getCustomerId();
20
  $nativeSubscriberId = $nativeSubscriber->getId();
21
  $nativeSubscriberEmail = $nativeSubscriber->getEmail();
 
 
 
22
 
23
- if (isset($customerIdList[$customerId]) || isset($subscriberIdList[$nativeSubscriberId]) || isset($emailList[$nativeSubscriberEmail])) {
 
 
 
 
24
  continue;
25
  }
26
 
19
  $customerId = $nativeSubscriber->getCustomerId();
20
  $nativeSubscriberId = $nativeSubscriber->getId();
21
  $nativeSubscriberEmail = $nativeSubscriber->getEmail();
22
+ $exists = ($customerId != "0" && isset($customerIdList[$customerId])) ||
23
+ isset($subscriberIdList[$nativeSubscriberId]) ||
24
+ isset($emailList[$nativeSubscriberEmail]);
25
 
26
+ $customerIdList[$customerId] = 1;
27
+ $subscriberIdList[$nativeSubscriberId] = 1;
28
+ $emailList[$nativeSubscriberEmail] = 1;
29
+
30
+ if ($exists) {
31
  continue;
32
  }
33
 
app/code/community/Laposta/Connect/Model/Observer.php CHANGED
@@ -222,7 +222,7 @@ class Laposta_Connect_Model_Observer
222
  protected function handleSaveListConfig()
223
  {
224
  $listName = Mage::helper('lapostaconnect')->config('list_name');
225
- $subscribeCustomers = false;
226
 
227
  /** @var $lists Laposta_Connect_Model_Mysql4_List_Collection */
228
  $lists = Mage::getModel('lapostaconnect/list')->getCollection();
222
  protected function handleSaveListConfig()
223
  {
224
  $listName = Mage::helper('lapostaconnect')->config('list_name');
225
+ $subscribeCustomers = true;
226
 
227
  /** @var $lists Laposta_Connect_Model_Mysql4_List_Collection */
228
  $lists = Mage::getModel('lapostaconnect/list')->getCollection();
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mage_Laposta_Connect</name>
4
- <version>1.0.18</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -24,11 +24,11 @@
24
  &#xD;
25
  &lt;h2&gt;Questions&lt;/h2&gt;&#xD;
26
  &lt;p&gt;Please see the FAQ section for questions.&lt;/p&gt;</description>
27
- <notes>- Prevent duplicate email address subscriptions</notes>
28
  <authors><author><name>Merten van Gerven</name><user>mertenvg</user><email>merten@codeblanche.com</email></author></authors>
29
- <date>2015-11-26</date>
30
- <time>18:02:10</time>
31
- <contents><target name="magecommunity"><dir name="Laposta"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Mapfields.php" hash="2c88b8a08121c09ba5748f631205a282"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Customer.php" hash="ef0a5dff85fd77de92a0fefe06fddc60"/><file name="Data.php" hash="8f9e28d0f28f9375385432d227ec1d06"/><file name="Fields.php" hash="51bc0aa26167219b038c04b3babb19af"/><file name="Laposta.php" hash="cdb9424258c1e80930d99f9f1ba31aee"/><file name="Subscribe.php" hash="168ed4a64c29a574133ffcb22ce8e51e"/><file name="Sync.php" hash="9ba91bd86edc85b5d75cc704cb9fec69"/></dir><dir name="Model"><file name="Cron.php" hash="270a2289a1de1bc678dfc4e6264c095b"/><file name="Field.php" hash="42e1857bdb7d90b31be189e2921ac8fd"/><file name="List.php" hash="99f590a5e5ea3b1a14869c641f49eaed"/><dir name="Mysql4"><dir name="Field"><file name="Collection.php" hash="f8133202231937b1ec14d8cdc39903fe"/></dir><file name="Field.php" hash="c49743d6acd1d4ce2b69aadf22838839"/><dir name="List"><file name="Collection.php" hash="fcc556452fff91bb3e9f933c68fff630"/></dir><file name="List.php" hash="6fef1b36f5d3a5560f83bafe205be614"/><dir name="Subscriber"><file name="Collection.php" hash="05db928eb656f132e4fa16ac740ce3c5"/></dir><file name="Subscriber.php" hash="9f73d39e97d4a19f8d8ad3c19f83a699"/></dir><file name="Observer.php" hash="3d58c2213ac929f41b4c4756c4a7f7a8"/><file name="Subscriber.php" hash="cba5176e53a7dcab9b9014190f13485d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LapostaController.php" hash="cc2a0d62caf63469258042e3b29616e4"/></dir><file name="IndexController.php" hash="7577e30abee9624d59901edb5cecd3e9"/><file name="SubscribeAllController.php" hash="160ac8e5229bb1003d7220116a9b06f7"/><file name="WebhookController.php" hash="0526b02b319fc31cd8c8a3e9789ba358"/></dir><dir name="etc"><file name="adminhtml.xml" hash="71f985837d4b79e3db94c529bfee1e47"/><file name="config.xml" hash="72458847e9370acc79614139a38d502d"/><file name="system.xml" hash="6ee7d5de56541573f16a2caf94dc0418"/></dir><dir name="lib"><dir name="Laposta"><dir name="Laposta"><file name="Error.php" hash="46e746b650bbb5df1ec51f4c530d5f35"/><file name="Field.php" hash="99bc22f997692ff648cb660330552a94"/><file name="List.php" hash="f3b8a716c1d9fd11828f980445dd6d5b"/><file name="Login.php" hash="dc11941e5ca3a404005730843c74e8b3"/><file name="Member.php" hash="cae2b3f6b23ee44e9246a8d33d2ddd46"/><file name="Request.php" hash="57d27e3f8165db905d36d85cf234e86e"/><file name="Resource.php" hash="c2ca77821136b798b526b5dc41659054"/><file name="Util.php" hash="d6760d2d5ddb6f4de6aff185fd432a91"/><file name="Webhook.php" hash="e06b2e711c348af1df425b7faaa5c33e"/></dir><file name="Laposta.php" hash="c99f38dcfef24df38a5a921360356381"/></dir></dir><dir name="sql"><dir name="lapostaconnect_setup"><file name="mysql4-install-1.0.0.php" hash="a1b0319b992b9effe6aa2712031e8701"/><file name="mysql4-install-1.0.12.php" hash="aafda6f1342a9e5ca30c3a87886619f8"/><file name="mysql4-upgrade-1.0.11-1.0.12.php" hash="4cb4083f5bbc27dc719bd0a816a33476"/><file name="mysql4-upgrade-1.0.7-1.0.8.php" hash="a1b0319b992b9effe6aa2712031e8701"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="lapostaconnect.xml" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Laposta_Connect.csv" hash="4f8f28790602cdd01633c0bb00f70585"/></dir></target><target name="mageetc"><dir name="modules"><file name="Laposta_Connect.xml" hash="ab7675e19ea96d39c5980bee835f0e76"/></dir></target></contents>
32
  <compatible/>
33
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
34
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mage_Laposta_Connect</name>
4
+ <version>1.0.19</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
24
  &#xD;
25
  &lt;h2&gt;Questions&lt;/h2&gt;&#xD;
26
  &lt;p&gt;Please see the FAQ section for questions.&lt;/p&gt;</description>
27
+ <notes>- Import non-customer newsletter subscribers</notes>
28
  <authors><author><name>Merten van Gerven</name><user>mertenvg</user><email>merten@codeblanche.com</email></author></authors>
29
+ <date>2015-12-07</date>
30
+ <time>01:39:14</time>
31
+ <contents><target name="magecommunity"><dir name="Laposta"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Mapfields.php" hash="2c88b8a08121c09ba5748f631205a282"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Customer.php" hash="ef0a5dff85fd77de92a0fefe06fddc60"/><file name="Data.php" hash="8f9e28d0f28f9375385432d227ec1d06"/><file name="Fields.php" hash="51bc0aa26167219b038c04b3babb19af"/><file name="Laposta.php" hash="cdb9424258c1e80930d99f9f1ba31aee"/><file name="Subscribe.php" hash="8f3366b6a032bcf158c8332115bf8705"/><file name="Sync.php" hash="9ba91bd86edc85b5d75cc704cb9fec69"/></dir><dir name="Model"><file name="Cron.php" hash="270a2289a1de1bc678dfc4e6264c095b"/><file name="Field.php" hash="42e1857bdb7d90b31be189e2921ac8fd"/><file name="List.php" hash="99f590a5e5ea3b1a14869c641f49eaed"/><dir name="Mysql4"><dir name="Field"><file name="Collection.php" hash="f8133202231937b1ec14d8cdc39903fe"/></dir><file name="Field.php" hash="c49743d6acd1d4ce2b69aadf22838839"/><dir name="List"><file name="Collection.php" hash="fcc556452fff91bb3e9f933c68fff630"/></dir><file name="List.php" hash="6fef1b36f5d3a5560f83bafe205be614"/><dir name="Subscriber"><file name="Collection.php" hash="05db928eb656f132e4fa16ac740ce3c5"/></dir><file name="Subscriber.php" hash="9f73d39e97d4a19f8d8ad3c19f83a699"/></dir><file name="Observer.php" hash="5398b1a59c4813807ac02b7cc8000a1c"/><file name="Subscriber.php" hash="cba5176e53a7dcab9b9014190f13485d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LapostaController.php" hash="cc2a0d62caf63469258042e3b29616e4"/></dir><file name="IndexController.php" hash="7577e30abee9624d59901edb5cecd3e9"/><file name="SubscribeAllController.php" hash="160ac8e5229bb1003d7220116a9b06f7"/><file name="WebhookController.php" hash="0526b02b319fc31cd8c8a3e9789ba358"/></dir><dir name="etc"><file name="adminhtml.xml" hash="71f985837d4b79e3db94c529bfee1e47"/><file name="config.xml" hash="72458847e9370acc79614139a38d502d"/><file name="system.xml" hash="6ee7d5de56541573f16a2caf94dc0418"/></dir><dir name="lib"><dir name="Laposta"><dir name="Laposta"><file name="Error.php" hash="46e746b650bbb5df1ec51f4c530d5f35"/><file name="Field.php" hash="99bc22f997692ff648cb660330552a94"/><file name="List.php" hash="f3b8a716c1d9fd11828f980445dd6d5b"/><file name="Login.php" hash="dc11941e5ca3a404005730843c74e8b3"/><file name="Member.php" hash="cae2b3f6b23ee44e9246a8d33d2ddd46"/><file name="Request.php" hash="57d27e3f8165db905d36d85cf234e86e"/><file name="Resource.php" hash="c2ca77821136b798b526b5dc41659054"/><file name="Util.php" hash="d6760d2d5ddb6f4de6aff185fd432a91"/><file name="Webhook.php" hash="e06b2e711c348af1df425b7faaa5c33e"/></dir><file name="Laposta.php" hash="c99f38dcfef24df38a5a921360356381"/></dir></dir><dir name="sql"><dir name="lapostaconnect_setup"><file name="mysql4-install-1.0.0.php" hash="a1b0319b992b9effe6aa2712031e8701"/><file name="mysql4-install-1.0.12.php" hash="aafda6f1342a9e5ca30c3a87886619f8"/><file name="mysql4-upgrade-1.0.11-1.0.12.php" hash="4cb4083f5bbc27dc719bd0a816a33476"/><file name="mysql4-upgrade-1.0.7-1.0.8.php" hash="a1b0319b992b9effe6aa2712031e8701"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="lapostaconnect.xml" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Laposta_Connect.csv" hash="4f8f28790602cdd01633c0bb00f70585"/></dir></target><target name="mageetc"><dir name="modules"><file name="Laposta_Connect.xml" hash="ab7675e19ea96d39c5980bee835f0e76"/></dir></target></contents>
32
  <compatible/>
33
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
34
  </package>