How to have product variants that all pull from the same pool of stock available

Question:
How do you have product variants that all pull from the same pool of stock available?

Product:
What ever product can be used for eCommerce and has a solution to this issue.

What are you trying to achieve:
I need to be able to add stock variants that equally pull from the same pool of stock available. We sell plants and I need variants to be Bareroot or Potted. All of the plants are by default bareroot. People can pay more for them to be potted for them. But, if I only have 1 apple tree left I don’t want to have 1 in stock for bareroot and 1 in stock for potted or I would over-sell what I have available. I need to have the customer be able to choose Bareroot Apple Tree for X amount of dollars or Potted Apple tree for +$10 and there is only 1 tree available total so you have to choose one option or the other.

What have you already tried:
I cannot see any way to do this. Am I missing something? Some way to code it or?

Additional information:
I won’t be able to use Wix if this has no resolution.

Hey Alissa,

Yes this certainly can be custom coded.

How? Is there a tutorial somewhere?

There isn’t a straight up tutorial doing just this, but you can achieve this using Wix Ecom’s backend events that are triggered when an order is placed and then call decrement inventory by fetching the variant ID.

https://dev.wix.com/docs/velo/api-reference/wix-ecom-backend/events/on-order-payment-status-updated