Number of Uses Issue

  • Default avatar
     7 years ago

    I am having some difficulty with the Number of Uses field. I uploaded a bunch of coupon codes via csv file and had the number of uses set to "1". Number of uses type is set to "total". However, one of the coupons got "out" and was used 4 times. So, obviously, the coupon did not get de-activated/unpublished after the first use.

    I tried uploading all the codes as Gift Certificate instead of Coupon, but they were still able to be used multiple times.

    What am I missing?


  • Your avatar
     7 years ago

    Hi Janna,

    On the AwoCoupon dashboard, did you take a look at the installation check? Is the core (required) item installed?

    Another thought, is the coupon cleanup being called? Check to make sure you have the below code in
    www/administrator/components/com_virtuemart/classes/ps_checkout.php, in function add
    // Remove the Coupon, because it is a Gift Coupon and now is used!!
    if( @$_SESSION['coupon_type'] == "gift" ) {
    $d['coupon_id'] = $_SESSION['coupon_id'];
    CLASSPATH.'ps_coupon.php' );
    ps_coupon::remove_coupon_code$d );