# How to make of rate value Percent and currency Rate digits bigger than default?

Hi

in “shipping Method Config” and “Rate Value” Section

only i can put only 2 digit number after . point (in Percent value )

i want to set manulaly shipping method and some shipping company formula need to 3 or 4 low digits.

like : weight * 0.0116

and have a same problem in another section :

in “currency Rate” , some of country have a very low rate compare with major rate like US dollar

and need to 6 digit number before point like Iranian Rial Rate = 0.000273

and i can not set this digit and show & calculate only with 0.00027

i mena not let mor than 5 number before point.

the above 2 problems resolved only when i can set make a number bigger than default.

so what should i do?

Best Regards

Hi,

1 Shipping Rate Value

``` \$v['value'] = fn_format_price(\$v['value'], CART_PRIMARY_CURRENCY, 4 /* decimals you need */ ); ```

2. Currency Rate

You need to modify database :

``` ALTER TABLE `cscart_currencies` CHANGE `coefficient` `coefficient` DOUBLE( 12, 6 ) NOT NULL DEFAULT '1.000000' ```

Please change table prefix is you are using another the 'cscart_'

Vali

Hi

1-put the full of below line on there or needto change:

\$v['value'] = fn_format_price(\$v['value'], CART_PRIMARY_CURRENCY, 4 /* decimals you need / );

i mean only put this line is enough or should be change " decimals you need " ?

like

\$v['value'] = fn_format_price(\$v['value'], CART_PRIMARY_CURRENCY, 4 /
4 */ );

where can i found the below

ALTER TABLE `cscart_currencies` CHANGE `coefficient` `coefficient` DOUBLE( 12, 6 ) NOT NULL DEFAULT '1.000000'

and this line is too , and need to change ?

Best Regards

1- if you wish:[list]

[]3 you add \$v['value'] = fn_format_price(\$v['value'], CART_PRIMARY_CURRENCY, 3 );

[
]4 you add \$v['value'] = fn_format_price(\$v['value'], CART_PRIMARY_CURRENCY, 4 );

[/list]

2- ALTER TABLE `cscart_currencies` is a mysql query, you must use it in phpmyadmin or another mysql manager or use Administration/Database, Restore

1. save a txt file with sql extension with [color=#ff0000]ALTER TABLE `cscart_currencies` CHANGE `coefficient` `coefficient` DOUBLE( 12, 6 ) NOT NULL DEFAULT '1.000000'[/color] content

3 select and click restore

Dear VALI

a lot thanks because one of them is resolve .

first my problem is fix and work in good now.

in the next i think use sql or php is better (in the past i lost all of site with restore section and don't like use that area) and in to “phpmyadmin” area:

cscart_currencies => CHANGE => coefficient

you writes : cscart_currencies => CHANGE => coefficient ` `[color=#ff0000]coefficient[/color]` DOUBLE( 12, [color=#ff0000]6[/color] )

in coefficient section have a Tab (not exist another " coefficient " in there )and after that "DOUBLE( 12, 5 ) and after it show that currency rate (like :0.00028)

change in to currency rate not work and comeback to previous type.

what should i do in this level ?

apologize me because i am not have experience

Regards

Dear Vali

the next problem is fix now.

many thanks for your help ,

have a nice day

sincerely yours