Jump to content

Vyhledavani zadanim jen casti nazvu produktu


hddr4dr

Recommended Posts

Pokud zadam do interniho vyhledavace eshopu /PS1.6/ jen cast nazvu produktu napr. z nazvu WD3200BEVT-80A0RT0 zadam jen BEVT tak neni nic nalezeno. Indexaci jsem provedl. Kde muze byt chyba?

 

Nalezl jsem v diskuzich toto reseni a funguje:

 

http://www.prestashop.com/forums/topic/280306-native-prestashop-search-module-issuessolved-casesimprovementsother/

 

v souboru /classes/search.php pridat do kodu %

 

-----------------------------------------------------------------------------------------------------------------------

...

? ' \'%'.pSQL(Tools::substr($word, 1, PS_SEARCH_MAX_WORD_LENGTH)).'%\''
: '\'%'.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\''
);
 
if ($word[0] != '-')
 $score_array[] = 'sw.word LIKE \'%'.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\'';

--------------------------------------------------------------------------------------------------------------------------

Edited by hddr4dr (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...