App reviews, troubleshooting, and recommendations
Hey everyone,
I am currently working on a store and I was wondering if there's a way to edit the logic of the sorting feature within collection pages? I am familiar with coding but not much with liquid.
I am looking to make the A-Z sorting feature so that titles with numbers will be at the bottom and the letters at the top. I was trying to play around with the liquid code, but I just can't seem to find where the logic for the sorting functions are kept. All I was able to find is where the drop down main to select each of the options is created:
<span class="filter">
<label for="sort-by">{{ 'collections.sorting.title' | t }}:</label>
<select id="sort-by" class="sort-by" data-default-value="{{ collection.sort_by | default: collection.default_sort_by }}">
{% if section.settings.collection_sort_show_featured %}<option value="manual">{{ 'collections.sorting.featured' | t }}</option>{% endif %}
<option value="best-selling">{{ 'collections.sorting.best_selling' | t }}</option>
<option value="price-ascending">{{ 'collections.sorting.price_ascending' | t }}</option>
<option value="price-descending">{{ 'collections.sorting.price_descending' | t }}</option>
<option value="title-ascending">{{ 'collections.sorting.az' | t }}</option>
<option value="title-descending">{{ 'collections.sorting.za' | t }}</option>
<option value="created-ascending">{{ 'collections.sorting.date_ascending' | t }}</option>
<option value="created-descending">{{ 'collections.sorting.date_descending' | t }}</option>
</select>
</span>
I am using the Canopy theme.
Please help!
Thanks,
Rozen
Another thing that I am willing to settle for is ordering my collections based on the vendor name instead of the title of the product. I would there will be something somewhere defining these sorting options
Hi @Rozen01 - there's not a way to edit the sorting logic in the Shopify UI (!). The best way to do what you're looking to do is to either rename the products or use the custom sorting feature within a collection. If you're interested in maximizing sales, you can also look into collection sorting tools like ours.
Hope this helps!
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024