creative designer

I have to come clean and admit the title of this post is pure clickbait since there's no current way to change the 100 variant limit. You can however take two (or three, four, etc) products and merge them together to form a new magical giant product. Let's take a quick look at how that might be possible.

This is being written whilst I sit at an airport, after way too many delayed flights on a super long flight from Australia to Shopify HQ. Tired eyes will result in many, many glorious typos so expect the need to translate.

Now since this does require some hefty code edits I am only going to talk about the concept. There will be some code to copy and paste but expect to have to modify and adapt it to your theme. Since each theme is going to be different, the exact code you need will be different too. 

Here's the base idea

  • Make a product with 100 variants. 
  • Set whatever options you need.
  • Make another product with 100 variants (do less if you are feeling lazy).
  • Set whatever options you need, but make sure they are *exactly* the same as the first one. When I say the options should be the same I mean in both option order AND in the option name used.
  • Use the code to marge the multiple products together.

Won't this mean there's extra product(s) floating around?

Yes, and this can be a problem. There's general management, SEO and third party integrations that you need to consider before going down this path.

For SEO, you can remove the extra products from the sitemap, along with adding whatever theme edits needed (like noindex meta tags, hiding content, etc). I strongly suggest that you hide the product in the sitemap rather than just leave it in place for the world to find. Duplicate content issues are not something you want to have.

See the removing a product from the sitemap post for a bit more info on that front. If you're making a lot of products via the API you can set that metafield to remove the extras from the sitemap at the same time.

Example product to get us started:

In our example we are going to assume that you have three products:

  • the Master (being the one that the customer will view)
  • an additional product with the handle of 'additional-product-1'
  • another additional product with the handle of 'additional-product-2'

If you want to use different handles just make sure you adjust the code below to match whatever they are. And before you ask - yes - the additional product handles could be set in a metafield on the master product itself. I'll update this post with more info on how to do that (eventually!).

View the example with the code in action. I had initially cheated a bit being lazy, and tired from 30 hours of flights so only added 10 variants per product. I've since adjusted that so we should have a product with at least 150. Feel free to poke around the page source should it help.

The Code:

 

Like to work with me?

Let's talk