recapture - Version 1.0.3

Version Notes

More cool updates!

Download this release

Release Info

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


Code changes from version 1.0.2 to 1.0.3

app/code/local/Recapture/Connector/Block/Adminhtml/System/Config/Key.php CHANGED
@@ -4,7 +4,6 @@ class Recapture_Connector_Block_Adminhtml_System_Config_Key extends Mage_Adminht
4
 
5
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
6
 
7
- $element->setDisabled('disabled');
8
  return parent::_getElementHtml($element);
9
 
10
  }
4
 
5
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
6
 
 
7
  return parent::_getElementHtml($element);
8
 
9
  }
app/code/local/Recapture/Connector/controllers/CartController.php CHANGED
@@ -2,33 +2,56 @@
2
 
3
  class Recapture_Connector_CartController extends Mage_Core_Controller_Front_Action {
4
 
 
 
 
 
 
 
 
5
  public function indexAction(){
6
 
7
  $helper = Mage::helper('recapture');
8
 
9
  $hash = $this->getRequest()->getParam('hash');
10
 
11
- $cartId = $helper->translateCartHash($hash);
 
 
 
 
 
 
 
 
12
 
13
  if (!$cartId){
14
 
15
  Mage::getSingleton('core/session')->addError('There was an error retrieving your cart.');
16
- $this->_redirect('/');
17
 
18
  }
19
 
20
- $result = $helper->associateCartToMe($cartId);
 
 
 
 
 
 
 
 
21
 
22
  if (!$result){
23
 
24
  Mage::getSingleton('core/session')->addError('There was an error retrieving your cart.');
25
- $this->_redirect('/');
26
 
27
  } else {
28
 
29
  $cart = Mage::getModel('checkout/cart')->getQuote();
30
 
31
- $this->_redirect('checkout/cart');
32
 
33
  }
34
 
2
 
3
  class Recapture_Connector_CartController extends Mage_Core_Controller_Front_Action {
4
 
5
+ public function testAction(){
6
+
7
+ echo 'Api Key: ' . Mage::helper('recapture')->getApiKey() . '<br>';
8
+ echo 'Enabled: ' . Mage::getStoreConfig('recapture/configuration/enabled') . '<br>';
9
+
10
+ }
11
+
12
  public function indexAction(){
13
 
14
  $helper = Mage::helper('recapture');
15
 
16
  $hash = $this->getRequest()->getParam('hash');
17
 
18
+ try {
19
+
20
+ $cartId = $helper->translateCartHash($hash);
21
+
22
+ } catch (Exception $e){
23
+
24
+ Mage::log($e, null, 'recapture.log');
25
+
26
+ }
27
 
28
  if (!$cartId){
29
 
30
  Mage::getSingleton('core/session')->addError('There was an error retrieving your cart.');
31
+ return $this->_redirect('/');
32
 
33
  }
34
 
35
+ try {
36
+
37
+ $result = $helper->associateCartToMe($cartId);
38
+
39
+ } catch (Exception $e){
40
+
41
+ Mage::log($e, null, 'recapture.log');
42
+
43
+ }
44
 
45
  if (!$result){
46
 
47
  Mage::getSingleton('core/session')->addError('There was an error retrieving your cart.');
48
+ return $this->_redirect('/');
49
 
50
  } else {
51
 
52
  $cart = Mage::getModel('checkout/cart')->getQuote();
53
 
54
+ return $this->_redirect('checkout/cart');
55
 
56
  }
57
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>recapture</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Free analytics dashboard for abandoned carts. Set up automated cart recovery email campaigns in minutes.</description>
11
  <notes>More cool updates!</notes>
12
  <authors><author><name>David Webber</name><user>Adstream</user><email>david@adstreaminc.com</email></author></authors>
13
- <date>2015-07-24</date>
14
- <time>23:37:19</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="b4def4c279d801f7e9c327d8ee87c414"/><file name="Key.php" hash="f95c74992894b0a823793ef605c103e1"/><file name="Status.php" hash="003133a47fb37e6f522314778eec9632"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AuthenticateController.php" hash="677c55f039ca051b44fec1bfbf63b969"/></dir><file name="CartController.php" hash="0ec0843034d768ad6d978e291183a980"/></dir><dir name="etc"><file name="config.xml" hash="50062202cfd4a8262cd001bfb7e4f6f0"/><file name="system.xml" hash="12f5cd5932b919ba61f0cb366f252efc"/></dir><dir name="Helper"><file name="Data.php" hash="a8256fffe350a4bd82ba13a9af8ddd54"/><file name="Transport.php" hash="a13bf58b13e207f5260fe2bdbe86fb5e"/></dir><dir name="Model"><file name="Observer.php" hash="3dbcbfc25944aedb3cc6658c495bb70b"/></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.0.3</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
10
  <description>Free analytics dashboard for abandoned carts. Set up automated cart recovery email campaigns in minutes.</description>
11
  <notes>More cool updates!</notes>
12
  <authors><author><name>David Webber</name><user>Adstream</user><email>david@adstreaminc.com</email></author></authors>
13
+ <date>2015-07-28</date>
14
+ <time>18:11:43</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="b4def4c279d801f7e9c327d8ee87c414"/><file name="Key.php" hash="adf516740c9e1a392fd7f81c4fb1927e"/><file name="Status.php" hash="003133a47fb37e6f522314778eec9632"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AuthenticateController.php" hash="677c55f039ca051b44fec1bfbf63b969"/></dir><file name="CartController.php" hash="77b05dabce511b6cd360aaeae79fbe27"/></dir><dir name="etc"><file name="config.xml" hash="50062202cfd4a8262cd001bfb7e4f6f0"/><file name="system.xml" hash="12f5cd5932b919ba61f0cb366f252efc"/></dir><dir name="Helper"><file name="Data.php" hash="a8256fffe350a4bd82ba13a9af8ddd54"/><file name="Transport.php" hash="a13bf58b13e207f5260fe2bdbe86fb5e"/></dir><dir name="Model"><file name="Observer.php" hash="3dbcbfc25944aedb3cc6658c495bb70b"/></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>