Incorrect calculation for percentage coupon discount


  • Default avatar
    paul93    
     13 years ago
    0

    I get an incorrect calculation of the discount for a percentage coupon. For example, when I have an item in the cart that is 32.50, with a 1% coupon, I get a discount of .35, not the .33 that I should recieve. Strangely enough, If I delete an item from the cart, or add a new Item, the percentage updates, and the calculation returns a correct value. Any thought on how to correct this so that I get the correct number every time?

    I have both the latest versions of Joomla and Virtuemart.

    Paul
  • Your avatar
    seyi    
     13 years ago
    0

    this is a problem with virtuemart itself, i believe:
    http://forum.virtuemart.net/index.php?topic=78619.msg260805

    But if you are using AwoCoupon, you should not see it as I applied a fix to it. I just tested through AwoCoupon and could not reproduce. Can you give more details that might help reproduce the problem? Do you have something different in your vm that is not normal?
  • Default avatar
    harvey    
     13 years ago
    0

    Seyi,

    I did not want to start a new thread about this issue but the percentage tax calculation does not work properly.
    Here is my example:

    Product cost $120.00
    5% coupon -6.30 (should be $6.00)
    Tax Total 5.69 (tax rate is 5%)

    Total #119.39

    Tax config set to deduct discount before tax and shipping. The net sale is $114.00 after the discount the 5% tax should be 5.70 and the total $119.70. Off by the 30 cents?

    I have tried changing he basket .php and checkout.php as you state in your blog post but no change.

    Running Joomla 1.5.17
    Virtuemart 1.1.6 stable

    Really want to use the program as it worked with 1.1.4 OK. Any suggestions?

    Thanks,
    Harvey
  • Your avatar
    seyi    
     13 years ago
    0

    I cannot reproduce this.

    Product net price: 114
    Tax: 5%
    Coupon discount: 5%
    Discount being received: 5.99

    Order total: 113.71
    Where tax is 5.41

    This makes sense since 114*.05 = 5.70 (discount)
    then 114-5.70 = 108.30 (product price)
    tax 108.3 *.05 = 5.415


    Your totals do not make sensee to me, only if the net price of the product is 120 then it works perfectly.
    120-6 = 114 (product price after discount)
    tax 114*.05 = 5.7
    Order total: 119.70


    In the blog, search for "On or around line 255 is this". Did you implement that? Because that would cause the total displayed to be exactly 31 cents short with a order total of 119.39.


  • Default avatar
    paul93    
     13 years ago
    0

    I wanted to give you more info so to help you reporduce this. I have the following setup:

    Jooma 1.5.22
    VM 1.1.6 Stable
    Yagendo Vamazing Theme

    I backed up before the install, and after restoring, my regular VM coupons work just fine.

    The AWOcouponpro indicated that it installed correctly.

    maybe the fix you corrected is no longer necessary in 1.1.6?

    I hope that this helps you track this down, as I really need to implement this coupon software on my site. I can provide you access to my files if you would like to see if there is anything different in my setup. Just contact me through the email on my profile.


  • Your avatar
    seyi    
     13 years ago
    0

    please pm me ftp/admin access, I can take a look.