Customizing Shopify Sort Options for Enhanced User Experience

Published on Aug 18, 2024

By Liam Gallagher

#Shopify#E-commerce#Web Development
White and Pink Card on Brown Wooden Table

Understanding Shopify’s Default Sort Options

Shopify themes, including the popular Narrative theme, come with a set of default sorting options for product collections. These options allow customers to organize products based on various criteria, enhancing their shopping experience. However, store owners often want to customize these options to better suit their specific needs.

Default Sort Options in Shopify

Shopify’s default sort options typically include:

  1. Featured
  2. Best Selling
  3. Alphabetically, A-Z
  4. Alphabetically, Z-A
  5. Price, low to high
  6. Price, high to low
  7. Date, old to new
  8. Date, new to old

While these options cover a wide range of sorting needs, they may not always align perfectly with every store’s requirements.

Limitations of Default Sort Options

One of the main limitations of Shopify’s default sort options is that they are generated automatically by the platform. This means that store owners cannot easily add, remove, or modify these options without diving into the theme’s code.

Customizing Sort Options in the Narrative Theme

For those using the Narrative theme and looking to customize their sort options, there are ways to achieve this through custom code modifications. While it’s not possible to add new sort options directly through the theme settings, you can remove or hide certain options.

Removing Unwanted Sort Options

To remove specific sort options from your collection pages, follow these steps:

  1. Navigate to your theme’s code editor
  2. Open the collection-template.liquid file in the Sections folder
  3. Locate the collection.sort_options loop
  4. Add an unless condition to exclude specific options

Here’s an example of how to remove the “Alphabetically, A-Z” and “Alphabetically, Z-A” options:

{% for option in collection.sort_options %}
  {% unless option.value == 'title-ascending' or option.value == 'title-descending' %}
    <option value="{{ option.value }}" {% if option.value == collection.sort_by %}selected="selected"{% endif %}>
      {{ option.name }}
    </option>
  {% endunless %}
{% endfor %}

Available Sort Option Values

When customizing your sort options, you can use the following values in your conditions:

  • manual (Featured)
  • best-selling
  • title-ascending (Alphabetically, A-Z)
  • title-descending (Alphabetically, Z-A)
  • price-ascending (Price, low to high)
  • price-descending (Price, high to low)
  • created-ascending (Date, old to new)
  • created-descending (Date, new to old)

Advanced Customization Techniques

While removing options is relatively straightforward, adding custom sort options or renaming existing ones requires more advanced modifications.

Renaming Sort Options

Unfortunately, renaming the default sort options is not directly supported by Shopify. The names are generated by the platform and cannot be easily changed without significant custom development.

Adding Custom Sort Options

Adding entirely new sort options is a complex task that requires creating custom Liquid code and potentially leveraging Shopify’s API. This is beyond the scope of what can be achieved through simple theme modifications and may require the assistance of a Shopify expert.

Mobile Considerations

It’s important to note that customizations made to desktop sort options may not automatically apply to mobile versions of your store. The mobile layout often uses different template files, so you may need to make separate modifications for mobile devices.

Best Practices for Sort Option Customization

When customizing your sort options, keep the following best practices in mind:

  1. Maintain Clarity: Ensure that the remaining sort options are clear and useful for your customers.
  2. Test Thoroughly: After making any changes, test your collection pages on various devices and browsers to ensure functionality.
  3. Consider SEO: Be aware that removing certain sort options might affect how search engines crawl and index your collection pages.
  4. User Experience: Focus on providing sort options that are most relevant to your specific product catalog and customer preferences.

Alternatives to Custom Sorting

If the limitations of Shopify’s default sorting system are too restrictive for your needs, consider these alternatives:

Using Filters Instead of Sort Options

In some cases, you may be able to achieve your desired product organization through the use of filters rather than sort options. Filters can provide more flexibility in how customers view and narrow down product selections.

Third-Party Apps

There are several Shopify apps available that can extend the functionality of your store’s sorting and filtering capabilities. These apps often provide more customization options without requiring extensive code modifications.

By understanding the limitations and possibilities of customizing sort options in Shopify’s Narrative theme, store owners can create a more tailored shopping experience for their customers. While some modifications require technical knowledge, even small changes can significantly impact how users interact with your product collections.

Take Our Quick Quiz:

Which primary product image do you think has the highest conversion rate?