Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default The dreaded penny problem returns

    Had this sorted in 1.3.9h and upgraded to 1.5.1 and it returns - yet from reading the forums it was stated the penny issue had been fixed in this version. I don't think so! And here's why.

    I can quickly re-create the issue in a fresh installation. Only change is the UK tax rate of 20% (just to make it more realistic from my point of view!) Otherwise as is.

    Have two products. One priced at £23 and the other at £12.95. If I buy two at £23 and one at £12.95 - the cart total is £58.95 and if I proceed to checkout the checkout total is £58.95.

    Click image for larger version. 

Name:	Capture11.JPG 
Views:	106 
Size:	37.0 KB 
ID:	12672

    Click image for larger version. 

Name:	Capture12.JPG 
Views:	136 
Size:	19.6 KB 
ID:	12675

    Whoopee! All is well.

    Now we sell a lot of discounted products. So let's do that differently.

    One product at £40 and another at £24. But this time we add a products price manager special price. The £40 product's special price is £19.17 (so with 20% tax that's £23.00)
    The £24 product's special price is £10.79 (so with 20% tax that's £12.95)

    Now add that to the cart (including 2 x £23 and 1 x 12.95) and the total is £58.95 - as before. Great. Proceed to checkout and the sub-total is now £58.96. One penny out.

    Click image for larger version. 

Name:	Capture13.JPG 
Views:	134 
Size:	20.8 KB 
ID:	12676

    We've gone backwards and are in a mess with book-keeping and customers demanding penny refunds etc.

    Can anyone please offer a solution!

    This error is easy to recreate so I am hoping a developer will read this and be able to work out where to change the code.

  2. #2
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: The dreaded penny problem returns

    Apologies for the double post but I have made progress is locating what causes this issue.

    includes/classes/order.php line 511 and 512 were altered in 1.5.1.

    If I substitute the lines that were in 1.5.0 then the problems is resolved.

    Question is why was the 1.5.1 alteration made and can I safely use the 1.5.0 version (on a 1.5.1 site) without then screwing up something else? To say we are desperate to sort this would be an understatement. We are getting 3/4 orders per day with a penny issue and that causes subsequent book-keeping imports to fall over as the math doesn't work (so back to hand entries) - plus handling emails from folk pointing out the website isn't adding up properly...

    These are the lines in 1.5.1:

    Code:
    $shown_price = (zen_add_tax($this->products[$index]['final_price'] * $this->products[$index]['qty'], $this->products[$index]['tax']))
          + zen_add_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']);
    replaced with this from 1.5.0:

    Code:
    $shown_price = zen_round(zen_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) ,$decimals) * $this->products[$index]['qty'];
          $shown_price +=  zen_round(zen_add_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']), $decimals);

 

 

Similar Threads

  1. The dreaded password databse upgrade problem following a hack!
    By joricarmo in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 7 Jan 2016, 07:07 PM
  2. v139h the dreaded white screen
    By jenpen in forum Upgrading to 1.5.x
    Replies: 21
    Last Post: 2 Jan 2015, 04:07 AM
  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. The Dreaded Blank Page.
    By goldfoot in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 Nov 2009, 06:21 AM
  5. the dreaded white space
    By smallpigpig in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 23 Sep 2007, 06:31 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