aluminoter Posted December 23, 2014 Share Posted December 23, 2014 Please help!!! I have presta 1.5.6.2, i can search product by ref if i type ref from the beginning. So if type from the begin, search is normal. But very often i need to search product from the end by 3 or 4 char. I was advised that need to edit /class/search.php class find. Can any help me by hint or for money to this??? Link to comment Share on other sites More sharing options...
Yann - Prestaplugins Posted December 24, 2014 Share Posted December 24, 2014 Hello, I can do it for you today, if you join my online chat at http://www.prestaplugins.com 1 Link to comment Share on other sites More sharing options...
aluminoter Posted December 24, 2014 Author Share Posted December 24, 2014 I find the solution: how to improve search in prestashop, we need to correct /classes/search.php in ''.pSQL we insert % Result: in '%'.pSQL $intersect_array[] = 'SELECT si.id_product FROM '._DB_PREFIX_.'search_word sw LEFT JOIN '._DB_PREFIX_.'search_index si ON sw.id_word = si.id_word WHERE sw.id_lang = '.(int)$id_lang.' AND sw.id_shop = '.$context->shop->id.' AND sw.word LIKE '.($word[0] == '-' ? ' \'%'.pSQL(Tools::substr($word, 1, PS_SEARCH_MAX_WORD_LENGTH)).'%\'' : '\'%'.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\'' ); 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