Missing data in History of coupons and no Balance deduction in Gift certificates


  • Default avatar
    edvard    
     7 years ago  last edited 7 years ago
    0

    Hello,

    Using J3.7.0, VM3.2.1, AC 2.5.6

    Coupons and gift certificates are working OK in cart and on orders and invoices but there is no history of usage and no deduction of Gift Certificate balance.


    Please note that in "History of Uses > Coupons", column "Discount" is empty and in table "###_awocoupon_history"

    all values are 0 in columns "coupon_discount" and "coupon_entered_id" but all data seems OK in column "details".


    What could be the problem here?


    ...and site is new on localhost xampp, PHP 7.0.15...
  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    The only thing I can think of is bad configuration.  Look in awocoupon->configuration.  How do you have these 2 settings setup:

    - Order state to trigger coupon processing    
    - Restore coupon's number of uses if order is not processed
  • Default avatar
    edvard    
     7 years ago  last edited 7 years ago
    0

    thank you for prompt reply.

    the config is:

    - Order state to trigger coupon processing     - Confirmed
    - Restore coupon's number of uses if order is not processed - Cancelled / Refunded

    Please note that I have language overrides on these so "Confirmed" is now "Paid"... I have tried to delete these overrides but still same behavior


    Also, I have the same settings in currently live old version of the site J2.5.28, VM 2.6.18, AC 2.5.6, PHP 5.4 and it works fine.
  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    Ok, not really sure what is going.  Might be a database table issue, but cant determine without debug.  Can you please send temp admin / ftp access to the test site for debugging?  You can send a private message.
  • Default avatar
    edvard    
     7 years ago
    0

    unfortunately, it is on localhost. I will try to check a few things myself and if nothing else, let you know once uploaded to server
  • Your avatar
    seyi    
     7 years ago  last edited 7 years ago
    0

    Ok,  check the table #__awocoupon_history, and make sure it matches the table schema found in
    www/administrator/components/com_awocoupon/helpers/install/mysql.install.sql

    And of course, make sure your orders are going through the 'paid' stage, and not entering the 'cancelled/refunded' stage afterwards
  • Default avatar
    edvard    
     7 years ago
    0

    i have tried everything now...

    checked tables, reinstalled tables, uninstalled component and installed again fresh copy of awocoupon, tried with default templates and it is still the same.

    finally, I have installed a fresh copy from virtuemart page of J3.7.0, VM3.2.1, AC 2.5.6 on localhost xampp PHP 7.0.15 with only sample data and there is no history as well, same as described in my first post. can you please check yourself with these latest versions?

  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    I also have j370, vm321, awo256 installed, and I am not having problems with used coupons showing in the history table.

    Not really sure what is going on, maybe it is an issue with processing through the plugin.  Can you try changing 'Order state to trigger coupon processing' to 'order creation'? Does it work there?
  • Default avatar
    edvard    
     7 years ago  last edited 7 years ago
    0

    tried all possible variants
    and no matter which trigger I choose all is OK with the orders in VM, only histroy is not OK

    could it be something with PHP version or Xampp?


    so just to be clear, coupon usage is shown in history, but all values in columns "coupon_discount" and "coupon_entered_id" are 0, so there is no deduction of gift balance
  • Your avatar
    seyi    
     7 years ago  last edited 7 years ago
    0

    Oh, that was not clear to me.  I thought here were no entries in the history.

    How are you setting up the coupons being used?

    And are you using a checkout extension?

    Ok, getting the same issue

    But in my testing, using 'order creation' it works fine
  • Default avatar
    edvard    
     7 years ago
    0

    it works! using 'order creation' is creating all OK.

    thank you so much and sorry for the trouble. I've had so many language overrides and sometimes it is quite confusing...

  • Your avatar
    seyi    
     7 years ago
    0

    Ok, try this:

    in www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php, around line 205 is this:
    <?php
            $coupon_session 
    $instance->object_array(json_decode($coupon_session));
    ?>


    Change it to this
    <?php
            $coupon_session 
    json_decode($coupon_sessiontrue);
    ?>


    Then try the confirmed stage again.
  • Default avatar
    edvard    
     7 years ago
    0

    work as a charm on 'confirmed' status as well!

    thank you for you help. looking forward to use Tracker and/or Reward ;)