Jack_mcs Posted May 12, 2014 Author Share Posted May 12, 2014 You're welcome. I'm glad they are useful. To fix these errors, in includes/functions/site_search.php, find this code if ($languageDir === end(explode("/", $filePath))) { CheckFileContents($filePath, $searchTerm, $fileList, $languageDir); } } else { $fileName = end(explode("/", $filePath)); if (end(explode(".", $fileName)) == 'php') { //NOTE: fails if there's an extenstion such file.php.old and replace it with $tmp = explode('/', $filePath); if ($languageDir === end($tmp)) { CheckFileContents($filePath, $searchTerm, $fileList, $languageDir); } } else { $tmp = explode('/', $filePath); $fileName = end($tmp); $tmp = explode(".", $fileName); if (end($tmp) == 'php') { //NOTE: fails if there's an extension such file.php.old Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mhsuffolk Posted May 12, 2014 Share Posted May 12, 2014 Thank you Jack  Solved Quote Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions. Link to comment Share on other sites More sharing options...
radhavallabh Posted January 20, 2015 Share Posted January 20, 2015 Hi, Thanks for this contribution- I am using Site Search Plus and smart suggest it seems to work perfectly;Just one small issue -That if someone searches for example 'dresses' and i have products listed by name of 'dress' , the results appear as 0;Could you please help me sort it that even if a part of the word that is 'dress' from 'dresses' is included in product name then the search results are displayed for the customers.Awaiting your earliest help and response.... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 20, 2015 Author Share Posted January 20, 2015 I haven't ran the two addons together so I can't say what the problem might be. But on my site, where just this addon is installed, a search for partial words returns all results that contain them. So it seems there is either a conflict with the two addons running together or the other addon has a problem. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
radhavallabh Posted January 21, 2015 Share Posted January 21, 2015 @@Jack_mcs Thank you for your response;I cross checked all the code for Site search plus is intact it is no where conflicting with smart suggest;Could you please guide me about what code should be looked at further to check this... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 21, 2015 Author Share Posted January 21, 2015 No, I'm sorry but I can't support edited code due to the vast number of possibilities. You can install this addon by itself into a clean shop to see if the problem goes away. If not, then I should be able to help with that.  But I just reread your original post and I think I misunderstood it. The search code can only find full or partial words, not words longer than full. So, for example, if you have a product named "my dress" the search will find things like  my dress dre ss  But it won't find something like "dressing" because that word does not exist in "my dress". Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
gvv Posted June 10, 2015 Share Posted June 10, 2015 @@Jack_mcs Will this addon work on Oscommerce Bootstrap? Quote Doors, Stairs an Furniture Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 10, 2015 Author Share Posted June 10, 2015 Yes, it will. Though there aren't instructions for that version but if you use a compare program like WinMerge you should be able to figure it out. Don't upload the files as is though. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 26, 2015 Author Share Posted December 26, 2015 A new version has been uploaded with these changes: Â Added autocomplete code to store and check words searched for. Added an exclude list for files that shouldn't show in the results, like checkout_process. Added code to handle pages from the Information Pages addon. Created code for the bootstrap version. Changed name used for Article Manager search so articles are found. Changed css code for the display so the links are more uniform. Changed code in includes/functions/site_search.php to remove strict warnings (found by member mhsuffolk). I did not have time to update the install file so you will need to use a compare program, like WinMerge, to make the changes. They are clearly marked so it should not be difficult. Please post here if you run into any problems. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted December 27, 2015 Share Posted December 27, 2015 I got this error in my error log. Everything is working fine, but this strange (to me) error appears. What does this mean? Â [sun Dec 27 08:56:40 2015] [error] [client 84.241.194.246] PHP Strict Standards: Â Only variables should be passed by reference in /storage/web/public/sites/www.muisjesensitief.nl/includes/functions/site_search.php on line 65, referer: http://www.muisjesensitief.nl/ Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 28, 2015 Author Share Posted December 28, 2015 In includes/functions/site_search.php, find foreach ($matches as $filePath) { and change it to $tmp = $matches; foreach ($tmp as $filePath) { Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2016 Share Posted January 15, 2016 @@Jack_mcs  thank you for your answer, but it doesn't solved the problem. the error log is still being written with some 40 lines of errors like these (lines 65 and 66 are repeated almost 40 times):  [Fri Jan 15 20:03:58 2016] [error] [client ##.###.###.###] PHP Strict Standards:  Only variables should be passed by reference in /storage/web/public/sites/www.muisjesensitief.nl/includes/functions/site_search.php on line 61, referer: https://www.muisjesensitief.nl/index.php [Fri Jan 15 20:03:58 2016] [error] [client ##.###.###.###] PHP Strict Standards:  Only variables should be passed by reference in /storage/web/public/sites/www.muisjesensitief.nl/includes/functions/site_search.php on line 65, referer: https://www.muisjesensitief.nl/index.php [Fri Jan 15 20:03:58 2016] [error] [client ##.###.###.###] PHP Strict Standards:  Only variables should be passed by reference in /storage/web/public/sites/www.muisjesensitief.nl/includes/functions/site_search.php on line 66, referer: https://www.muisjesensitief.nl/index.php Quote Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2016 Share Posted January 15, 2016 @@Jack_mcs Solved the problem. The problem is, that 'end' requires a reference, because it modifies the internal representation of the array. To solve this, find: if ($languageDir === end(explode("/", $filePath))) { and replace this with: $temp = explode("/", $filePath);if ($languageDir === end($temp)) { and find: $fileName = end(explode("/", $filePath));if (end(explode(".", $fileName)) == 'php') { and replace this with: $temp = explode("/", $filePath);$fileName = end($temp);if (end($temp) == 'php') { Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 16, 2016 Author Share Posted January 16, 2016 Thanks for posting the fix but it was already mentioned on the previous page.  Anywhere in the code, of any addon, where a reference is part of the function being called will cause a warning under strict standards. I don't know why the php developers decided to make strict standards the default but that's the way it is. Until everyone, including myself, gets in the habit of using a temp variable for such functions, the warnings will continue to show up. But, in my code at least, if I need the variable altered by the function I always make sure it exists first. In the case sited here, it doesn't make any difference. I don't see it in my local setup since I don't code with strict standards set. Maybe I will start doing that. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
railroadguy Posted June 9, 2016 Share Posted June 9, 2016 I have added this but have a problem. I have gone back a few times and started over to make sure I did all the changes. The error I get is:  1054 - Unknown column 'p.pages_name' in 'field list'select pd.pages_id, p.pages_name from pages p left join pages_description pd on p.pages_id = pd.pages_id where ( pages_title like '%-s%' or pages_body like '%-s%' ) and language_id = 1[TEP STOP]  It appears to be related to the second set of code in advanced_search_result.php file If that code is not added the error goes away although then I am guessing I am really missing some functionality?  FIND (around line 136) $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH));ADD ABOVE  /************** BEGIN SITESEARCH CHANGE ****************/ require(DIR_WS_FUNCTIONS . FILENAME_SITE_SEARCH); $dir = DIR_WS_LANGUAGES; $searchTerm = $keywords;  $articlesList = array(); $fileList = array(); $pagesList = array(); if (tep_not_null($keywords)) //only check for words {   CheckAllPages($dir, $searchTerm, $fileList, $articlesList, $pagesList, $languages_id); }   /************** END SITESEARCH CHANGE ****************/ Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 9, 2016 Author Share Posted June 9, 2016 The code that is causing that is looking for the Page Manager table. That is an addon that uses a defined name of TABLE_PAGES. I'm not aware of any other addon that uses a table named pages but it is possible. If your site uses that table but it is not from Page Manager, then in the includes/functions/site_search.php file, find this line if (defined('TABLE_PAGES')) { and change it to if (false && defined('TABLE_PAGES')) { If you do have Page Manager installed, then it is a different version than what this addon will work with so you would need to change the name being loaded in. Or you can make the above change and just disable it. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
railroadguy Posted June 10, 2016 Share Posted June 10, 2016 Thank you. I never would have found that. I am using an add on called EXTRA PAGES INFOBOX VERSION 4.60Â and that's where the TABLE_PAGES is coming from. Â Thank you again, Â Dan Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 11, 2016 Author Share Posted June 11, 2016 That addon, I think, is an earlier or later version of Page Manager. I think the difference was something like page_name being used instead of page_title, or vice-versa. If you want to get the code to work for that addon, you just need to change the MySQL statement in the code I mentioned. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.