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

list products by tag

vittoriocitro
Shopify Partner
8 0 1

 

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


vittoriocitro.it

Vittorio Citro
Replies 2 (2)
PaulNewton
Shopify Partner
4868 408 1047

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 

 

 

 

Finally Combinable Discounts - EARLY ACCESS ONLY - Use Free Shipping With Other Discounts

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org
Problem Solved? ✔Accept and Like solutions to help future merchants
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
MsWeb_Designer
Trailblazer
235 15 26

Hi @vittoriocitro 

 

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