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
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Totals Off by a Penny!

    Fixed in v1.5.0
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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,571
    Plugin Contributions
    1

    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.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,695
    Plugin Contributions
    123

    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);
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    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.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,695
    Plugin Contributions
    123

    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.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    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.

  8. #8
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    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.

  9. #9
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    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

  10. #10
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    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?
    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. The dreaded penny problem returns
    By peteratdd in forum Bug Reports
    Replies: 1
    Last Post: 18 Jun 2013, 09:03 AM
  2. ZC Adding a Penny to the total
    By timhersh in forum General Questions
    Replies: 3
    Last Post: 21 May 2013, 03:43 PM
  3. Attributes. Over a penny off?
    By quixotic in forum General Questions
    Replies: 1
    Last Post: 28 Nov 2012, 11:47 AM
  4. Penny Shipping Not Registering
    By Tapper in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 5 Jul 2012, 06:31 PM
  5. Duplicate database sub-totals and totals
    By confused_aswell in forum General Questions
    Replies: 0
    Last Post: 28 Aug 2008, 08:01 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR