Liquid, JavaScript, themes, sales channels
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
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
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 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
User | RANK |
---|---|
37 | |
28 | |
13 | |
12 | |
9 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023