Is that possible, via Shopify Script Editor to show a user message when it tries to stack discount codes on the checkout?
I want to allow the user to add any new valid promotion code with regular behavior (attach)
But I want to show a message saying that would not be possible to use 2 discount codes at the same time
My current script is like this:
Output.cart = Input.cart
exit unless Input.cart.discount_code
if Input.cart.discount_code > 1
Input.cart.discount_code.reject({ message: 'Only 1 code can be applied at a time' })
end
Output.cart = Input.cart
Regular Behavior
Thank you in advance
Shopify doesn’t allow user to use more than one discount code during checkout, you dont need to worry on this