4
votes

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

4
This is a rare use case, so you're gonna have a hard time. Here are some avenues I would try: 1) grouped products - check if they can share stock amount. Unlikely. 2) Variable products - you would need to make an extra effort to show each variation as a different product on front-end, but you have a shared stock in the back-end. 3) Add actions to decrease stock of linked products. You would need a custom linking system to know which are tied together. Additional problems with stock availability queries in cart, which are complex and not filtered ( they take into account pending orders ).MSTannu
A possible solution would go like this. Products that share the same stoch go to the same product category (make these categories hidden from front-end, just in case). Then, once a sale has been made , loop through each product in the same category as the sold item and decrease their stock by the amount sold. Sounds simple, but it can prove to be difficult to achieve without hiccups...swiss_blade

4 Answers

2
votes

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!

0
votes

WooCommerce has that option. Add as variable products. Add Iphone 5s as one variant and Iphone 6s as another. Under Inventory tab, enable manage stock and enter total amount of stock.

Note: not the manage stock under the variable tab.

That's it now, as you expected, Iphone 5s + Iphone 5s = Your stock. You can add the title as "Iphone 5s or iphone 6s".

0
votes

I see this thread is pretty old.

But I have developed a handy plugin for this feature. You can find it here: https://www.wooextend.com/product/group-stock-manager/

It allows you to split inventory between multiple product & variations. Stocks are reduced for all products which share the stock when an order comes in. Also, when an order is refunded or cancelled, the stock levels are reduced for all products.

Here is a demo video for working functionality as well: https://www.youtube.com/watch?v=mNtKl-yacJk

0
votes






  1. SET A MAIN PRODUCT AS BASIS:
    1.1) Set up a main product with wished price and stock amount and a main Picture
    (Exp: Name: "USB-Cable", Price: "$25", Stock Amount: "50" pieces, SKU:"001")
    1.2) Set "Catalog visibility:" to "Hidden" for this Product and save/publish.

  2. SET CLONE PRODUCTS FOR SALE:
    2.1) Create a new product as "GROUPED PRODUCT"
    2.2) Set NAME, DESCRIPTION, PICTURES, ATTRIBUTES etc.
    (Exp: Name: "USB-Cable for Printer")
    2.3) Under "Linked Products" assign now the Main-Product
    (Exp: Linked Product: "USB Cable (SKU 001)"
    2.4) Save/publish product
    2.5) Repeat 2.1-1.4 for other clone products
    (Exp: Name: "USB-Cable for Scanner" a.s.o)
    2.6) If you want list the main product too (because set it hidden above),
    than create a new grouped product for it as in 2.1-2.4
    (Exp: Name: "USB-Cable")