Is it possible to create an unpublished/hidden product variant through the Shopify API? I know it's possible to create a hidden product by specifying product['published'] = false
in the POST request, but I just want to create a hidden variant that can be added to a cart.
What I'm attempting to do is create a "sale" item that's only available to a single user with a specific cart. I can create the product variant through node.js, and I can use AJAX to actually add the product to the cart on the client side, but I'll never have access to the shop's dashboard so I can't mask product variants through collections, linked options, et cetera.
Any help is greatly appreciated!
It’s not possible to hide a particular variant at the API level, but you can do it via Liquid or client-side code.
Take a look at how http://apps.shopify.com/quantity-breaks implements this and you should have a better idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With