Page 1 of 2

Zone Based Rates, $shipping_weight add two decimal places

Posted: Wed Jan 22, 2025 10:45 am
by miki
Hi
I use Zone Based Rates,
I need to add two decimal places to "$shipping_weight" in this module.
When the product weighs less than 1 kg, 0 kg is displayed everywhere.
Can you help me, please.

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Wed Jan 22, 2025 11:42 am
by heatherbell
You don't say what Phoenix Cart version you are using but testing on a default current v1.0.9.9 with nothing changed from default and Lime Products Weight is 0.35, the display is as expected:
Screenshot 2025-01-22 113942.png

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Wed Jan 22, 2025 1:16 pm
by bonbec
Hello @miki

This happens when you use a comma instead of a period.
0,30 => 0 Kg
0.30 => 0.30 Kg

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Wed Jan 22, 2025 3:55 pm
by miki
bonbec wrote: Wed Jan 22, 2025 1:16 pm Hello @miki

This happens when you use a comma instead of a period.
0,30 => 0 Kg
0.30 => 0.30 Kg
I use the period everywhere.
Products Weight,
Shipping Table...

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Wed Jan 22, 2025 4:14 pm
by burt
You must always state your Phoenix version when asking for help.

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Wed Jan 22, 2025 7:34 pm
by miki
I'm sorry.
CE Phoenix v1.0.9.0

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Thu Jan 23, 2025 6:13 am
by heatherbell
Confirmed that testing on a default v1.0.9.0 with nothing changed from default where Lime Products Weight is 0.35, the display is incorrect:
Screenshot 2025-01-23 044733.png
Personally don't know a fix (though somebody else might) other than updating your installation.

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Thu Jan 23, 2025 7:46 am
by ecartz

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Fri Jan 24, 2025 11:16 am
by miki
Yes.
Solved. Thank you a lot.

Re: Zone Based Rates, $shipping_weight add two decimal places

Posted: Mon Jan 27, 2025 9:02 am
by Philo2005
I would like to add the following here:
I had to adjust the products_weight field in the products table. 1 kilogram (kg) has 3 decimal places for 1 gram.
This was necessary in order to calculate the weight calculation for the Swiss postal tariff more precisely.

Perhaps it would make sense to take this into account in the main version of Phoenix:
(products_weight field decimal 6,3). I work with Version 1 0 7 15