AwoCoupon Error messages


  • Default avatar
    hk    
     10 years ago
    0

    Hi,

    I'm using AwoCoupon for my website. I have a coupon set for minimum purchase of 1500. I recently figured out that, when a user enters a Coupon code when the cart amount is less than 1500, it shows an error:
    ?This coupon is valid for an order with a minimum of
    but it doesn't show the amount (1500) in this error message.

    Can you please check and let me know what change is required for this.

    Thanks.
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    What version of AwoCoupon is this?
  • Default avatar
    hk    
     10 years ago
    0

    I'm using AwoCoupon 2.0.9 version.
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    I assume that is the free version? Please upgrade to the latest, 2.0.13, it has that feature built in.
    http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions/virtuemart-coupons/11629
  • Default avatar
    hk    
     10 years ago
    0

    Thanks for the note!
    I looked at the Version history, seems like it was fixed in 2.0.11

    I was comparing the version 2.0.9 and 2.0.13 and found that there are new files in 2.0.13 for VM Payment. Can you please let me know, what are these for.

    Also, do I need to edit the VM code as mentioned in https://awodev.com/forum/awocoupon/help-section/virtuemart-2026-coupon-usage-not-being-recorded, to make it working in VM 2.0.26d.

    Thanks.
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    the vmpayment is for this:

    2.0.12
    - Fixed bug where entering an invalid coupon code would cause the error message to be displayed on the remaining session page refreshes


    And for your second question, if you use number of uses, yes:

    2.0.13
    - Updated number of uses logic, for Virtuemart 2.0.26, this fix is needed to get it to work with no holes:
    https://awodev.com/forum/awocoupon/help-section/virtuemart-2026-coupon-usage-not-being-recorded


    You can find the release_notes.txt file in the download.
  • Default avatar
    hk    
     10 years ago
    0

    I updated to latest version 2.0.13 and added the below code in components/com_virtuemart/helpers/coupon.php, but I do not see the history of Coupon usage.

    JPluginHelper::importPlugin('vmcoupon');
    $dispatcher = JDispatcher::getInstance();
    $returnValues = $dispatcher->trigger('plgVmCouponInUse', array($code));
    if(!empty($returnValues)){
    foreach ($returnValues as $returnValue) {
    if ($returnValue !== null ) {
    return $returnValue;
    }
    }
    }


    Also, please confirm that the coupon count will be calculated only when order status is confirmed (not pending or cancelled)..
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Setting which order status the coupon is counted is only an option in the pro version. For the free version the coupon is counted as soon as the order is created (customer hits the confirm button).

    How are you testing the usage in the free version? The best way would be to create a coupon with a total usage of 1, in the front end, use the coupon code and confirm the order. Then try to use it again. Is this what you are doing?
  • Default avatar
    hk    
     10 years ago
    0

    Yep.. I'm testing the same way as you mentioned.
    In which screen can we see the Coupon usage history?
  • Your avatar
    seyi    
     10 years ago
    0

    In the free version, you cannot.

    I am not sure where the problem is, if you like I can have a look at it, but you would need to send a private message with temporary access.
  • Default avatar
    hk    
     10 years ago
    0

    I was looking for Coupon usage history and order status the coupon is counted. As both of these are available only in PRO version, I do not have any queries.
    Thanks for helping!

    I'll have to make sure the code is added in components/com_virtuemart/helpers/coupon.php every time, whenever I upgrade the Virtuemart version.

    Thanks!
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    You can look directly in the dtabase at the table #__awocoupon_history to see if it is being updated.

    And no, that virtuemart code only affects 2.0.26. Once you update to a later version, you do not need to add it again as it is currently part of core.
  • Default avatar
    hk    
     10 years ago
    0

    Yep. The history table is getting updated. I thought it might show in the Coupon details or Orders page.

    Thanks for pointing that this code is required only for 2.0.26.
    I did not try in 2.6 version, but looked in the file coupon.php of VM 2.6, the code was not added. May be it is added somewhere else.
  • Your avatar
    seyi    
     10 years ago
    0

    Perhaps you are looking in the wrong file? I just checked it and it is there:
    www/components/com_virtuemart/helpers/coupon.php, the first section of function setInUseCoupon
  • Default avatar
    hk    
     10 years ago
    0

    Yep. You are correct! I was looking at some other file.
    Thanks.