Apply discount on set amount


  • Default avatar
    zetemkaa    
     13 years ago
    0

    Is it possible to automatically activate a discount coupon when the subtotal of the cart exceed a set amount ?

  • Your avatar
    seyi    
     13 years ago
    0

    it is, by setting the minimum value to the amount you want it to activate.
  • Default avatar
    jim    
     13 years ago
    0

    is it possible to have the minimum value as the subtotal/before tax amount?
  • Your avatar
    seyi    
     13 years ago
    0

    it can be altered, but then it would be for every coupon code, is that what you want?
  • Default avatar
    jim    
     13 years ago
    0

    yeah, that would be perfect if you could let me know how to do that. Excellent Component by the way!
  • Your avatar
    seyi    
     13 years ago
    0

    Glad you like. Ok, here is the update, using pro version 1.3.4
    in www/administrator/components/com_awocoupon/assets/virtuemart/ps_coupon_process.php, around line 304, change this
    <?php
    if (!empty($coupon_row->min_value) && round($d['total'],2)<$coupon_row->min_value) {
    ?>

    to
    <?php
    //if (!empty($coupon_row->min_value) && round($d['total'],2)<$coupon_row->min_value) {
    if (!empty($coupon_row->min_value) && round($d['order_subtotal_withtax']-$d['order_tax'],2)<$coupon_row->min_value) {
    ?>
  • Default avatar
    jim    
     13 years ago
    0

    Worked like a charm! Thanks a lot.