Re: How to manage thousands of categories/subcategories with API

How to manage thousands of categories/subcategories with API

robbie1988
Visitor
1 0 0

We want to migrate our store to shopify(down from woocommerce) and we are checking if shopify contains all tools necessary to get the job done. We have 750K+ products and they have a lot of categories and subcategories. So far I've been unable to find a good strategy to categorize the products. Yes we have tags and collections via API,  but no hierarchy. We have menu item hierarchy in the admin front-end, but no API routes to automate this.

 

It feels like this is such a basic thing to need, that I wonder if I'm missing a point here. If not by categories and subcategories, how do you keep hundreds of thousands of products findable? 

Side question would be: Is it realistic to assume shopify can manage this amound of products with a good speed( they say unlimited products support).

Replies 2 (2)

francesco_gs
Shopify Partner
73 6 11

Hi @robbie1988 

I know it can be a bit confusing at the beginning 😄

The fact is that most of other CMS like woo or presta do some PIM tasks as well, like the categories hierarchy.

 

Btw, a really cool workaround is to simply use a metafield on the collections, like "category_level", so you can populate it with the relative woocommerce category level.

Also you could use another 2 metafields on collections

  1. parent_collection_id where you store for each collection the relative parent collection ID
  2. children_collections_list using the metafield type Single Line Text and then (optionally) choosing the List type (for a more simple management from code) where you can store basically the array of children

This way you can use these metafields both for your backend integration with DB, PIM or anything else you're using but also on frontend where iterating for example the collections in the menu object or similar.

 

This is a very quick "scheme" of some solutions already implemented, please let me know if any of these make sense, I'd be happy to share some more detailed thoughts on this!

Alison_Ablestar
Shopify Partner
32 1 5

Hello,

 

My name is Alison, I'm the Customer Success Specialist for Ablestar apps. We have an app called the WooCommerce Importer, that migrates stores from WooCommerce to Shopify. 

 

One of the ways to overcome the differences between the way Shopify handles the collections and Woo handles the categories is to add all of the Woo sub-categories to your Shopify products as 'tags'.  Then, you can filter your collections by tag.  Some themes, like 'Brooklyn' have an option you can turn on to add the tags to the collection page, so customers can filter by clicking the tags.

 

Alison_Ablestar_1-1660144066636.png

 

 

You can also filter collections by tags from the navigation menus.

 

Alison_Ablestar_0-1660144013808.png

 

 

And if you need to build the menus in HTML for the collection headings, the URL structure for filtering collections in Shopify looks like this:

 

https://yourdomainname.com/collections/collectioname/tag

https://yourdomainname.com/collections/collectioname/tag+tag2

 

When stores are migrated from WooCommerce too Shopify with our Ablestar WooCommerce Importer app and store owners are concerned about sub-categories, we add the categories in as tags for them.

 

If you have any more questions you can reach us directly at support@ablestar.com.

 

Best,

Alison