d
Topic
Posts:
1
9 months ago
g
1
upvotes

Cart script to disable promo codes for users with a tag

I've read all the stuff on the forums on the topic, it appears as if cart scripts do not support a methods of preventing users from using a promotion code.

Our situation is this, wholesalers have a "wholesaler" tag, and we run cart scripts to determine their discount rate based on their cart value. However, wholesalers are not allowed to use promotion codes because if we give them 15% OFF as a wholesaler, and we run a separate promotion for 10% off, then they can combine the two for 25% OFF.

There needs to be a way to interact with promotion codes in cart scripts to either increase the value of the cart by the promotion's discount, or simply ignore the promo code all together.

Is there a way to do this? If not, when will it be available?

 

i
Replies
Jason Shopify Expert freakdesign.com.au
Posts:
6903
Last edited 9 months ago

Hey Luke,

Are you talking about Shopify Scripts? You can detect if a discount code has been applied and then choose to not apply the automatic wholesale discount.

Since this would be for a Plus account, you could also

  • edit checkout.liquid to add some logic to remove / hide the discount field if a wholesaler is detected.
  • or edit checkout.liquid to stop the checkout from proceeding if a wholesaler adds a discount (not something I'd recommend, but possible)
★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
HandHugs Shopify Partner handhugs.com
Posts:
63
4 days ago

Is there any way to do this on a NON-Plus account?

 

We are using the Bold Customer Pricing app for our Wholesale section of our store. It works great but doesn't disable the use of coupon codes so codes given to our retail base could potentially be used ON TOP of a wholesale price discount, which we dont want to happen.