Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2005
    Posts
    38
    Plugin Contributions
    0

    Default Order Total - penny rounding bug?

    I've seen a few threads about penny rounding bugs, all of which seem to indicate these were solved in 1.5.0, but... I'm on 1.5.1, and here's a wee screenshot of an apparent order total bug - i.e. Sub-Total is £38.56, Delivery is £4.00, but Total is £42.55, not the expected £42.56.

    ZC v1.5.1 (upgraded from a full install of 1.5.0)
    Database Patch Level: 1.5.0
    PHP: v5.3.28
    MySQL: v5.5.42-cll
    Attached Images Attached Images  

  2. #2
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Order Total - penny rounding bug?

    So first off this seems to only or primarily happen when the tax is considered to be a part of the entered price. Not to say it is the only condition in which it occurs, but is the condition in which it often appears.

    No it is not completely solved even in yet newer versions. That said and now that you've upgraded from about four year old software to about three year old software, what's your plan to upgrade to software that is now almost 4 months old? (Assuming that your host offers a php version that supports it.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Nov 2005
    Posts
    38
    Plugin Contributions
    0

    Default Re: Order Total - penny rounding bug?

    Thanks for confirming that this is a bug.

    Since you ask, my plan is to read the release notes and take a view based on the work and time involved in upgrading against the potential problems of not doing so.

  4. #4
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Order Total - penny rounding bug?

    1 - Are there any order total or other 'totaling' modules installed or active in your cart?

    2 - Is this the byproduct of:
    - rounding before final calculation
    - rounding beyond a set limit or standard limit of decimals
    - SQL field length restrictions
    - bad math?
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

  5. #5
    Join Date
    Nov 2005
    Posts
    38
    Plugin Contributions
    0

    Default Re: Order Total - penny rounding bug?

    Twitchoo...

    1. No, it's a standard install.

    2. I have absolutely no idea. I'm just reporting that it happened.

  6. #6
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Order Total - penny rounding bug?

    When you swing on over to your admin -> modules -> order total

    What's turned on and off?
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Order Total - penny rounding bug?

    Quote Originally Posted by arthurdent View Post
    Thanks for confirming that this is a bug.

    Since you ask, my plan is to read the release notes and take a view based on the work and time involved in upgrading against the potential problems of not doing so.
    There are posted resolutions to the issue, between number of decimals, quantity of product associated, tax calculation/rounding, a mix of the above and other things I haven't listed...

    Unfortunately somebody ends up losing a penny. The "state" (if the base product price increases and the sales tax remains the same or if the sales tax decreases and the product price remains the same), the customer (the tax amount increases while the price remains the same), or the store (price descreases and tax stays the same or tax increases and total payment remains the same)... And with these type calculations, it is in my opinion difficult to tell who either should get the "extra" penny and whether there really is one or what. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

    Default Re: Order Total - penny rounding bug?

    Quote Originally Posted by arthurdent View Post
    I've seen a few threads about penny rounding bugs, all of which seem to indicate these were solved in 1.5.0, but... I'm on 1.5.1, and here's a wee screenshot of an apparent order total bug - i.e. Sub-Total is £38.56, Delivery is £4.00, but Total is £42.55, not the expected £42.56.

    ZC v1.5.1 (upgraded from a full install of 1.5.0)
    Database Patch Level: 1.5.0
    PHP: v5.3.28
    MySQL: v5.5.42-cll
    Had the same problem some time ago and fixed it "my way" - see this thread: http://www.zen-cart.com/showthread.p...94#post1254894

    Works up to 1.5.4 - so far.

  9. #9
    Join Date
    Nov 2005
    Posts
    38
    Plugin Contributions
    0

    Default Re: Order Total - penny rounding bug?

    OK thanks Frank... when I get the time I'll investigate your solution.

    Does seem a bit odd that, in all the years that ZC (and OSC) has been going, and with all the excellent people that contribute, this is still a problem. Surely "adding things up" is one of the core requirements of ecommerce software... :-/

    I would say "good luck in the World Cup final on Sunday", but I'm a pommie b*****d. ;)

  10. #10
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

    Default Re: Order Total - penny rounding bug?

    Quote Originally Posted by arthurdent View Post
    OK thanks Frank... when I get the time I'll investigate your solution.

    Does seem a bit odd that, in all the years that ZC (and OSC) has been going, and with all the excellent people that contribute, this is still a problem. Surely "adding things up" is one of the core requirements of ecommerce software... :-/

    I would say "good luck in the World Cup final on Sunday", but I'm a pommie b*****d. ;)
    The basic maths are fine in both ZC and OSC - but the error happens due to rounding of adding/subtracting taxes, discounts etc. My theory was to restrict decimals to 2 to try and eliminate that rounding error. After all there are no fractions of cents in the retail world even though are frequent in the manufacturing process.

    Thanks for Sunday

 

 

Similar Threads

  1. Replies: 11
    Last Post: 25 Mar 2014, 09:48 AM
  2. Replies: 2
    Last Post: 5 Feb 2014, 04:45 PM
  3. ZC Adding a Penny to the total
    By timhersh in forum General Questions
    Replies: 3
    Last Post: 21 May 2013, 03:43 PM
  4. Replies: 2
    Last Post: 7 Jun 2012, 12: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