Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi there,
I know how to change the 'Sort by' in collections that I create myself, however, I'm not sure how to customize the 'Sort by' when a collection is auto created to show tagged products.
See the screenshot below:
When I click on product tags, the resulting collections always have 'Alphabetical' sort, which isn't great.
I'd love to change the default sort for these automatic collections to 'Best selling.'
I've tried creating and customizing an 'All' collection, but it messed up some of my settings, so I'd prefer to do this via code or another way.
Any help would be appreciated.
hello @linia,
{%- assign sort_by = results.sort_by | default: 'best-selling' -%}
Hi there - thanks so much for the quick reply! And for helping me learn where to look for this.
I've made this change - in fact, I saw the "results.default_sort_by" three times in the file and updated all three instances.
However, I'm still seeing the sort alphabetically. Here's an example URL for the tagged collections:
https://linia-presentations.com/collections/all/timeline
I thought for sure this solution would work - any idea if there is another place I may need to look?
Boriana
After a little more experimenting, what finally worked is that I did the same edit you suggested in the file ''main-collection-product-grid.liquid" and that did the trick.
I wanted to note it here in case others have the same issue getting things to work.
Thank you for sending me on the path to figuring it out!
Hello,
I am San from MS Web Designer.
Please share the URL and let me know which theme you are using so we can provide the proper solution to you.
Regards,
San
If it’s helpful to you, please mark it as a solution.
Need Help with Shopify Design, Migration, Speed, or Custom tasks?
email: hi@mswebdesigner.com
Try Our Conversion Booster app to get more sales | Connect Our Founder Linkedin
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024