In the shipping details tab there is an option t charge extra per Gram (or kilo, Lbs etc depending on what weight you have set in the atore)
The problem is we ship by grams and CS will only calculate 2 decimal places minimum 0.01, I need 0.001 (3 decimal places)
Can anyone point me where to change please.
Thanks
john
app\functions\fn.cart.php
find the fn_normalized_shipping_rate function and replace
$v['value'] = fn_format_price($v['value']);
with
if ($rate_type == 'W') {
$v['value'] = fn_format_price($v['value'], CART_PRIMARY_CURRENCY, 3);
} else {
$v['value'] = fn_format_price($v['value']);
}
Hope this will help
[color=#262626][font=arial, sans-serif][size=3]Hi John,[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3][quote name='johnbol1' timestamp='1430296422' post='212890'][/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]In the shipping details tab there is an option t charge extra per Gram (or kilo, Lbs etc depending on what weight you have set in the atore)[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]The problem is we ship by grams and CS will only calculate 2 decimal places minimum 0.01, I need 0.001 (3 decimal places)[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]Can anyone point me where to change please.[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3][/quote][/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]Also, it can be changed in the database.[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]You should change the type of the necessary fields to “decimal(12,3)” (where 3 is the number of digits after the decimal point) in the cscart_shippings table in your store.[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]Best Regards, Alt-team.[/size][/font][/color]
[quote name='Alt-team' timestamp='1430299557' post='212908']
[color=#262626][font=arial, sans-serif][size=3]Hi John,[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3][/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]Also, it can be changed in the database.[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]You should change the type of the necessary fields to “decimal(12,3)” (where 3 is the number of digits after the decimal point) in the cscart_shippings table in your store.[/size][/font][/color]
[color=#262626][font=arial, sans-serif][size=3]Best Regards, Alt-team.[/size][/font][/color]
[/quote]
The rates are stored in the serialized array. Please check
Works, many thanks