Expertrec_Recommendation - Version 1.2.5

Version Notes

Expertrec Recommendation plugin for magento sites.

Download this release

Release Info

Developer melchi
Extension Expertrec_Recommendation
Version 1.2.5
Comparing to
See all releases


Code changes from version 1.2.4 to 1.2.5

app/code/community/Expertrec/Recommendation/Model/Resource/Mysql4/Setup.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
- class Expertrec_Recommendation_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup
3
- {
4
-
5
- }
6
- ?>
 
 
 
 
 
 
app/code/community/Expertrec/Recommendation/Model/Validate.php CHANGED
@@ -43,7 +43,7 @@ class Expertrec_Recommendation_Model_Validate {
43
  if(empty($storedMid)){
44
  $storedMid = Mage::getStoreConfig(self::CONFIG_MID);
45
  Mage::getSingleton('expertrec_recommendation/feed_feedconfig')
46
- ->setSecret($storedMid);
47
  }
48
 
49
  return $storedMid;
43
  if(empty($storedMid)){
44
  $storedMid = Mage::getStoreConfig(self::CONFIG_MID);
45
  Mage::getSingleton('expertrec_recommendation/feed_feedconfig')
46
+ ->setMerchantId($storedMid);
47
  }
48
 
49
  return $storedMid;
app/code/community/Expertrec/Recommendation/controllers/ApiController.php CHANGED
@@ -23,10 +23,10 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
23
  const THUMBNAIL_WIDTH = 'expertrec/general/expertrec_thumbnail_width';
24
  const THUMBNAIL_HEIGHT = 'expertrec/general/expertrec_thumbnail_height';
25
  const MERCHANT_ID = 'expertrec/general/mid';
26
- const SECRET = 'expertrec/general/secret';
27
 
28
 
29
- const BUILD_NO = "1489744852";
30
  private $_password;
31
 
32
  //main function which loads the feed API
@@ -431,7 +431,7 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
431
 
432
  $result .='<fieldset>';
433
  $result .='<legend>Configure Filters</legend>';
434
-
435
  foreach ($filterArray as $filter) {
436
  if (isset($storedFiltersArray) && in_array($filter, $storedFiltersArray)){
437
  $result .= '<input type="checkbox" id="'.$filter.'" name="filter_check_list[]" value="'.$filter.'" checked>';
@@ -745,14 +745,16 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
745
  return $result;
746
  }
747
 
 
 
 
 
748
 
749
-
750
- public function pushFeedAction(){
751
-
752
- $logger = Mage::getSingleton('expertrec_recommendation/log');
753
 
754
  $mid = Mage::getStoreConfig(self::MERCHANT_ID);
755
- $secret = Mage::getStoreConfig(self::SECRET);
756
  $website_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
757
  $admin_email = Mage::getStoreConfig('trans_email/ident_general/email'); //fetch sender email Admin
758
  $admin_name = Mage::getStoreConfig('trans_email/ident_general/name'); //fetch sender name Admin
@@ -781,13 +783,31 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
781
  ->saveConfig('secret',$data['secret'])
782
  ->saveConfig('mid',$data['merchantid'])
783
  ->clearCache();
 
784
  $logger->log("Generated new mid and secret");
785
  }catch (Zend_Http_Client_Exception $e) {
786
  $logger->log(sprintf($apiUrl ." failed to create mid&secret because HTTP error: %s", $e->getMessage()),Zend_Log::ERR);
787
  }
788
  }
 
 
 
 
 
 
 
 
 
 
789
 
790
- //get count
 
 
 
 
 
 
 
791
  $array_count = array();
792
  $websiteCollection = Mage::getModel('core/website')->getCollection()->load();
793
  // $websitecount = count($websiteCollection);
@@ -802,20 +822,21 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
802
 
803
  $storeId=$oStore->getId();
804
  // get all products
805
- $collection = Mage::getSingleton('expertrec_recommendation/feed_feedfilter')->addBasicFilter($website,$oStore);
806
-
807
  $count = $collection->getSize();
808
 
809
- $array[$storeCount] = array('wid' => $websiteId, 'sid' => $storeId, 'total_products' => $count);
810
- $storeCount--;
811
-
812
  }
 
813
 
814
  }
815
  }
816
 
 
 
817
  // feedUrl as api to userpushfeed
818
- $feedUrl = "https://feed.expertrec.com/magento/n01eba6261ad7f174cd3a16523e86e65/";
819
 
820
  // finalurl added with merchant id
821
  $finalUrl = $feedUrl.''.$mid.'/';
@@ -831,53 +852,113 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
831
  ->setPrepareRequestStatus(true)
832
  ->sendRequest();
833
 
 
834
  if(!$response) {
835
  $logger->log('UserFeedPush_Track: request failed for total_count');
836
  }
 
837
 
838
- // all website
839
- $websiteCollection = Mage::getModel('core/website')->getCollection()->load();
840
- // $websitecount = count($websiteCollection);
841
- $websitecount = $websiteCollection->getSize();
842
- foreach ($websiteCollection as $website){
843
- $websiteId=$website->getWebsiteId();
844
- foreach ($website->getGroups() as $group) {
845
- // all stores
846
- $stores = $group->getStores();
847
- foreach ($stores as $oStore) {
848
- $storeId=$oStore->getId();
849
- // get all products
850
- $collection = Mage::getSingleton('expertrec_recommendation/feed_feedfilter')->addBasicFilter($website,$oStore);
851
- foreach ($collection as $product) {
852
- // checking product instance
853
- if (!isset($product) ||
854
- !$product instanceof Mage_Catalog_Model_Product ||
855
- !$product->hasData('entity_id')){
856
- $logger->log('UserFeedPush_Track: product is not a valid type');
857
- return $this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
858
  }
859
- try{
860
- // get headers
861
- $storedHeaders = Mage::getStoreConfig(self::CONFIG_HEADERS);
862
- if (isset($storedHeaders)){
863
- $header = explode(',', $storedHeaders);
864
- }
865
- else{
866
- $header = array();
867
- }
868
- if(!empty($header)){
869
 
870
- if(empty($finalUrl)){
871
- return $this;
872
- }
873
- $resultArray = Mage::getSingleton('expertrec_recommendation/feed_formatter')
874
- ->init()
875
- ->prepareRow($header,$product);
 
 
 
 
 
876
  $resultArray['storeId'] = $storeId;
877
  $resultArray['websiteId'] = $websiteId;
878
- //$logger->log("Result Array ".print_r($resultArray,1));
879
 
880
- // sending request
881
  $response = Mage::getModel('expertrec_recommendation/api_request')
882
  ->setPrepareRequestStatus(false)
883
  ->setUserId('expertrec')
@@ -888,60 +969,77 @@ class Expertrec_Recommendation_ApiController extends Mage_Core_Controller_Front_
888
  ->setPrepareRequestStatus(true)
889
  ->sendRequest();
890
 
891
- // $logger->log('UserFeedPush_Track: request succeded for product with Id #'.$product->getId().' of store '.$storeId);
892
  if(!$response) {
893
  $logger->log('UserFeedPush_Track: request failed for product with Id #'.$product->getId());
894
  }
 
 
 
 
895
  }
896
  }
897
- catch (Exception $e) {
898
- $logger->log("UserFeedPush_Track error: ".$e->getMessage());
899
  }
900
  }
901
  }
 
902
  }
903
- $websitecount--;
904
- }
905
- // check for feed completion
906
- if($websitecount == 0){
907
- $array = array('completed' => 1, );
908
- $response = Mage::getModel('expertrec_recommendation/api_request')
909
- ->setPrepareRequestStatus(false)
910
- ->setUserId('expertrec')
911
- ->setUrl($finalUrl)
912
- ->setMethod(Zend_Http_Client::GET)
913
- ->setData($array)
914
- ->setHeader("Content-Type",'application/json')
915
- ->setPrepareRequestStatus(true)
916
- ->sendRequest();
917
-
918
- //$logger->log('UserFeedPush_Track: request completed');
919
- if(!$response) {
920
- $logger->log('UserFeedPush_Track: Request not complete');
921
  }
 
 
 
922
  }
923
- // update db to 1 once feed pushed
924
- Mage::helper("expertrec_recommendation")->saveConfig('expertrec_feed_push','1');
925
  }
926
 
927
- //upload feed by user
 
 
928
  public function feedAction(){
929
  $this->pushFeedAction();
930
  return $this->_redirectReferer();
931
  }
932
 
933
- // pull feed from info page
 
 
934
  public function pullFeedAction(){
935
  try{
936
  //return array of all parameters sent
937
  $requestParams = Mage::app()->getRequest()->getParams();
938
  $Password = isset($requestParams['secret']) ? $requestParams['secret'] : '';
939
- // Check password. if invalid password, it will not proceed.
940
- if(!Mage::getModel('expertrec_recommendation/validate')->checkPassword($Password)){
 
 
 
 
 
 
 
941
  die('ERROR: The specified password is invalid.');
942
  }
943
- $this->pushFeedAction();
944
- die("Feed pulled successfully.");
 
 
945
  }catch (Exception $e) {
946
  Mage::getSingleton('expertrec_recommendation/log')->log( "Not able to pull the feed: ".$e->getMessage());
947
  }
23
  const THUMBNAIL_WIDTH = 'expertrec/general/expertrec_thumbnail_width';
24
  const THUMBNAIL_HEIGHT = 'expertrec/general/expertrec_thumbnail_height';
25
  const MERCHANT_ID = 'expertrec/general/mid';
26
+ const CONFIG_SECRET = 'expertrec/general/secret';
27
 
28
 
29
+ const BUILD_NO = "1490312068";
30
  private $_password;
31
 
32
  //main function which loads the feed API
431
 
432
  $result .='<fieldset>';
433
  $result .='<legend>Configure Filters</legend>';
434
+ $result .='<p>filter_by_visiblity -- choose from ( not_visible_individually , visible_catalog , visible_search , visible_catalog_search ).</p>';
435
  foreach ($filterArray as $filter) {
436
  if (isset($storedFiltersArray) && in_array($filter, $storedFiltersArray)){
437
  $result .= '<input type="checkbox" id="'.$filter.'" name="filter_check_list[]" value="'.$filter.'" checked>';
745
  return $result;
746
  }
747
 
748
+ /*
749
+ Set & Set mid and secret if not set
750
+ */
751
+ public function getMidSecret(){
752
 
753
+ $logger = Mage::getSingleton('expertrec_recommendation/log');;
754
+ $feedConfig = Mage::getSingleton('expertrec_recommendation/feed_feedconfig');
 
 
755
 
756
  $mid = Mage::getStoreConfig(self::MERCHANT_ID);
757
+ $secret = Mage::getStoreConfig(self::CONFIG_SECRET);
758
  $website_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
759
  $admin_email = Mage::getStoreConfig('trans_email/ident_general/email'); //fetch sender email Admin
760
  $admin_name = Mage::getStoreConfig('trans_email/ident_general/name'); //fetch sender name Admin
783
  ->saveConfig('secret',$data['secret'])
784
  ->saveConfig('mid',$data['merchantid'])
785
  ->clearCache();
786
+
787
  $logger->log("Generated new mid and secret");
788
  }catch (Zend_Http_Client_Exception $e) {
789
  $logger->log(sprintf($apiUrl ." failed to create mid&secret because HTTP error: %s", $e->getMessage()),Zend_Log::ERR);
790
  }
791
  }
792
+ else{
793
+ $data = array('merchantid' => $mid, 'secret' => $secret );
794
+ }
795
+ //set config with mid and secret
796
+ $storedPwd = base64_decode($secret);
797
+ $feedConfig->setSecret($storedPwd);
798
+ $storedMid = $mid;
799
+ $feedConfig->setMerchantId($storedMid);
800
+
801
+ return $data;
802
 
803
+ }
804
+
805
+ /*
806
+ Initial hit to backend with product count and secret
807
+ */
808
+ public function getProductCount($finalUrl,$secret){
809
+ $logger = Mage::getSingleton('expertrec_recommendation/log');
810
+ $filter = Mage::getSingleton('expertrec_recommendation/feed_feedfilter');
811
  $array_count = array();
812
  $websiteCollection = Mage::getModel('core/website')->getCollection()->load();
813
  // $websitecount = count($websiteCollection);
822
 
823
  $storeId=$oStore->getId();
824
  // get all products
825
+ $collection = $filter->addBasicFilter($website,$oStore);
 
826
  $count = $collection->getSize();
827
 
828
+ $array[$storeCount] = array('wid' => $websiteId, 'sid' => $storeId, 'total_products' => $count);
829
+ $storeCount--;
 
830
  }
831
+ $collection->clear();
832
 
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.'/';
852
  ->setPrepareRequestStatus(true)
853
  ->sendRequest();
854
 
855
+ $logger->log('UserFeedPush_Track: request with product count sent');
856
  if(!$response) {
857
  $logger->log('UserFeedPush_Track: request failed for total_count');
858
  }
859
+ }
860
 
861
+ /*
862
+ Push feed per product
863
+ */
864
+ public function pushFeedAction(){
865
+ $logger = Mage::getSingleton('expertrec_recommendation/log');
866
+
867
+ //Increase memory limit
868
+ ini_set('memory_limit', '1024M');
869
+ //Increase maximum execution time to 5 hours (default in magento)
870
+ set_time_limit(18000);
871
+
872
+ ob_end_clean();
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/b01eba6261ad7f174cd3a16523e86e65/";
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
+
901
+ $filter = Mage::getSingleton('expertrec_recommendation/feed_feedfilter');
902
+ $formatter = Mage::getSingleton('expertrec_recommendation/feed_formatter')
903
+ ->init();
904
+ $feedConfig = Mage::getSingleton('expertrec_recommendation/feed_feedconfig');
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
+ }
912
+ else{
913
+ $header = array();
914
+ }
915
+ if(!empty($header)){
916
+ // all website
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);
934
+
935
+ $pageEnd = $feedConfig->pageEnd;
936
+ $lastPageNumber = $collection->getLastPageNumber();
937
+
938
+ if($pageEnd != 0 && $pageEnd < $lastPageNumber){
939
+ $pages = $pageEnd;
940
  }
941
+ else{
942
+ $pages = $lastPageNumber;
943
+ }
944
+ $logger->log("Total no. of pages for which we are collecting feed in this reqeust: #".$pages);
 
 
 
 
 
 
945
 
946
+ for($currentPage = $feedConfig->pageStart; $currentPage <= $pages; $currentPage++) {
947
+ $logger->log("Collecting feed for page: #".$currentPage);
948
+ $collection->setCurPage($currentPage);
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
+
956
+ $resultArray = $formatter->prepareRow($header,$product);
957
  $resultArray['storeId'] = $storeId;
958
  $resultArray['websiteId'] = $websiteId;
959
+ // $logger->log("Result Array ".print_r($resultArray,1));
960
 
961
+ //sending request
962
  $response = Mage::getModel('expertrec_recommendation/api_request')
963
  ->setPrepareRequestStatus(false)
964
  ->setUserId('expertrec')
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
  }
976
+
977
+ }
978
+ catch (Exception $e) {
979
+ $logger->log("UserFeedPush_Track error: ".$e->getMessage());
980
  }
981
  }
982
+ $collection->clear();
 
983
  }
984
  }
985
  }
986
+ $websitecount--;
987
  }
988
+ // check for feed completion
989
+ if($websitecount == 0){
990
+ $array = array('completed' => 1, );
991
+ $response = Mage::getModel('expertrec_recommendation/api_request')
992
+ ->setPrepareRequestStatus(false)
993
+ ->setUserId('expertrec')
994
+ ->setUrl($finalUrl)
995
+ ->setMethod(Zend_Http_Client::GET)
996
+ ->setData($array)
997
+ ->setHeader("Content-Type",'application/json')
998
+ ->setPrepareRequestStatus(true)
999
+ ->sendRequest();
1000
+
1001
+ $logger->log('UserFeedPush_Track: request completed');
1002
+ if(!$response) {
1003
+ $logger->log('UserFeedPush_Track: Request not complete');
1004
+ }
 
1005
  }
1006
+ $logger->logMemoryUsage();
1007
+ // update db to 1 once feed pushed
1008
+ Mage::helper("expertrec_recommendation")->saveConfig('expertrec_feed_push','1');
1009
  }
 
 
1010
  }
1011
 
1012
+ /*
1013
+ upload feed by user
1014
+ */
1015
  public function feedAction(){
1016
  $this->pushFeedAction();
1017
  return $this->_redirectReferer();
1018
  }
1019
 
1020
+ /*
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
+ $storedPwd = Mage::getSingleton('expertrec_recommendation/feed_feedconfig')->getSecret();
1030
+
1031
+ if(empty($storedPwd)){
1032
+ $storedPwd = base64_decode(Mage::getStoreConfig(self::CONFIG_SECRET));
1033
+ Mage::getSingleton('expertrec_recommendation/feed_feedconfig')->setSecret($storedPwd);
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
  Mage::getSingleton('expertrec_recommendation/log')->log( "Not able to pull the feed: ".$e->getMessage());
1045
  }
app/code/community/Expertrec/Recommendation/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Expertrec_Recommendation>
5
- <version>1.2.4</version>
6
  </Expertrec_Recommendation>
7
  </modules>
8
  <global>
@@ -25,8 +25,6 @@
25
  <expertrec_setup>
26
  <setup>
27
  <module>Expertrec_Recommendation</module>
28
- <class>Expertrec_Recommendation_Model_Resource_Mysql4_Setup</class>
29
-
30
  </setup>
31
  </expertrec_setup>
32
  </resources>
2
  <config>
3
  <modules>
4
  <Expertrec_Recommendation>
5
+ <version>1.2.5</version>
6
  </Expertrec_Recommendation>
7
  </modules>
8
  <global>
25
  <expertrec_setup>
26
  <setup>
27
  <module>Expertrec_Recommendation</module>
 
 
28
  </setup>
29
  </expertrec_setup>
30
  </resources>
app/code/community/Expertrec/Recommendation/sql/expertrec_setup/{mysql4-install-1.2.4.php → mysql4-install-1.2.5.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.4';
19
  //Subdomain
20
  $result['site_subdomain'] = $uri;
21
  //hostname
@@ -57,7 +57,7 @@ $installer->run("
57
  ('default',0,'expertrec/general/mid','new_user'),
58
  ('default',0,'expertrec/general/secret','NTE5NTQ1Zjk4OGExYzYxOWFkOTkyN2Y3MDQ5MTQ3NTM='),
59
  ('default',0,'expertrec/general/log_endpoint','https://feed.expertrec.com/magento/9418bba77c3b75abd2842e93b8c52c4a'),
60
- ('default',0,'expertrec/general/headers','is_in_stock,expert_image,expert_thumbnail,expert_category,expert_category_ids,final_price,entity_id,rating_summary,expert_url,created_at,image,msrp,name,price,short_description,sku,small_image,special_price,category_ids'),
61
  ('default',0,'expertrec/general/expertrec_image_width',250),
62
  ('default',0,'expertrec/general/expertrec_image_height',250),
63
  ('default',0,'expertrec/general/expertrec_thumbnail_width',80),
15
  //magento version
16
  $result['mage_ver'] = $mage_ver;
17
  //expertrec version
18
+ $result['expertrec_ver'] = '1.2.5';
19
  //Subdomain
20
  $result['site_subdomain'] = $uri;
21
  //hostname
57
  ('default',0,'expertrec/general/mid','new_user'),
58
  ('default',0,'expertrec/general/secret','NTE5NTQ1Zjk4OGExYzYxOWFkOTkyN2Y3MDQ5MTQ3NTM='),
59
  ('default',0,'expertrec/general/log_endpoint','https://feed.expertrec.com/magento/9418bba77c3b75abd2842e93b8c52c4a'),
60
+ ('default',0,'expertrec/general/headers','is_in_stock,expert_image,expert_thumbnail,expert_category,expert_category_ids,final_price,entity_id,rating_summary,expert_url,created_at,image,msrp,name,price,short_description,sku,small_image,special_price,category_ids,minimal_price'),
61
  ('default',0,'expertrec/general/expertrec_image_width',250),
62
  ('default',0,'expertrec/general/expertrec_image_height',250),
63
  ('default',0,'expertrec/general/expertrec_thumbnail_width',80),
app/code/community/Expertrec/Recommendation/sql/expertrec_setup/{mysql4-upgrade-1.2.3-1.2.4.php → mysql4-upgrade-1.2.4-1.2.5.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.4';
21
  //hostname
22
  $result['site_host'] = $host;
23
  //Subdomain
@@ -59,7 +59,7 @@ $installer->run("
59
  ('default',0,'expertrec/general/mid','new_user'),
60
  ('default',0,'expertrec/general/secret','NTE5NTQ1Zjk4OGExYzYxOWFkOTkyN2Y3MDQ5MTQ3NTM='),
61
  ('default',0,'expertrec/general/log_endpoint','https://feed.expertrec.com/magento/9418bba77c3b75abd2842e93b8c52c4a'),
62
- ('default',0,'expertrec/general/headers','is_in_stock,expert_image,expert_thumbnail,expert_category,expert_category_ids,final_price,entity_id,rating_summary,expert_url,created_at,image,msrp,name,price,short_description,sku,small_image,special_price,category_ids'),
63
  ('default',0,'expertrec/general/expertrec_image_width',250),
64
  ('default',0,'expertrec/general/expertrec_image_height',250),
65
  ('default',0,'expertrec/general/expertrec_thumbnail_width',80),
17
  //magento version
18
  $result['mage_ver'] = $mage_ver;
19
  //expertrec version
20
+ $result['expertrec_ver'] = '1.2.5';
21
  //hostname
22
  $result['site_host'] = $host;
23
  //Subdomain
59
  ('default',0,'expertrec/general/mid','new_user'),
60
  ('default',0,'expertrec/general/secret','NTE5NTQ1Zjk4OGExYzYxOWFkOTkyN2Y3MDQ5MTQ3NTM='),
61
  ('default',0,'expertrec/general/log_endpoint','https://feed.expertrec.com/magento/9418bba77c3b75abd2842e93b8c52c4a'),
62
+ ('default',0,'expertrec/general/headers','is_in_stock,expert_image,expert_thumbnail,expert_category,expert_category_ids,final_price,entity_id,rating_summary,expert_url,created_at,image,msrp,name,price,short_description,sku,small_image,special_price,category_ids,minimal_price'),
63
  ('default',0,'expertrec/general/expertrec_image_width',250),
64
  ('default',0,'expertrec/general/expertrec_image_height',250),
65
  ('default',0,'expertrec/general/expertrec_thumbnail_width',80),
app/design/adminhtml/default/default/template/expertrec/expertrec/recommendation/notifications.phtml DELETED
@@ -1,15 +0,0 @@
1
-
2
- <?php
3
-
4
- $feed_push = 'expertrec/general/expertrec_feed_push';
5
- $pushed = Mage::getStoreConfig($feed_push);
6
- if($pushed == 0): ?>
7
-
8
- <div class="notification-global">
9
- <strong><?php echo $this->helper('index')->__('Expertrec : ') ?></strong>
10
- <?php echo "Please Upload the Feed"?>.
11
- <?php $push_feed = Mage::getBaseUrl().'expertrec-feed/api/feed';?>
12
- <?php echo $this->helper('index')->__('Click here to <a href="%s">Upload Feed</a>.', $push_feed);?>
13
- </div>
14
-
15
- <?php endif;?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/expertrec/recommendation/notifications.phtml CHANGED
@@ -7,7 +7,7 @@
7
 
8
  <div class="notification-global">
9
  <strong><?php echo $this->helper('index')->__('Expertrec : ') ?></strong>
10
- <?php echo "Please upload the Feed"?>.
11
  <?php $push_feed = Mage::getBaseUrl().'expertrec-feed/api/feed';?>
12
  <?php echo $this->helper('index')->__('Click here to <a href="%s">Upload Feed</a>.', $push_feed);?>
13
  </div>
7
 
8
  <div class="notification-global">
9
  <strong><?php echo $this->helper('index')->__('Expertrec : ') ?></strong>
10
+ <?php echo "Please Upload the Feed"?>.
11
  <?php $push_feed = Mage::getBaseUrl().'expertrec-feed/api/feed';?>
12
  <?php echo $this->helper('index')->__('Click here to <a href="%s">Upload Feed</a>.', $push_feed);?>
13
  </div>
app/design/frontend/base/default/template/expertrec/feed/info.phtml CHANGED
@@ -251,7 +251,7 @@
251
  <form id="logform" name="logform" method="post" action="<?php echo $logApi['surl'] ?>">
252
  <p><b>Get Log Url</b></p>
253
  <!-- <p><a href="<?php //echo $this->getLogUrl() ?>"><?php //echo $this->getLogUrl() ?></a></p> -->
254
- <p><?php echo $logApi['surl'] ?></p>
255
  <input type="hidden" name="secret" value="<?php echo $logApi['secret']?>">
256
  <button id="logsub" name="logsub" type="submit">submit</button>
257
  </form>
@@ -259,7 +259,7 @@
259
  <form id="cleanform" name="cleanform" method="post" action="<?php echo $cleanDir['surl'] ?>" target="_blank">
260
  <p><b>Get Cleandir Url</b></p>
261
  <!-- <p><a href="<?php //echo $this->getCleanDirUrl() ?>" target="_blank"><?php //echo $this->getCleanDirUrl() ?></a></p> -->
262
- <p><?php echo $cleanDir['surl'] ?></p>
263
  <input type="hidden" name="secret" value="<?php echo $cleanDir['secret']?>">
264
  <button id="cleansub" name="cleansub" type="submit">submit</button>
265
  </form>
@@ -281,7 +281,7 @@
281
  <fieldset>
282
  <legend>Pull Feed</legend>
283
  <?php $pullFeed = $this->pullFeed();?>
284
- <form method="post" action="<?php echo $pullFeed['surl'];?>" target="_blank">
285
  <input type="hidden" name="secret" value="<?php echo $pullFeed['secret'];?>">
286
  <p><?php echo $pullFeed['link']; ?></p>
287
  <button type="submit">submit</button>
251
  <form id="logform" name="logform" method="post" action="<?php echo $logApi['surl'] ?>">
252
  <p><b>Get Log Url</b></p>
253
  <!-- <p><a href="<?php //echo $this->getLogUrl() ?>"><?php //echo $this->getLogUrl() ?></a></p> -->
254
+ <p><?php echo $logApi['link'] ?></p>
255
  <input type="hidden" name="secret" value="<?php echo $logApi['secret']?>">
256
  <button id="logsub" name="logsub" type="submit">submit</button>
257
  </form>
259
  <form id="cleanform" name="cleanform" method="post" action="<?php echo $cleanDir['surl'] ?>" target="_blank">
260
  <p><b>Get Cleandir Url</b></p>
261
  <!-- <p><a href="<?php //echo $this->getCleanDirUrl() ?>" target="_blank"><?php //echo $this->getCleanDirUrl() ?></a></p> -->
262
+ <p><?php echo $cleanDir['link'] ?></p>
263
  <input type="hidden" name="secret" value="<?php echo $cleanDir['secret']?>">
264
  <button id="cleansub" name="cleansub" type="submit">submit</button>
265
  </form>
281
  <fieldset>
282
  <legend>Pull Feed</legend>
283
  <?php $pullFeed = $this->pullFeed();?>
284
+ <form method="post" action="<?php echo $pullFeed['surl'];?>">
285
  <input type="hidden" name="secret" value="<?php echo $pullFeed['secret'];?>">
286
  <p><?php echo $pullFeed['link']; ?></p>
287
  <button type="submit">submit</button>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Expertrec_Recommendation</name>
4
- <version>1.2.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-03-17</date>
14
- <time>10:02:24</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="06e9f382b78385ffcebd289cccb2ff80"/><file name="Formatter.php" hash="316fe0f30af7ca946dffcc2f16a2193d"/></dir><file name="Feed.php" hash="ddac87d6a060bc77fb7718e7b19e1273"/><file name="Log.php" hash="27fcee49e67fe2be761b4af94aecff2b"/><file name="Observer.php" hash="636adabe6bc85f9f66c825f85525a6e2"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="6b660487988035cd715fa3c51b2b58b6"/></dir></dir><dir name="Translator"><file name="Category.php" hash="0050de4918d73af310008aa8f49239d1"/></dir><file name="Validate.php" hash="2d4619284f24309b77668f07cb1ef9f4"/><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="b761c2b268e5df57274cc9b0a88a4f03"/><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="0a277c19e91c0485d9b13f2fa5ab7eeb"/></dir><dir name="sql"><dir name="expertrec_setup"><file name="mysql4-install-1.2.4.php" hash="7094adc0b081c3380a18eccca15c782e"/><file name="mysql4-upgrade-1.2.3-1.2.4.php" hash="6c4747308f452e10665263a2f2db53fe"/></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="c6b3b1d748be73f2dbbc8608c8e79f5e"/></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="expertrec"><dir name="recommendation"><file name="notifications.phtml" hash="4f965be2e3ed310a8b4ce271ad064ee4"/></dir></dir><dir name="recommendation"><file name="notifications.phtml" hash="0aeaea93d36eb867dbf11d176e72cdc3"/></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.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-03-23</date>
14
+ <time>23:39:56</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="06e9f382b78385ffcebd289cccb2ff80"/><file name="Formatter.php" hash="316fe0f30af7ca946dffcc2f16a2193d"/></dir><file name="Feed.php" hash="ddac87d6a060bc77fb7718e7b19e1273"/><file name="Log.php" hash="27fcee49e67fe2be761b4af94aecff2b"/><file name="Observer.php" hash="636adabe6bc85f9f66c825f85525a6e2"/><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="20ceaecb3f950ab60fc919acdbdf0a07"/><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="e93e04bcf4ab1843f96b250af920d143"/></dir><dir name="sql"><dir name="expertrec_setup"><file name="mysql4-install-1.2.5.php" hash="e2088ec0cefb46b8be071810348acec1"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="b247bc12407ba558e4a4aeafb31f5905"/></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>