Entering Invalid Coupon Twice Automatically Checks Out


  • Default avatar
    donald6    
     4 years ago
    0

    My customers have run into an issue when they enter an invalid coupon code and try to enter it again (thinking they made a mistake), it automatically takes them to the checkout completion page.

    For instance, I created a coupon for certain products. There is a discount in Hikashop currently on those products, but I set the coupon in AWO not to apply to discounted products.

    When I enter the discount code, I get the message that is triggered from [(exclude) Discounted Products] error and leaves me in the cart view. If I enter the code again, I get the same error message, but it takes me to the checkout completion page.

    Using Hikashop 3.0, AWO Coupon Pro 2.1.3.
  • Your avatar
    seyi    
     4 years ago
    0

    Hello,

    Thanks for reporting, I was able to reproduce and believe I have found a solution. Here it is:

    in www/administrator/components/com_awocoupon/helpers/estore/hikashop/couponhandler.php, around line 131 is this:
    <?php
        
    function initialize_coupon() {
            
    parent::initialize_coupon();
            
    ?>


    right after that, add this line of code
    <?php
            JFactory
    ::getApplication()->setUserStateHIKASHOP_COMPONENT.'.coupon_code','');        
    ?>


    I believe that will fix the issue. I have not been able to do extensive testing on it so do not know if there are any side effects, so please test it fully before moving live. This will be revised for the next update.
  • Default avatar
    donald6    
     4 years ago
    0

    It appears that the change has solved the issue. I can now enter the code multiple times and it stays on the checkout page.

    Thanks for the quick response and the fix.

    Don