Collection Sorting: It should be possible to ignore articles (the/a/an) or customize the alphabetical sort

Short description of issue

When sorting titles, there should be an option to ignore articles (i.e. the, an, etc.) so that “The Beatles” doesn’t get lumped into the “T” category.

Reproduction steps

Create a collection that has products with articles in their title.

“The Beatles”, “The Monkeys”, “The Rolling Stones”

And some that don’t

“Banana”, “Dinosaur”, “Apple”

It should be possible to sort this either alphabetically (as it is implemented today) or article-agnostic (Apple, Banana, The Beatles, Dinosaur, The Monkeys, The Rolling Stones)

Additional info

When rendering a collection, the alphabetical sort treats articles (such as the/an/etc.) as part of the title. Therefore were you to sort titles such as ‘The Beatles’ or ‘The Rolling Stones’, these bands would be bunched up with others that start with “The”. This makes it frustratingly difficult to sort products in the way the shop desires without a hacky workaround (listed below.)

I.e.

Banana
The Beatles
Dinosaur
The Rolling Stones
Tiesto

Although technically correct, this is not always the way a store owner will want to display the information.

It should be possible to provide a sortTitle that is used during the alphabetical sort. This way the out-of-the-box alphabetical and reverse-alphabetical sorts will work properly.

The current workaround is to populate the Manual sort with a manual ordering matching the desired alphabetical sorting order. This also eliminates the ability to create other custom sorts (aka you burn your one manual sort on fixing “alphabetical”.)

What type of topic is this

Feature request

Hey @malaxeur, thanks for reaching out to request this.

One other workaround would be to handle the sorting programmatically: fetch the collection titles, strip the titles, then sort and display them. This approach would become unnecessarily complex when dealing with pagination though.

I’ve submitted your feature request internally. While we can’t provide a timeline or guarantee implementation, we appreciate you taking the time to share this use case with us.

Thanks for sending it along to the team.

And yep, exactly, it’s a bit of a nightmare to deal with on the client side unless you’re working with a single page of products. If you can picture a movie or music library, you can imagine how many products are involved.

1 Like