I am maintaining an old project that is using branch 2-4-stable of spree
lets say I used a promotion with coupon code AAAA at /cart and than I changed my mind and used promotion BBBB at /cart. Now when I change my mind second time and try to add promotion AAAA /cart it says
The coupon code has already been applied to this order
The code that checks in promotion has been applied is present at
def promotion_exists_on_order?(order, promotion)
I want order.promotions to only contain one promotion of coupon code.
Any idea how this can be achieved?