recapture - Version 1.1.0

Version Notes

Added pre-submit email tracking

Download this release

Release Info

Developer David Webber
Extension recapture
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.9.5 to 1.1.0

app/code/local/Recapture/Connector/Block/Client.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Recapture_Connector_Block_Client extends Mage_Core_Block_Template {
4
+
5
+ private $_cartId = null;
6
+
7
+ public function shouldTrack(){
8
+
9
+ if (!Mage::helper('recapture')->isEnabled()) return false;
10
+ if (!Mage::helper('recapture')->canTrackEmail()) return false;
11
+
12
+ $apiKey = $this->getApiKey();
13
+ if (empty($apiKey)) return false;
14
+
15
+ $cartId = $this->getCartId();
16
+ if (empty($cartId)) return false;
17
+
18
+ return true;
19
+
20
+ }
21
+
22
+ public function getApiKey(){
23
+
24
+ return Mage::helper('recapture')->getApiKey();
25
+
26
+ }
27
+
28
+ public function getCartId(){
29
+
30
+ if (empty($this->_cartId)){
31
+
32
+ $cart = Mage::getModel('checkout/cart')->getQuote();
33
+ $this->_cartId = $cart->getId();
34
+
35
+ }
36
+
37
+ return $this->_cartId;
38
+
39
+ }
40
+
41
+ }
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 getApiKey(){
14
 
15
  return Mage::getStoreConfig('recapture/configuration/api_key');
10
 
11
  }
12
 
13
+ public function canTrackEmail(){
14
+
15
+ return Mage::getStoreConfig('recapture/configuration/track_email');
16
+
17
+ }
18
+
19
  public function getApiKey(){
20
 
21
  return Mage::getStoreConfig('recapture/configuration/api_key');
app/code/local/Recapture/Connector/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Recapture_Connector>
5
- <version>1.0.9.5</version>
6
  </Recapture_Connector>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Recapture_Connector>
5
+ <version>1.1.0</version>
6
  </Recapture_Connector>
7
  </modules>
8
 
app/code/local/Recapture/Connector/etc/system.xml CHANGED
@@ -61,6 +61,15 @@
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>0</show_in_store>
63
  </api_key>
 
 
 
 
 
 
 
 
 
64
  </fields>
65
  </configuration>
66
  </groups>
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>0</show_in_store>
63
  </api_key>
64
+ <track_email translate="label">
65
+ <label>Enable Pre-submit Email Capturing</label>
66
+ <frontend_type>select</frontend_type>
67
+ <sort_order>30</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>0</show_in_store>
71
+ <source_model>adminhtml/system_config_source_yesno</source_model>
72
+ </track_email>
73
  </fields>
74
  </configuration>
75
  </groups>
app/design/frontend/base/default/layout/recapture.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <layout>
3
+
4
+ <default>
5
+ <reference name="before_body_end">
6
+ <block type="recapture/client" template="recapture/client.phtml" />
7
+ </reference>
8
+ </default>
9
+
10
+ </layout>
app/design/frontend/base/default/template/recapture/client.phtml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php if ($this->shouldTrack()){ ?>
2
+
3
+ <script type="text/javascript" src="//cdn.recapture.io/loader.min.js"></script>
4
+ <script>
5
+ recapture.init('<?php echo $this->getApiKey() ?>', '<?php echo $this->getCartId() ?>', {autoDetectEmail: true});
6
+ </script>
7
+
8
+ <?php } ?>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>recapture</name>
4
- <version>1.0.9.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>Added version tracking, better product and user data tracking.</notes>
12
  <authors><author><name>David Webber</name><user>Adstream</user><email>david@adstreaminc.com</email></author></authors>
13
- <date>2015-10-13</date>
14
- <time>15:48:42</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="2433544256c447f96d1e4b4a823e724a"/><file name="Key.php" hash="adf516740c9e1a392fd7f81c4fb1927e"/><file name="Status.php" hash="f19858c8bb476b05e7e86cbdce403323"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AuthenticateController.php" hash="0722003698fa2710d58d0d806840f543"/></dir><file name="CartController.php" hash="dff4d0442ff4101a23c7e506e5317cc7"/><file name="IndexController.php" hash="3b1bb4f397617f696ac89e688c4dc1ae"/><file name="RecaptureController.php" hash="987215ca928935afc9d4f9ce4fdf670c"/></dir><dir name="etc"><file name="config.xml" hash="ca755a4c3d9f435e699960896e7854c8"/><file name="system.xml" hash="af2ebdfe2b9796f62aa3b956c0e20bd6"/></dir><dir name="Helper"><file name="Data.php" hash="f149c1a41c797c9f883255a598d6bf2f"/><file name="Transport.php" hash="7bdbdbf7c3cee4841fe7ce42371f5951"/></dir><dir name="Model"><file name="Observer.php" hash="ebb0d3e134cc115c4849384590b28b1e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Recapture_Connector.xml" hash="e8fea9dc4237af6b34219c7f52bd02d8"/></dir></target></contents>
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.0</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>Added pre-submit email tracking</notes>
12
  <authors><author><name>David Webber</name><user>Adstream</user><email>david@adstreaminc.com</email></author></authors>
13
+ <date>2015-10-16</date>
14
+ <time>21:28:03</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="2433544256c447f96d1e4b4a823e724a"/><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"><dir name="Adminhtml"><file name="AuthenticateController.php" hash="0722003698fa2710d58d0d806840f543"/></dir><file name="CartController.php" hash="dff4d0442ff4101a23c7e506e5317cc7"/><file name="IndexController.php" hash="3b1bb4f397617f696ac89e688c4dc1ae"/><file name="RecaptureController.php" hash="987215ca928935afc9d4f9ce4fdf670c"/></dir><dir name="etc"><file name="config.xml" hash="8fc77ef2a52f99a2c6bde0276ce97ca1"/><file name="system.xml" hash="9fa3b66cf5a7aa51b7ba2c0f9bac7de5"/></dir><dir name="Helper"><file name="Data.php" hash="5314dd6ab92b848e9840f1f0aa7d7e9d"/><file name="Transport.php" hash="7bdbdbf7c3cee4841fe7ce42371f5951"/></dir><dir name="Model"><file name="Observer.php" hash="ebb0d3e134cc115c4849384590b28b1e"/></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>