Hi everyone,
I have been building my website selling pets products. I previously made large individual collections for each pet type, i.e. cats, dogs, hamsters and so on. However, I want to give customers the option to filter products in these collections by product category for each pet type, for example when shopping for cats, I want customers to be able to filter products so that they can only shop for ‘cat beds’, or ‘cat toys’. I believe the solution to this is to add smaller collections to a page, where the page would only be for one pet type such as cats, and the collections would consist of ‘cat beds’, ‘cat toys’ etc.
However, when researching how to do this, I found that I need to create a new template called a ‘page list-collections’ file using coding, however I couldn’t find the appropriate coding for my Debutify 2.0 theme.
Therefore, my ultimate question is, does anyone know the Debutify 2.0 coding to create this template, OR, is there an alternative way to creating multiple collections on a specific page?
Thanks so much for your time
Tom
Does Debutify not offer the option to filter products by tag? That seems to be the more appropriate solution here, tag all your cat products with “cat”, dog products with “dog”, etc. Then allow the customer to click it and filter the results. You may want to check in your customize editor on your collection pages to see if there is an option for filtering that isn’t enabled and not just sorting.
1 Like
Thanks for the reply, I appreciate it!
Does this mean that I would need to create ‘automated collections’ rather than 'manual collections so that I can use tags? At the minute I have created manual collections.
Thanks again
You can create the collections however you want, collections will always be filterable by a tag though. So lets say you have a collection of cat items that’s called “Cats” and you want to view all of the cat beds in your collection, make sure all the beds are tagged with “bed”, and then you could view the filtered collection by changing the url to “Die E-Commerce-Lösung für Ihr Online-Business” – You’d still be in the Cat collection, but you’d only be viewing the items tagged “bed”. If your theme doesnt offer this natively you’d typically create this kind of functionality with a set of check boxes or something and when they’re checked use javascript to create the new url and reload the page with that url. Or alternatively make an AJAX call and just reload that portion of the webpage without reloading, reloading is just simpler.
1 Like
Thank you so much for the detailed response, you’ve been extremely helpful and I really appreciate it.
I will now go an work on that.
Thanks again!
Hi again,
I have a quick question following the introduction of tags into my website.
I have created tags for my cat products such as ‘Cat beds’, ‘Cat toys’ etc, however these tags are also showing up at the top of the page of all of my other collections, such as dogs. Is there a way to filter these tags so that only certain tags show up in certain collections?
Thanks again for your time
Hm, I don’t know why a collection would be displaying tags for a product that isn’t in the collection. Are you sure you haven’t accidentally tagged things that are in the “Dog” collection with a cat related tag? I don’t know how Debutify handles it as I’ve never worked in it before, but if you’re on a specific collection it should only be pulling tags from products that within in that collection.
1 Like
Thanks again for the reply.
On standard shopify themes, how do you create tags for only specific collections? The way I added tags was by going on each product and adding tags on the bottom right of my screen. I couldn’t see an option to only create specific for specific collections.
There’s only one way to add tags to products and you’re doing it correctly. What I’m saying is that if you’re on a collection called “Dogs”, it should only be pulling tags from products that are inside of that collection. So unless you put a product manually in your Dogs collection that shouldn’t be there, or accidentally tagged a dog item with the wrong tags, it should only be showing tags associated with products from that collection. Tags are referenced in code like:
{{ collection.all_tags }}
//or
{{ collection.tags }}
//or
{% for tag in collection.tags %}
{{ tag }}
{% endfor %}
You see, so it’s actually pulling from the “collection” object – not multiple collections, just whatever one you’re currently on. Unless you’re in /collections/all – in which case it would pull from every product. If you’d like I can request access to your themes and products to take a look at what’s going on, I’ll just need your store URL. Let me know what collection you’re on, and what tags shouldnt be there so I can try to figure out what’s going on.
1 Like
Thanks again for your detailed response, I really appreciate it.
I have a feeling that the reason that the tags are being displayed in multiple collections is because some of the products are being displayed in multiple collections. For example, a pet grooming brush is being displayed in both dog and cat collections, hence perhaps the tags may transfer to that collection? Although, it is not only the tags applicable to the grooming brush that are being transferred over to the dog collection, all of the tags from the cat collection are. However, an interesting point is that the tags are not being applied to other collections such as ‘bird and wildlife’ collections, where there are no products that are in both the ‘birds & wildlife’ collection and the ‘cats’ collection.
If I gave you access to my store, does that come at a price and if so what price?
Thanks again for your help.
I mean if you want to donate something to me that’s fine, but I’m not going to charge you. From what you say, that appears to be what’s going on. The fact that it’s not showing up in all collections leads me to believe that there’s overlapping products from collections like you suggested. If you have a pet brush that is tagged “cat” and is also tagged “dog” it’ll pull both tags even if you’re just in the “Dogs” collection. In this kind of situation if I don’t want all tags to be displayed for a customer to use, I’ll make my own set of tags that I want them to be able to see and replace their loop that’s looping through all the tags. For instance their setup may look something like this:
Instead of using collection.tags for every collection like they are, I’d make a variable that contains a string of tags only I want visible to the customer depending on what collection they’re in:
{% assign my_tags = false %}
{% if collection.handle == 'cats' %}
{% assign my_tags = 'cat brushes, cat toys, scratching posts' | split: ', ' %}
{% elsif collection.handle == 'dogs' %}
{% assign my_tags = 'dog brushes, dog toys, potty pads' | split: ', ' %}
{% else %}
{% assign my_tags = collection.all_tags %}
{% endif %}
So if you were in the cats collection, it would only show cat brushes, cat toys, and scratching posts as tags. The dogs collection, only the ones assigned in the variable for the dogs collection, if it’s any other collection, it’ll use all tags associated with the collection.
The problem here may be that your tags are a little hyper sensitive. Since your collections already are specifying what animal it’s for, don’t tag them for the animal. Instead just tag the brushes “brushes”, just tag the toys “toys”. If they can be used on both animals it’ll still show up in both collections, but it’ll just say brush, not cat brush.
1 Like
Thank you so much.
I will work on using some of the solutions you have mentioned including coding to solve my issue, and if I can’t get it to work I would be more than happy to offer you a donation to take a look at my store.
Thanks again for your help, I can’t thank you enough!!