Multiple Coupons shown - but set to none


  • Default avatar
    thomas973    
     3 years ago
    0

    Hi
    I have disabled Store Coupons and Multiple Coupons is set to NO, but still I see the option in the front-end to enter another Coupon after entering the first?

    Regards
    Thomas
  • Your avatar
    seyi    
     3 years ago
    0

    Hello,

    AwoCoupon does not disable the showing of the coupon box in the front end, it just will not accept more than one coupon.

    This can be done in your template through an override though.  what shopping cart are you using?
  • Default avatar
    thomas973    
     3 years ago  last edited 3 years ago
    0

    Thanks!
    What does Disabling Store Coupons do then?

    I'm using HikaShop.

    Besides, before installing AWOCoupon I only had the option to enter 1 coupon, not multiple?
  • Your avatar
    seyi    
     3 years ago
    0

    That disables Hikashop coupons from working. 

    For Hikashop, here is what you can do, in the file:
    www/plugins/hikashop/awocoupon/awocoupon.php, around line 200 is this:
    <?php
        
    public function onHikashopAfterDisplayView(&$view){
            if ( @ $view->ctrl != 'checkout' ) {
                return;
            }
    ?>

    Right after that, add this
    <?php
            
    if ( ! AC()->param->get'enable_multiple_coupon' ) ) {
                $coupon_session AC()->storediscount->get_coupon_session();
                if ( ! empty( $coupon_session->processed_coupons ) && count$coupon_session->processed_coupons ) > ) {
                    return;
                }
                $coupon current$coupon_session->processed_coupons );
                if ( $coupon->isauto == false ) {
                    return;
                }
            }
    ?>

    That should fix it.
  • Default avatar
    thomas973    
     3 years ago
    0

    Thank you so much, seems to work! :-)