Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2010
    Location
    Andalucía
    Posts
    15
    Plugin Contributions
    0

    Default shopping_cart Rounding problem

    Hello,

    Using v151 fresh install.

    How reproduce this issue:

    - Add a product_general with price 0.367, no taxes.
    - No attributes, discounts or prices modifications, nothing.

    I my example I put 80 units in the cart.

    shopping_cart page is showing 29,60 instead 29,36.

    But checkout is showing 29,36.

    In currencies I have euro as default with 2 decimal places and a value of 1.00000000 and the currencies conversion ratio is 1.00000000

    Thank you.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: shopping_cart Rounding problem

    I can not reproduce your issue

    See my attempt HERE
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: shopping_cart Rounding problem

    I believe this error was addressed before, do a search for it and you will see the thread I started and Wilt's fix. This was to do with discounts but it might apply to your problem.
    Last edited by lankeeyankee; 24 May 2013 at 03:10 PM.

    Zen Cart and it's community are the best!!

  4. #4
    Join Date
    Oct 2010
    Location
    Andalucía
    Posts
    15
    Plugin Contributions
    0

    Default Re: shopping_cart Rounding problem

    I tested this issue in:

    v151 - 29,60
    v150 - 29,60
    v139h - 29,36

    Kobra, what version are you using?

    My includes/classes/shopping_cart.php is the original.

    @lankeeyankee doesn't work for me


    Cheers

  5. #5
    Join Date
    Oct 2010
    Location
    Andalucía
    Posts
    15
    Plugin Contributions
    0

    Default Re: shopping_cart Rounding problem

    I found a patch from Linda:

    /includes/classes/shopping_cart.php
    PHP Code:
    //      $this->total += zen_round(zen_add_tax($productTotal, $products_tax), $decimalPlaces) * $qty;
          
    $this->total += (zen_add_tax($productTotal$products_tax)) * $qty;
    //      $this->total += zen_round(zen_add_tax($totalOnetimeCharge, $products_tax), $decimalPlaces);
          
    $this->total += (zen_add_tax($totalOnetimeCharge$products_tax)); 
    /includes/modules/pages/shopping_cart/header_php
    Code:
    PHP Code:
    //  $ppe = zen_round(zen_add_tax($ppe, zen_get_tax_rate($products[$i]['tax_class_id'])), $currencies->get_decimal_places($_SESSION['currency']));   $ppe = ((zen_add_tax($ppezen_get_tax_rate($products[$i]['tax_class_id'])) )); 
    It's working for me. I will test this deeply before apply the patch in production.

    Cheers
    Last edited by pititis; 25 May 2013 at 12:06 AM.

 

 

Similar Threads

  1. v139h Item on sale and its rounding problem. It breaks my Quickbooks import
    By simpledomaining in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 16 Jul 2012, 07:03 PM
  2. Unique Rounding Problem
    By wendyandmilo in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 14
    Last Post: 28 Feb 2011, 06:06 PM
  3. Rounding up and rounding down how to stop this?
    By Kazz in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 9
    Last Post: 24 Jul 2008, 06:40 PM
  4. Currency Rounding Problem/Request
    By Steven300 in forum General Questions
    Replies: 3
    Last Post: 8 Jun 2008, 07:18 PM
  5. Tax Exempt module rounding problem
    By HoosierRed in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 12 Jul 2007, 09:34 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR