Code still rejected after meeting the requirements

Highlighted
Shopify Partner
4 0 0

We have a simple discount code 10% off when a minimum purchase amount is met.

We use the script editor (in this specific case you could just use the code settings, but stick with me):

if Input.cart.subtotal_price_was.cents >= 2900
  ...
else
  Input.cart.discount_code.reject({ message: 'Unfortunately you have not yet reached the minimum order value of $ 29' })


With an item below the threshold we enter the code and as expected it is rejected: ''Unfortunately you have not ...".

If we now go back to the store to meet the requirements by adding items till we are over $ 29 and then proceed with the checkout - the code is still rejected. In order for it to work, we have to remove the code and reapply it. That is not very user friendly. Are there any workarounds?

0 Likes