Expertrec_Recommendation - Version 1.2.8

Version Notes

Expertrec Recommendation plugin for magento sites.

Download this release

Release Info

Developer melchi
Extension Expertrec_Recommendation
Version 1.2.8
Comparing to
See all releases


Code changes from version 1.2.7 to 1.2.8

app/code/community/Expertrec/Recommendation/Model/Observer.php CHANGED
@@ -23,26 +23,16 @@ class Expertrec_Recommendation_Model_Observer {
23
  Mage::getSingleton('expertrec_recommendation/log')->log('AddToCart_Track: product is not a valid type',Zend_Log::ERR);
24
  return $this;
25
  }
26
-
27
- // added url to track rtr
28
- //$lastUrl = Mage::getSingleton('core/session')->getLastUrl();
29
- //$currUrl = Mage::helper('core/url')->getCurrentUrl();
30
- //$ci_id = $_COOKIE['ci_id'];
31
-
32
- //Mage::getSingleton('core/session')->setCartLastUrl($lastUrl);
33
- //Mage::getSingleton('core/session')->setCartCurrUrl($currUrl);
34
-
35
  //return unique product id
36
  $uniqueId = Mage::helper('expertrec_recommendation')->getUniqueId($product);
 
37
 
38
  //sending request
39
  //return boolean
40
  $response = Mage::getModel('expertrec_recommendation/api_request')
41
  ->setPrepareRequestStatus(false)
42
  ->setData(array(
43
- //'ci_id' => $ci_id,
44
- //'lastUrl' => $lastUrl,
45
- //'currUrl' => $currUrl,
46
  'item' => $uniqueId,
47
  'event' => 3,
48
  'sku' => $product->getSku(),
@@ -91,58 +81,25 @@ class Expertrec_Recommendation_Model_Observer {
91
 
92
  //return unique product id
93
  $uniqueId = Mage::helper('expertrec_recommendation')->getUniqueId($product, $item);
 
94
 
95
- // added url to track rtr
96
- //$ci_id = $_COOKIE['ci_id'];
97
- //$cartLastUrl =Mage::getSingleton('core/session')->getCartLastUrl();
98
- //$cartCurrUrl =Mage::getSingleton('core/session')->getCartCurrUrl();
99
-
100
- //Mage::getSingleton('core/session')->unsCartLastUrl();
101
- //Mage::getSingleton('core/session')->unsCartCurrUrl();
102
-
103
- // checking buy from addtocart
104
- //if(isset($cartCurrUrl) && isset($cartLastUrl)){
105
- //sending request
106
- //return boolean
107
- $response = Mage::getModel('expertrec_recommendation/api_request')
108
- ->setPrepareRequestStatus(false)
109
- ->setData(array(
110
- //'cartLastUrl' => $cartLastUrl,
111
- //'cartCurrUrl' => $cartCurrUrl,
112
- //'ci_id' => $ci_id,
113
- 'item' => $uniqueId,
114
- 'event' => 2,
115
- 'sku' => $item->getSku(),
116
- 'qty' => $item->getQtyOrdered(),
117
- 'price' => $item->getPriceInclTax(),
118
- 'domain' => $_SERVER['HTTP_HOST'],
119
- 'ip' => isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'])
120
- )
121
- ->setHeader("User-Agent",$_SERVER['HTTP_USER_AGENT'])
122
- ->prepareRequest()
123
- ->sendRequest();
124
-
125
- //}
126
- //else{
127
- //sending request
128
- //return boolean
129
- // $response = Mage::getModel('expertrec_recommendation/api_request')
130
- // ->setPrepareRequestStatus(false)
131
- // ->setData(array(
132
- // 'ci_id' => $ci_id,
133
- // 'item' => $uniqueId,
134
- // 'event' => 2,
135
- // 'sku' => $item->getSku(),
136
- // 'qty' => $item->getQtyOrdered(),
137
- // 'price' => $item->getPriceInclTax(),
138
- // 'domain' => $_SERVER['HTTP_HOST'],
139
- // 'ip' => isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'])
140
- //)
141
- //->setHeader("User-Agent",$_SERVER['HTTP_USER_AGENT'])
142
- //->prepareRequest()
143
- //->sendRequest();
144
-
145
- //}
146
 
147
  // Mage::getSingleton('expertrec_recommendation/log')->log("Order_Track: request made with uniqueId ".$uniqueId);
148
 
@@ -474,16 +431,9 @@ class Expertrec_Recommendation_Model_Observer {
474
  return $this;
475
  }
476
 
477
- // added url to track rtr
478
- $lastUrl = Mage::getSingleton('core/session')->getLastUrl();
479
- $currUrl = Mage::helper('core/url')->getCurrentUrl();
480
- $ci_id = $_COOKIE['ci_id'];
481
-
482
- // Mage::getSingleton('core/session')->setCartLastUrl($lastUrl);
483
- // Mage::getSingleton('core/session')->setCartCurrUrl($currUrl);
484
-
485
  //return unique product id
486
  $uniqueId = Mage::helper('expertrec_recommendation')->getUniqueId($product);
 
487
 
488
  //sending request
489
  //return boolean
@@ -491,8 +441,6 @@ class Expertrec_Recommendation_Model_Observer {
491
  ->setPrepareRequestStatus(false)
492
  ->setData(array(
493
  'ci_id' => $ci_id,
494
- 'lastUrl' => $lastUrl,
495
- 'currUrl' => $currUrl,
496
  'item' => $uniqueId,
497
  'event' => 17,
498
  'sku' => $product->getSku(),
23
  Mage::getSingleton('expertrec_recommendation/log')->log('AddToCart_Track: product is not a valid type',Zend_Log::ERR);
24
  return $this;
25
  }
 
 
 
 
 
 
 
 
 
26
  //return unique product id
27
  $uniqueId = Mage::helper('expertrec_recommendation')->getUniqueId($product);
28
+ $ci_id = $_COOKIE['ci_id'];
29
 
30
  //sending request
31
  //return boolean
32
  $response = Mage::getModel('expertrec_recommendation/api_request')
33
  ->setPrepareRequestStatus(false)
34
  ->setData(array(
35
+ 'ci_id' => $ci_id,
 
 
36
  'item' => $uniqueId,
37
  'event' => 3,
38
  'sku' => $product->getSku(),
81
 
82
  //return unique product id
83
  $uniqueId = Mage::helper('expertrec_recommendation')->getUniqueId($product, $item);
84
+ $ci_id = $_COOKIE['ci_id'];
85
 
86
+ //sending request
87
+ //return boolean
88
+ $response = Mage::getModel('expertrec_recommendation/api_request')
89
+ ->setPrepareRequestStatus(false)
90
+ ->setData(array(
91
+ 'ci_id' => $ci_id,
92
+ 'item' => $uniqueId,
93
+ 'event' => 2,
94
+ 'sku' => $item->getSku(),
95
+ 'qty' => $item->getQtyOrdered(),
96
+ 'price' => $item->getPriceInclTax(),
97
+ 'domain' => $_SERVER['HTTP_HOST'],
98
+ 'ip' => isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'])
99
+ )
100
+ ->setHeader("User-Agent",$_SERVER['HTTP_USER_AGENT'])
101
+ ->prepareRequest()
102
+ ->sendRequest();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
104
  // Mage::getSingleton('expertrec_recommendation/log')->log("Order_Track: request made with uniqueId ".$uniqueId);
105
 
431
  return $this;
432
  }
433
 
 
 
 
 
 
 
 
 
434
  //return unique product id
435
  $uniqueId = Mage::helper('expertrec_recommendation')->getUniqueId($product);
436
+ $ci_id = $_COOKIE['ci_id'];
437
 
438
  //sending request
439
  //return boolean
441
  ->setPrepareRequestStatus(false)
442
  ->setData(array(
443
  'ci_id' => $ci_id,
 
 
444
  'item' => $uniqueId,
445
  'event' => 17,
446
  'sku' => $product->getSku(),
app/code/community/Expertrec/Recommendation/controllers/ApiController.php CHANGED
@@ -27,7 +27,7 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
27
  const PUSHED_FEED_PAGES = 'expertrec/general/expertrec_feed_pushed_pages';
28
 
29
 
30
- const BUILD_NO = "1491991376";
31
  private $_password;
32
  private $_websiteId = array();
33
  private $_storeId = array();
@@ -786,7 +786,7 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
786
  //ver & host
787
  $siteArray['mage_ver'] = Mage::getVersion();
788
  $siteArray['php_ver'] = phpversion();
789
- $siteArray['expertrec_ver'] = '1.2.7';
790
  // currency details
791
  $siteArray['baseCurrency'] = Mage::app()->getStore()->getBaseCurrencyCode();
792
  $baseCurrencyCode = Mage::app()->getBaseCurrencyCode();
27
  const PUSHED_FEED_PAGES = 'expertrec/general/expertrec_feed_pushed_pages';
28
 
29
 
30
+ const BUILD_NO = "1492086935";
31
  private $_password;
32
  private $_websiteId = array();
33
  private $_storeId = array();
786
  //ver & host
787
  $siteArray['mage_ver'] = Mage::getVersion();
788
  $siteArray['php_ver'] = phpversion();
789
+ $siteArray['expertrec_ver'] = '1.2.8';
790
  // currency details
791
  $siteArray['baseCurrency'] = Mage::app()->getStore()->getBaseCurrencyCode();
792
  $baseCurrencyCode = Mage::app()->getBaseCurrencyCode();
app/code/community/Expertrec/Recommendation/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Expertrec_Recommendation>
5
- <version>1.2.7</version>
6
  </Expertrec_Recommendation>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Expertrec_Recommendation>
5
+ <version>1.2.8</version>
6
  </Expertrec_Recommendation>
7
  </modules>
8
  <global>
app/code/community/Expertrec/Recommendation/sql/expertrec_setup/{mysql4-install-1.2.7.php → mysql4-install-1.2.8.php} RENAMED
@@ -17,7 +17,7 @@ $result['status'] = "Installed";
17
  //magento version
18
  $result['mage_ver'] = $mage_ver;
19
  //expertrec version
20
- $result['expertrec_ver'] = '1.2.7';
21
  $result['php_ver'] = $php_ver;
22
  //Subdomain
23
  $result['site_subdomain'] = $uri;
17
  //magento version
18
  $result['mage_ver'] = $mage_ver;
19
  //expertrec version
20
+ $result['expertrec_ver'] = '1.2.8';
21
  $result['php_ver'] = $php_ver;
22
  //Subdomain
23
  $result['site_subdomain'] = $uri;
app/code/community/Expertrec/Recommendation/sql/expertrec_setup/{mysql4-upgrade-1.2.6-1.2.7.php → mysql4-upgrade-1.2.7-1.2.8.php} RENAMED
@@ -18,7 +18,7 @@ $result['status'] = "Upgraded";
18
  //magento version
19
  $result['mage_ver'] = $mage_ver;
20
  //expertrec version
21
- $result['expertrec_ver'] = '1.2.7';
22
  $result['php_ver'] = $php_ver;
23
  //hostname
24
  $result['site_protocol'] = $protocol;
18
  //magento version
19
  $result['mage_ver'] = $mage_ver;
20
  //expertrec version
21
+ $result['expertrec_ver'] = '1.2.8';
22
  $result['php_ver'] = $php_ver;
23
  //hostname
24
  $result['site_protocol'] = $protocol;
app/design/frontend/base/default/template/expertrec/recommendation/tracker.phtml CHANGED
@@ -31,9 +31,10 @@ if(typeof expertSiteConf == 'undefined' || expertSiteConf == null) {
31
 
32
  //Add website and store id
33
  <?php
34
- Mage::getModel('core/cookie')->set("webId",Mage::app()->getWebsite()->getId());
35
- Mage::getModel('core/cookie')->set("storeId",Mage::app()->getStore()->getId());
36
- Mage::getModel('core/cookie')->set("currency",Mage::app()->getStore()->getCurrentCurrencyCode());
 
37
  ?>
38
 
39
  /* * * DON'T EDIT BELOW LINE * * */
31
 
32
  //Add website and store id
33
  <?php
34
+ setcookie("webId",Mage::app()->getWebsite()->getId());
35
+ setcookie("storeId",Mage::app()->getStore()->getId());
36
+ setcookie("currency",Mage::app()->getStore()->getCurrentCurrencyCode());
37
+ setcookie("merchantId", Mage::getStoreConfig('expertrec/general/mid'));
38
  ?>
39
 
40
  /* * * DON'T EDIT BELOW LINE * * */
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Expertrec_Recommendation</name>
4
- <version>1.2.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Expertrec search extension helps you have complete control over your site search results. You will be able to add instant autocomplete, spell corrections that learn from the user behaviour on your site, and show product recommendations within the search user interface. It also adds search results pages with facets, sorting by different attributes.</description>
11
  <notes>Expertrec Recommendation plugin for magento sites.</notes>
12
  <authors><author><name>melchi</name><user>melchi</user><email>magento@cloudinfra.in</email></author><author><name>magento</name><user>magento</user><email>magento-team@cloudinfra.in</email></author></authors>
13
- <date>2017-04-12</date>
14
- <time>10:03:21</time>
15
- <contents><target name="magecommunity"><dir name="Expertrec"><dir name="Recommendation"><dir name="Block"><file name="Api.php" hash="c3c8aaecba77a27e228cb3cec34fa8dc"/></dir><dir name="Helper"><file name="Autocompletehelper.php" hash="7bd733d91f69091c1f6f5bb162467a43"/><file name="Data.php" hash="c3d423049c2d2b347258171b59d61848"/><file name="Filehelper.php" hash="deeb1e764f7fc7c1d749cb0ab2be64aa"/><dir name="Search"><file name="Layout.php" hash="c68c9d6c4def7daca0a0ae332dceaff3"/></dir><file name="Suggestionhelper.php" hash="1c34f031a920b07950420e148dff8e93"/></dir><dir name="Model"><dir name="Api"><file name="Request.php" hash="dd34241f00c6bea36700f768a3feef6e"/></dir><dir name="Feed"><file name="Feedconfig.php" hash="de0c332e9e1b4eb6c021feaa927d8250"/><file name="Feedcreator.php" hash="1115f203ea1bda87b423078c19ce543e"/><file name="Feedfilter.php" hash="c278681d9cf0fa03d62c308a73151eb2"/><file name="Formatter.php" hash="51866f6b6dcd8af0661cc31ff22a0ae1"/></dir><file name="Feed.php" hash="ddac87d6a060bc77fb7718e7b19e1273"/><file name="Log.php" hash="27fcee49e67fe2be761b4af94aecff2b"/><file name="Observer.php" hash="3363ad0e7f5cce5873d61bd88e6b2f1c"/><dir name="Translator"><file name="Category.php" hash="45402cee2ff6e204dac6471a3a9d5ea4"/></dir><file name="Validate.php" hash="f15e87fc29af912376b149307c731acc"/><dir name="Writer"><file name="Abstract.php" hash="6b5153c0a09f8d4ee6fe4cedc5ec8a64"/><file name="Csv.php" hash="427fea44d988302f409e1860c18875b1"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="c4f80c214d11fd531496e71b4951b27f"/></dir><file name="ApiController.php" hash="6155ce4754226517f5a5e261470ab42f"/><dir name="CatalogSearch"><file name="ResultController.php" hash="e740f44c0cef4aa83545f2278626e7de"/></dir><file name="ConfigController.php" hash="0fd9a9686806c26635c7db0a57a0f4ab"/><file name="IndexController.php" hash="7bfaa867dfa9bed0c7b0ebd634d2e2bb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0b24b4132ac25269fecc9fcee0d0d446"/><file name="config.xml" hash="ab9dd100c318f7d5014937cfd21be334"/></dir><dir name="sql"><dir name="expertrec_setup"><file name="mysql4-install-1.2.7.php" hash="aa260dc58973fc027a162e5a2fa81a8a"/><file name="mysql4-upgrade-1.2.6-1.2.7.php" hash="f7b1e4cfd4ea1b220974d3db6a2ae829"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Expertrec_Recommendation.xml" hash="c314465f907c89dfe912035be8d48e71"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="expertrec"><file name="recommendation.xml" hash="a1d166c3c3e665b476aaef69e0e6b792"/></dir></dir><dir name="template"><dir name="expertrec"><dir name="feed"><file name="info.phtml" hash="12aa7b095144dddd925369209a2f4478"/></dir><dir name="recommendation"><file name="tracker.phtml" hash="38b5d2ac10a6710a0a6b1dd93a068e84"/><dir name="tracking"><file name="product.phtml" hash="e02d3f870397cf351bc0ff7ca864c7e2"/></dir></dir><dir name="search"><file name="custom.phtml" hash="0f162aa949c00329e3697f0a71abc43d"/><file name="list.phtml" hash="cda3f434a1e70f1272f62bb9f0848726"/><file name="view.phtml" hash="ecb9a55f6128bef2f10d66528dc5424b"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="expertrec"><file name="recommendation.xml" hash="115d3023af9566c37e39d003a25e031a"/></dir></dir><dir name="template"><dir name="expertrec"><dir name="recommendation"><file name="notifications.phtml" hash="4f965be2e3ed310a8b4ce271ad064ee4"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Expertrec_Recommendation</name>
4
+ <version>1.2.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
10
  <description>Expertrec search extension helps you have complete control over your site search results. You will be able to add instant autocomplete, spell corrections that learn from the user behaviour on your site, and show product recommendations within the search user interface. It also adds search results pages with facets, sorting by different attributes.</description>
11
  <notes>Expertrec Recommendation plugin for magento sites.</notes>
12
  <authors><author><name>melchi</name><user>melchi</user><email>magento@cloudinfra.in</email></author><author><name>magento</name><user>magento</user><email>magento-team@cloudinfra.in</email></author></authors>
13
+ <date>2017-04-13</date>
14
+ <time>12:35:54</time>
15
+ <contents><target name="magecommunity"><dir name="Expertrec"><dir name="Recommendation"><dir name="Block"><file name="Api.php" hash="c3c8aaecba77a27e228cb3cec34fa8dc"/></dir><dir name="Helper"><file name="Autocompletehelper.php" hash="7bd733d91f69091c1f6f5bb162467a43"/><file name="Data.php" hash="c3d423049c2d2b347258171b59d61848"/><file name="Filehelper.php" hash="deeb1e764f7fc7c1d749cb0ab2be64aa"/><dir name="Search"><file name="Layout.php" hash="c68c9d6c4def7daca0a0ae332dceaff3"/></dir><file name="Suggestionhelper.php" hash="1c34f031a920b07950420e148dff8e93"/></dir><dir name="Model"><dir name="Api"><file name="Request.php" hash="dd34241f00c6bea36700f768a3feef6e"/></dir><dir name="Feed"><file name="Feedconfig.php" hash="de0c332e9e1b4eb6c021feaa927d8250"/><file name="Feedcreator.php" hash="1115f203ea1bda87b423078c19ce543e"/><file name="Feedfilter.php" hash="c278681d9cf0fa03d62c308a73151eb2"/><file name="Formatter.php" hash="51866f6b6dcd8af0661cc31ff22a0ae1"/></dir><file name="Feed.php" hash="ddac87d6a060bc77fb7718e7b19e1273"/><file name="Log.php" hash="27fcee49e67fe2be761b4af94aecff2b"/><file name="Observer.php" hash="d8255a403080564c29218c9eefea709d"/><dir name="Translator"><file name="Category.php" hash="45402cee2ff6e204dac6471a3a9d5ea4"/></dir><file name="Validate.php" hash="f15e87fc29af912376b149307c731acc"/><dir name="Writer"><file name="Abstract.php" hash="6b5153c0a09f8d4ee6fe4cedc5ec8a64"/><file name="Csv.php" hash="427fea44d988302f409e1860c18875b1"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="c4f80c214d11fd531496e71b4951b27f"/></dir><file name="ApiController.php" hash="7e2f6dcc575ca49c95cf9a934d9be45c"/><dir name="CatalogSearch"><file name="ResultController.php" hash="e740f44c0cef4aa83545f2278626e7de"/></dir><file name="ConfigController.php" hash="0fd9a9686806c26635c7db0a57a0f4ab"/><file name="IndexController.php" hash="7bfaa867dfa9bed0c7b0ebd634d2e2bb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0b24b4132ac25269fecc9fcee0d0d446"/><file name="config.xml" hash="d6a108556ec8f52114d2c818d0b27f39"/></dir><dir name="sql"><dir name="expertrec_setup"><file name="mysql4-install-1.2.8.php" hash="953c9209bfa95842b96c72848cf5e459"/><file name="mysql4-upgrade-1.2.7-1.2.8.php" hash="0a4dd654cc571cc87599d16c0063ed57"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Expertrec_Recommendation.xml" hash="c314465f907c89dfe912035be8d48e71"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="expertrec"><file name="recommendation.xml" hash="a1d166c3c3e665b476aaef69e0e6b792"/></dir></dir><dir name="template"><dir name="expertrec"><dir name="feed"><file name="info.phtml" hash="12aa7b095144dddd925369209a2f4478"/></dir><dir name="recommendation"><file name="tracker.phtml" hash="b0f50d31f18b08d69c7d9b7073798b4b"/><dir name="tracking"><file name="product.phtml" hash="e02d3f870397cf351bc0ff7ca864c7e2"/></dir></dir><dir name="search"><file name="custom.phtml" hash="0f162aa949c00329e3697f0a71abc43d"/><file name="list.phtml" hash="cda3f434a1e70f1272f62bb9f0848726"/><file name="view.phtml" hash="ecb9a55f6128bef2f10d66528dc5424b"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="expertrec"><file name="recommendation.xml" hash="115d3023af9566c37e39d003a25e031a"/></dir></dir><dir name="template"><dir name="expertrec"><dir name="recommendation"><file name="notifications.phtml" hash="4f965be2e3ed310a8b4ce271ad064ee4"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>