Coupons not appling to sale


  • Default avatar
    mbrando    
     10 years ago
    0

    Hi,

    I am using Joomla 2.5.16 and VM 2.0.24c and AWOcoupon 2.2.3 together.

    I have 2 orders in VirtueMart that used a parent coupon created in AWOcoupon that was not applied to the sale.

    First coupon:
    The parent coupon is made up of 2 child coupons and set to process all that apply and unlimited use 1) is a value discount of $75 with unlimited use that expires on 2014-01-13 with start date empty and 2) is a shipping coupon with 100% discount, unlimited use that expires on 2014-01-13 with start date empty.

    The customer enters the the parent coupon and the they should receive up to a $75 discount and free shipping.

    I can see in the coupon history the use of the coupon. However, there is no order number or Order date. The history does show the customers correct ID, email, last name and first name. Looking at the VM orders, there is an order for this person. It shows no coupon discount.

    How can that be if all criteria were met?


    Second coupon:
    The parent coupon is made up of 2 child coupons and set to process all that apply and 1 total use use 1) is a value discount of $75 with 1 total use that expires on 2014-01-07 with start date empty and 2) is a shipping coupon with 100% discount, unlimited use that expires on 2049-12-31 with start date empty.

    The customer enters the the parent coupon and the they should receive up to a $75 discount.

    I can see in the coupon history the use of the coupon. However, there is no order number or Order date. The history does show the customers correct ID, email, last name and first name. Looking at the VM orders, there is an order for this person. It shows no coupon discount.

    How can that be if all criteria were met?

    Thanks,
    Mike
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    It sounds like the order the coupon was used for was deleted and a new order created with no coupon discount. Are you by chance using the paypal pro extension? If so that would be the problem. You should read this topic:
    https://awodev.com/forum/awocoupon/help-section/coupons-and-gift-certificates-not-working-paypal-pro


    When using this extension, it calls the coupon code cleanup function (which removes the coupon code from the session) before it opens the paypal payment page. If the customer refreshes or enters wrong data, it deletes the order with the coupon code and creates a new one. Since you are using unlimited coupons, you can stop awocoupon from deleting it in the session, which should keep it available when multiple orders are created.

    in www/administrator/components/com_awocoupon/helpers/estore/estorecouponhandler.php, around line 1917 is this
    <?php
            $this
    ->initialize_coupon();
    ?>


    comment it out like this
    <?php
            
    //$this->initialize_coupon();
    ?>


    That should do it. But this will only work for unlimited coupons. If you have x use coupons or gift certificates this would not work so well.
  • Default avatar
    mbrando    
     10 years ago
    0

    Hello,

    Oh, okay. I wonder if they had a session time out or expire if that would create the same issue. No one deleted any orders though. We keep them for history on the customers.

    I'll look at your suggestion above.

    No Paypal pro. Only Authorize.net

    - Mike
  • Your avatar
    seyi    
     10 years ago
    0

    Hm strange. You can always look in the database at table #__awocoupon_history to see the order_id registered and compare that to your orders.
  • Default avatar
    mbrando    
     10 years ago
    0

    Hi,

    And the plot thickens.

    I checked the table as suggested and see order_ID 34 and 36 for these orders. However, looking at VM they are order ID 35 and 37 respectively.

    I'm wondering what happened to orders 34 and 36.

    So I looked in the #_virtuemart_order_histories

    And do see these orders as marked Deleted.

    Thanks for your help.

    - Mike
  • Your avatar
    seyi    
     10 years ago
    0

    You are welcome. If you find the problem, please post back why the old orders were deleted and recreated.