Hey guys, I am working on some scripts to filter out certain payment method if a discount coupon is used. But when I test the script it shows me this errors:
Discount code requirements not met (Your cart)
Discount code requirements not met (Empty cart)
Discount code requirements not met (No customer)
Any idea why this is? Its only a free shipping coupon with no exception rules. So how am I getting this error? Your help is much appreciated
I'm getting the same error. It occurs for me whenever I enter a free shipping discount code into the Script Input, even if the code has no requirements to use and even if the script itself is basically blank:
Output.shipping_rates = Input.shipping_rates
Which leads me to believe this is a Shopify error that can't handle Free Shipping discount codes in the Script Editor input for testing, for some reason. Hope this is fixed soon.
Hey K&J, I found out that adding an {% if %} to check if there is a coupon code on the cart before using any coupon code value acutally fixes the problem. Eitherway, if you published a script with that error, there should not be any problem with it. I would suggest using the script preview to see how your script works on your live store just to be on the safe side. But like I said adding the if to check if the coupon code exist usually fixes the problem :D Best of lucks! :D
Cheers!