Version Notes
- Fix a bug where the email would be sent multiple times on a multi stores installation
Download this release
Release Info
Developer | Digital Pianism |
Extension | DigitalPianism_Abandonedcarts |
Version | 0.2.1 |
Comparing to | |
See all releases |
Code changes from version 0.2.0 to 0.2.1
app/code/community/DigitalPianism/Abandonedcarts/Model/Observer.php
CHANGED
@@ -308,7 +308,7 @@ class DigitalPianism_Abandonedcarts_Model_Observer extends Mage_Core_Model_Abstr
|
|
308 |
else
|
309 |
{
|
310 |
Mage::helper('abandonedcarts')->log(__METHOD__ . "sendAbandonedCartsEmail: " . $email);
|
311 |
-
|
312 |
// Send the email
|
313 |
Mage::getModel('core/email_template')
|
314 |
->sendTransactional(
|
@@ -319,13 +319,13 @@ class DigitalPianism_Abandonedcarts_Model_Observer extends Mage_Core_Model_Abstr
|
|
319 |
$recipient['emailTemplateVariables'],
|
320 |
null);
|
321 |
}
|
322 |
-
|
323 |
// Load the quote
|
324 |
$quote = Mage::getModel('sales/quote')->load($recipient['cartId']);
|
325 |
|
326 |
// We change the notification attribute
|
327 |
$quote->setAbandonedNotified(1);
|
328 |
-
|
329 |
// Save only if dryrun is false or if the test email is set and found
|
330 |
if (!$dryrun || (isset($testemail) && $email == $testemail))
|
331 |
{
|
@@ -504,12 +504,12 @@ class DigitalPianism_Abandonedcarts_Model_Observer extends Mage_Core_Model_Abstr
|
|
504 |
// Call iterator walk method with collection query string and callback method as parameters
|
505 |
// Has to be used to handle massive collection instead of foreach
|
506 |
Mage::getSingleton('core/resource_iterator')->walk($collection->getSelect(), array(array($this, 'generateSaleRecipients')));
|
507 |
-
|
508 |
-
// Send the emails
|
509 |
-
$this->sendSaleEmails($dryrun,$testemail);
|
510 |
}
|
511 |
}
|
512 |
}
|
|
|
|
|
|
|
513 |
}
|
514 |
}
|
515 |
catch (Exception $e)
|
@@ -666,12 +666,12 @@ class DigitalPianism_Abandonedcarts_Model_Observer extends Mage_Core_Model_Abstr
|
|
666 |
// Call iterator walk method with collection query string and callback method as parameters
|
667 |
// Has to be used to handle massive collection instead of foreach
|
668 |
Mage::getSingleton('core/resource_iterator')->walk($collection->getSelect(), array(array($this, 'generateRecipients')));
|
669 |
-
|
670 |
-
// Send the emails
|
671 |
-
$this->sendEmails($dryrun,$testemail);
|
672 |
}
|
673 |
}
|
674 |
}
|
|
|
|
|
|
|
675 |
}
|
676 |
}
|
677 |
catch (Exception $e)
|
308 |
else
|
309 |
{
|
310 |
Mage::helper('abandonedcarts')->log(__METHOD__ . "sendAbandonedCartsEmail: " . $email);
|
311 |
+
|
312 |
// Send the email
|
313 |
Mage::getModel('core/email_template')
|
314 |
->sendTransactional(
|
319 |
$recipient['emailTemplateVariables'],
|
320 |
null);
|
321 |
}
|
322 |
+
|
323 |
// Load the quote
|
324 |
$quote = Mage::getModel('sales/quote')->load($recipient['cartId']);
|
325 |
|
326 |
// We change the notification attribute
|
327 |
$quote->setAbandonedNotified(1);
|
328 |
+
|
329 |
// Save only if dryrun is false or if the test email is set and found
|
330 |
if (!$dryrun || (isset($testemail) && $email == $testemail))
|
331 |
{
|
504 |
// Call iterator walk method with collection query string and callback method as parameters
|
505 |
// Has to be used to handle massive collection instead of foreach
|
506 |
Mage::getSingleton('core/resource_iterator')->walk($collection->getSelect(), array(array($this, 'generateSaleRecipients')));
|
|
|
|
|
|
|
507 |
}
|
508 |
}
|
509 |
}
|
510 |
+
|
511 |
+
// Send the emails
|
512 |
+
$this->sendSaleEmails($dryrun,$testemail);
|
513 |
}
|
514 |
}
|
515 |
catch (Exception $e)
|
666 |
// Call iterator walk method with collection query string and callback method as parameters
|
667 |
// Has to be used to handle massive collection instead of foreach
|
668 |
Mage::getSingleton('core/resource_iterator')->walk($collection->getSelect(), array(array($this, 'generateRecipients')));
|
|
|
|
|
|
|
669 |
}
|
670 |
}
|
671 |
}
|
672 |
+
|
673 |
+
// Send the emails
|
674 |
+
$this->sendEmails($dryrun,$testemail);
|
675 |
}
|
676 |
}
|
677 |
catch (Exception $e)
|
app/code/community/DigitalPianism/Abandonedcarts/etc/config.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
<modules>
|
6 |
<DigitalPianism_Abandonedcarts>
|
7 |
-
<version>0.2.
|
8 |
</DigitalPianism_Abandonedcarts>
|
9 |
</modules>
|
10 |
|
4 |
|
5 |
<modules>
|
6 |
<DigitalPianism_Abandonedcarts>
|
7 |
+
<version>0.2.1</version>
|
8 |
</DigitalPianism_Abandonedcarts>
|
9 |
</modules>
|
10 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DigitalPianism_Abandonedcarts</name>
|
4 |
-
<version>0.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -95,11 +95,11 @@ Save the configuration.
|
|
95 |

|
96 |
<p>To manually trigger the notification system, please access System &gt; Configuration &gt; Digital Pianism &gt; Abandoned carts email and click on the "Send" button</p>
|
97 |
<p>Please note that this functionality will send abandoned carts notification regardless the delay you provided, all possible abandoned carts emails will be sent.</p></description>
|
98 |
-
<notes>-
|
99 |
<authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
|
100 |
-
<date>2015-09-
|
101 |
-
<time>
|
102 |
-
<contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="Abandonedcarts"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="d5a6f33d47d067fc09a7b7fe8eacd287"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4eda7b865d023206a58a4178f7db81a5"/></dir><dir name="Model"><file name="Observer.php" hash="
|
103 |
<compatible/>
|
104 |
<dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
|
105 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DigitalPianism_Abandonedcarts</name>
|
4 |
+
<version>0.2.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
95 |

|
96 |
<p>To manually trigger the notification system, please access System &gt; Configuration &gt; Digital Pianism &gt; Abandoned carts email and click on the "Send" button</p>
|
97 |
<p>Please note that this functionality will send abandoned carts notification regardless the delay you provided, all possible abandoned carts emails will be sent.</p></description>
|
98 |
+
<notes>- Fix a bug where the email would be sent multiple times on a multi stores installation</notes>
|
99 |
<authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
|
100 |
+
<date>2015-09-22</date>
|
101 |
+
<time>16:02:32</time>
|
102 |
+
<contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="Abandonedcarts"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="d5a6f33d47d067fc09a7b7fe8eacd287"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4eda7b865d023206a58a4178f7db81a5"/></dir><dir name="Model"><file name="Observer.php" hash="b592de89874d6feeba72fa4106c05b3e"/><dir name="Sales"><dir name="Resource"><file name="Quote.php" hash="3b2f9f24a74a6ea3b6851d64bd6ae5ba"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AbandonedcartsController.php" hash="ca68e31a5e41f036451a409a7eeaaa16"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="8ddca513c0ed7e034c476f3e026ceda8"/><file name="config.xml" hash="e273a27ecf72cd5101e90df871fe17f7"/><file name="system.xml" hash="d54fa8ad3607a7f54809f967ebff6ce6"/></dir><dir name="sql"><dir name="abandonedcarts_setup"><file name="install-0.0.1.php" hash="851338e4a710b5d94fead688b065f4b5"/><file name="upgrade-0.0.1-0.0.2.php" hash="0227c009e49b97bcf3f34f84c49f0927"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DigitalPianism_Abandonedcarts.xml" hash="8a7657855486c68d548db4ba48e083d2"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="digitalpianism"><dir name="abandonedcarts"><dir name="system"><dir name="config"><file name="button.phtml" hash="8f7e673ea52cd81b616cac01b1022990"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="digitalpianism"><dir name="abandonedcarts"><file name="sales_abandonedcarts.html" hash="30565f91c47913465fd184a214c14b23"/><file name="sales_abandonedcarts_sale.html" hash="3cdee557727cb0166741062e5fdcf06f"/></dir></dir></dir></dir><file name="DigitalPianism_Abandonedcarts.csv" hash="4e17b6cae58dd1cdcd43b1113e2e09f4"/></dir><dir name="fr_FR"><file name="DigitalPianism_Abandonedcarts.csv" hash=""/></dir></target></contents>
|
103 |
<compatible/>
|
104 |
<dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
|
105 |
</package>
|