View Single Post
  #1  
Old 10-13-2006, 01:51 AM
 
vixnfox vixnfox is offline
 

Advanced Member
  
Join Date: Feb 2006
Location: Adelaide, South Australia
Posts: 82
 

Default Weight to three decimal places

Hi,
i deal in jewellery components whose weight is often 1gram or less.
I changed weight in database xcart_products to decimal(12,3) with default weight of 0.001 (1gram)
I also changed this line in product_details.tpl from
Code:
<input type="text" name="weight" size="18" value="{ $product.weight|formatprice|default:$zero }" />
to
Code:
<input type="text" name="weight" size="18" value="{ $product.weight|default:$zero }" />
to get three decimal places in my modify product template, but if I enter 0.001 for a weight it always comes back as 0.000. If I put 0.009 it will return rounded to 0.010. I dont know how to modify the function .Any clue?

vixnfox
__________________
V 4.3.1 Live:

Developing on
PHP 5.3.0
MySQL server 5.0.75-community-log
MySQL client 5.1.36
Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11
Windows 7 64bit on a Toshiba Satellite P500

ADELAIDE, SOUTH AUSTRALIA
Reply With Quote