Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Louisburg, Kansas
    Posts
    29
    Plugin Contributions
    0

    Default Shopping Cart Rounding Problem with products priced at 0.098 and qty pricing

    Trying to complete the upgrade from v139h to v150 and having rounding issue in the shopping cart.
    v150 Site: maxwelldirect.com/store2
    Item page example: http://www.maxwelldirect.com/store2/...roducts_id=429
    The product is: 225: Weekly Time Card
    The prices displayed on the product info page are correct.
    250= $24.50
    500= $38.50
    1000= $63.88

    Price Manager Settings for this item:
    Price Each: .098, Qty Min: 250, Qty Units: 1, Price by Attribute: No
    Discount Type: Percentage
    250= 0.00,
    500= 21.4286%
    1000= 34.8214%

    Priced Displayed in the Shopping Cart:
    250= $25.00
    500= $40.00
    1000= $60.00

    If the currency decimal is changed from 2 to 3 or 4, different amounts will show for both and not what they are suppose to be.

    Do not have this problem in the current version v139h.

    Please advise

  2. #2
    Join Date
    Jan 2007
    Location
    Louisburg, Kansas
    Posts
    29
    Plugin Contributions
    0

    Default Re: Shopping Cart Rounding Problem

    Could sure use some help with this problem or is this something that can not be fixed in v150?

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shopping Cart Rounding Problem

    I am looking into this right now and will be posting a solution as soon as possible ...

    Sorry to keep you hanging ... but I have reproduced this ... I just need to ensure the fix does not trigger other issues somewhere else ...

    Thanks for your patience on this ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shopping Cart Rounding Problem

    What happens if you edit the file:
    /includes/classes/shopping_cart.php

    and around line 852 change the code from:
    Code:
          $this->total += zen_round(zen_add_tax($productTotal, $products_tax), $decimalPlaces) * $qty;
          $this->total += zen_round(zen_add_tax($totalOnetimeCharge, $products_tax), $decimalPlaces);
    to read:
    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));
          $this->free_shipping_price += zen_round(zen_add_tax($freeShippingTotal, $products_tax), $decimalPlaces) * $qty;
    And if you change the code in the file:
    /includes/modules/pages/shopping_cart/header_php

    to have the code:
    Code:
    //echo 'I AM HEADER_PHP final_price: ' . $ppe . '<br>';
    //  $ppe = zen_round(zen_add_tax($ppe, zen_get_tax_rate($products[$i]['tax_class_id'])), $currencies->get_decimal_places($_SESSION['currency']));
    // Ajeh - Tax fix?
      $ppe = ((zen_add_tax($ppe, zen_get_tax_rate($products[$i]['tax_class_id'])) ));
    
    Does this fix the display on the shopping_cart.php?

    Does your checkout_payment and checkout_confirmation work right?
    Last edited by Ajeh; 22 Oct 2012 at 07:27 PM.
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jan 2007
    Location
    Louisburg, Kansas
    Posts
    29
    Plugin Contributions
    0

    Default Re: Shopping Cart Rounding Problem

    Ajeh:
    Thank you again for following up on this.
    Have applied the changes you sent and the shopping cart is now displaying the correct prices however, the Sub-Total line amount at the bottom of the box is not correct.
    Example:
    250 = $24.50, Sub-Total is showing $49.50
    500 = $38.50, Sub-Total = $78.50
    1000 = $63.88, Sub-Total = $123.88

    Have no taxes installed so, I can not determine where the additional amount is coming from.
    The cart goes back to the original problem after removing the updates above.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shopping Cart Rounding Problem

    Do you have these changes on your server right now?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Qty Pricing not going through to shopping cart
    By barrysmagic in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 13 Jul 2009, 01:50 AM
  2. Shopping cart doubling price of products priced by attributes
    By Kellyami in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 7 Oct 2008, 07:45 PM
  3. got a problem with products and shopping cart help needed please
    By fezzy-s-16 in forum Basic Configuration
    Replies: 1
    Last Post: 30 Sep 2008, 04:50 PM
  4. help needed please problem with products and shopping cart
    By fezzy-s-16 in forum General Questions
    Replies: 4
    Last Post: 28 Sep 2008, 03:43 PM
  5. problem with products and shopping cart
    By fezzy-s-16 in forum General Questions
    Replies: 0
    Last Post: 24 Sep 2008, 03:19 PM

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