Jump to content

Numeric product name search problems


Recommended Posts

first of all, sorry for my english

products names "130204_150027_06412" like numbers, giving

 

searches as a result, "130204_150027_06412" (130204_150027_XXXX), as a result, everything returns

 

My prestashop version:PrestaShop™ 1.5.3.1

 

return.jpg

 

 

 

I want it as follows:

Iwant.jpg

 

Note:Examined similar issues, but I could not find a solution :(

sample post :http://www.prestashop.com/forums/topic/180406-search-fail-if-the-string-is-a-number/

Thank you in advance

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

  • 4 years later...

first of all, sorry for my english

products names "130204_150027_06412" like numbers, giving

 

searches as a result, "130204_150027_06412" (130204_150027_XXXX), as a result, everything returns

 

My prestashop version:PrestaShop™ 1.5.3.1

 

return.jpg

 

 

 

I want it as follows:

Iwant.jpg

 

Note:Examined similar issues, but I could not find a solution sad.png

sample post :http://www.prestashop.com/forums/topic/180406-search-fail-if-the-string-is-a-number/

Thank you in advance

for 1.6.xxx

 

add to classes/search.php line 98

 

 

 

$string = str_replace(array('/', '-', '_', '.'), array('', '', '', ''), $string); // '/', '-', bla bla...
class SearchCore
{
    public static function sanitize($string, $id_lang, $indexation = false, $iso_code = false)
    {
	$string = str_replace(array('/', '-', '_', '.'), array('', '', '', ''), $string);
        $string = trim($string);
        if (empty($string)) {
            return '';
        }
Link to comment
Share on other sites

×
×
  • Create New...