Auto generated coupon from AwoRewards not working in AwoCoupon


  • Default avatar
    peter130    
     6 years ago
    0

    Hi I have similar problems.
    I use Joomla 3.8.2, VM 3.2.6, AwoCoupon free ver 2.0.26 and AwoRewards pro 2.3.7.
    I have the procedure, that after registration user receive also auto generated coupon for discount.
    When I put cupon in to VM is not working, but if I just save again coupon in the admin panel coupon is working.
    Where is the problem? Is this something to do with cache?
    Regards,
    Pet
  • Your avatar
    seyi    
     6 years ago
    0

    Hello,

    The coupon that you care copying in AwoRewards, how did you set it up?
  • Default avatar
    peter130    
     6 years ago
    0

    Hi the config of a coupon, that i care copying is:
    Coupon code: COUPONCODE1
    Published: Published
    Percent of Amount: Percent
    Discount Type: Overall
    Value: 10.00
    Number of Users: per Customer # 1
    Minimum Value: 0.00
    Start date: 2017-12-02
    Expiration: /
    Customers: /
    Asset=>Type: /

    Regards, Peter

  • Your avatar
    seyi    
     6 years ago
    0

    Ok, in the file:
    www/administrator/components/com_aworewards/helpers/estore/virtuemart/helper.php, around line 163 is this:
    <?php
            $date_from 
    date('Y-m-d H:i:s');
            $date_to = !empty($expiration) && ctype_digit($expiration)
                            date('Y-m-d H:i:s'strtotime('+'.(int)$expiration.' days'))
                            date('Y-m-d H:i:s'strtotime('+10 years'));
    ?>


    Please change it to this:
    <?php
            $date_from 
    date('Y-m-d').' 00:00:00';
            $date_to = !empty($expiration) && ctype_digit($expiration)
                            date('Y-m-d'strtotime('+'.(int)$expiration.' days')).' 23:59:59'
                            date('Y-m-d'strtotime('+10 years')).' 23:59:59';
    ?>


    That should fix the dating issue
  • Default avatar
    peter130    
     6 years ago
    0

    Hi,
    Now is working ;) Thank you very much.
    Regards,
    Peter