Results 1 to 10 of 18

Hybrid View

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

    Default Re: Correct price for a quantity of products

    There's NO DIFFERENCE: Quite simple, if the product price is shown as 1.25 (although adding tax has made it actually 1.2543) it's 1.25 - it doesn't matter how many products you buy, the unit price should be 1.25! (3pcs 3.75, 45pcs 56.25)

    The problem arises, as you well know, because it stores the price without taxes and then adds the tax "on the fly" if so requested. So if the price (with no tax) contains cents and the tax is a number (almost anything but a 100%) you get fractions of a cent - e.g. 1.11 * 1.13 (13% tax) = 1.2543 AND this is shown as a unit price of 1.25 when you look at the product (as it should)! BUT when you buy 10 pcs, the price is suddenly 12.54 - not much, but it makes the shop look "adequate" not good!

    And I managed to get it half right - as I said:
    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.
    PS. Nice that you "wise" guys stick together....

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

    Default Re: Correct price for a quantity of products

    PPS. THE POINT being that if the price is defined to have e.g. 2 decimals, that should determine the rounding - I mean that's why it's there, isn't it?

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

    Default Re: Correct price for a quantity of products

    When you edit the Product, is the Product Price entered as:
    1.25

    or are you entering it as:
    1.2543
    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
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Correct price for a quantity of products

    I enter it as 1.11 !!!!!!!!! The 13% sales tax makes it 1.2543.

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

    Default Re: Correct price for a quantity of products

    Dear Sirs,

    I am reporting a bug, not stating an opinion!

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Correct price for a quantity of products

    Quote Originally Posted by kalastaja View Post
    Dear Sirs,

    I am reporting a bug, not stating an opinion!
    It's not a bug, and it is an opinion, albeit implict, that the cart should work in the specific way that favors the way your tax regime and pricing are setup over all others.

    Enter the price as 1.1062 instead of 1.11 as Zen Cart intends and your problem will go away.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

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

    Default Re: Correct price for a quantity of products

    Whoops. I rechecked and - my humble apologies - only the TAX decimals are defined. Not to worry big guys, if I can't get a hint from you which function to edit - I'll figure it out myself.... My shop already has e.g. a cash-back-functionality (based on the profit, so there is a buyin_price, etc.), phpNuke as backoffice...

 

 

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

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