Number of uses not working


  • Default avatar
    donald6    
     11 years ago
    0

    Hi:

    The coupons are working as they are supposed to - the only issue I am having is with the number of uses.

    I have the product and shipping discounts which allow a user to get a free product. I want to limit the number of these products to 5. I created a parent coupon to contain the product and shipping coupons. I set the overall use limit to 5.

    It seems like nothing is recording as being used. I get no error message. Also there is nothing being recorded in the history of uses. All orders in Hikashop are listed as confirmed.

    I took off the parent coupon and used just the free fudge coupon, and it still does not record the uses, although it does give the discount.

    Since the promotion will be for a free fudge, I certainly don't want everyone to order free fudge!

    Thanks again for your fine support.
  • Your avatar
    seyi    
     11 years ago
    0

    The problem is the history of uses not being recorded, since this is where it calculates the number of uses from. This is a problem I cannot reproduce locally so do not know, but I will be happy to look at your specific installation. If you can send me temporary admin and ftp access through private message, I will take a look at it.
  • Your avatar
    seyi    
     11 years ago
    0

    Ok, i got it working but not sure if the solution I implemented will cause problems. When calling the coupon code, it checks to see if the cart_id is equal to the cart_id stored within the coupon, if it is not equal, then it resets the coupon so it cannot be used. In your case, when the order is created, the cart_id in the session is 0, and I dont understand why. Here is my change

    in www/administrator/components/com_awocoupon/helpers/estore/hikashop/couponHandler.php, around line 49, I changed this
    <?php
        
    if(!empty($coupon_session) ) {
            
    $coupon_session unserialize($coupon_session);
            if(
    $coupon_session['cart_id']!=$current_cart_id$this->initialize_coupon();
        }
    ?>


    To this
    <?php
        
    if(!empty($current_cart_id)) {
            if(!empty(
    $coupon_session) ) {
                
    $coupon_session unserialize($coupon_session);
                if(
    $coupon_session['cart_id']!=$current_cart_id$this->initialize_coupon();
            }
        }
    ?>


    Please test and make sure you do not see any adverse effects from doing this.
  • Default avatar
    donald6    
     11 years ago
    0

    The coupons seem to be working fine for the discounts, along with showing the history, along with counting down the number of uses. However, when I add items to my cart, I am getting the following at the top of the page. Sometimes the line appears 6 or 8 times at the very top:

    Notice: awocalled 113 in /home/schecks/public_html/fudgebydesign.com/administrator/components/com_awocoupon/helpers/estore/hikashop/couponhandler.php on line 48

    Is this possibly a debugging thing? Everything else seems to be working just fine now.

    Thanks for your help in getting it figured out!
  • Your avatar
    seyi    
     11 years ago
    0

    yes, that was just a debug statement, it has been removed.
  • Default avatar
    donald6    
     11 years ago
    0

    Thanks again for your fine service. I am very pleased with the control that Coupon Pro gives me in my marketing. I love the autoload feature and the ability to create a parent coupon to apply a coupon for free shipping and free product.

    Have a great day!