Note: I only have an X-Cart PRO license, and only v4.1.X setup for testing, so the skin1 directories may differ for X-Cart GOLD and Gold versions.
DATABASE TABLES
Using phpadmin or similar editor, view the ⌠structure page■
xcart_products
In the FIELD column locate
weight
In the TYPE column, change the entry from decimal(12,2) to decimal(12,
3)
In the DEFAULT column, change 0.00 to 0.00
0
xcart_shipping
In the FIELD column locate
weight_min and
weight_limit
In the TYPE column, change the entry from decimal(12,2) to decimal(12,
3)
In the DEFAULT column, change 0.00 to 0.00
0
xcart_shipping_rates
In the FIELD column locate
minweight and
maxweight
In the TYPE column, change the entry from decimal(12,2) to decimal(12,
3)
In the DEFAULT column, change 0.00 to 0.00
0
TEMPLATE FILES
admin/main/shipping.tpl
This following appears in 3 lines of code, each in a different template section, also make sure to check the extreme RIGHT of the editing page, as some of these lines a very long.
Code:
Search for "data[{$s.shippingid}][weight_min]"
Change value="{$s.weight_min|default:0.00|formatprice}"
To value="{$s.weight_min|default:0.000|formatnumeric}"
For "data[{$s.shippingid}][weight_limit]"
Change value="{$s.weight_limit|formatprice}"
To value="{$s.weight_limit|formatnumeric}"
Code:
The following appears in 1 line of code only in this template.
Search for "add[weight_min]"
Change value="{0.00|formatprice}"
To value="{0.000|formatnumeric}"
For "add[weight_limit]"
Change value="{0.00|formatprice}"
To value="{0.000|formatnumeric}"
----------------------------------------------------------------------------------------------------------------------------------
customer/main/product.tpl
Search for
{if $product.weight ne "0.00"}
Change to {if $product.weight ne "0.000"}
Search for
{$product.weight|formatprice}
Change to {$product.weight|formatnumeric}
----------------------------------------------------------------------------------------------------------------------------------
skin1/main/product_details.tpl
Search for
{ $product.weight|formatprice|default:$zero }
Change to { $product.weight|formatnumeric|default:$zero }
----------------------------------------------------------------------------------------------------------------------------------
provider or admin/main/shipping_rates.tpl
Code:
Search for "posted_data[{$shipping_rate.rateid}][minweight]"
Change value="{$shipping_rate.minweight|formatprice}"
To value="{$shipping_rate.minweight|formatnumeric}"
For "posted_data[{$shipping_rate.rateid}][maxweight]"
Change value=■{$shipping_rate.maxweight|formatprice}■
To value="{$shipping_rate.maxweight|formatnumeric}"
These changes will display 3 decimal places on product pages, and on the "Add"/"Display" admin/provider shipping and shipping rates pages.