woocommerce stock, multiple products from same stock

Sebastiaan36 picture Sebastiaan36 · Aug 25, 2015 · Viewed 7.5k times · Source

I'm building a woocommerce webshop. It's a webshop for phonecases and the customer wants to keep inventory in the woocommerce backoffice, there is only one problem:

They have different models for example for iPhone 4 & iPhone 5. But in fact these are the same cases. They are added as separate products to WooCommerce.

What they want is that there are 2 different products that have combined inventory.

For example, a brown iPhone 4 case is sold, after that a brown iPhone 5 case. This means there is a stock value that changes by -2. And if stock is 0 both products change status to "sold out".

I can't seem to think of anything, does anybody have an idea?

The webshop can be found here : http://itZbcause.nl

Answer

Matías Ighani picture Matías Ighani · Feb 10, 2017

I've found the solution to this. I use the official Woocommerce Product Bundles plugin. I know that in CodeCanyon there are similar plugins in terms of functionalities, so they might work too but I can't assure that.

  1. Create the "Main product". In my case I was selling this small cup as a planter See here

  2. I wanted to offer it as a pencil cup too, sharing the stock as it was essentially the same product. So I created a Bundled Product. In this bundled product you set the name, the image, description, category and the price you want for the "new" product. See here

  3. In the bundled products tab you select the main product. In "Advanced settings" you untick all visibility options so the main product doesn't show anywhere as being a "component" of the bundle. Done!

I have found two limitations so far.

  1. The quantity selector is limited by the maximum and minimum you enter in the bundled products settings, not the main product stock. If you set a maximum of 10 then it's always going to allow the customer to choose up to 10 in the selector. However, don't panic, if the stock of the main product is less than that a notice will appear and won't get added to the cart. So it's more an annoyance for the customer that doesn't know how many are available until they try adding to the cart and would have to manually try until it hits the mark.

  2. In some cases you may want to hide the main product (for example, a blank mug if you sell only printed mugs). Doing this by setting the product to private won't allow you to add it to the bundle. However I'm sure there are other ways to hide a product from the shop beyond the "private" setting.

Hope this helps!