Rejoiner - Version 1.1.19

Version Notes

Added option to track item prices with and without taxes

Download this release

Release Info

Developer Magento Core Team
Extension Rejoiner
Version 1.1.19
Comparing to
See all releases


Code changes from version 1.1.18 to 1.1.19

app/code/community/Rejoiner/Acr/Block/Snippets.php CHANGED
@@ -9,13 +9,15 @@
9
  class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
10
  {
11
 
 
 
12
  public function getCartItems()
13
  {
14
  $items = array();
15
  if ($quote = $this->_getQuote()) {
16
  $mediaUrl = Mage::getBaseUrl('media');
17
  $quoteItems = $quote->getAllItems();
18
-
19
  $parentToChild = array();
20
  /** @var Mage_Sales_Model_Quote_Item $item */
21
  foreach ($quoteItems as $item) {
@@ -70,13 +72,20 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
70
  $image = $mediaUrl . 'catalog/product' . $thumbnail;
71
  }
72
 
 
 
 
 
 
 
 
73
  $newItem = array();
74
  $newItem['name'] = addslashes($item->getName());
75
  $newItem['image_url'] = $image;
76
- $newItem['price'] = (string) $this->_convertPriceToCents($item->getBaseCalculationPrice());
77
  $newItem['product_id'] = (string) $item->getSku();
78
  $newItem['item_qty'] = (string) $item->getQty();
79
- $newItem['qty_price'] = (string) $this->_convertPriceToCents($item->getBaseRowTotal());
80
  $items[] = $newItem;
81
  }
82
  }
@@ -86,7 +95,13 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
86
  public function getCartData()
87
  {
88
  if ($quote = $this->_getQuote()) {
89
- return '"totalItems":"'.$this->_getQuote()->getItemsQty().'","value":"'.$this->_convertPriceToCents($this->_getQuote()->getBaseSubtotal()).'","returnUrl":"'.Mage::helper('rejoiner_acr')->getRestoreUrl().'"';
 
 
 
 
 
 
90
  }
91
  return '';
92
  }
@@ -101,4 +116,9 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
101
  return round($price*100);
102
  }
103
 
 
 
 
 
 
104
  }
9
  class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
10
  {
11
 
12
+ const XML_PATH_REJOINER_TRACK_PRICE_WITH_TAX = 'checkout/rejoiner_acr/price_with_tax';
13
+
14
  public function getCartItems()
15
  {
16
  $items = array();
17
  if ($quote = $this->_getQuote()) {
18
  $mediaUrl = Mage::getBaseUrl('media');
19
  $quoteItems = $quote->getAllItems();
20
+ $displayPriceWithTax = $this->getTrackPriceWithTax();
21
  $parentToChild = array();
22
  /** @var Mage_Sales_Model_Quote_Item $item */
23
  foreach ($quoteItems as $item) {
72
  $image = $mediaUrl . 'catalog/product' . $thumbnail;
73
  }
74
 
75
+ if ($displayPriceWithTax) {
76
+ $prodPrice = $item->getPriceInclTax();
77
+ $rowTotal = $item->getRowTotalInclTax();
78
+ } else {
79
+ $prodPrice = $item->getBaseCalculationPrice();
80
+ $rowTotal = $item->getBaseRowTotal();
81
+ }
82
  $newItem = array();
83
  $newItem['name'] = addslashes($item->getName());
84
  $newItem['image_url'] = $image;
85
+ $newItem['price'] = (string) $this->_convertPriceToCents($prodPrice);
86
  $newItem['product_id'] = (string) $item->getSku();
87
  $newItem['item_qty'] = (string) $item->getQty();
88
+ $newItem['qty_price'] = (string) $this->_convertPriceToCents($rowTotal);
89
  $items[] = $newItem;
90
  }
91
  }
95
  public function getCartData()
96
  {
97
  if ($quote = $this->_getQuote()) {
98
+ if ($this->getTrackPriceWithTax()) {
99
+ $total = $this->_getQuote()->getGrandTotal();
100
+ } else {
101
+ $total = $this->_getQuote()->getSubtotal();
102
+ }
103
+
104
+ return '"totalItems":"'.$this->_getQuote()->getItemsQty().'","value":"'.$this->_convertPriceToCents($total).'","returnUrl":"'.Mage::helper('rejoiner_acr')->getRestoreUrl().'"';
105
  }
106
  return '';
107
  }
116
  return round($price*100);
117
  }
118
 
119
+ protected function getTrackPriceWithTax()
120
+ {
121
+ return Mage::getStoreConfig(self::XML_PATH_REJOINER_TRACK_PRICE_WITH_TAX);
122
+ }
123
+
124
  }
app/code/community/Rejoiner/Acr/etc/system.xml CHANGED
@@ -64,6 +64,16 @@
64
  <show_in_website>1</show_in_website>
65
  <show_in_store>1</show_in_store>
66
  </track_numbers>
 
 
 
 
 
 
 
 
 
 
67
  <persist_forms>
68
  <label>Persist Forms</label>
69
  <frontend_type>select</frontend_type>
@@ -122,7 +132,7 @@
122
  <depends><show_standard>0</show_standard></depends>
123
  </custom_attributes>
124
  <debug_enabled translate="label">
125
- <label>Debig Mode</label>
126
  <frontend_type>select</frontend_type>
127
  <comment>Enable this parameter if you want to enabled debug extension.</comment>
128
  <source_model>adminhtml/system_config_source_yesno</source_model>
64
  <show_in_website>1</show_in_website>
65
  <show_in_store>1</show_in_store>
66
  </track_numbers>
67
+ <price_with_tax>
68
+ <label>Track Prices with Taxes</label>
69
+ <frontend_type>select</frontend_type>
70
+ <comment>Enable this parameter if you want to track price with taxes.</comment>
71
+ <source_model>adminhtml/system_config_source_yesno</source_model>
72
+ <sort_order>75</sort_order>
73
+ <show_in_default>1</show_in_default>
74
+ <show_in_website>1</show_in_website>
75
+ <show_in_store>1</show_in_store>
76
+ </price_with_tax>
77
  <persist_forms>
78
  <label>Persist Forms</label>
79
  <frontend_type>select</frontend_type>
132
  <depends><show_standard>0</show_standard></depends>
133
  </custom_attributes>
134
  <debug_enabled translate="label">
135
+ <label>Debug Mode</label>
136
  <frontend_type>select</frontend_type>
137
  <comment>Enable this parameter if you want to enabled debug extension.</comment>
138
  <source_model>adminhtml/system_config_source_yesno</source_model>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rejoiner</name>
4
- <version>1.1.18</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Rejoiner Cart Abandonment Remarketing</summary>
10
- <description>Turn abandoned carts into 15% more sales with Rejoiner.</description>
11
- <notes>were renamed a few fields in the Admin Panel</notes>
12
  <authors><author><name>Mike</name><user>auto-converted</user><email>mike@rejoiner.com</email></author></authors>
13
- <date>2016-01-06</date>
14
- <time>14:21:58</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Rejoiner_Acr.xml" hash="1aad3601804cead81b6e687dfcb5b83f"/></dir></target><target name="magecommunity"><dir name="Rejoiner"><dir name="Acr"><dir name="Block"><dir name="Adminhtml"><dir name="Custom"><file name="Form.php" hash="88c8a6fa07de1c1f9ea12b79a791c370"/></dir><dir name="Form"><dir name="Field"><file name="Source.php" hash="87fca4bcce28c32b51d1ab0be864a11d"/></dir></dir><file name="Notification.php" hash="4b4837b59ab85fa886e65be49d511490"/><dir name="Preinstalled"><file name="Form.php" hash="04f5b18db325c2e630c103779c704ebe"/></dir></dir><file name="Snippets.php" hash="36ccef9416a0d7b3768341fff28750ec"/></dir><dir name="Helper"><file name="Data.php" hash="1533241a5b0dd30b987464a719c0c25a"/></dir><dir name="Model"><dir name="Api"><file name="Client.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><file name="Notification.php" hash="a03d68e9bbaa820ce87557fca9f8f811"/><file name="Observer.php" hash="6a90f25f0a4378f9b5dad032b0a975a5"/><dir name="Resource"><file name="Setup.php" hash="48f66ad159e3d10a21cc04a980ca923e"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Salesrule.php" hash="1b6a8d728b5fa308b18a222c5981ed52"/></dir></dir></dir></dir><dir name="controllers"><file name="AddbyskuController.php" hash="7f258b4e6b5cb541913d9de5d374b44f"/><file name="AddtocartController.php" hash="c578297cdb4ef281aff17f33b27d6162"/><dir name="Adminhtml"><file name="RejoinerController.php" hash="c2e5fea12a2fc23905d86f119c2baa39"/></dir></dir><dir name="etc"><file name="config.xml" hash="525db600c2c3572bc4fdfb3bb01121fb"/><file name="system.xml" hash="4db43edd0bf5bb3edb034cd0b9c4475c"/></dir><dir name="sql"><dir name="rejoiner_setup"><file name="mysql4-install-1.0.0.0.php" hash="8d9a21c9c09fe44c6fe51ddd2106e3e0"/><file name="mysql4-upgrade-1.0.0.0-1.0.1.0.php" hash="36cc70cc6dd37aab7f3c460e0af58d59"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="rejoiner_acr.xml" hash="538d7561470c2cc1c7f822e7fe1ffef8"/></dir><dir name="template"><dir name="rejoiner_acr"><file name="conversion.phtml" hash="13a53b2f28e5f5fa6e0644ea9cf5a6a4"/><file name="email.phtml" hash="05e54d0999953acf865b6a439c4bb6b5"/><file name="tracking.phtml" hash="87e4d3e22c3b4876cca8ccb9cb3744c6"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="rejoiner_acr.xml" hash="3181cf1ca63813a9ce633ed3268659f4"/></dir><dir name="template"><dir name="rejoiner_acr"><file name="notification.phtml" hash="3a3872e6434bf7d2ca7fa0edfe6f9726"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Rejoiner_Acr.csv" hash="9015e31d97b9bc4746bc0a5241f8013b"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rejoiner</name>
4
+ <version>1.1.19</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Rejoiner Cart Abandonment Remarketing</summary>
10
+ <description>Turn abandoned carts into 15% more sales with Rejoiner</description>
11
+ <notes>Added option to track item prices with and without taxes</notes>
12
  <authors><author><name>Mike</name><user>auto-converted</user><email>mike@rejoiner.com</email></author></authors>
13
+ <date>2016-01-19</date>
14
+ <time>13:39:32</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Rejoiner_Acr.xml" hash="1aad3601804cead81b6e687dfcb5b83f"/></dir></target><target name="magecommunity"><dir name="Rejoiner"><dir name="Acr"><dir name="Block"><dir name="Adminhtml"><dir name="Custom"><file name="Form.php" hash="88c8a6fa07de1c1f9ea12b79a791c370"/></dir><dir name="Form"><dir name="Field"><file name="Source.php" hash="87fca4bcce28c32b51d1ab0be864a11d"/></dir></dir><file name="Notification.php" hash="4b4837b59ab85fa886e65be49d511490"/><dir name="Preinstalled"><file name="Form.php" hash="04f5b18db325c2e630c103779c704ebe"/></dir></dir><file name="Snippets.php" hash="560ff9092b1083eaa45edf8e893cb890"/></dir><dir name="Helper"><file name="Data.php" hash="1533241a5b0dd30b987464a719c0c25a"/></dir><dir name="Model"><dir name="Api"><file name="Client.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><file name="Notification.php" hash="a03d68e9bbaa820ce87557fca9f8f811"/><file name="Observer.php" hash="6a90f25f0a4378f9b5dad032b0a975a5"/><dir name="Resource"><file name="Setup.php" hash="48f66ad159e3d10a21cc04a980ca923e"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Salesrule.php" hash="1b6a8d728b5fa308b18a222c5981ed52"/></dir></dir></dir></dir><dir name="controllers"><file name="AddbyskuController.php" hash="7f258b4e6b5cb541913d9de5d374b44f"/><file name="AddtocartController.php" hash="c578297cdb4ef281aff17f33b27d6162"/><dir name="Adminhtml"><file name="RejoinerController.php" hash="c2e5fea12a2fc23905d86f119c2baa39"/></dir></dir><dir name="etc"><file name="config.xml" hash="525db600c2c3572bc4fdfb3bb01121fb"/><file name="system.xml" hash="13cdcf93f5638abf82c1499db974dec5"/></dir><dir name="sql"><dir name="rejoiner_setup"><file name="mysql4-install-1.0.0.0.php" hash="8d9a21c9c09fe44c6fe51ddd2106e3e0"/><file name="mysql4-upgrade-1.0.0.0-1.0.1.0.php" hash="36cc70cc6dd37aab7f3c460e0af58d59"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="rejoiner_acr.xml" hash="538d7561470c2cc1c7f822e7fe1ffef8"/></dir><dir name="template"><dir name="rejoiner_acr"><file name="conversion.phtml" hash="13a53b2f28e5f5fa6e0644ea9cf5a6a4"/><file name="email.phtml" hash="05e54d0999953acf865b6a439c4bb6b5"/><file name="tracking.phtml" hash="87e4d3e22c3b4876cca8ccb9cb3744c6"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="rejoiner_acr.xml" hash="3181cf1ca63813a9ce633ed3268659f4"/></dir><dir name="template"><dir name="rejoiner_acr"><file name="notification.phtml" hash="3a3872e6434bf7d2ca7fa0edfe6f9726"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Rejoiner_Acr.csv" hash="9015e31d97b9bc4746bc0a5241f8013b"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php></required></dependencies>
18
  </package>