Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Mar 2008
    Posts
    34
    Plugin Contributions
    0

    help question decimal place error

    hello see i have this problem when i tried to change the decimal place in the admin --> localisation --> currencies to 2. The price of my product shows up as $2917 dollars instead of $29.17. Any help is deeply appreciated, thanks!!!!

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: decimal place error

    What does the 'value'say in the Localization setup?

  3. #3
    Join Date
    Mar 2008
    Posts
    34
    Plugin Contributions
    0

    Default Re: decimal place error

    "Value: 1.00000000"

    any ideas?

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: decimal place error

    If the decimal places is 2 it should work - how is the price listed in your product setup? 2917 or 29.17?

  5. #5
    Join Date
    Mar 2008
    Posts
    34
    Plugin Contributions
    0

    Default Re: decimal place error

    it doesn't work for me it appears as $2917 instead of $29.17

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

    Default Re: decimal place error

    If you edit your Product with the wrong price, do you see in the field:
    A $2917
    B $29.17
    C 2917
    D 29.17

    the correct answer should be D ... 29.17

    If you have the correct answer, and switch to the Classic Template, do you have the correct display for the price 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!

  7. #7
    Join Date
    Mar 2008
    Posts
    34
    Plugin Contributions
    0

    Default Re: decimal place error

    actually it is 29.1775. when i changed it to the classic green it is still 29.1775

  8. #8

    Default Re: decimal place error

    I have a similar problem -- I have site where the quantity discounts module is installed and code is added to have the prices display as "as low as $xxx" to pull the minimum discount price. When the code is added the prices display with 4 decimal places rather than 2. The settings are correct in localization>currencies. The code being added to the files (includes>modules>featured_products.php, >new_products.php, etc)is:

    // show only when 1 or more

    if ($num_products_count > 0) {

    if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == 0) {

    $col_width = floor(100/$num_products_count);

    } else {

    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS);

    }

    while (!$featured_products->EOF) {

    $res = mysql_query("select min(discount_price) from zen_products_discount_quantity where products_id ='" . $featured_products->fields['products_id'] . "'");

    $row1 = mysql_fetch_array($res);

    if($row1[0] != ""){

    $products_price = "As low as $" . $row1[0];

    } else {

    $products_price = "As low as " .zen_get_products_display_price($featured_products->fields['products_id']);

    }

    //$products_price = zen_get_products_display_price($featured_products->fields['products_id']);



    Can anyone please tell me where the error is? Thanks in advance!!

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

    Default Re: decimal place error

    You need to look at the currency display function for this ...

    Try a search in the Developers Tool Kit on:
    $currencies->display_price

    for examples of how this is used to obtain the right format for prices ...
    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!

  10. #10

    Default Re: decimal place error

    Ajeh-
    Thank you for the quick reply! I have went through Localization>Currencies twice and everything is set correctly. The extra decimal places only appear when I add the code posted in the thread. The only thing which is different is that the site is using Singapore Dollars and not USD, but I'm not sure that should make any difference.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Decimal quantities error on category pages
    By aeolidia in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 30 Sep 2008, 09:46 AM
  2. Replies: 5
    Last Post: 23 Nov 2006, 04:40 PM
  3. Currency Not showing - need decimal place
    By sharq in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 19 Sep 2006, 03:24 AM
  4. order totals decimal place moved
    By Angel Devoid in forum General Questions
    Replies: 2
    Last Post: 17 Sep 2006, 05:20 AM
  5. VAT error message (1366 Incorrect decimal value)
    By Typhoon in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 5
    Last Post: 18 Jul 2006, 11:32 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