Version Notes
Updated version to 1.1.5
Download this release
Release Info
| Developer | David Webber |
| Extension | recapture |
| Version | 1.1.5 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.4 to 1.1.5
app/code/local/Recapture/Connector/Helper/Data.php
CHANGED
|
@@ -10,6 +10,12 @@ class Recapture_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
| 10 |
|
| 11 |
}
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
public function canTrackEmail(){
|
| 14 |
|
| 15 |
return Mage::getStoreConfig('recapture/abandoned_carts/track_email');
|
| 10 |
|
| 11 |
}
|
| 12 |
|
| 13 |
+
public function shouldCaptureSubscriber(){
|
| 14 |
+
|
| 15 |
+
return Mage::getStoreConfig('recapture/abandoned_carts/capture_subscriber');
|
| 16 |
+
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
public function canTrackEmail(){
|
| 20 |
|
| 21 |
return Mage::getStoreConfig('recapture/abandoned_carts/track_email');
|
app/code/local/Recapture/Connector/Model/Observer.php
CHANGED
|
@@ -4,13 +4,33 @@ class Recapture_Connector_Model_Observer {
|
|
| 4 |
|
| 5 |
public function itemUpdate($observer){
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
}
|
| 10 |
|
| 11 |
public function quoteUpdate($observer){
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
}
|
| 16 |
|
|
@@ -135,33 +155,78 @@ class Recapture_Connector_Model_Observer {
|
|
| 135 |
|
| 136 |
public function quoteDelete($observer){
|
| 137 |
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
$quote = $observer->getEvent()->getQuote();
|
| 141 |
-
|
| 142 |
-
$transportData = array(
|
| 143 |
-
'external_id' => $quote->getId()
|
| 144 |
-
);
|
| 145 |
-
|
| 146 |
-
Mage::helper('recapture/transport')->dispatch('cart/remove', $transportData);
|
| 147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
return $this;
|
| 149 |
|
| 150 |
}
|
| 151 |
|
| 152 |
public function cartConversion($observer){
|
| 153 |
|
| 154 |
-
|
| 155 |
|
| 156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
|
| 158 |
-
$
|
| 159 |
-
'external_id' => $order->getQuoteId()
|
| 160 |
-
);
|
| 161 |
|
| 162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
return $this;
|
| 165 |
|
|
|
|
| 166 |
}
|
|
|
|
| 167 |
}
|
| 4 |
|
| 5 |
public function itemUpdate($observer){
|
| 6 |
|
| 7 |
+
try {
|
| 8 |
+
|
| 9 |
+
$result = $this->_updateQuote($observer->getEvent()->getQuoteItem()->getQuote());
|
| 10 |
+
|
| 11 |
+
} catch (Exception $e){
|
| 12 |
+
|
| 13 |
+
Mage::log($e, null, 'recapture.log');
|
| 14 |
+
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
return $result;
|
| 18 |
|
| 19 |
}
|
| 20 |
|
| 21 |
public function quoteUpdate($observer){
|
| 22 |
|
| 23 |
+
try {
|
| 24 |
+
|
| 25 |
+
$result = $this->_updateQuote($observer->getEvent()->getQuote());
|
| 26 |
+
|
| 27 |
+
} catch (Exception $e){
|
| 28 |
+
|
| 29 |
+
Mage::log($e, null, 'recapture.log');
|
| 30 |
+
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
return $result;
|
| 34 |
|
| 35 |
}
|
| 36 |
|
| 155 |
|
| 156 |
public function quoteDelete($observer){
|
| 157 |
|
| 158 |
+
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
+
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 161 |
+
|
| 162 |
+
$quote = $observer->getEvent()->getQuote();
|
| 163 |
+
|
| 164 |
+
$transportData = array(
|
| 165 |
+
'external_id' => $quote->getId()
|
| 166 |
+
);
|
| 167 |
+
|
| 168 |
+
Mage::helper('recapture/transport')->dispatch('cart/remove', $transportData);
|
| 169 |
+
|
| 170 |
+
} catch (Exception $e){
|
| 171 |
+
|
| 172 |
+
Mage::log($e, null, 'recapture.log');
|
| 173 |
+
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
return $this;
|
| 177 |
|
| 178 |
}
|
| 179 |
|
| 180 |
public function cartConversion($observer){
|
| 181 |
|
| 182 |
+
try {
|
| 183 |
|
| 184 |
+
if (!Mage::helper('recapture')->isEnabled()) return $this;
|
| 185 |
+
|
| 186 |
+
$order = $observer->getEvent()->getOrder();
|
| 187 |
+
|
| 188 |
+
$transportData = array(
|
| 189 |
+
'external_id' => $order->getQuoteId()
|
| 190 |
+
);
|
| 191 |
+
|
| 192 |
+
Mage::helper('recapture/transport')->dispatch('conversion', $transportData);
|
| 193 |
+
|
| 194 |
+
} catch (Exception $e){
|
| 195 |
+
|
| 196 |
+
Mage::log($e, null, 'recapture.log');
|
| 197 |
+
|
| 198 |
+
}
|
| 199 |
|
| 200 |
+
return $this;
|
|
|
|
|
|
|
| 201 |
|
| 202 |
+
}
|
| 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 |
+
|
| 214 |
+
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
| 215 |
+
$quote->setCustomerEmail($email);
|
| 216 |
+
$quote->save();
|
| 217 |
+
|
| 218 |
+
//we do this in case the customer didn't have a cart to begin with
|
| 219 |
+
Mage::helper('recapture')->associateCartToMe($quote->getId());
|
| 220 |
+
|
| 221 |
+
} catch (Exception $e){
|
| 222 |
+
|
| 223 |
+
Mage::log($e, null, 'recapture.log');
|
| 224 |
+
|
| 225 |
+
}
|
| 226 |
|
| 227 |
return $this;
|
| 228 |
|
| 229 |
+
|
| 230 |
}
|
| 231 |
+
|
| 232 |
}
|
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 |
|
|
@@ -57,6 +57,17 @@
|
|
| 57 |
</recapture_cart_conversion>
|
| 58 |
</observers>
|
| 59 |
</sales_order_place_after>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
</events>
|
| 61 |
|
| 62 |
</global>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Recapture_Connector>
|
| 5 |
+
<version>1.1.5</version>
|
| 6 |
</Recapture_Connector>
|
| 7 |
</modules>
|
| 8 |
|
| 57 |
</recapture_cart_conversion>
|
| 58 |
</observers>
|
| 59 |
</sales_order_place_after>
|
| 60 |
+
|
| 61 |
+
<newsletter_subscriber_save_after>
|
| 62 |
+
<observers>
|
| 63 |
+
<recapture_cart_subscriber>
|
| 64 |
+
<type>singleton</type>
|
| 65 |
+
<class>Recapture_Connector_Model_Observer</class>
|
| 66 |
+
<method>newsletterSubscriber</method>
|
| 67 |
+
</recapture_cart_subscriber>
|
| 68 |
+
</observers>
|
| 69 |
+
</newsletter_subscriber_save_after>
|
| 70 |
+
|
| 71 |
</events>
|
| 72 |
|
| 73 |
</global>
|
app/code/local/Recapture/Connector/etc/system.xml
CHANGED
|
@@ -80,7 +80,18 @@
|
|
| 80 |
<show_in_website>1</show_in_website>
|
| 81 |
<show_in_store>0</show_in_store>
|
| 82 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
|
|
|
| 83 |
</track_email>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
<return_landing translate="label">
|
| 85 |
<label>Click Through Landing</label>
|
| 86 |
<frontend_type>select</frontend_type>
|
|
@@ -89,6 +100,7 @@
|
|
| 89 |
<show_in_website>1</show_in_website>
|
| 90 |
<show_in_store>0</show_in_store>
|
| 91 |
<source_model>recapture/landing</source_model>
|
|
|
|
| 92 |
</return_landing>
|
| 93 |
</fields>
|
| 94 |
</abandoned_carts>
|
| 80 |
<show_in_website>1</show_in_website>
|
| 81 |
<show_in_store>0</show_in_store>
|
| 82 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 83 |
+
<comment>When enabled, this will immediately capture typed email addresses anywhere on your site, without requiring the customer to submit any type of form. Useful on checkouts like One Step Checkout.</comment>
|
| 84 |
</track_email>
|
| 85 |
+
<capture_subscriber translate="label">
|
| 86 |
+
<label>Enable Newsletter Subscription Capturing</label>
|
| 87 |
+
<frontend_type>select</frontend_type>
|
| 88 |
+
<sort_order>10</sort_order>
|
| 89 |
+
<show_in_default>1</show_in_default>
|
| 90 |
+
<show_in_website>1</show_in_website>
|
| 91 |
+
<show_in_store>0</show_in_store>
|
| 92 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 93 |
+
<comment>When enabled, this will capture any emails that are subscribed to your newsletter.</comment>
|
| 94 |
+
</capture_subscriber>
|
| 95 |
<return_landing translate="label">
|
| 96 |
<label>Click Through Landing</label>
|
| 97 |
<frontend_type>select</frontend_type>
|
| 100 |
<show_in_website>1</show_in_website>
|
| 101 |
<show_in_store>0</show_in_store>
|
| 102 |
<source_model>recapture/landing</source_model>
|
| 103 |
+
<comment>What page do you want the customer to land on when they click a link in any abandoned cart emails we send?</comment>
|
| 104 |
</return_landing>
|
| 105 |
</fields>
|
| 106 |
</abandoned_carts>
|
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.5</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.5</notes>
|
| 12 |
<authors><author><name>David Webber</name><user>Recapture</user><email>hello@recapture.io</email></author></authors>
|
| 13 |
+
<date>2015-11-11</date>
|
| 14 |
+
<time>22:35:02</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="5ea7271aa23351246b5a0ac8a8fdf437"/><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="8005ed3e9c499bdc24cbc889f38ca330"/></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>
|
