Purchase sweets by weight

Hi

im trying to find a way to purchase sweets by weight without creating multiple products for variants.

i want to manage stock

for example

stock of 1kg bag of sweets

have variants of weight 100g, 250g etc that would reduce down from the opening stock.

the current methods are creating individual stock and products for each variant I am making

is there a way to do this?

thanks

This can be done by a developer using the Shopify APIs. The way to do it would be to listen for the webhook when an order is placed and then, using code, update the inventory of the top level product. I’m a developer and happy to work with you on this if you’d like.