Discount added instead of subtracted!


  • Default avatar
    christos    
     11 years ago
    0

    Hello Seyi,

    We have noted the following issue with AwoCoupon in our installation: basically instead of subtracting the discount, it is adding it!

    You can check here:

    www.quality-tuning.eu

    Just add some products in the cart, go to checkout and enter for example the following code and see the results!:

    Reisbrennen13

    Above is for 25 pct discount.

    We are using VM2.0.22a, latest AwoCoupon Pro and OPC by Rupostel (already informed Stan also

    Rgrds,
    Chris
  • Your avatar
    seyi    
     11 years ago
    0

    Hello,

    This issue is fixed in the latest version of AwoCoupon Pro, 2.2.0.

    I would suggest a couple of things:
    - test it without opc
    - verify you are using he lastest of this file, if not update it:
    www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php
  • Default avatar
    christos    
     11 years ago
    0

    Hi Seyi,

    - Tried without OPC, the problem remains
    - Verified, we are using latest AwoCoupon Pro 2.2.0. I overwrote the couponhandler.php from the latest archive into our installation but the problem remains.

    I would appreciate your advice asap!

    Rgrds,
    Chris
  • Your avatar
    seyi    
     11 years ago
    0

    Hi Chris,

    I really dont know as I have not encountered such a problem before. You can pm temporary admin and ftp access and I can look at it.

    Do you have any hacks in opc, awocoupon, or virtuemart?
  • Default avatar
    christos    
     11 years ago
    0

    Hi Seyi,

    Have PM you the details. No hacks with AwoCoupon Pro, OPC2, only few hacks in VM2 but nothing to do with calcs.

    Would appreciate your assistance!

    Rgrds,
    Chris
  • Your avatar
    seyi    
     11 years ago
    0

    Hello Chris,

    There is definitely something strange going on with your site. While I was debugging, I kept getting inconsistent results. Eventually I figured it out. So I reverted the file back to the original and tested it. You can look at these 2 orders I put in:

    Order 32e30802: I was logged in
    Order 77430803: I was not logge in

    Exact same products, exact same coupon codes, but it the totals are calculated differently if you are logged in or not. Test it out. Something is causing that, and do not know what. Can put in a hack into awocoupon to return a negative or positive depending on if logged in or not, just let me know if you want me to add it. In doing that, you will have to add this hack everytime you update awocoupon.
  • Default avatar
    christos    
     11 years ago
    0

    Hi Seyi,

    I confirm your findings; until we find out what's causing this would appreciate if you can advise which file to modify for the hack.

    rgrds,
    chris
  • Your avatar
    seyi    
     11 years ago
    0

    Hello,

    In www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php, after
    <?php
            $negative_multiplier 
    version_compare($vmversion'2.0.21''>=') ? -1;
    ?>


    You can try something like this (not tested):
    <?php
    $user 
    JFactory::getUser();
    if(empty(
    $user->id)) $negative_multiplier *= -1;
    ?>
  • Default avatar
    christos    
     11 years ago
    0

    Thanks Seyi,

    Seems to be working now ok, will keep monitoring.

    Rgrds,
    Chris