Eliyas Posted January 19, 2016 Share Posted January 19, 2016 (edited) I have about 460 products. In BO prestashop>Preference>Search, it shows The "indexed" products have been analyzed by PrestaShop and will appear in the results of a front office search. Indexed products 381 / 381. The products with reference number containing " - " sign in it and less than 5 characters, does not show in search result. Like: po-2 y-52 A-5 4-IM All other products with reference containg more than 5 characters show up in search results. Like : po-212 po1-243 A-511 How can I solve this problem, so that these articles also show in the search results. Thanks Edited January 19, 2016 by Eliyas (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted January 19, 2016 Share Posted January 19, 2016 (edited) This is a feature. Dash is a delimiter and there are indexed at least 3 characters. NO po-2 NO po-21 YES po-212 (212 is indexed) Edited January 19, 2016 by tuk66 (see edit history) Link to comment Share on other sites More sharing options...
Eliyas Posted January 19, 2016 Author Share Posted January 19, 2016 Thanks for clarifying. Now is there any way around, so that these products also show up in search result? I have many products with "-" symbols. Link to comment Share on other sites More sharing options...
tuk66 Posted January 19, 2016 Share Posted January 19, 2016 You can override the Search class to forget dash to be a delimiter. Link to comment Share on other sites More sharing options...
Eliyas Posted January 19, 2016 Author Share Posted January 19, 2016 (edited) I look up for search.php file in classes folder and tried to figure out what to edit. I am no programmer. I found this line . if ($indexation) { $string = preg_replace('/[._-]+/', ' ', $string); } Should I change this line (remove "-" from it) ? Or is there more to it? Edit I found a solution from here https://www.prestashop.com/forums/topic/317997-frontpage-search-with-minus-in/ Edited January 26, 2016 by Eliyas (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now