Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1

    Default Totals Off by a Penny!

    Some customers have noticed that their totals are a penny off. I don't charge tax (digital goods). I believe the problem happens when the item is on sale (all my items are discounted 5%), and although it is rounded off for the published customer price, the full, say, four decimal points are used when totalling. And occasionally when several products are ordered, that will make the total a penny higher.

    For instance, an item at 5% off is $14.2025. The published price on the store is $14.20. The next product discounts to $15.1525. The customer sees $15.15. But the store totals the full 4 decimal places (unseen to the customer), and their total is $29.36. But from what the customer can see, it should be $29.35.

    I am wondering if I should change the number in Admin --> Currencies --> US Dollar to have only 2 decimal places. Would that hurt anything? Would that solve my problem?

    I am running 1.3.9h.

    Thanks in advance for your help!

  2. #2
    Join Date
    Jan 2004
    Posts
    58,460
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Totals Off by a Penny!

    Fixed in v1.5.0
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,132
    Plugin Contributions
    0

    Default Re: Totals Off by a Penny!

    Quote Originally Posted by carol2848 View Post
    I am wondering if I should change the number in Admin --> Currencies --> US Dollar to have only 2 decimal places. Would that hurt anything? Would that solve my problem?
    Won't hurt anything and should solve your problem.
    The learning is in the doing.

    Potent Products

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    4,510
    Plugin Contributions
    127

    Default Re: Totals Off by a Penny!

    I have also seen cases where rounding errors after a price increase cause problems.
    To fix them, back up your database and in phpMyAdmin, do this update:

    update products set products_price = round(products_price, 2);
    Scott C Wilson, That Software Guy, Plugin Moderator
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  5. #5
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    Plugin Contributions
    1

    Default Re: Totals Off by a Penny!

    Quote Originally Posted by swguy View Post
    I have also seen cases where rounding errors after a price increase cause problems.
    To fix them, back up your database and in phpMyAdmin, do this update:

    update products set products_price = round(products_price, 2);
    Tried this fix, does not seem to work for me.

    issue: one wax tart priced £1.00 = total okay
    continue shopping add another wax tart priced £1.00 = total £1.99 ??
    Do I now need to update my whole cart to v 1.5 to fix this?
    I entered the price in New product as £1.00
    when I return to the same screen it reads as

    Tax Class: UK V.A.T. 20%
    Products Price (Net): 0.83
    Products Price (Gross): 0.996
    Last edited by BillyBoyle; 22 Sep 2011 at 03:55 PM.
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    4,510
    Plugin Contributions
    127

    Default Re: Totals Off by a Penny!

    Can you do a test in 1.5 and see if this works? The OP wasn't using embedded taxes the way you are.
    Scott C Wilson, That Software Guy, Plugin Moderator
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  7. #7
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    Plugin Contributions
    1

    Default Re: Totals Off by a Penny!

    Quote Originally Posted by swguy View Post
    Can you do a test in 1.5 and see if this works? The OP wasn't using embedded taxes the way you are.
    If your question is @billy then yes I could I have a test site for trying stuff out I was planning on up-grading to 1.5 I'll give it a go arround mid week. Think I've got a few hours off from day job and setting up the wifes shop.
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  8. #8
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    Plugin Contributions
    1

    Default Re: Totals Off by a Penny!

    I know it took a while to get back on this, but been really busy.

    Fact is it's still doing the wrong TAX calculation in Version 1.5

    input tax rate 20%

    pirice item at £1.00
    calcultates TAX at £0.83

    I'm no math expert but I think that's not right.
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  9. #9
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    Plugin Contributions
    1

    Default Tax calculation in v1.5

    Hi guys, I had a little issue in v 1.3.9 that I think is carried over to 1.5, in that when using tax rates there seems to be a little discrepancy in the tax calculation. i.e.

    Setting a Tax rate of 20% (as it shockingly is here in the UK)
    Does not get calculated correctly in the add product page of the admin.

    Tax Class: Taxable goods (20%)
    Products Price (Net): 0.8333
    Products Price (Gross): 1.00

    Surely that's not correct?
    I know there was an issue with prices being out by a penny in the last version and there was this same tax issue.
    I would just love it if someone explained it to me as my Math teacher would have failed me on this one just for showing my workings, even though the answer is right on the product info page and order totals at check out.

    I am confussed
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  10. #10
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,655
    Plugin Contributions
    25

    Default Re: Tax calculation in v1.5

    That looks right to me to 4 decimal places. Why do you think it's wrong?
    See and test drive Zen Cart's free templates at zencarttemplates.info

    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Inventory Totals
    By Linux in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 12 Jan 2011, 03:08 AM
  2. Paypal DP and WPP with totals
    By ianto_panto in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 3 Feb 2009, 01:32 PM
  3. Duplicate database sub-totals and totals
    By confused_aswell in forum General Questions
    Replies: 0
    Last Post: 28 Aug 2008, 08:01 AM
  4. Attribute..Penny has not dropped
    By Timeout in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 9 Jul 2006, 12:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •