Jump to content

Ignoring quotes and apostrophes while sorting products by name - Prestashop 1.7.6.4


grupaperun

Recommended Posts

Hey guys,
in my client's shop there are many products with similar names. Sometimes difference is in the third or fourth word. Sometimes these different parts of the names are in quotes or apostrophes and here is the problem.

How to set alphabetical product sorting to ignore quotes and apostrophes in product names?

Example

Default sorting by names:

1. Product 'Delta'

2. Product Alpha

3. Product Beta

4. Product Gamma

Should be:

1. Product Alpha

2. Product Beta

3. Product Gamma

4. Product 'Delta'

 

Anyone knows how to fix this?

Link to comment
Share on other sites

The easiest approach would be to sort by the link_rewrite field instead of by name. Link-Rewrite is used for making the links when pretty links are enabled.

There is one catch: where should you make those changes.

It depends: of the Faceted Search module is active you should make it there. Otherwise you should make it in the getProducts function in /classes/Category.php

Link to comment
Share on other sites

3 hours ago, musicmaster said:

The easiest approach would be to sort by the link_rewrite field instead of by name. Link-Rewrite is used for making the links when pretty links are enabled.

There is one catch: where should you make those changes.

It depends: of the Faceted Search module is active you should make it there. Otherwise you should make it in the getProducts function in /classes/Category.php

Thank you for your reply.

Default products sort order is set in BO to Product Name. It can be change in category page using dropdown menu but there is no option to sort by link_rewrite.

Module ps_facetedsearch is active in our store.

Can you guide me what I need to change?

 

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