Jump to content

Search Result Error When Reference Contains Minus/hyphen Sign


Recommended Posts

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 by Eliyas (see edit history)
Link to comment
Share on other sites

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 by Eliyas (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...