Rejoiner - Version 1.1.22

Version Notes

Added 'category' to setCartItem API call

Download this release

Release Info

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


Code changes from version 1.1.21 to 1.1.22

app/code/community/Rejoiner/Acr/Block/Snippets.php CHANGED
@@ -18,7 +18,9 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
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) {
24
  /** @var Mage_Sales_Model_Quote_Item $parent */
@@ -27,14 +29,23 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
27
  $parentToChild[$parent->getId()] = $item;
28
  }
29
  }
 
30
  }
31
 
 
 
 
 
 
 
 
32
  foreach ($quote->getAllItems() as $item) {
33
  if ($item->getParentItem()) {
34
  continue;
35
  }
36
 
37
  $product = $item->getProduct();
 
38
  $thumbnail = 'no_selection';
39
  $imageHelper = Mage::helper('catalog/image');
40
  // get thumbnail from configurable product
@@ -66,7 +77,7 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
66
  if ($thumbnail == 'no_selection') {
67
  $imageHelper->init($product, 'thumbnail');
68
  $image = Mage::getDesign()->getSkinUrl($imageHelper->getPlaceholder());
69
- } elseif($imagePath = Mage::helper('rejoiner_acr')->resizeImage($thumbnail)) {
70
  $image = str_replace(Mage::getBaseDir('media') . '/', $mediaUrl, $imagePath);
71
  } else {
72
  $image = $mediaUrl . 'catalog/product' . $thumbnail;
@@ -87,6 +98,7 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
87
  $newItem['product_url'] = (string) $item->getProduct()->getProductUrl();
88
  $newItem['item_qty'] = (string) $item->getQty();
89
  $newItem['qty_price'] = (string) $this->_convertPriceToCents($rowTotal);
 
90
  $items[] = $newItem;
91
  }
92
  }
18
  $mediaUrl = Mage::getBaseUrl('media');
19
  $quoteItems = $quote->getAllItems();
20
  $displayPriceWithTax = $this->getTrackPriceWithTax();
21
+ $rejoinerHelper = Mage::helper('rejoiner_acr');
22
  $parentToChild = array();
23
+ $categories = array();
24
  /** @var Mage_Sales_Model_Quote_Item $item */
25
  foreach ($quoteItems as $item) {
26
  /** @var Mage_Sales_Model_Quote_Item $parent */
29
  $parentToChild[$parent->getId()] = $item;
30
  }
31
  }
32
+ $categories = array_merge($categories, $item->getProduct()->getCategoryIds());
33
  }
34
 
35
+ $categoriesArray = Mage::getModel('catalog/category')
36
+ ->getCollection()
37
+ ->addAttributeToSelect('name')
38
+ ->addFieldToFilter('entity_id', array('in' => $categories))
39
+ ->load()
40
+ ->getItems();
41
+
42
  foreach ($quote->getAllItems() as $item) {
43
  if ($item->getParentItem()) {
44
  continue;
45
  }
46
 
47
  $product = $item->getProduct();
48
+ $productCategories = $rejoinerHelper->getProductCategories($product, $categoriesArray);
49
  $thumbnail = 'no_selection';
50
  $imageHelper = Mage::helper('catalog/image');
51
  // get thumbnail from configurable product
77
  if ($thumbnail == 'no_selection') {
78
  $imageHelper->init($product, 'thumbnail');
79
  $image = Mage::getDesign()->getSkinUrl($imageHelper->getPlaceholder());
80
+ } elseif($imagePath = $rejoinerHelper->resizeImage($thumbnail)) {
81
  $image = str_replace(Mage::getBaseDir('media') . '/', $mediaUrl, $imagePath);
82
  } else {
83
  $image = $mediaUrl . 'catalog/product' . $thumbnail;
98
  $newItem['product_url'] = (string) $item->getProduct()->getProductUrl();
99
  $newItem['item_qty'] = (string) $item->getQty();
100
  $newItem['qty_price'] = (string) $this->_convertPriceToCents($rowTotal);
101
+ $newItem['category'] = $productCategories;
102
  $items[] = $newItem;
103
  }
104
  }
app/code/community/Rejoiner/Acr/Helper/Data.php CHANGED
@@ -193,4 +193,16 @@ class Rejoiner_Acr_Helper_Data extends Mage_Core_Helper_Abstract
193
  }
194
  return $result;
195
  }
 
 
 
 
 
 
 
 
 
 
 
 
196
  }
193
  }
194
  return $result;
195
  }
196
+
197
+ public function getProductCategories($product, $categoriesArray)
198
+ {
199
+ $result = array();
200
+ foreach ($product->getCategoryIds() as $catId) {
201
+ if (isset($categoriesArray[$catId])) {
202
+ $result[] = $categoriesArray[$catId]->getName();
203
+ }
204
+ }
205
+ return implode(' ', $result);
206
+ }
207
+
208
  }
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rejoiner</name>
4
- <version>1.1.21</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 compatibility with MindMagnet PrimeCheckout</notes>
12
  <authors><author><name>Mike</name><user>auto-converted</user><email>mike@rejoiner.com</email></author></authors>
13
- <date>2016-03-22</date>
14
- <time>08:07:37</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><dir name="Preinstalled"><file name="Form.php" hash="04f5b18db325c2e630c103779c704ebe"/></dir><file name="Notification.php" hash="4b4837b59ab85fa886e65be49d511490"/></dir><file name="Snippets.php" hash="b8b8b5fbc0d48629fc4ff1d825c4d2df"/></dir><dir name="Helper"><file name="Data.php" hash="1533241a5b0dd30b987464a719c0c25a"/></dir><dir name="Model"><dir name="Api"><file name="Client.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><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><file name="Notification.php" hash="a03d68e9bbaa820ce87557fca9f8f811"/><file name="Observer.php" hash="6a90f25f0a4378f9b5dad032b0a975a5"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="RejoinerController.php" hash="c2e5fea12a2fc23905d86f119c2baa39"/></dir><file name="AddbyskuController.php" hash="2a09648d5550ab0c9b8f934615c2e8bf"/><file name="AddtocartController.php" hash="3449e820f5f46fc4aa12a5b989ddae89"/></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="908d4f08cc1d82189c8d94b5959e45db"/></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/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rejoiner</name>
4
+ <version>1.1.22</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 'category' to setCartItem API call</notes>
12
  <authors><author><name>Mike</name><user>auto-converted</user><email>mike@rejoiner.com</email></author></authors>
13
+ <date>2016-03-29</date>
14
+ <time>07:29:05</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><dir name="Preinstalled"><file name="Form.php" hash="04f5b18db325c2e630c103779c704ebe"/></dir><file name="Notification.php" hash="4b4837b59ab85fa886e65be49d511490"/></dir><file name="Snippets.php" hash="f3093cc38dfa69da65a51bb8ac79f992"/></dir><dir name="Helper"><file name="Data.php" hash="b04adceaeebee51b1cb521365d551d53"/></dir><dir name="Model"><dir name="Api"><file name="Client.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><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><file name="Notification.php" hash="a03d68e9bbaa820ce87557fca9f8f811"/><file name="Observer.php" hash="6a90f25f0a4378f9b5dad032b0a975a5"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="RejoinerController.php" hash="c2e5fea12a2fc23905d86f119c2baa39"/></dir><file name="AddbyskuController.php" hash="2a09648d5550ab0c9b8f934615c2e8bf"/><file name="AddtocartController.php" hash="3449e820f5f46fc4aa12a5b989ddae89"/></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="908d4f08cc1d82189c8d94b5959e45db"/></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/>
18
  </package>