[Resolved] Make a 0 value coupon


  • Default avatar
    peter49    
     10 years ago
    0

    I would like to have a coupon with value 0.

    The reason is this:

    • I want to issue a charity coupon

    • when people use this coupon, they get 0 discount but the charity coupon is tracked in the history of uses

    • at the end of each month, we count the number of uses and donate to charity


    Or is there another way already?
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Yes, AwoCoupon is stopping 0 value coupon codes. Might make this an option in the future. If you want it to work, then in
    www/administrator/components/com_awocoupon/helpers/estore/estorecouponhandler.php, around line 1066 is this:

    <?php
                
    if(empty($r[1]['force_add']) && empty($r[1]['product_discount']) && empty($r[1]['shipping_discount'])) continue;
    ?>


    Comment it out like this
    <?php
                
    //if(empty($r[1]['force_add']) && empty($r[1]['product_discount']) && empty($r[1]['shipping_discount'])) continue;
    ?>


    And that will allow 0 value coupon codes
  • Default avatar
    peter49    
     10 years ago
    0

    Thanks!
  • Default avatar
    peter49    
     10 years ago
    0

    I have tried this, it does allow me to create a €0 coupon. However, it does not allow me to apply the coupon in the shopping cart (maybe it is applied but not in a visible way).
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    What shopping cart are you using and what version?

    After updating the code with the above on a virutemart 2.0.26 site, the coupon code was displayed in the cart, but the zero is not. Virtuemart for some reason shows a blank when there is a 0 value in any field,.
  • Default avatar
    peter49    
     10 years ago
    0

    Hi, I am using VM2.0.26d with OnePageCheckout from Rupostel.com. Url: www.saintbasics.com.
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Onepagecheckout is probably not allowing it. Can you contact rupostel for a solution?
  • Your avatar
    seyi    
     9 years ago
    0

    there is an option for this now in configuration in the latest versions of AwoCoupon