Results 1 to 10 of 18

Hybrid View

  1. #1
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Correct price for a quantity of products

    Is there any way to make sure that e.g. 10 pcs of a products that "seems" to cost 1.25 (reality 1.2534) becomes 12.50 and NOT 12.53.
    By introducing zen_round() to the function zen_add_tax($price, $tax) I get the shopping cart ok, but subtotal and thereby total still hangs (erroneously) on to the decimals.... I use 1.3.9h

  2. #2
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Erroneous rounding of item price

    10 pcs of a products that "seems" to cost 1.25 (reality 1.2534) should become 12.50 and NOT 12.53.
    By introducing zen_round() to the function zen_add_tax($price, $tax) I get the shopping cart ok, but subtotal and thereby total still hangs (erroneously) on to the decimals.... I use 1.3.9h

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

    Default Re: Erroneous rounding of item price

    How much are 3 suppose to be?

    How much are 5 suppose to be?

    How much are 7 suppose to be?
    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: v1.5.5]
    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
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Erroneous rounding of item price

    I used zen_round() when testing - hopefully it's working correctly.... The point was that the "extra" digits should be rounded BEFORE multiplying with quantity! As a reply to the "wise man": as far as I know 1-4 goes down, 6-9 goes up and 5 goes to even.

  5. #5
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Correct price for a quantity of products

    Anybody!?

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

    Default Re: Correct price for a quantity of products

    You might try to directly answer the questions on post #3 ... it would help to know ...
    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: v1.5.5]
    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. v138a Products Price Manager & Quantity Discounts Attributes
    By minskin in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 19 Mar 2012, 11:29 PM
  2. attributes, products price manager discounts and quantity
    By buildingblocks in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 25 Oct 2011, 05:36 PM
  3. Remove Price from Quantity 0 Products?
    By Lisk in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Dec 2007, 04:54 PM
  4. Replies: 2
    Last Post: 1 Jul 2007, 05:23 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