A space to discuss online store customization, theme development, and Liquid templating.
I've been playing around with Dawn theme and am so confused because it doesn't seem to have any built in way to sort a collection by tag...the filter on the collection page only has the options of sorting by product type, price, vendor, and availability. Every Shopify theme I've ever worked with has the ability to sort products by tag built into it somewhere and this is a feature I need on every site I am working on as I need to be able to filter by custom categories such as 'Occasion', etc. Do I have to figure out how to code this in myself? Or am I just missing something? Thanks in advance!
Sure thing, I'll try. A reminder that this worked for me with the Empire theme. Not sure if all 2.0 themes work this way.
Go to Edit Code for your theme. For each Section that you want to be available in a page template, you have to scroll down to the bottom of the section liquid and within the {% schema}, find the "templates" list. It should say "index" (homepage) at the very least. Add "page" to the templates list, like so:
{% schema %}
[...]
"templates": [
"index",
"product",
"page"
]
}
{% endschema %}
Don't forget to put a comma after each template except for the last one.
I hope this helps. Sorry to the others for taking this thread into a tangent.
This is really helpful, thank you! I chose Modular over Empire mainly because it didn't look like Empire was set up to have sections on the pages, and I wasn't able to access the code in the trial version to see, so it's nice to know that it is easily remedied in case I need to use Empire in the future for anything! Thanks!
No problem!
I know what you mean. I couldn't get sections to work in the trial, but I naively thought it was probably a limitation of the trial since 2.0 boasts that you can add sections anywhere, so we bought the theme anyway. When I still couldn't add sections after buying it, my heart sank and I hoped I hadn't just thrown money into a fire. Luckily I found this little remedy last night and we're back on track! Huge relief.
Now that that is taken care of, I can safely say that this theme is awesome. I really love the group tag filtering, and the fact that you can select multiple tag filters across different categories.
At least we know that product tag filtering is still possible with 2.0 themes, although it depends on the theme and/or your coding expertise. I definitely still get the feeling they will eventually phase them out entirely.
Here is a new update in the github repository about filtering metafileds with api:
https://github.com/Shopify/storefront-api-feedback/discussions/10#discussioncomment-1464732
Thanks for this. I learned that the reason Dawn filtering isn't working is because there's a product limit of 1000.
Which explains why all my collections have filtering, except for my View All collection.
This is great news. Filtering by metafield is a great addition. it'll take some time to apply new metafields to all our products but it will definitely be worth doing. There are two things I hope Shopify adds soon, right now filter by metafield is only available for
But I think these two other types should definitely be available:
Both can give even more flexibility. If anyone is wondering, my workaround for the missing two is to use normal number_integer (for rating it's just a number and for Boolean: true, it is 1)
Yeah these Metafield filters are fantastic news!
Personally, I’ll wait until the Binary one is launched before adopting it - it’s the obvious next step and I’m hoping it won’t be too long.
I know it’s possible simulating a Binary one with single line text “true” or number 1 - but in practice I imagine it will be too complicated to explain to staff what 1 means in which context. and when I switch the current setup, then for a proper solution and not yet another workaround
... Every time a new theme or product type is added you would have to go in and create a collection for it and manually add it to a bunch of different nav menus in the different departments. That makes no sense at all. Plus with nav menus they cannot filter down to get to the items that are for example, only for gymnastics girls in the teen age range etc.
Note to generate a list of product types in liquid in a collection use collection.all_types https://shopify.dev/api/liquid/objects/collection#collection-all_types
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
See this link for solution
If helpful then please Like and Accept Solution.
Shopify theme and app developer.
Thanks
An update to this thread:
Metafields have received a series of upgrades in the last few months and from what I can tell, it’s now at full feature parity with tags. I suggest to make the switch from the deprecated tagging system to the new facet filters