Peerius_Connect - Version 1.0.6

Version Notes

Fixed p:recommended attribute in feed to include SKUs instead of magento ids.

Download this release

Release Info

Developer Peerius
Extension Peerius_Connect
Version 1.0.6
Comparing to
See all releases


Code changes from version 1.0.4 to 1.0.6

app/code/community/Peerius/Smartrecs/.DS_Store DELETED
Binary file
app/code/community/Peerius/Smartrecs/Block/Tracking.php CHANGED
@@ -152,10 +152,11 @@ class Peerius_Smartrecs_Block_Tracking extends Mage_Core_Block_Template {
152
  if ($item->getParentItem()) {
153
  continue;
154
  }
 
155
  $newItem = array(
156
  'refCode' => $item->getSku(),
157
  'qty' => $item->getQty(),
158
- 'price' => $item->getPrice()
159
  );
160
  $pixel['basket']['items'][] = $newItem;
161
  }
@@ -184,10 +185,11 @@ class Peerius_Smartrecs_Block_Tracking extends Mage_Core_Block_Template {
184
  if ($item->getParentItem()) {
185
  continue;
186
  }
 
187
  $newItem = array(
188
  'refCode' => $item->getSku(),
189
  'qty' => (int) $item->getQty(),
190
- 'price' => $item->getPrice()
191
  );
192
  $pixel['checkout']['items'][] = $newItem;
193
  }
@@ -227,10 +229,11 @@ class Peerius_Smartrecs_Block_Tracking extends Mage_Core_Block_Template {
227
  if ($item->getParentItem()) {
228
  continue;
229
  }
 
230
  $newItem = array(
231
  'refCode' => $item->getSku(),
232
  'qty' => (int) $item->getQtyOrdered(),
233
- 'price' => $item->getPrice()
234
  );
235
  $pixel['order']['items'][] = $newItem;
236
  }
@@ -393,7 +396,5 @@ class Peerius_Smartrecs_Block_Tracking extends Mage_Core_Block_Template {
393
  }
394
  return '<script type="text/JavaScript" src="//'.$this->escapeHtml(Mage::getStoreConfig('peerius/general/client_name')).'.peerius.com/tracker/peerius.page" charset="UTF-8"></script>';
395
  }
396
- // alert(JSON.stringify(PeeriusCallbacks))
397
 
398
- }
399
-
152
  if ($item->getParentItem()) {
153
  continue;
154
  }
155
+ $priceIncTax = Mage::helper('tax')->getPrice($item, $item->getPrice(), true);
156
  $newItem = array(
157
  'refCode' => $item->getSku(),
158
  'qty' => $item->getQty(),
159
+ 'price' => $priceIncTax
160
  );
161
  $pixel['basket']['items'][] = $newItem;
162
  }
185
  if ($item->getParentItem()) {
186
  continue;
187
  }
188
+ $priceIncTax = Mage::helper('tax')->getPrice($item, $item->getPrice(), true);
189
  $newItem = array(
190
  'refCode' => $item->getSku(),
191
  'qty' => (int) $item->getQty(),
192
+ 'price' => $priceIncTax
193
  );
194
  $pixel['checkout']['items'][] = $newItem;
195
  }
229
  if ($item->getParentItem()) {
230
  continue;
231
  }
232
+ $priceIncTax = Mage::helper('tax')->getPrice($item, $item->getPrice(), true);
233
  $newItem = array(
234
  'refCode' => $item->getSku(),
235
  'qty' => (int) $item->getQtyOrdered(),
236
+ 'price' => $priceIncTax
237
  );
238
  $pixel['order']['items'][] = $newItem;
239
  }
396
  }
397
  return '<script type="text/JavaScript" src="//'.$this->escapeHtml(Mage::getStoreConfig('peerius/general/client_name')).'.peerius.com/tracker/peerius.page" charset="UTF-8"></script>';
398
  }
 
399
 
400
+ }
 
app/code/community/Peerius/Smartrecs/Model/.DS_Store DELETED
Binary file
app/code/community/Peerius/Smartrecs/Model/Feed/Creator.php CHANGED
@@ -354,20 +354,24 @@ class Peerius_Smartrecs_Model_Feed_Creator {
354
  * @return string
355
  */
356
  protected function _getRecommended($product) {
357
- $all = array();
358
- $related = $product->getRelatedProductIds();
359
- foreach ($related as $id) {
360
- $all[$id] = $id;
361
- }
362
- $crosssell = $product->getCrossSellProducts();
363
- foreach ($crosssell as $_item) {
364
- $all[$_item->getId()] = $_item->getId();
365
- }
366
- $upsell = $product->getUpSellProductCollection();
367
- foreach ($upsell as $_item) {
368
- $all[$_item->getId()] = $_item->getId();
369
- }
370
- return implode(',', $all);
 
 
 
 
371
  }
372
 
373
  /**
354
  * @return string
355
  */
356
  protected function _getRecommended($product) {
357
+ $all = array();
358
+ $related = $product->getRelatedProductIds();
359
+ foreach ($related as $id) {
360
+ $all[$id] = Mage::getModel('catalog/product')->load($id)->getSku();
361
+ //$this->log("Related Product is :".$all[$id]);
362
+ }
363
+
364
+ $crosssell = $product->getCrossSellProducts();
365
+ foreach ($crosssell as $_item) {
366
+ $all[$_item->getId()] = $_item->getSku();
367
+ //$this->log("Cross Selling Product is :".$all[$_item->getId()]);
368
+ }
369
+ $upsell = $product->getUpSellProductCollection();
370
+ foreach ($upsell as $_item) {
371
+ $all[$_item->getId()] = $_item->getSku();
372
+ //$this->log("Up Selling Product is :".$all[$_item->getId()]);
373
+ }
374
+ return implode(',', $all);
375
  }
376
 
377
  /**
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Peerius_Connect</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php#sthash.1eAD3rgO.dpuf">OSL v3.0</license>
7
  <channel>community</channel>
@@ -9,15 +9,15 @@
9
  <summary>The trusted partner for personalisation.</summary>
10
  <description>The Peerius Connect extension allows you to add personalised product recommendations to your website. This extension performs the following key functions:&#xD;
11
  &#xD;
12
- Creates a feed containing product and category information from your site catalogue.&#xD;
13
- Adds a tracking script that allows Peerius to track user behaviour on your site.&#xD;
14
- Renders recommendations that you enable on pre-configured pages.&#xD;
15
  </description>
16
- <notes>Show search result recommendations only on empty search results if not set in config.</notes>
17
  <authors><author><name>Peerius</name><user>Peerius</user><email>extensions@peerius.com</email></author></authors>
18
- <date>2015-12-20</date>
19
- <time>21:05:08</time>
20
- <contents><target name="magecommunity"><dir name="Peerius"><dir name="Smartrecs"><dir name="Block"><file name="Config.php" hash="5d81508e9cf3061d6f34458bbdafff9b"/><file name="Recommendations.php" hash="cc8f955efbd6835d890b8efb864c0cac"/><file name="Template.php" hash="e9431386180c113cfa4660f8ce2c220b"/><file name="Tracking.php" hash="e096d0cfc453614464a6b82525bbd834"/></dir><dir name="Helper"><file name="Data.php" hash="07a1c36598d89c28a5c9f902707cb02e"/><file name="Feedhelper.php" hash="5c981f753a3f139dd0798855ec2e51f4"/></dir><dir name="Model"><dir name="Feed"><file name="Creator.php" hash="4e1f88e9a6ac56f4c5b16a61a6734808"/></dir><file name="Max.php" hash="a3c7eb408d59c3a0b71b9f5f8d85dfa9"/><file name="SearchLayer.php" hash="4457eb768fc387d08700d67b5e1bb55b"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Values.php" hash="bc71d86dcc6fdb046222c0a051b323b4"/></dir><file name="Yesno.php" hash="4f6cb1392c1496837cc6021cb263aad5"/></dir></dir></dir><dir name="Templates"><file name="Basket.php" hash="96eb28e5977acd90ee8bf38f4e938274"/><file name="Category.php" hash="7882da9cd0026ed5bde0360189d593ae"/><file name="Checkout.php" hash="d46564549391af35da90a4a10c9a8093"/><file name="Home.php" hash="44a09df724298154d2f8671572c7f5ea"/><file name="Order.php" hash="3525a61a41f63c4133549254c31c842a"/><file name="Other.php" hash="2cb2c3d3de6d3155b5e33f1f3f8ade00"/><file name="Product1.php" hash="b3f3f27b3b319290f4ce7238b12e77d7"/><file name="Product2.php" hash="65170140bc75324cb0e216a9ba4f2597"/><file name="Search.php" hash="aa1e063656bd5b93a6ea1764dd317bd0"/><file name="Wishlist.php" hash="49daf0c47250b9512d285340c53af644"/></dir><file name="Templates.php" hash="b44ee8b39cf9d2166307ae6eb1500dc8"/><file name="Token.php" hash="2361e10a26b9beb9f066d6ad4827261c"/><file name=".DS_Store" hash="121fcc7ffb2eda1059e7fd2cba768368"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PeeriusController.php" hash="6d72ba380fa0ef6d618a97fc3124cdb7"/></dir><file name="FeedController.php" hash="7b21a1c6a9a8e27314d9b317f94a2e07"/><file name="InfoController.php" hash="915a4388f9cc72c917d6804ac38408c7"/><file name="RenderController.php" hash="e9f46140cb254a24ce9d21288ee9a250"/></dir><dir name="etc"><file name="adminhtml.xml" hash="468dbed05f1cb0be9a4062c85e388e04"/><file name="config.xml" hash="e64216f70b3a67775c93966b412ffb13"/><file name="system.xml" hash="580dfd7e143413dc71f2ffc5f5f1de63"/><file name="system_ft.xml" hash="a42d9bf6de1df48c246057a4ef3c3a71"/><file name="widget.xml" hash="2a2a7c7097a33bb761c97d21c4d373f7"/></dir><file name=".DS_Store" hash="c9ad824fadf49b3c7a9e0648d7cdac61"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Peerius_Smartrecs.xml" hash="e5c77ca4bb1474945191f4be23a0b390"/></dir></target><target name="mageweb"><dir name="js"><dir name="peerius"><dir name="smartrecs"><file name="smartrecs.js" hash="344e4abf974c5d834afbbd5ec22a6785"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="smartrecs"><file name="smartrecs.phtml" hash="eb191cbebb3729fe54294db5981e5a21"/><file name="render.phtml" hash="b508a2f71675d7a37b942cc41d2c5692"/><file name="render.phtml" hash="b508a2f71675d7a37b942cc41d2c5692"/><dir name="recs"><file name="home.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="category.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="product-1.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="product-2.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="search.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="basket.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/></dir></dir></dir><dir name="layout"><file name="smartrecs.xml" hash="f52a4fba91d0a70e676ea2b92c7814ba"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="smartrecs.xml" hash="b18cea41c87596b4a391060772d62036"/></dir><dir name="template"><dir name="smartrecs"><file name="config.phtml" hash="e1592ad4495ef3e6b9061e348b35ed1d"/><file name="aclreloadbutton.phtml" hash="5a1baf33dff410aeef3de6811d3c8777"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="peerius"><dir name="smartrecs"><dir><dir name="css"><file name="config.css" hash="bc6e8f257e82345829fa4ab40cd6e73a"/></dir><dir name="img"><file name="logo-rollover.png" hash="d47a12d82bc3b271f343f590f7de260a"/><file name="navigation.png" hash="02fb819ba8faf2b9df42345e6f71463c"/></dir><dir name="js"><file name="smartrecs.js" hash="e9fc66f04761d7c0de868f031b592e50"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="peerius_smartrecs"><file name="style.css" hash="54f4d88777c86d9b2951183e0323f026"/></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Peerius_Connect</name>
4
+ <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php#sthash.1eAD3rgO.dpuf">OSL v3.0</license>
7
  <channel>community</channel>
9
  <summary>The trusted partner for personalisation.</summary>
10
  <description>The Peerius Connect extension allows you to add personalised product recommendations to your website. This extension performs the following key functions:&#xD;
11
  &#xD;
12
+ Creates a feed containing product and category information from your site catalogue.&#xD;
13
+ Adds a tracking script that allows Peerius to track user behaviour on your site.&#xD;
14
+ Renders recommendations that you enable on pre-configured pages.&#xD;
15
  </description>
16
+ <notes>Fixed p:recommended attribute in feed to include SKUs instead of magento ids.</notes>
17
  <authors><author><name>Peerius</name><user>Peerius</user><email>extensions@peerius.com</email></author></authors>
18
+ <date>2016-01-15</date>
19
+ <time>15:03:51</time>
20
+ <contents><target name="magecommunity"><dir name="Peerius"><dir name="Smartrecs"><dir name="Block"><file name="Config.php" hash="5d81508e9cf3061d6f34458bbdafff9b"/><file name="Recommendations.php" hash="cc8f955efbd6835d890b8efb864c0cac"/><file name="Template.php" hash="e9431386180c113cfa4660f8ce2c220b"/><file name="Tracking.php" hash="dc187f312b64fa7db93e34bf40291773"/></dir><dir name="Helper"><file name="Data.php" hash="07a1c36598d89c28a5c9f902707cb02e"/><file name="Feedhelper.php" hash="5c981f753a3f139dd0798855ec2e51f4"/></dir><dir name="Model"><dir name="Feed"><file name="Creator.php" hash="41c2c55bc80a1291c49080cdd533d86b"/></dir><file name="Max.php" hash="a3c7eb408d59c3a0b71b9f5f8d85dfa9"/><file name="SearchLayer.php" hash="4457eb768fc387d08700d67b5e1bb55b"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Values.php" hash="bc71d86dcc6fdb046222c0a051b323b4"/></dir><file name="Yesno.php" hash="4f6cb1392c1496837cc6021cb263aad5"/></dir></dir></dir><dir name="Templates"><file name="Basket.php" hash="96eb28e5977acd90ee8bf38f4e938274"/><file name="Category.php" hash="7882da9cd0026ed5bde0360189d593ae"/><file name="Checkout.php" hash="d46564549391af35da90a4a10c9a8093"/><file name="Home.php" hash="44a09df724298154d2f8671572c7f5ea"/><file name="Order.php" hash="3525a61a41f63c4133549254c31c842a"/><file name="Other.php" hash="2cb2c3d3de6d3155b5e33f1f3f8ade00"/><file name="Product1.php" hash="b3f3f27b3b319290f4ce7238b12e77d7"/><file name="Product2.php" hash="65170140bc75324cb0e216a9ba4f2597"/><file name="Search.php" hash="aa1e063656bd5b93a6ea1764dd317bd0"/><file name="Wishlist.php" hash="49daf0c47250b9512d285340c53af644"/></dir><file name="Templates.php" hash="b44ee8b39cf9d2166307ae6eb1500dc8"/><file name="Token.php" hash="2361e10a26b9beb9f066d6ad4827261c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PeeriusController.php" hash="6d72ba380fa0ef6d618a97fc3124cdb7"/></dir><file name="FeedController.php" hash="7b21a1c6a9a8e27314d9b317f94a2e07"/><file name="InfoController.php" hash="915a4388f9cc72c917d6804ac38408c7"/><file name="RenderController.php" hash="e9f46140cb254a24ce9d21288ee9a250"/></dir><dir name="etc"><file name="adminhtml.xml" hash="468dbed05f1cb0be9a4062c85e388e04"/><file name="config.xml" hash="e64216f70b3a67775c93966b412ffb13"/><file name="system.xml" hash="580dfd7e143413dc71f2ffc5f5f1de63"/><file name="system_ft.xml" hash="a42d9bf6de1df48c246057a4ef3c3a71"/><file name="widget.xml" hash="2a2a7c7097a33bb761c97d21c4d373f7"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Peerius_Smartrecs.xml" hash="e5c77ca4bb1474945191f4be23a0b390"/></dir></target><target name="mageweb"><dir name="js"><dir name="peerius"><dir name="smartrecs"><file name="smartrecs.js" hash="344e4abf974c5d834afbbd5ec22a6785"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="smartrecs"><file name="smartrecs.phtml" hash="eb191cbebb3729fe54294db5981e5a21"/><file name="render.phtml" hash="b508a2f71675d7a37b942cc41d2c5692"/><file name="render.phtml" hash="b508a2f71675d7a37b942cc41d2c5692"/><dir name="recs"><file name="home.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="category.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="product-1.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="product-2.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="search.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/><file name="basket.phtml" hash="9179ca699b638cc8fb6d9755b8f0ebe2"/></dir></dir></dir><dir name="layout"><file name="smartrecs.xml" hash="f52a4fba91d0a70e676ea2b92c7814ba"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="smartrecs.xml" hash="b18cea41c87596b4a391060772d62036"/></dir><dir name="template"><dir name="smartrecs"><file name="config.phtml" hash="e1592ad4495ef3e6b9061e348b35ed1d"/><file name="aclreloadbutton.phtml" hash="5a1baf33dff410aeef3de6811d3c8777"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="peerius"><dir name="smartrecs"><dir><dir name="css"><file name="config.css" hash="bc6e8f257e82345829fa4ab40cd6e73a"/></dir><dir name="img"><file name="logo-rollover.png" hash="d47a12d82bc3b271f343f590f7de260a"/><file name="navigation.png" hash="02fb819ba8faf2b9df42345e6f71463c"/></dir><dir name="js"><file name="smartrecs.js" hash="e9fc66f04761d7c0de868f031b592e50"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="peerius_smartrecs"><file name="style.css" hash="54f4d88777c86d9b2951183e0323f026"/></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>