Expertrec_Recommendation - Version 1.1.5

Version Notes

Expertrec Recommendation plugin for magento sites.

Download this release

Release Info

Developer melchi
Extension Expertrec_Recommendation
Version 1.1.5
Comparing to
See all releases


Code changes from version 1.1.4 to 1.1.5

app/code/community/Expertrec/Recommendation/Block/Api.php CHANGED
@@ -119,7 +119,7 @@ class Expertrec_Recommendation_Block_Api extends Mage_Core_Block_Template{
119
  foreach ($stores as $oStore) {
120
  $sid=$oStore->getId();
121
  $websiteStoreRow = array();
122
- $apiUrl=$this->getBaseUrl().'index.php/expertrec-feed?secret='.$this->getSecret().'&cmd=export&wid='.$wid.'&sid='.$sid;
123
  // Display the store-website details with feed api
124
 
125
  $websiteStoreRow["wid"] = $wid;
@@ -129,13 +129,10 @@ class Expertrec_Recommendation_Block_Api extends Mage_Core_Block_Template{
129
  $websiteStoreRow["surl"] = $apiUrl;
130
 
131
  try{
132
- $collection=$feedFilter->addBasicFilter($website,$oStore)
133
- ->setPageSize(500);
134
- $pages = $collection->getLastPageNumber();
135
- $websiteStoreRow["pages"] = (string)$pages;
136
 
137
  }catch(Exception $e){
138
- $websiteStoreRow["pageerr"] = $e.getMessage();
139
  }
140
 
141
  array_push($websiteStoreData,$websiteStoreRow);
119
  foreach ($stores as $oStore) {
120
  $sid=$oStore->getId();
121
  $websiteStoreRow = array();
122
+ $apiUrl=Mage::app()->getStore($sid)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'index.php/expertrec-feed?secret='.$this->getSecret().'&cmd=export&wid='.$wid.'&sid='.$sid;
123
  // Display the store-website details with feed api
124
 
125
  $websiteStoreRow["wid"] = $wid;
129
  $websiteStoreRow["surl"] = $apiUrl;
130
 
131
  try{
132
+ $websiteStoreRow["pcount"] = Mage::helper('expertrec_recommendation')->getProductCount($wid,$sid);
 
 
 
133
 
134
  }catch(Exception $e){
135
+ $websiteStoreRow["pcounterr"] = $e.getMessage();
136
  }
137
 
138
  array_push($websiteStoreData,$websiteStoreRow);
app/code/community/Expertrec/Recommendation/Helper/Data.php CHANGED
@@ -235,6 +235,20 @@ class Expertrec_Recommendation_Helper_Data extends Mage_Core_Helper_Abstract {
235
  return true;
236
  }
237
 
238
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  }
240
  ?>
235
  return true;
236
  }
237
 
238
+ /*
239
+ Fetching number of products per store, per website
240
+ */
241
+ public function getProductCount($wid,$sid)
242
+ {
243
+ $productcount = 0;
244
+
245
+ $collection = Mage::getResourceModel('catalog/product_collection');
246
+ $collection->addStoreFilter($sid);
247
+ $collection->addWebsiteFilter($wid);
248
+ // Retrieve product count in collection
249
+ $productcount = $collection->getSize();
250
+
251
+ return $productcount;
252
+ }
253
  }
254
  ?>
app/code/community/Expertrec/Recommendation/controllers/ApiController.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_Action {
4
- const BUILD_NO = "1486454605";
5
  private $_password;
6
 
7
  //main function which loads the feed API
1
  <?php
2
 
3
  class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_Action {
4
+ const BUILD_NO = "1487051832";
5
  private $_password;
6
 
7
  //main function which loads the feed API
app/code/community/Expertrec/Recommendation/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Expertrec_Recommendation>
5
- <version>1.1.4</version>
6
  </Expertrec_Recommendation>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Expertrec_Recommendation>
5
+ <version>1.1.5</version>
6
  </Expertrec_Recommendation>
7
  </modules>
8
  <global>
app/code/community/Expertrec/Recommendation/sql/expertrec_setup/mysql4-install-1.0.0.php CHANGED
File without changes
app/design/frontend/base/default/template/expertrec/feed/info.phtml CHANGED
@@ -87,7 +87,7 @@
87
  <th>Website Name</th>
88
  <th>Store ID</th>
89
  <th>Store Name</th>
90
- <th>Total Pages</th>
91
  <th>Url</th>
92
  </tr>
93
  </thead>
@@ -97,15 +97,16 @@
97
  <td style="text-align:center;"><?php echo $_item['wid'] ?></td>
98
  <td style="text-align:center;"><?php echo $_item['wname'] ?></td>
99
  <td style="text-align:center;"><?php echo $_item['sid'] ?></td>
100
- <?php if(isset($_item['pages'])): ?>
101
- <td style="text-align:center;"><?php echo $_item['pages'] ?></td>
 
102
  <?php endif;?>
103
- <?php if(isset($_item['pageerr'])): ?>
104
  <td style="text-align:center;"><b style="color:red;">Error: </b>
105
- <?php echo $_item['pageerr'] ?>
106
  </td>
107
- <?php endif;?>
108
- <td style="text-align:center;"><?php echo $_item['sid'] ?></td>
109
  <td><a href = "<?php echo $_item['surl'] ?>"><?php echo $_item['surl'] ?></a></td>
110
  </tr>
111
  <?php endforeach; ?>
@@ -249,7 +250,7 @@
249
  </form>
250
  </fieldset>
251
  <!--Displaying selected headers-->
252
- <?php if(!empty(Mage::getStoreConfig('expertrec/general/headers')) &&
253
  isset($storedHeaders) && count($storedHeaders) > 0): ?>
254
  <fieldset style="margin-top:20px;">
255
  <legend>Selected Headers</legend>
87
  <th>Website Name</th>
88
  <th>Store ID</th>
89
  <th>Store Name</th>
90
+ <th>Total# Products</th>
91
  <th>Url</th>
92
  </tr>
93
  </thead>
97
  <td style="text-align:center;"><?php echo $_item['wid'] ?></td>
98
  <td style="text-align:center;"><?php echo $_item['wname'] ?></td>
99
  <td style="text-align:center;"><?php echo $_item['sid'] ?></td>
100
+ <td style="text-align:center;"><?php echo $_item['sname'] ?></td>
101
+ <?php if(isset($_item['pcount'])): ?>
102
+ <td style="text-align:center;"><?php echo $_item['pcount'] ?></td>
103
  <?php endif;?>
104
+ <?php if(isset($_item['pcounterr'])): ?>
105
  <td style="text-align:center;"><b style="color:red;">Error: </b>
106
+ <?php echo $_item['pcounterr'] ?>
107
  </td>
108
+ <?php endif;?>
109
+
110
  <td><a href = "<?php echo $_item['surl'] ?>"><?php echo $_item['surl'] ?></a></td>
111
  </tr>
112
  <?php endforeach; ?>
250
  </form>
251
  </fieldset>
252
  <!--Displaying selected headers-->
253
+ <?php if(!empty($storedHeaders) &&
254
  isset($storedHeaders) && count($storedHeaders) > 0): ?>
255
  <fieldset style="margin-top:20px;">
256
  <legend>Selected Headers</legend>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Expertrec_Recommendation</name>
4
- <version>1.1.4</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-02-07</date>
14
- <time>08:05:18</time>
15
- <contents><target name="magecommunity"><dir name="Expertrec"><dir name="Recommendation"><dir name="Block"><file name="Api.php" hash="3081b070b4e233dbb642610ce8f258b5"/><dir name="Product"><dir name="List"><file name="Toolbar.php" hash="bd05a0d7473829c47662e6b763907ea6"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="5d0519a4bc78aca319c22f3cc7fcb34d"/><file name="Filehelper.php" hash="5ac956e12548398dc159a16eb1a03e8b"/><dir name="Search"><file name="Layout.php" hash="d7b7ec5f4bbd846dd063934f8a267d48"/></dir><file name="Searchhelper.php" hash="dfc4fc81fea519c15517f53645488c7a"/><file name="Suggestionhelper.php" hash="93f3aa295761a510f782856c0180a799"/></dir><dir name="Model"><dir name="Api"><file name="Request.php" hash="7df8b22d74b6a05de86da287687a6e96"/></dir><dir name="Catalogsearch"><file name="Layer.php" hash="2b6252ed8bb4c44d0a1c44b2e7dcc1d8"/></dir><dir name="Feed"><file name="Feedconfig.php" hash="013bd447dccc7cc4f073be5bd53a18c9"/><file name="Feedcreator.php" hash="fa6cf4590cf81073325b6717c8951486"/><file name="Feedfilter.php" hash="d7599a63a8d1f2033cb1e56204809c2d"/><file name="Formatter.php" hash="cb0d747319ef70e122c3558edaf89626"/></dir><file name="Feed.php" hash="ddac87d6a060bc77fb7718e7b19e1273"/><file name="Log.php" hash="27fcee49e67fe2be761b4af94aecff2b"/><file name="Observer.php" hash="5aedaf6c18314b6abee906577e77767f"/><dir name="Translator"><file name="Category.php" hash="dd209cdda3a1a62042a8a3360ee2dbac"/></dir><file name="Validate.php" hash="7a5fd226b0055e39b725975113e42ee5"/><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="acee369983ece308acc6f17ed61ff7d6"/><dir name="CatalogSearch"><file name="ResultController.php" hash="9cb1406e901701ea58e663433358a4c6"/></dir><file name="ConfigController.php" hash="0fd9a9686806c26635c7db0a57a0f4ab"/><file name="IndexController.php" hash="7bfaa867dfa9bed0c7b0ebd634d2e2bb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e86ff2b7aac4d09a4c359f0047b06ca3"/><file name="config.xml" hash="f970fd1bfd4323512c929362ab3d26af"/></dir><dir name="sql"><dir name="expertrec_setup"><file name="mysql4-install-1.0.0.php" hash="4e7e163698fdca36df8c3dd2bd4ceef7"/></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="061b28ab9009ff2346977cebe2333cb8"/></dir></dir><dir name="template"><dir name="expertrec"><dir name="feed"><file name="info.phtml" hash="b7c1069fe88c3eda185383ac75884955"/></dir><dir name="recommendation"><file name="tracker.phtml" hash="c4da6289ad644d96d7dac9b5521ae3a1"/><dir name="tracking"><file name="product.phtml" hash="e02d3f870397cf351bc0ff7ca864c7e2"/></dir></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.1.5</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-02-14</date>
14
+ <time>05:58:12</time>
15
+ <contents><target name="magecommunity"><dir name="Expertrec"><dir name="Recommendation"><dir name="Block"><file name="Api.php" hash="f606f34d734d892701b88b97b1b49c83"/><dir name="Product"><dir name="List"><file name="Toolbar.php" hash="bd05a0d7473829c47662e6b763907ea6"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="364ab05880bed5e6a02f20bcca1b993c"/><file name="Filehelper.php" hash="5ac956e12548398dc159a16eb1a03e8b"/><dir name="Search"><file name="Layout.php" hash="d7b7ec5f4bbd846dd063934f8a267d48"/></dir><file name="Searchhelper.php" hash="dfc4fc81fea519c15517f53645488c7a"/><file name="Suggestionhelper.php" hash="93f3aa295761a510f782856c0180a799"/></dir><dir name="Model"><dir name="Api"><file name="Request.php" hash="7df8b22d74b6a05de86da287687a6e96"/></dir><dir name="Catalogsearch"><file name="Layer.php" hash="2b6252ed8bb4c44d0a1c44b2e7dcc1d8"/></dir><dir name="Feed"><file name="Feedconfig.php" hash="013bd447dccc7cc4f073be5bd53a18c9"/><file name="Feedcreator.php" hash="fa6cf4590cf81073325b6717c8951486"/><file name="Feedfilter.php" hash="d7599a63a8d1f2033cb1e56204809c2d"/><file name="Formatter.php" hash="cb0d747319ef70e122c3558edaf89626"/></dir><file name="Feed.php" hash="ddac87d6a060bc77fb7718e7b19e1273"/><file name="Log.php" hash="27fcee49e67fe2be761b4af94aecff2b"/><file name="Observer.php" hash="5aedaf6c18314b6abee906577e77767f"/><dir name="Translator"><file name="Category.php" hash="dd209cdda3a1a62042a8a3360ee2dbac"/></dir><file name="Validate.php" hash="7a5fd226b0055e39b725975113e42ee5"/><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="936f1ab4a41a2cdc893ce3e2940e9e43"/><dir name="CatalogSearch"><file name="ResultController.php" hash="9cb1406e901701ea58e663433358a4c6"/></dir><file name="ConfigController.php" hash="0fd9a9686806c26635c7db0a57a0f4ab"/><file name="IndexController.php" hash="7bfaa867dfa9bed0c7b0ebd634d2e2bb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e86ff2b7aac4d09a4c359f0047b06ca3"/><file name="config.xml" hash="e081e8db7d726968795d765511f397f3"/></dir><dir name="sql"><dir name="expertrec_setup"><file name="mysql4-install-1.0.0.php" hash="4e7e163698fdca36df8c3dd2bd4ceef7"/></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="061b28ab9009ff2346977cebe2333cb8"/></dir></dir><dir name="template"><dir name="expertrec"><dir name="feed"><file name="info.phtml" hash="28ea4ca6cae0760c0ab1867908769695"/></dir><dir name="recommendation"><file name="tracker.phtml" hash="c4da6289ad644d96d7dac9b5521ae3a1"/><dir name="tracking"><file name="product.phtml" hash="e02d3f870397cf351bc0ff7ca864c7e2"/></dir></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>