I want to be able to do the following:
Fake example store sells t-shirts, variant/options are a white shirt and a blue shirt.
User adds one variant/option to cart, let's say blue.
User then tries to add white but is not able to add to cart and a toast reflects this.
User then tries to add white but white variant/option is now missing, stopping user from selecting it.
Essentially I want to block the ability to add an option/variant to cart or see a variant/option in the selector based on the option or tag or some other method
A way this would work:
S X XL
If cart has Blue XL then block/hide White S X XL from all product selectors and from cart.
What you're asking isn't 100% clear.
Are you saying that if I add a blue shirt (from your example) than I can no longer add a white shirt? Walk me through how that works if you have stock on hand for both?
You have two options. White & Blue.
You have size s,m,l,xl.
I add Blue S to my cart. What are you hoping the customer sees or experiences now?
I also realize this is a verbose post, but extra details and context help avoid confusion.
You can see an example from above:
The option to add 'single vision' and 'multi focal' lenses to the cart is blocked.
So, similar results, but using Shopify instead.
All options at the example url are enabled even after adding different ones to the cart.
Your comments on stock make it seem more like your just trying to "limit product one per customer"
try https://github.com/carolineschnapp/limiter or one of the order limit apps
If your instead trying to link inventory between variants to "pool" shirt blanks because the color doesn't actually matter:
E.g. buying 1 Large blue shirt means there's no more inventory left to sell a "Large white" personalized shirt?
If so a Line Item Properties customization would if probably fit as long as fulfillment doesn't expect specific skus of variant.options:
Steps are now clear for reproducing the feature in example url.
Either way what your looking for is a limiter customization.
|an hour ago|
|an hour ago|