vonbrocklin Posted March 1, 2003 Share Posted March 1, 2003 I searched but could not find info on this: When I add a product with a price of 11.95, for example, and then return to edit that product, the price is listed as 11.9500. This does not show up in the store, only in admin. Why is this, and how do I get it to stop? I'm using MS1 with US currency default. Thanks... Link to comment Share on other sites More sharing options...
Guest Posted March 1, 2003 Share Posted March 1, 2003 It is set in the database table products > products_price decimal(15,4) The second number governs how many decimal places are stored in the database..... not sure where in the code though for displaying only the two(didn't look). You are better off leaving it as it is as its used in calculating the different currencies when they are updated. Link to comment Share on other sites More sharing options...
vonbrocklin Posted March 1, 2003 Author Share Posted March 1, 2003 This is what I don't get though: I DO have it set to show two decimal places and it is doing just that on the consumer side. But on admin it is showing 4 decimal places, which I do not get and find slightly disconcerting. Maybe I am missing something simple but any more clarification on why I get two extra zeros would be appreciated. Link to comment Share on other sites More sharing options...
vonbrocklin Posted March 1, 2003 Author Share Posted March 1, 2003 I just read your reply more carefully and realized you were talking about the actual database set-up for that field. This makes more sense now, but it is still annoying to see those extra zeros in the price field. I guess I will just have to get used to this and explain to my clients to ignore them. Link to comment Share on other sites More sharing options...
HLT Posted March 1, 2003 Share Posted March 1, 2003 Happens on my store too. One of several peculiarities :) HLT . www.hairlosstalk.com Consumer Hair Loss Information & Support Link to comment Share on other sites More sharing options...
mouflon Posted March 1, 2003 Share Posted March 1, 2003 look in admin/categories.php look for : <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price); ?></td> </tr> change to: <tr> <td class="main"><?php echo TEXT_PRODUCTS_PRICE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', round($pInfo->products_price,2)); ?></td> </tr> Unexpect the Expected Link to comment Share on other sites More sharing options...
vonbrocklin Posted March 5, 2003 Author Share Posted March 5, 2003 Thanks. For future reference, this worked perfectly if anybody else wants to get rid of their extra zeros. :whatthat: Link to comment Share on other sites More sharing options...
jujuhost Posted May 9, 2004 Share Posted May 9, 2004 Has anyone got this working in MS2? On the admin side I would just like to see 2 decimal places (while the database may still calculate 4 decimal places). I've tried the code given above but does not seem to work on Milestone 2. Any one any help? Thanks! JuJu Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.