MailUp - Version 0.2.1

Version Notes

Bug fixing

Download this release

Release Info

Developer Magento Core Team
Extension MailUp
Version 0.2.1
Comparing to
See all releases


Code changes from version 0.2.0 to 0.2.1

app/code/local/SevenLike/MailUp/Model/Cron.php CHANGED
@@ -5,19 +5,17 @@ class SevenLike_MailUp_Model_Cron {
5
 
6
  public function run()
7
  {
8
- echo 'lanciato';
9
  if (Mage::getStoreConfig('newsletter/mailup/enable_cron_export') == 1):
10
- Mage::log('Cron partito', null, 'danieleCron.log');
11
 
12
  $MailUpWsImport = Mage::getModel('mailup/ws');
13
  $wsImport = new MailUpWsImport();
14
 
15
  $customersFiltered = self::getCustomersCron();
16
 
17
- Mage::log('Cron terminato', null, 'danieleCron.log');
18
  endif;
19
- Mage::log('Scrivo comunque', null, 'danieleCron.log');
20
-
21
  }
22
 
23
  public function getCustomersCron()
@@ -97,7 +95,8 @@ class SevenLike_MailUp_Model_Cron {
97
  foreach ($items as $item):
98
  $productIds[] = $item->getProductId();
99
  $product = Mage::getModel('catalog/product')->load($item->getProductId());
100
- $categoryIds[] = implode(",", $product->getCategoryIds());
 
101
  endforeach;
102
 
103
  $toSend[$i]['productIds'] = implode(",", $productIds);
@@ -106,6 +105,8 @@ class SevenLike_MailUp_Model_Cron {
106
  $i++;
107
  endif;
108
 
 
 
109
  endforeach;
110
 
111
  $subscriberCollection = Mage::getModel('newsletter/subscriber')->getCollection()->useOnlySubscribed()->addFieldToFilter('customer_id', 0);
5
 
6
  public function run()
7
  {
8
+ //echo 'lanciato';
9
  if (Mage::getStoreConfig('newsletter/mailup/enable_cron_export') == 1):
10
+ //Mage::log('Cron partito', null, 'danieleCron.log');
11
 
12
  $MailUpWsImport = Mage::getModel('mailup/ws');
13
  $wsImport = new MailUpWsImport();
14
 
15
  $customersFiltered = self::getCustomersCron();
16
 
17
+ //Mage::log('Cron terminato', null, 'danieleCron.log');
18
  endif;
 
 
19
  }
20
 
21
  public function getCustomersCron()
95
  foreach ($items as $item):
96
  $productIds[] = $item->getProductId();
97
  $product = Mage::getModel('catalog/product')->load($item->getProductId());
98
+ if ($product->getCategoryIds())
99
+ $categoryIds[] = implode(",", $product->getCategoryIds());
100
  endforeach;
101
 
102
  $toSend[$i]['productIds'] = implode(",", $productIds);
105
  $i++;
106
  endif;
107
 
108
+ //unsetto la variabile
109
+ $customer->setData(array());
110
  endforeach;
111
 
112
  $subscriberCollection = Mage::getModel('newsletter/subscriber')->getCollection()->useOnlySubscribed()->addFieldToFilter('customer_id', 0);
app/code/local/SevenLike/MailUp/Model/Ws.php CHANGED
@@ -185,6 +185,8 @@ class MailUpWsImport {
185
  else
186
  $tempNoPurchased[] = $result[$count];
187
 
 
 
188
  $count++;
189
  }
190
 
@@ -232,6 +234,9 @@ class MailUpWsImport {
232
  if ($purchasedProduct == 1)
233
  $tempProduct[] = $result[$count];
234
 
 
 
 
235
  $count++;
236
  }
237
 
@@ -275,6 +280,9 @@ class MailUpWsImport {
275
  if ($purchasedCategory == 1)
276
  $tempCategory[] = $result[$count];
277
 
 
 
 
278
  $count++;
279
  }
280
 
@@ -320,6 +328,10 @@ class MailUpWsImport {
320
 
321
  if ($countryId == $request->getRequest()->getParam('mailupCountry'))
322
  $tempCountry[] = $customer;
 
 
 
 
323
  }
324
 
325
  $customersFiltered = $tempCountry;
@@ -343,6 +355,9 @@ class MailUpWsImport {
343
 
344
  if ($postCode == $request->getRequest()->getParam('mailupPostCode'))
345
  $tempPostCode[] = $customer;
 
 
 
346
  }
347
 
348
  $customersFiltered = $tempPostCode;
@@ -419,6 +434,9 @@ class MailUpWsImport {
419
  $tempTotal[] = $result[$count];
420
 
421
  $count++;
 
 
 
422
  }
423
 
424
  $customersFiltered = $tempTotal;
@@ -466,6 +484,9 @@ class MailUpWsImport {
466
  if ($createdAt <= $filterEnd)
467
  $orderedDate = 1;
468
  }
 
 
 
469
  }
470
 
471
  if ($orderedDate == 1)
185
  else
186
  $tempNoPurchased[] = $result[$count];
187
 
188
+ //unsetto la variabile
189
+ $orders->unsetData();
190
  $count++;
191
  }
192
 
234
  if ($purchasedProduct == 1)
235
  $tempProduct[] = $result[$count];
236
 
237
+ //unsetto la variabile
238
+ $orders->unsetData();
239
+
240
  $count++;
241
  }
242
 
280
  if ($purchasedCategory == 1)
281
  $tempCategory[] = $result[$count];
282
 
283
+ //unsetto la variabile
284
+ $orders->unsetData();
285
+
286
  $count++;
287
  }
288
 
328
 
329
  if ($countryId == $request->getRequest()->getParam('mailupCountry'))
330
  $tempCountry[] = $customer;
331
+
332
+ //unsetto la variabile
333
+ $customerItem->unsetData();
334
+
335
  }
336
 
337
  $customersFiltered = $tempCountry;
355
 
356
  if ($postCode == $request->getRequest()->getParam('mailupPostCode'))
357
  $tempPostCode[] = $customer;
358
+
359
+ //unsetto la variabile
360
+ $customerItem->unsetData();
361
  }
362
 
363
  $customersFiltered = $tempPostCode;
434
  $tempTotal[] = $result[$count];
435
 
436
  $count++;
437
+
438
+ //unsetto la variabile
439
+ $orders->unsetData();
440
  }
441
 
442
  $customersFiltered = $tempTotal;
484
  if ($createdAt <= $filterEnd)
485
  $orderedDate = 1;
486
  }
487
+
488
+ //unsetto la variabile
489
+ $orders->unsetData();
490
  }
491
 
492
  if ($orderedDate == 1)
app/code/local/SevenLike/MailUp/etc/config.xml CHANGED
@@ -25,7 +25,7 @@
25
 
26
  <modules>
27
  <SevenLike_MailUp>
28
- <version>0.2.0</version>
29
  </SevenLike_MailUp>
30
  </modules>
31
 
@@ -137,7 +137,7 @@
137
  <jobs>
138
  <sevenlike_mailup>
139
  <schedule>
140
- <cron_expr>18 * * * *</cron_expr>
141
  </schedule>
142
  <run>
143
  <model>mailup/Cron::run</model>
25
 
26
  <modules>
27
  <SevenLike_MailUp>
28
+ <version>0.2.1</version>
29
  </SevenLike_MailUp>
30
  </modules>
31
 
137
  <jobs>
138
  <sevenlike_mailup>
139
  <schedule>
140
+ <cron_expr>* 3 * * *</cron_expr>
141
  </schedule>
142
  <run>
143
  <model>mailup/Cron::run</model>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MailUp</name>
4
- <version>0.2.0</version>
5
  <stability>stable</stability>
6
  <license>AFL</license>
7
  <channel>community</channel>
@@ -38,11 +38,11 @@ By installing this Magento plugin you can import contacts registered in your eCo
38
 
39
 
40
  Professionally manage newsletters and e-mail marketing campaigns with MailUp, a robust, hosted service that's been fully integrated with Magento. MailUp is a subscription service, and the price is&#xA0;per month. You can cancel at any time, and there is an initial, 30-day free trial&lt;/description&gt;</description>
41
- <notes>New advanced feature: Cron - CSV export subscribers</notes>
42
  <authors><author><name>Sevenlike</name><user>auto-converted</user><email>moduli-magento@sevenlike.com</email></author></authors>
43
- <date>2011-07-15</date>
44
- <time>10:43:20</time>
45
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mailup.xml" hash="eda776bc6cd233c52ef06f2046969665"/></dir><dir name="template"><dir name="sevenlike"><dir name="mailup"><file name="confirm.phtml" hash="e5bc6540c9de5657852cbc116f69f37e"/><file name="filter.phtml" hash="9dcca8fc30629cc6d8bc3aefbd6920a6"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="sevenlike"><dir name="mailup"><dir name="images"><file name="titoli.png" hash="95a7996cd77d3413fd048018095aec6e"/></dir><file name="mailup.css" hash="4f935afe2e7b1c9de7c47795bca1f206"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="SevenLike_MailUp.csv" hash="e870074bec24801c911e62e4e70b61e9"/></dir><dir name="it_IT"><file name="SevenLike_MailUp.csv" hash="dd3bc84f1c4273b6683a640027aa78d9"/></dir></target><target name="mageetc"><dir name="modules"><file name="SevenLike_MailUp.xml" hash="8377b55193e7524ca9572ed4dc2dca62"/></dir></target><target name="magelocal"><dir name="SevenLike"><dir name="MailUp"><dir name="controllers"><dir name="Adminhtml"><file name="FilterController.php" hash="fc75d411d37752139ad111e7595c35c9"/></dir></dir><dir name="etc"><file name="config.xml" hash="7120dbe8d7785bca3cd300eb66432def"/><file name="system.xml" hash="27b5a26b450b8bdd8b4b46900f38af45"/></dir><dir name="Helper"><file name="Data.php" hash="15b30e8e02a50054be62bb6ee2458ac5"/></dir><dir name="Model"><dir name="Mysql14"><dir name="MailUp"><file name="Collection.php" hash="1435c91e677f7b668079373599aae3eb"/></dir><file name="MailUp.php" hash="4e6e23f0eccdfe35776d1e8eab68692a"/></dir><file name="Cron.php" hash="2936b67c5baafa2d9d8c8ea8d29617f1"/><file name="Lists.php" hash="1a4c1bf8ca0135bfe48e8243b7c57070"/><file name="MailUp.php" hash="2829fb8a8ad6317ce5b2a28a2fe0149d"/><file name="Ws.php" hash="66661d96961cb03e5514d194e2ec125c"/><file name="Wssend.php" hash="2d9d936bd9dad015e4ce143c1e7653de"/></dir><dir name="sql"><dir name="mailup_setup"><file name="mysql4-install-0.1.0.php" hash="022c3ba8a7d802aba927353096c826fc"/></dir></dir></dir></dir></target></contents>
46
  <compatible/>
47
  <dependencies/>
48
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MailUp</name>
4
+ <version>0.2.1</version>
5
  <stability>stable</stability>
6
  <license>AFL</license>
7
  <channel>community</channel>
38
 
39
 
40
  Professionally manage newsletters and e-mail marketing campaigns with MailUp, a robust, hosted service that's been fully integrated with Magento. MailUp is a subscription service, and the price is&#xA0;per month. You can cancel at any time, and there is an initial, 30-day free trial&lt;/description&gt;</description>
41
+ <notes>Bug fixing</notes>
42
  <authors><author><name>Sevenlike</name><user>auto-converted</user><email>moduli-magento@sevenlike.com</email></author></authors>
43
+ <date>2011-07-29</date>
44
+ <time>13:42:09</time>
45
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mailup.xml" hash="eda776bc6cd233c52ef06f2046969665"/></dir><dir name="template"><dir name="sevenlike"><dir name="mailup"><file name="confirm.phtml" hash="e5bc6540c9de5657852cbc116f69f37e"/><file name="filter.phtml" hash="9dcca8fc30629cc6d8bc3aefbd6920a6"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="sevenlike"><dir name="mailup"><dir name="images"><file name="titoli.png" hash="95a7996cd77d3413fd048018095aec6e"/></dir><file name="mailup.css" hash="4f935afe2e7b1c9de7c47795bca1f206"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="SevenLike_MailUp.csv" hash="e870074bec24801c911e62e4e70b61e9"/></dir><dir name="it_IT"><file name="SevenLike_MailUp.csv" hash="dd3bc84f1c4273b6683a640027aa78d9"/></dir></target><target name="mageetc"><dir name="modules"><file name="SevenLike_MailUp.xml" hash="8377b55193e7524ca9572ed4dc2dca62"/></dir></target><target name="magelocal"><dir name="SevenLike"><dir name="MailUp"><dir name="controllers"><dir name="Adminhtml"><file name="FilterController.php" hash="fc75d411d37752139ad111e7595c35c9"/></dir></dir><dir name="etc"><file name="config.xml" hash="1f2dd623f0486599874b9d54ed09d857"/><file name="system.xml" hash="27b5a26b450b8bdd8b4b46900f38af45"/></dir><dir name="Helper"><file name="Data.php" hash="15b30e8e02a50054be62bb6ee2458ac5"/></dir><dir name="Model"><dir name="Mysql14"><dir name="MailUp"><file name="Collection.php" hash="1435c91e677f7b668079373599aae3eb"/></dir><file name="MailUp.php" hash="4e6e23f0eccdfe35776d1e8eab68692a"/></dir><file name="Cron.php" hash="ca450afd264de7a840d4f2c8f4916697"/><file name="Lists.php" hash="1a4c1bf8ca0135bfe48e8243b7c57070"/><file name="MailUp.php" hash="2829fb8a8ad6317ce5b2a28a2fe0149d"/><file name="Ws.php" hash="05d1bf820df3cefa8beec727448dd070"/><file name="Wssend.php" hash="2d9d936bd9dad015e4ce143c1e7653de"/></dir><dir name="sql"><dir name="mailup_setup"><file name="mysql4-install-0.1.0.php" hash="022c3ba8a7d802aba927353096c826fc"/></dir></dir></dir></dir></target></contents>
46
  <compatible/>
47
  <dependencies/>
48
  </package>