Jump to content

Search issue with my products


Gianlo

Recommended Posts

Hi, I'm working on a manga e-commerce, and I'm in trouble with the default PrestaShop search module.

Most of the product that I sell on my website have a number:

  • One Piece 1
  • One Piece 2
  • One Piece 3

When a customer search a specific product "One piece 97" the searched product, even if it's present and available, isn't displayed as first as I expect.

The sort as also another problem, if I sort the products alphabetically A - Z the result is this:

  • One Piece 1
  • One Piece 11
  • One Piece 12
  • ...
  • One Piece 2

to fix this issue I can manipulate the SQL query and add into the ORDER BY clause LENGTH (name) but if I follow this path and I have a product called "One piece 3 + cards" the new order became:

  • One Piece 1
  • One Piece 2
  • One Piece 4
  • ....
  • One Piece 99
  • One Piece 3 + cards

 

I'm looking for a way (or a module) to sort my products alphabetically but respecting the number of the product and a way or a module to fix the search of a specific volume of a collection (e.g "One Piece 98" has the same search results as "One Piece").

Prestashop details:
Installation type (new/update): new
PrestaShop version: 1.7.6.8
Theme (default/customized): charme
Code (original/modified): original
PHP version: 7.3.29-1~deb10u1
MySQL version: 10.5.11-MariaDB

 

 

 

Link to comment
Share on other sites

On 9/1/2021 at 12:55 PM, Gianlo said:

Hi, I'm working on a manga e-commerce, and I'm in trouble with the default PrestaShop search module.

Most of the product that I sell on my website have a number:

  • One Piece 1
  • One Piece 2
  • One Piece 3

When a customer search a specific product "One piece 97" the searched product, even if it's present and available, isn't displayed as first as I expect.

The sort as also another problem, if I sort the products alphabetically A - Z the result is this:

  • One Piece 1
  • One Piece 11
  • One Piece 12
  • ...
  • One Piece 2

to fix this issue I can manipulate the SQL query and add into the ORDER BY clause LENGTH (name) but if I follow this path and I have a product called "One piece 3 + cards" the new order became:

  • One Piece 1
  • One Piece 2
  • One Piece 4
  • ....
  • One Piece 99
  • One Piece 3 + cards

 

I'm looking for a way (or a module) to sort my products alphabetically but respecting the number of the product and a way or a module to fix the search of a specific volume of a collection (e.g "One Piece 98" has the same search results as "One Piece").

Prestashop has a rather simple search algorithm. It has only a list of words and weights connecting those words to a product. So if you index a product with the name "one piece 99" it will see three words "one", "piece" and "99". It will discard "99" as it is too short: the minimum length is 3.

Of course there are modules available that provide context. But those are usually not free.

Link to comment
Share on other sites

  • 2 weeks later...
On 9/7/2021 at 4:58 PM, musicmaster said:

Prestashop has a rather simple search algorithm. It has only a list of words and weights connecting those words to a product. So if you index a product with the name "one piece 99" it will see three words "one", "piece" and "99". It will discard "99" as it is too short: the minimum length is 3.

Of course there are modules available that provide context. But those are usually not free.

Hi, thanks for your response. 

Do you recommend one (or many) specific module for this purpose?

 

 

 

 

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