Version Notes
Updated version to 1.1.6
Download this release
Release Info
| Developer | David Webber |
| Extension | recapture |
| Version | 1.1.6 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.5 to 1.1.6
app/code/local/Recapture/Connector/Model/Observer.php
CHANGED
|
@@ -4,48 +4,48 @@ class Recapture_Connector_Model_Observer {
|
|
| 4 |
|
| 5 |
public function itemUpdate($observer){
|
| 6 |
|
|
|
|
|
|
|
| 7 |
try {
|
| 8 |
|
| 9 |
-
$
|
| 10 |
|
| 11 |
} catch (Exception $e){
|
| 12 |
|
| 13 |
-
Mage::log($e
|
| 14 |
|
| 15 |
}
|
| 16 |
|
| 17 |
-
return $
|
| 18 |
|
| 19 |
}
|
| 20 |
|
| 21 |
public function quoteUpdate($observer){
|
| 22 |
|
|
|
|
|
|
|
| 23 |
try {
|
| 24 |
|
| 25 |
-
$
|
| 26 |
|
| 27 |
} catch (Exception $e){
|
| 28 |
|
| 29 |
-
Mage::log($e
|
| 30 |
|
| 31 |
}
|
| 32 |
|
| 33 |
-
return $
|
| 34 |
|
| 35 |
}
|
| 36 |
|
| 37 |
protected function _updateQuote(Mage_Sales_Model_Quote $quote){
|
| 38 |
|
| 39 |
-
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 40 |
-
|
| 41 |
if (!$quote->getId()) return;
|
| 42 |
|
| 43 |
//sales_quote_save_before gets called like 5 times on some page loads, we don't want to do 5 updates per page load
|
| 44 |
if (Mage::registry('recapture_has_posted')) return;
|
| 45 |
|
| 46 |
-
Mage::register('recapture_has_posted', true);
|
| 47 |
-
|
| 48 |
-
$quote->collectTotals();
|
| 49 |
|
| 50 |
$mediaConfig = Mage::getModel('catalog/product_media_config');
|
| 51 |
$storeId = Mage::app()->getStore();
|
|
@@ -155,9 +155,9 @@ class Recapture_Connector_Model_Observer {
|
|
| 155 |
|
| 156 |
public function quoteDelete($observer){
|
| 157 |
|
| 158 |
-
|
| 159 |
|
| 160 |
-
|
| 161 |
|
| 162 |
$quote = $observer->getEvent()->getQuote();
|
| 163 |
|
|
@@ -169,7 +169,7 @@ class Recapture_Connector_Model_Observer {
|
|
| 169 |
|
| 170 |
} catch (Exception $e){
|
| 171 |
|
| 172 |
-
Mage::log($e
|
| 173 |
|
| 174 |
}
|
| 175 |
|
|
@@ -179,9 +179,9 @@ class Recapture_Connector_Model_Observer {
|
|
| 179 |
|
| 180 |
public function cartConversion($observer){
|
| 181 |
|
| 182 |
-
|
| 183 |
|
| 184 |
-
|
| 185 |
|
| 186 |
$order = $observer->getEvent()->getOrder();
|
| 187 |
|
|
@@ -193,7 +193,7 @@ class Recapture_Connector_Model_Observer {
|
|
| 193 |
|
| 194 |
} catch (Exception $e){
|
| 195 |
|
| 196 |
-
Mage::log($e
|
| 197 |
|
| 198 |
}
|
| 199 |
|
|
@@ -203,11 +203,11 @@ class Recapture_Connector_Model_Observer {
|
|
| 203 |
|
| 204 |
public function newsletterSubscriber($observer){
|
| 205 |
|
|
|
|
|
|
|
|
|
|
| 206 |
try {
|
| 207 |
|
| 208 |
-
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 209 |
-
if (!Mage::helper('recapture')->shouldCaptureSubscriber()) return $this;
|
| 210 |
-
|
| 211 |
$subscriber = $observer->getEvent()->getSubscriber();
|
| 212 |
$email = $subscriber->getSubscriberEmail();
|
| 213 |
|
|
@@ -220,7 +220,7 @@ class Recapture_Connector_Model_Observer {
|
|
| 220 |
|
| 221 |
} catch (Exception $e){
|
| 222 |
|
| 223 |
-
Mage::log($e
|
| 224 |
|
| 225 |
}
|
| 226 |
|
| 4 |
|
| 5 |
public function itemUpdate($observer){
|
| 6 |
|
| 7 |
+
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 8 |
+
|
| 9 |
try {
|
| 10 |
|
| 11 |
+
$this->_updateQuote($observer->getEvent()->getQuoteItem()->getQuote());
|
| 12 |
|
| 13 |
} catch (Exception $e){
|
| 14 |
|
| 15 |
+
Mage::log($e->getMessage());
|
| 16 |
|
| 17 |
}
|
| 18 |
|
| 19 |
+
return $this;
|
| 20 |
|
| 21 |
}
|
| 22 |
|
| 23 |
public function quoteUpdate($observer){
|
| 24 |
|
| 25 |
+
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 26 |
+
|
| 27 |
try {
|
| 28 |
|
| 29 |
+
$this->_updateQuote($observer->getEvent()->getQuote());
|
| 30 |
|
| 31 |
} catch (Exception $e){
|
| 32 |
|
| 33 |
+
Mage::log($e->getMessage());
|
| 34 |
|
| 35 |
}
|
| 36 |
|
| 37 |
+
return $this;
|
| 38 |
|
| 39 |
}
|
| 40 |
|
| 41 |
protected function _updateQuote(Mage_Sales_Model_Quote $quote){
|
| 42 |
|
|
|
|
|
|
|
| 43 |
if (!$quote->getId()) return;
|
| 44 |
|
| 45 |
//sales_quote_save_before gets called like 5 times on some page loads, we don't want to do 5 updates per page load
|
| 46 |
if (Mage::registry('recapture_has_posted')) return;
|
| 47 |
|
| 48 |
+
Mage::register('recapture_has_posted', true, true);
|
|
|
|
|
|
|
| 49 |
|
| 50 |
$mediaConfig = Mage::getModel('catalog/product_media_config');
|
| 51 |
$storeId = Mage::app()->getStore();
|
| 155 |
|
| 156 |
public function quoteDelete($observer){
|
| 157 |
|
| 158 |
+
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 159 |
|
| 160 |
+
try {
|
| 161 |
|
| 162 |
$quote = $observer->getEvent()->getQuote();
|
| 163 |
|
| 169 |
|
| 170 |
} catch (Exception $e){
|
| 171 |
|
| 172 |
+
Mage::log($e->getMessage());
|
| 173 |
|
| 174 |
}
|
| 175 |
|
| 179 |
|
| 180 |
public function cartConversion($observer){
|
| 181 |
|
| 182 |
+
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 183 |
|
| 184 |
+
try {
|
| 185 |
|
| 186 |
$order = $observer->getEvent()->getOrder();
|
| 187 |
|
| 193 |
|
| 194 |
} catch (Exception $e){
|
| 195 |
|
| 196 |
+
Mage::log($e->getMessage());
|
| 197 |
|
| 198 |
}
|
| 199 |
|
| 203 |
|
| 204 |
public function newsletterSubscriber($observer){
|
| 205 |
|
| 206 |
+
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 207 |
+
if (!Mage::helper('recapture')->shouldCaptureSubscriber()) return $this;
|
| 208 |
+
|
| 209 |
try {
|
| 210 |
|
|
|
|
|
|
|
|
|
|
| 211 |
$subscriber = $observer->getEvent()->getSubscriber();
|
| 212 |
$email = $subscriber->getSubscriberEmail();
|
| 213 |
|
| 220 |
|
| 221 |
} catch (Exception $e){
|
| 222 |
|
| 223 |
+
Mage::log($e->getMessage());
|
| 224 |
|
| 225 |
}
|
| 226 |
|
app/code/local/Recapture/Connector/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Recapture_Connector>
|
| 5 |
-
<version>1.1.
|
| 6 |
</Recapture_Connector>
|
| 7 |
</modules>
|
| 8 |
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Recapture_Connector>
|
| 5 |
+
<version>1.1.6</version>
|
| 6 |
</Recapture_Connector>
|
| 7 |
</modules>
|
| 8 |
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>recapture</name>
|
| 4 |
-
<version>1.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Free analytics dashboard for abandoned carts. Set up automated cart recovery email campaigns in minutes.</summary>
|
| 10 |
<description>Free analytics dashboard for abandoned carts. Set up automated cart recovery email campaigns in minutes.</description>
|
| 11 |
-
<notes>Updated version to 1.1.
|
| 12 |
<authors><author><name>David Webber</name><user>Recapture</user><email>hello@recapture.io</email></author></authors>
|
| 13 |
-
<date>2015-11-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magelocal"><dir name="Recapture"><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Authenticate.php" hash="3452dbf00cdf4a87199eae62873a5706"/><file name="Key.php" hash="adf516740c9e1a392fd7f81c4fb1927e"/><file name="Status.php" hash="f19858c8bb476b05e7e86cbdce403323"/></dir></dir></dir><file name="Client.php" hash="91f04f33fc71e6bbe006d15a49bb6bb2"/></dir><dir name="controllers"><file name="CartController.php" hash="438f39a0c47b852e4e82c9b0505f3d80"/><file name="IndexController.php" hash="3b1bb4f397617f696ac89e688c4dc1ae"/><dir name="Recaptureadmin"><file name="AuthenticateController.php" hash="f49e6525739325f65da0b30e40d4ef5c"/></dir><file name="RecaptureController.php" hash="987215ca928935afc9d4f9ce4fdf670c"/></dir><dir name="etc"><file name="config.xml" hash="
|
| 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>recapture</name>
|
| 4 |
+
<version>1.1.6</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Free analytics dashboard for abandoned carts. Set up automated cart recovery email campaigns in minutes.</summary>
|
| 10 |
<description>Free analytics dashboard for abandoned carts. Set up automated cart recovery email campaigns in minutes.</description>
|
| 11 |
+
<notes>Updated version to 1.1.6</notes>
|
| 12 |
<authors><author><name>David Webber</name><user>Recapture</user><email>hello@recapture.io</email></author></authors>
|
| 13 |
+
<date>2015-11-24</date>
|
| 14 |
+
<time>17:27:56</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Recapture"><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Authenticate.php" hash="3452dbf00cdf4a87199eae62873a5706"/><file name="Key.php" hash="adf516740c9e1a392fd7f81c4fb1927e"/><file name="Status.php" hash="f19858c8bb476b05e7e86cbdce403323"/></dir></dir></dir><file name="Client.php" hash="91f04f33fc71e6bbe006d15a49bb6bb2"/></dir><dir name="controllers"><file name="CartController.php" hash="438f39a0c47b852e4e82c9b0505f3d80"/><file name="IndexController.php" hash="3b1bb4f397617f696ac89e688c4dc1ae"/><dir name="Recaptureadmin"><file name="AuthenticateController.php" hash="f49e6525739325f65da0b30e40d4ef5c"/></dir><file name="RecaptureController.php" hash="987215ca928935afc9d4f9ce4fdf670c"/></dir><dir name="etc"><file name="config.xml" hash="939fa52df4dd2590229082892a6742f6"/><file name="system.xml" hash="f52ac61123fb7f1508912ffa376ef2e2"/></dir><dir name="Helper"><file name="Data.php" hash="3779ea73875887b10e8ceee0782c8648"/><file name="Transport.php" hash="7bdbdbf7c3cee4841fe7ce42371f5951"/></dir><dir name="Model"><file name="Landing.php" hash="5a9ee53115f4caa835e3e381fd9ba937"/><file name="Observer.php" hash="02d5063ff31f5325f50b7b9fcbc25450"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Recapture_Connector.xml" hash="e8fea9dc4237af6b34219c7f52bd02d8"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="recapture.xml" hash="5a91899f12df162c706b17db79fb7f72"/></dir><dir name="template"><dir name="recapture"><file name="client.phtml" hash="50b49c48d393cf2566ab42b561bcf277"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
