How to prevent a product from being purchased?

#1

I have a store where I sell digital products that have several variations. My base products are not purchasable. I’ve created them just to be able to create variations and to create child products based on them. So my base products are just placeholders, they are not real products. I only want child products to be purchasable.

My initial idea was to set all base products status to draft which seemed to be a good idea, because draft products are not purchasable and they don’t show up in API responses (for example if one call products endpoint).

But it turned out that I can’t do it because there’s no way to query child products when the base product has a status of draft (I describe the problem, in more details, here: [feature request] Add a new endpoint that will allow for getting child products based on the main product ID)

I got in touch with tech support, they told me to apply a workaround - set base products’ quantity yo 0, which didn’t sound like an elegant idea, but I wanted to give it a try anyway because there were no better idea.

But unfortunately, this idea is not applicable either. It would work only if stock management was enabled. I sell digital products, so turning on stock management doesn’t make any sense. If I turned it on, I would have to set child products’ quantity to some enormous value (like 100000) in order not to end up with unavailable products.

So, is there any solution? Any ideas? It doesn’t look like an edge-case. I’m pretty sure that it’s very common to have placeholder products that are used just as a base for child products.

0 Likes