Version Notes
Expertrec Recommendation plugin for magento sites.
Download this release
Release Info
Developer | melchi |
Extension | Expertrec_Recommendation |
Version | 1.2.6 |
Comparing to | |
See all releases |
Code changes from version 1.2.5 to 1.2.6
- app/code/community/Expertrec/Recommendation/Model/Feed/Feedfilter.php +68 -49
- app/code/community/Expertrec/Recommendation/Model/Observer.php +51 -0
- app/code/community/Expertrec/Recommendation/controllers/ApiController.php +25 -50
- app/code/community/Expertrec/Recommendation/etc/config.xml +1 -1
- app/code/community/Expertrec/Recommendation/sql/expertrec_setup/{mysql4-install-1.2.5.php → mysql4-install-1.2.6.php} +1 -1
- app/code/community/Expertrec/Recommendation/sql/expertrec_setup/{mysql4-upgrade-1.2.4-1.2.5.php → mysql4-upgrade-1.2.5-1.2.6.php} +1 -1
- package.xml +4 -4
app/code/community/Expertrec/Recommendation/Model/Feed/Feedfilter.php
CHANGED
@@ -1,52 +1,71 @@
|
|
1 |
<?php
|
2 |
-
class Expertrec_Recommendation_Model_Feed_Feedfilter {
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
-
}
|
52 |
?>
|
1 |
<?php
|
2 |
+
class Expertrec_Recommendation_Model_Feed_Feedfilter {
|
3 |
+
// adding filters selected form info page
|
4 |
+
const CONFIG_FILTERS = 'expertrec/general/filters';
|
5 |
+
|
6 |
+
public function addBasicFilter(Mage_Core_Model_Website $website,Mage_Core_Model_Store $oStore){
|
7 |
+
|
8 |
+
$collection = Mage::getModel('catalog/product')->getCollection();
|
9 |
+
|
10 |
+
$storedFilters = Mage::getStoreConfig(self::CONFIG_FILTERS);
|
11 |
+
$storedFiltersArray = array();
|
12 |
+
if(isset($storedFilters)){
|
13 |
+
if(!empty($storedFilters)){
|
14 |
+
$storedFiltersArray = explode(',', $storedFilters);
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
$visible_1 = in_array('not_visible_individually',$storedFiltersArray) ? 1 : 0;
|
19 |
+
$visible_2 = in_array('visible_catalog',$storedFiltersArray) ? 2 : 0;
|
20 |
+
$visible_3 = in_array('visible_search',$storedFiltersArray) ? 3 : 0;
|
21 |
+
$visible_4 = in_array('visible_catalog_search',$storedFiltersArray) ? 4 : 0;
|
22 |
+
$visiblityCondition = array('in' => array("$visible_1","$visible_2","$visible_3","$visible_4"));
|
23 |
+
|
24 |
+
$coreResource = Mage::getSingleton("core/resource");
|
25 |
+
$catalogInventoryTable = method_exists($coreResource, 'getTableName')
|
26 |
+
? $coreResource->getTableName('cataloginventory_stock_item') : 'cataloginventory_stock_item';
|
27 |
+
$stockfields = array("qty" => "qty", "manage_stock" => "manage_stock",
|
28 |
+
"use_config_manage_stock" => "use_config_manage_stock", "is_in_stock" => "is_in_stock");
|
29 |
+
|
30 |
+
$collection
|
31 |
+
->addWebsiteFilter($website->getWebsiteId())
|
32 |
+
->setStoreId($oStore->getId())
|
33 |
+
->addAttributeToSelect('*')
|
34 |
+
->joinTable($catalogInventoryTable, 'product_id=entity_id', $stockfields, null, 'left')
|
35 |
+
->addCategoryIds()
|
36 |
+
// ->addAttributeToFilter('visibility',$visiblityCondition)
|
37 |
+
->addPriceData(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID, $website->getWebsiteId());
|
38 |
+
|
39 |
+
if(in_array('not_visible_individually',$storedFiltersArray) || in_array('visible_catalog',$storedFiltersArray) || in_array('visible_search',$storedFiltersArray) || in_array('visible_catalog_search',$storedFiltersArray) ){
|
40 |
+
$collection->addAttributeToFilter('visibility',$visiblityCondition);
|
41 |
+
}
|
42 |
+
|
43 |
+
// if(in_array('filter_by_stock',$storedFiltersArray)){
|
44 |
+
// $collection
|
45 |
+
// ->joinField(
|
46 |
+
// 'is_in_stock',
|
47 |
+
// 'cataloginventory/stock_item',
|
48 |
+
// 'is_in_stock',
|
49 |
+
// 'product_id=entity_id',
|
50 |
+
// '{{table}}.stock_id=1',
|
51 |
+
// 'left'
|
52 |
+
// )
|
53 |
+
// ->addAttributeToFilter('is_in_stock', array('eq' => 1));
|
54 |
+
// }
|
55 |
+
|
56 |
+
// if(in_array('filter_by_status',$storedFiltersArray)){
|
57 |
+
// $collection->addAttributeToFilter('status', array('eq' => 1));
|
58 |
+
// }
|
59 |
+
|
60 |
+
//filters out products which are Disabled
|
61 |
+
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
62 |
+
|
63 |
+
// echo "collection <pre>";
|
64 |
+
// print_r($collection->getSize());
|
65 |
+
// print_r($collection->getData());
|
66 |
+
// exit();
|
67 |
+
|
68 |
+
return $collection;
|
69 |
}
|
70 |
+
}
|
71 |
?>
|
app/code/community/Expertrec/Recommendation/Model/Observer.php
CHANGED
@@ -12,6 +12,7 @@ class Expertrec_Recommendation_Model_Observer {
|
|
12 |
const FEED_LOG_ENDPOINT = 'expertrec/general/log_endpoint';
|
13 |
const SEARCH_LIST_ENABLE = 'search/enable';
|
14 |
const SEARCH_CUSTOM_TEMPLATE = 'search/custom_template';
|
|
|
15 |
/**
|
16 |
* Method to track the add to cart
|
17 |
*/
|
@@ -212,6 +213,20 @@ class Expertrec_Recommendation_Model_Observer {
|
|
212 |
return $this;
|
213 |
}
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
//sending request
|
216 |
$response = Mage::getModel('expertrec_recommendation/api_request')
|
217 |
->setPrepareRequestStatus(false)
|
@@ -265,6 +280,21 @@ class Expertrec_Recommendation_Model_Observer {
|
|
265 |
->prepareRow($header,$product);
|
266 |
|
267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
//sending request
|
269 |
$response = Mage::getModel('expertrec_recommendation/api_request')
|
270 |
->setPrepareRequestStatus(false)
|
@@ -337,6 +367,24 @@ class Expertrec_Recommendation_Model_Observer {
|
|
337 |
->setPrepareRequestStatus(true)
|
338 |
->sendRequest();
|
339 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
if(!$response) {
|
341 |
$logger->log('request failed for category with Id #'.$category->getId());
|
342 |
}
|
@@ -469,6 +517,9 @@ class Expertrec_Recommendation_Model_Observer {
|
|
469 |
$endpoint = Mage::getStoreConfig(self::FEED_LOG_ENDPOINT);
|
470 |
$mid = Mage::getModel('expertrec_recommendation/validate')->getSiteKey();
|
471 |
|
|
|
|
|
|
|
472 |
if(empty($endpoint) || empty($mid)){
|
473 |
Mage::getSingleton('expertrec_recommendation/log')
|
474 |
->log("feed endpoint: ".$endpoint." or merchand id: ".$mid." is not configured Properly");
|
12 |
const FEED_LOG_ENDPOINT = 'expertrec/general/log_endpoint';
|
13 |
const SEARCH_LIST_ENABLE = 'search/enable';
|
14 |
const SEARCH_CUSTOM_TEMPLATE = 'search/custom_template';
|
15 |
+
const MERCHANT_ID = 'expertrec/general/mid';
|
16 |
/**
|
17 |
* Method to track the add to cart
|
18 |
*/
|
213 |
return $this;
|
214 |
}
|
215 |
|
216 |
+
//sending request
|
217 |
+
$response = Mage::getModel('expertrec_recommendation/api_request')
|
218 |
+
->setPrepareRequestStatus(false)
|
219 |
+
->setUserId('expertrec')
|
220 |
+
->setUrl($finalUrl)
|
221 |
+
->setMethod(Zend_Http_Client::DELETE)
|
222 |
+
->setData(array('item' => $product->getId()))
|
223 |
+
->setPrepareRequestStatus(true)
|
224 |
+
->sendRequest();
|
225 |
+
|
226 |
+
$mid = Mage::getStoreConfig(self::MERCHANT_ID);
|
227 |
+
$feedUrl = "https://feed.expertrec.com/magento/n01eba6261ad7f174cd3a16523e86e65/";
|
228 |
+
$finalUrl = $feedUrl.''.$mid.'/';
|
229 |
+
|
230 |
//sending request
|
231 |
$response = Mage::getModel('expertrec_recommendation/api_request')
|
232 |
->setPrepareRequestStatus(false)
|
280 |
->prepareRow($header,$product);
|
281 |
|
282 |
|
283 |
+
//sending request
|
284 |
+
$response = Mage::getModel('expertrec_recommendation/api_request')
|
285 |
+
->setPrepareRequestStatus(false)
|
286 |
+
->setUserId('expertrec')
|
287 |
+
->setUrl($finalUrl)
|
288 |
+
->setMethod(Zend_Http_Client::POST)
|
289 |
+
->setData($resultArray)
|
290 |
+
->setHeader("Content-Type",'application/json')
|
291 |
+
->setPrepareRequestStatus(true)
|
292 |
+
->sendRequest();
|
293 |
+
|
294 |
+
$mid = Mage::getStoreConfig(self::MERCHANT_ID);
|
295 |
+
$feedUrl = "https://feed.expertrec.com/magento/n01eba6261ad7f174cd3a16523e86e65/";
|
296 |
+
$finalUrl = $feedUrl.''.$mid.'/product';
|
297 |
+
|
298 |
//sending request
|
299 |
$response = Mage::getModel('expertrec_recommendation/api_request')
|
300 |
->setPrepareRequestStatus(false)
|
367 |
->setPrepareRequestStatus(true)
|
368 |
->sendRequest();
|
369 |
|
370 |
+
$mid = Mage::getStoreConfig(self::MERCHANT_ID);
|
371 |
+
$feedUrl = "https://feed.expertrec.com/magento/n01eba6261ad7f174cd3a16523e86e65/";
|
372 |
+
$finalUrl = $feedUrl.''.$mid.'/category';
|
373 |
+
|
374 |
+
//sending request
|
375 |
+
$response = Mage::getModel('expertrec_recommendation/api_request')
|
376 |
+
->setPrepareRequestStatus(false)
|
377 |
+
->setUserId('expertrec')
|
378 |
+
->setUrl($finalUrl)
|
379 |
+
->setMethod(Zend_Http_Client::POST)
|
380 |
+
->setData($categoryArray)
|
381 |
+
->setHeader("Content-Type",'application/json')
|
382 |
+
->setPrepareRequestStatus(true)
|
383 |
+
->sendRequest();
|
384 |
+
|
385 |
+
|
386 |
+
|
387 |
+
|
388 |
if(!$response) {
|
389 |
$logger->log('request failed for category with Id #'.$category->getId());
|
390 |
}
|
517 |
$endpoint = Mage::getStoreConfig(self::FEED_LOG_ENDPOINT);
|
518 |
$mid = Mage::getModel('expertrec_recommendation/validate')->getSiteKey();
|
519 |
|
520 |
+
// $endpoint = "https://feed.expertrec.com/magento/n01eba6261ad7f174cd3a16523e86e65/";
|
521 |
+
// $mid = Mage::getStoreConfig(self::MERCHANT_ID);
|
522 |
+
|
523 |
if(empty($endpoint) || empty($mid)){
|
524 |
Mage::getSingleton('expertrec_recommendation/log')
|
525 |
->log("feed endpoint: ".$endpoint." or merchand id: ".$mid." is not configured Properly");
|
app/code/community/Expertrec/Recommendation/controllers/ApiController.php
CHANGED
@@ -26,7 +26,7 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
26 |
const CONFIG_SECRET = 'expertrec/general/secret';
|
27 |
|
28 |
|
29 |
-
const BUILD_NO = "
|
30 |
private $_password;
|
31 |
|
32 |
//main function which loads the feed API
|
@@ -833,13 +833,8 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
833 |
}
|
834 |
}
|
835 |
|
836 |
-
$logger->log("product count ".print_r($array,1));
|
837 |
|
838 |
-
// feedUrl as api to userpushfeed
|
839 |
-
$feedUrl = "https://feed.expertrec.com/magento/b01eba6261ad7f174cd3a16523e86e65/";
|
840 |
-
|
841 |
-
// finalurl added with merchant id
|
842 |
-
$finalUrl = $feedUrl.''.$mid.'/';
|
843 |
$array_count = array('secrete' => $secret, 'product_count' => $array );
|
844 |
// sending request
|
845 |
$response = Mage::getModel('expertrec_recommendation/api_request')
|
@@ -852,7 +847,7 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
852 |
->setPrepareRequestStatus(true)
|
853 |
->sendRequest();
|
854 |
|
855 |
-
|
856 |
if(!$response) {
|
857 |
$logger->log('UserFeedPush_Track: request failed for total_count');
|
858 |
}
|
@@ -869,32 +864,16 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
869 |
//Increase maximum execution time to 5 hours (default in magento)
|
870 |
set_time_limit(18000);
|
871 |
|
872 |
-
|
873 |
-
//avoid apache to kill the php running
|
874 |
-
ignore_user_abort(true);
|
875 |
-
ob_start();//start buffer output
|
876 |
-
$logger->log("Pull Feed started in background.");
|
877 |
-
echo "Pull Feed started in background.";
|
878 |
-
//close session file on server side to avoid blocking other requests
|
879 |
-
session_write_close();
|
880 |
-
//send header to avoid the browser side to take content as gzip format
|
881 |
-
header("Content-Encoding: none");
|
882 |
-
header("Content-Length: ".ob_get_length());
|
883 |
-
header("Connection: close");
|
884 |
-
ob_end_flush();
|
885 |
-
flush();
|
886 |
-
|
887 |
-
$logger->log("checking for mid and secret");
|
888 |
// set&get mid and secret if mid is new_user
|
889 |
$data = $this->getMidSecret();
|
890 |
$mid = $data['merchantid'];
|
891 |
$secret = $data['secret'];
|
892 |
|
893 |
// feedUrl as api to userpushfeed
|
894 |
-
$feedUrl = "https://feed.expertrec.com/magento/
|
895 |
// finalurl added with merchant id
|
896 |
$finalUrl = $feedUrl.''.$mid.'/';
|
897 |
-
$logger->log("checking for product count");
|
898 |
// calculate number of products and send
|
899 |
$this->getProductCount($finalUrl,$secret);
|
900 |
|
@@ -905,7 +884,6 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
905 |
// get headers
|
906 |
$storedHeaders = Mage::getStoreConfig(self::CONFIG_HEADERS);
|
907 |
|
908 |
-
$logger->log("checking for feed headers");
|
909 |
if (isset($storedHeaders)){
|
910 |
$header = explode(',', $storedHeaders);
|
911 |
}
|
@@ -917,17 +895,13 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
917 |
$websiteCollection = Mage::getModel('core/website')->getCollection()->load();
|
918 |
// $websitecount = count($websiteCollection);
|
919 |
$websitecount = $websiteCollection->getSize();
|
920 |
-
$logger->log("collecting total website info ");
|
921 |
foreach ($websiteCollection as $website){
|
922 |
$websiteId=$website->getWebsiteId();
|
923 |
-
$logger->log("collecting website info for website #".$websiteId);
|
924 |
foreach ($website->getGroups() as $group) {
|
925 |
// all stores
|
926 |
-
$logger->log("collecting total store info");
|
927 |
$stores = $group->getStores();
|
928 |
foreach ($stores as $oStore) {
|
929 |
$storeId=$oStore->getId();
|
930 |
-
$logger->log("collecting store info for store #".$storeId);
|
931 |
|
932 |
$collection=$filter->addBasicFilter($website,$oStore)
|
933 |
->setPageSize($feedConfig->pageSize);
|
@@ -949,7 +923,6 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
949 |
|
950 |
// // get all products
|
951 |
// $collection = $filter->addBasicFilter($website,$oStore);
|
952 |
-
$logger->log("getting collection object");
|
953 |
foreach ($collection as $product) {
|
954 |
try{
|
955 |
|
@@ -969,7 +942,7 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
969 |
->setPrepareRequestStatus(true)
|
970 |
->sendRequest();
|
971 |
|
972 |
-
$logger->log('UserFeedPush_Track: request succeded for product with Id #'.$product->getId().' of store '.$storeId);
|
973 |
if(!$response) {
|
974 |
$logger->log('UserFeedPush_Track: request failed for product with Id #'.$product->getId());
|
975 |
}
|
@@ -1021,27 +994,29 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
|
|
1021 |
pull feed from info page
|
1022 |
*/
|
1023 |
public function pullFeedAction(){
|
|
|
1024 |
try{
|
1025 |
-
//return array of all parameters sent
|
1026 |
-
$requestParams = Mage::app()->getRequest()->getParams();
|
1027 |
-
$Password = isset($requestParams['secret']) ? $requestParams['secret'] : '';
|
1028 |
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1035 |
|
1036 |
-
if($Password == '' || $Password != $storedPwd){
|
1037 |
-
die('ERROR: The specified password is invalid.');
|
1038 |
-
}
|
1039 |
-
else{
|
1040 |
-
$this->pushFeedAction();
|
1041 |
-
die("Feed pulled successfully.");
|
1042 |
-
}
|
1043 |
}catch (Exception $e) {
|
1044 |
-
|
1045 |
}
|
1046 |
}
|
1047 |
|
26 |
const CONFIG_SECRET = 'expertrec/general/secret';
|
27 |
|
28 |
|
29 |
+
const BUILD_NO = "1490608866";
|
30 |
private $_password;
|
31 |
|
32 |
//main function which loads the feed API
|
833 |
}
|
834 |
}
|
835 |
|
836 |
+
// $logger->log("product count ".print_r($array,1));
|
837 |
|
|
|
|
|
|
|
|
|
|
|
838 |
$array_count = array('secrete' => $secret, 'product_count' => $array );
|
839 |
// sending request
|
840 |
$response = Mage::getModel('expertrec_recommendation/api_request')
|
847 |
->setPrepareRequestStatus(true)
|
848 |
->sendRequest();
|
849 |
|
850 |
+
//$logger->log('UserFeedPush_Track: request with product count sent');
|
851 |
if(!$response) {
|
852 |
$logger->log('UserFeedPush_Track: request failed for total_count');
|
853 |
}
|
864 |
//Increase maximum execution time to 5 hours (default in magento)
|
865 |
set_time_limit(18000);
|
866 |
|
867 |
+
//$logger->log("checking for mid and secret");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
868 |
// set&get mid and secret if mid is new_user
|
869 |
$data = $this->getMidSecret();
|
870 |
$mid = $data['merchantid'];
|
871 |
$secret = $data['secret'];
|
872 |
|
873 |
// feedUrl as api to userpushfeed
|
874 |
+
$feedUrl = "https://feed.expertrec.com/magento/n01eba6261ad7f174cd3a16523e86e65/";
|
875 |
// finalurl added with merchant id
|
876 |
$finalUrl = $feedUrl.''.$mid.'/';
|
|
|
877 |
// calculate number of products and send
|
878 |
$this->getProductCount($finalUrl,$secret);
|
879 |
|
884 |
// get headers
|
885 |
$storedHeaders = Mage::getStoreConfig(self::CONFIG_HEADERS);
|
886 |
|
|
|
887 |
if (isset($storedHeaders)){
|
888 |
$header = explode(',', $storedHeaders);
|
889 |
}
|
895 |
$websiteCollection = Mage::getModel('core/website')->getCollection()->load();
|
896 |
// $websitecount = count($websiteCollection);
|
897 |
$websitecount = $websiteCollection->getSize();
|
|
|
898 |
foreach ($websiteCollection as $website){
|
899 |
$websiteId=$website->getWebsiteId();
|
|
|
900 |
foreach ($website->getGroups() as $group) {
|
901 |
// all stores
|
|
|
902 |
$stores = $group->getStores();
|
903 |
foreach ($stores as $oStore) {
|
904 |
$storeId=$oStore->getId();
|
|
|
905 |
|
906 |
$collection=$filter->addBasicFilter($website,$oStore)
|
907 |
->setPageSize($feedConfig->pageSize);
|
923 |
|
924 |
// // get all products
|
925 |
// $collection = $filter->addBasicFilter($website,$oStore);
|
|
|
926 |
foreach ($collection as $product) {
|
927 |
try{
|
928 |
|
942 |
->setPrepareRequestStatus(true)
|
943 |
->sendRequest();
|
944 |
|
945 |
+
// $logger->log('UserFeedPush_Track: request succeded for product with Id #'.$product->getId().' of store '.$storeId);
|
946 |
if(!$response) {
|
947 |
$logger->log('UserFeedPush_Track: request failed for product with Id #'.$product->getId());
|
948 |
}
|
994 |
pull feed from info page
|
995 |
*/
|
996 |
public function pullFeedAction(){
|
997 |
+
$logger = Mage::getSingleton('expertrec_recommendation/log');
|
998 |
try{
|
|
|
|
|
|
|
999 |
|
1000 |
+
ob_end_clean();
|
1001 |
+
//avoid apache to kill the php running
|
1002 |
+
ignore_user_abort(true);
|
1003 |
+
ob_start();//start buffer output
|
1004 |
+
$logger->log("Pull Feed started in background.");
|
1005 |
+
echo "Pull Feed started in background.";
|
1006 |
+
//close session file on server side to avoid blocking other requests
|
1007 |
+
session_write_close();
|
1008 |
+
//send header to avoid the browser side to take content as gzip format
|
1009 |
+
header("Content-Encoding: none");
|
1010 |
+
header("Content-Length: ".ob_get_length());
|
1011 |
+
header("Connection: close");
|
1012 |
+
ob_end_flush();
|
1013 |
+
flush();
|
1014 |
+
|
1015 |
+
$this->pushFeedAction();
|
1016 |
+
die("Feed pulled successfully.");
|
1017 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1018 |
}catch (Exception $e) {
|
1019 |
+
$logger->log( "Not able to pull the feed: ".$e->getMessage());
|
1020 |
}
|
1021 |
}
|
1022 |
|
app/code/community/Expertrec/Recommendation/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Expertrec_Recommendation>
|
5 |
-
<version>1.2.
|
6 |
</Expertrec_Recommendation>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Expertrec_Recommendation>
|
5 |
+
<version>1.2.6</version>
|
6 |
</Expertrec_Recommendation>
|
7 |
</modules>
|
8 |
<global>
|
app/code/community/Expertrec/Recommendation/sql/expertrec_setup/{mysql4-install-1.2.5.php → mysql4-install-1.2.6.php}
RENAMED
@@ -15,7 +15,7 @@ $result['status'] = "Installed";
|
|
15 |
//magento version
|
16 |
$result['mage_ver'] = $mage_ver;
|
17 |
//expertrec version
|
18 |
-
$result['expertrec_ver'] = '1.2.
|
19 |
//Subdomain
|
20 |
$result['site_subdomain'] = $uri;
|
21 |
//hostname
|
15 |
//magento version
|
16 |
$result['mage_ver'] = $mage_ver;
|
17 |
//expertrec version
|
18 |
+
$result['expertrec_ver'] = '1.2.6';
|
19 |
//Subdomain
|
20 |
$result['site_subdomain'] = $uri;
|
21 |
//hostname
|
app/code/community/Expertrec/Recommendation/sql/expertrec_setup/{mysql4-upgrade-1.2.4-1.2.5.php → mysql4-upgrade-1.2.5-1.2.6.php}
RENAMED
@@ -17,7 +17,7 @@ $result['status'] = "Upgraded";
|
|
17 |
//magento version
|
18 |
$result['mage_ver'] = $mage_ver;
|
19 |
//expertrec version
|
20 |
-
$result['expertrec_ver'] = '1.2.
|
21 |
//hostname
|
22 |
$result['site_host'] = $host;
|
23 |
//Subdomain
|
17 |
//magento version
|
18 |
$result['mage_ver'] = $mage_ver;
|
19 |
//expertrec version
|
20 |
+
$result['expertrec_ver'] = '1.2.6';
|
21 |
//hostname
|
22 |
$result['site_host'] = $host;
|
23 |
//Subdomain
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Expertrec_Recommendation</name>
|
4 |
-
<version>1.2.
|
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-03-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Expertrec"><dir name="Recommendation"><dir name="Block"><file name="Api.php" hash="46ce038ecace7b3b35bea9bc05cac4e5"/></dir><dir name="Helper"><file name="Autocompletehelper.php" hash="7bd733d91f69091c1f6f5bb162467a43"/><file name="Data.php" hash="8a2760edc960d6a1bc72d80e73944cb3"/><file name="Filehelper.php" hash="5ac956e12548398dc159a16eb1a03e8b"/><dir name="Search"><file name="Layout.php" hash="c68c9d6c4def7daca0a0ae332dceaff3"/></dir><file name="Suggestionhelper.php" hash="93f3aa295761a510f782856c0180a799"/></dir><dir name="Model"><dir name="Api"><file name="Request.php" hash="dd34241f00c6bea36700f768a3feef6e"/></dir><dir name="Feed"><file name="Feedconfig.php" hash="013bd447dccc7cc4f073be5bd53a18c9"/><file name="Feedcreator.php" hash="34fafb9a24913a99606056f33728cf7d"/><file name="Feedfilter.php" hash="
|
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.6</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-03-27</date>
|
14 |
+
<time>10:01:29</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Expertrec"><dir name="Recommendation"><dir name="Block"><file name="Api.php" hash="46ce038ecace7b3b35bea9bc05cac4e5"/></dir><dir name="Helper"><file name="Autocompletehelper.php" hash="7bd733d91f69091c1f6f5bb162467a43"/><file name="Data.php" hash="8a2760edc960d6a1bc72d80e73944cb3"/><file name="Filehelper.php" hash="5ac956e12548398dc159a16eb1a03e8b"/><dir name="Search"><file name="Layout.php" hash="c68c9d6c4def7daca0a0ae332dceaff3"/></dir><file name="Suggestionhelper.php" hash="93f3aa295761a510f782856c0180a799"/></dir><dir name="Model"><dir name="Api"><file name="Request.php" hash="dd34241f00c6bea36700f768a3feef6e"/></dir><dir name="Feed"><file name="Feedconfig.php" hash="013bd447dccc7cc4f073be5bd53a18c9"/><file name="Feedcreator.php" hash="34fafb9a24913a99606056f33728cf7d"/><file name="Feedfilter.php" hash="c278681d9cf0fa03d62c308a73151eb2"/><file name="Formatter.php" hash="316fe0f30af7ca946dffcc2f16a2193d"/></dir><file name="Feed.php" hash="ddac87d6a060bc77fb7718e7b19e1273"/><file name="Log.php" hash="27fcee49e67fe2be761b4af94aecff2b"/><file name="Observer.php" hash="751f3f10ee652522ce0ffc87f28e3bc6"/><dir name="Translator"><file name="Category.php" hash="0050de4918d73af310008aa8f49239d1"/></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="a7c78b3019bbaa4896b2fd0c928acebc"/><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="90e0a400e62e045883cb9624b69c3f78"/><file name="config.xml" hash="f3672c1f6a9ea6fd493e2c8a6df7c96d"/></dir><dir name="sql"><dir name="expertrec_setup"><file name="mysql4-install-1.2.6.php" hash="da0193daebe54cfc42c9059ff38ebd93"/><file name="mysql4-upgrade-1.2.5-1.2.6.php" hash="7229f8a229f10fc43247e035d2807f5c"/></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="3c508f764463bf900613a3c2a239214d"/></dir><dir name="recommendation"><file name="tracker.phtml" hash="6e8219c5d1e46642d7915cedaa974313"/><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>
|