Jump to content


Photo

search doesnt work

prestashop 1.6 search

  • Please log in to reply
3 replies to this topic

#1 kangoo

kangoo

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 27 April 2014 - 11:30 PM

Hi

 

my module named block search doesnt work well.

im selling xerox printers and other stuff related to xerox brand.

 

when im trying to search for "3010" (xerox phaser 3010) i don't see any result.

when i try to search "phaser 3010" it works well.

 

what i can do in this case?



looking for the best presta addons with outstanding support? check this: PrestaShop Modules

#2 vekia

vekia

    Advanced Member

  • Members
  • PipPipPip
  • 10104 posts

Posted 27 April 2014 - 11:40 PM

hello

for the first try to go to back office section: preferences > search

and try to:

g19ZdQ6.png

 

 

after that please try again to search


free tutorials, free templates, free addons, prestashop modules MndfRK4.png  lpHMrZ5.png  gtKHYO7.png  google-48.png


#3 kangoo

kangoo

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 27 April 2014 - 11:44 PM

ok i did that but it doesnt work. problem is somewhere else

any other ideas?



#4 vekia

vekia

    Advanced Member

  • Members
  • PipPipPip
  • 10104 posts

Posted 27 April 2014 - 11:48 PM

ok thank you for fast reply
so, in this case it's necessary to modify Search class located in /classes/Search.php file

 

there is a code like:

? ' \''.pSQL(Tools::substr($word, 1, PS_SEARCH_MAX_WORD_LENGTH)).'%\''
: '\''.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\''

you have to add % before the searched word, so just change it to:

? ' \'%'.pSQL(Tools::substr($word, 1, PS_SEARCH_MAX_WORD_LENGTH)).'%\''
: '\'%'.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\''

free tutorials, free templates, free addons, prestashop modules MndfRK4.png  lpHMrZ5.png  gtKHYO7.png  google-48.png






IPB Skin By Virteq