Liquid, JavaScript, themes, sales channels
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
Hello ,
In my online boutique we assign a tag to each product based on their collection (Eg SS22 = spring summer 2022 / FW22 = Autumn winter 2022)
Now we would like to see in our collection pages first the products containing the FW22 tag, then those with the FW21 tag and lastly the products containing the ss22 ... ss21 tag and so on.
Is there a way to do this without having to manually order the products?
I know I could sort them by date of addition, but some contuning products, this way they will always show at the bottom, even if they are new.
Thank you
If this is a presentation matter then on the frontend this is an advanced customization making multiple collections being presented as one.
For admin sorting there's no simple way to do that as what you describe natively as those tag as are not purely alphabetical or simply numerical.
If products can be retitled adding a prefix may be one approach; keeping in mind the naming convention has to be alphabetical between these subcategories. Note this is different than changing the handle which would affect the url
A workaround may be if these product exist in only one collection to use the product CSV import. But it's been awhile so i'm not sure if the order of products is strictly respected when being added to a collection.
You might be able to lessen the ongoing manual burden by creating a flow in the free shopify-flow app to batch add products you select in the search admin by each tag in sequence.
https://help.shopify.com/en/manual/shopify-flow/reference/actions/add-product-to-collections
Apps like mechanic can be script to automate such a process though obviously they wont have such specific logic premade https://tasks.mechanic.dev/?q=sort
Welcome to the Shopify Community!
You can use the following code.
{% if product.tags contains "FW22 " %}
{% include 'product-list-item' %}
{% endif %}
{% if product.tags contains "FW21 " %}
{% include 'product-list-item' %}
{% endif %}
Regards,
Mehak
If it’s helpful to you, please mark it as a solution.
Need Help for Shopify Design , Migration , Speed or any Custom tasks ?
email : hi@mswebdesigner.com
Try Coupon Discount on Cart - Proven Way to boost your Shopify sales and conversion - Free to use
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022