For example if I have a parent custom collection called "Shoes" and a further 3 custom sub-collections below it called: "Running Shoes", "Formal Shoes", "Casual Shows" is there a way to add the 3 sub-collections using the API?
I presently have around 40 parent collections and 300 child collections and don't want to have to do this manually via the store dashboard. Is there an alternative using the API?
Hey @gdastgir,
Once you create a custom collection, you can use tags to filter / simulate a sub-collection.
So using the API, you might add all the shoes to the 'Shoes' collection and then tag specific shoes with 'Running shoes', 'Formal shoes', etc.
Your customers can find all the shoes at /collections/shoes and running shoes at /collections/shoes/running-shoes.
Hey @gdastgir,
You can achieve this with additional menus. For example, in the collection template, look for a menu with the same handle. If one is found, display the links as sub categories:
While you can create collections and tag products programmatically, there's no API for navigation, so this part would need to be set up manually.
Alternatively, collection.all_tags might be helpful to build a sub menu, but this becomes awkward if you have tags which aren't necessarily sub categories.
Subject | Author | Latest Post |
---|---|---|
Subject | Author | Posted |
---|---|---|
an hour ago | ||
2 hours ago | ||
2 hours ago | ||
yesterday | ||
yesterday |
User | Count |
---|---|
258 | |
165 | |
137 | |
67 | |
39 |