URGENT - Shipping coupon don't work !!!


  • Your avatar
    seyi    
     4 years ago
    0

    1.4.3 : shipping coupons do not work

    In this christmas period its baaaaaaaaaaad


    urgent help needed plz
  • Default avatar
    edouard    
     4 years ago
    0

    it works for regular coupons


    it works if I copy 1.4.1 com_awocoupon directory over 1.4.3 (all the files)
  • Your avatar
    seyi    
     4 years ago
    0

    It works for shipping if it is already selected, but not if it is not selected. This is fixed that problem:
    in www/administrator/components/com_awocoupon/assets/virtuemart/ps_coupon_process.php
    around line 770 is this:
    <?php
    return array(    'redeemed'=>true,
                    
    'coupon_id'=>$coupon_row->id,
                    
    'coupon_code'=>$coupon_row->coupon_code,
                    
    'product_discount'=>0,
                    
    'shipping_discount'=>0,
                    
    'usedproducts'=>'',
            );
    ?>

    change it to this
    <?php
    return array(    'redeemed'=>true,
                    
    'coupon_id'=>$coupon_row->id,
                    
    'coupon_code'=>$coupon_row->coupon_code,
                    
    'product_discount'=>0,
                    
    'shipping_discount'=>0,
                    
    'usedproducts'=>'',
                    
    'force_add'=>1,
            );
    ?>


    And around line 1257 is this:
    <?php
    if(!empty($coupon_used['product_discount']) || !empty($coupon_used['shipping_discount'])) {
    ?>


    change it to this:
    <?php
    if(!empty($coupon_used['force_add']) || !empty($coupon_used['product_discount']) || !empty($coupon_used['shipping_discount'])) {
    ?>
  • Your avatar
    seyi    
     4 years ago
    0

    updated in 1.4.4.