Is it possible to sort a collection by tag?

7 0 1

Hello. I'm trying to implement a little feature to sort collections by a specific tag. Let me explain further:


This is not about filtering. Besides being able to sort by price and name, I would like to select a sort option that allows me to show products with a certain tag FIRST and then everything else.


Example: I have 5 products in the collection. Three of those products have the tag "purple", another one has the tag "green" and the last one has the tag "yellow". When selecting the "Sort by Purple" option from the select form, I would like the purple objects to show up first in the template, and then all the other ones (green and yellow) in no specific order.


Is it possible to do this? What would be the best course of action to achieve it? I know this is not ideal, but it's something that the client would like to have.


Thank you.

Reply 1 (1)

37 4 10

I have the same Question.  I would like a way to have my collections page "sorted" by-product Tags.. Or perhaps have the "Featured Collections" section available in the default template so that I can add multiple selections using the collection tags I want. 

Clayton Healy