Block ability to add to cart

New Member
7 0 0

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. 
Or
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:

Option Color

White Blue

Option Size 
S X XL

If cart has Blue XL then block/hide White S X XL from all product selectors and from cart. 

0 Likes
Shopify Expert
164 34 56

You  can manage this with inventory if you don't user to buy white color simple go to the product and make the white variant quantity zero. 

Problem Solved? ✔️Accept the solution so you can help others.
* Email: fayyazraza@gmail.com * Skype: fayyaz_raza
0 Likes
New Member
7 0 0

No, 

 

This is about choosing these on the front end. All options and variants are in stock. It's a limitation of not allowing conflicting options to be added to the cart. To block two of conflicting options being added. Only one or the other at one time.

0 Likes
Shopify Expert
9778 86 1524

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.

 

Let's say:

  1. White s
  2. White m
  3. White l
  4. White xl
  5. Blue s
  6. Blue m
  7. Blue l
  8. Blue 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.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
New Member
7 0 0

https://www.aceandtate.com/gb/tyler-satin-gold-golden-brown?gender=female

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. 

0 Likes
Highlighted
Shopify Partner
1663 50 173

@shopibei wrote:

https://www.aceandtate.com/gb/tyler-satin-gold-golden-brown?gender=female


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:

  1. remove the color option from the variants
  2. enable inventory tracking.
  3. disallow purchasing when out of stock.
  4. Use LIP's to get the personalization info (color).

 

Problem Solved? ✔️Accept the solution so you can help others.
Confused? Busy? ? Get me to solve it paull.newton+shopifyforum@gmail.com.
Buy me a coffee? ☕ paypal.me/paulnewton or donate to eff.org
0 Likes
New Member
7 0 0

I have checked the link I provided and it's blocking me from adding a multi focal lens when the cart has a single vision lens active within it. 

Screen Shot 2019-05-23 at 6.44.27 pm.png

0 Likes
Shopify Partner
1663 50 173

Steps are now clear for reproducing the feature in example url.

 

Either way what your looking for is a limiter customization.

Problem Solved? ✔️Accept the solution so you can help others.
Confused? Busy? ? Get me to solve it paull.newton+shopifyforum@gmail.com.
Buy me a coffee? ☕ paypal.me/paulnewton or donate to eff.org
0 Likes