Jump to content

prestashop 1.4.11 Search.php problem


Recommended Posts

Hi,

 

After update PS 1.4.10 to 1.4.11 , our customer can not search the item with use hyphen " - " still I am using search.php from 1.4.10 and website working well with old search.php but I don't know how can I fix or find the problem with search.php 1.4.11.

 

Any help would be great.

 

Thanks All

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...

I noticed in the Bug Tracker that your problem was ignored. That was an inappropriate response by PS for the following reasons:

 

1. In previous versions of PS, the hyphen was explicitly included as a searchable character. This was accomplished by removing the hyphen from the list of Excluded Characters (at the top of Search.php). Removing the hyphen from list of excluded characters, allows the hyphen to behave like other searchable characters, and would solve the problem you experienced back in August 2013. Here is the relevant information from 1.4.9.0 Search.php:

 

/* Copied from Drupal search module, except for \x{0}-\x{2f} that has been replaced by \x{0}-\x{2c}\x{2e}-\x{2f} in order to keep the char '-' */
 

 

 

 

2. There is a new problem in Search.php for PS 1.4.11.0 (and possibly later versions). If a customer enters two or more words, the search is supposed to return results that contain both words. This was working correctly in 1.4.9.0. On a clean install of 1.4.11.0, when I tested two or more words separated by blank spaces, the search is returning all results containing the first word.

 

 

For example, if I search for 'WordA WordB' (no apostrophe marks) then I should get results like this:

 

WordA WordB etc etc

whatever WordA other WordB

 

 

 

I should not get results that look like this (but this is happening in Search.php for 1.4.11.0): 

 

WordA this

WordA that

WordA other

WordA WordB etc etc

something WordA

etc WordA etc WordB

 

 

 

Hence, in 1.4.11.0, the result when searching for two or more terms is really useless. Only the first term matters, and that defeats the purpose of searching for two or more terms.

 

Thankfully, my Search.php for 1.4.9.0 will work in PS 1.4.11.0.

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...