Zone Based Rates, $shipping_weight add two decimal places

Ask the community for help with CE Phoenix Cart.
miki
Posts: 5
Joined: Fri Apr 26, 2024 12:52 pm

Zone Based Rates, $shipping_weight add two decimal places

Post 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.
You do not have the required permissions to view the files attached to this post.
heatherbell
VIP Member
VIP Member
Posts: 2315
Joined: Mon Oct 07, 2019 4:39 am
Has thanked: 31 times
Been thanked: 218 times

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

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
bonbec
VIP Member
VIP Member
Posts: 102
Joined: Mon Oct 26, 2020 12:23 pm
Has thanked: 16 times
Been thanked: 7 times

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

Post by bonbec »

Hello @miki

This happens when you use a comma instead of a period.
0,30 => 0 Kg
0.30 => 0.30 Kg
Old MS2.2 PHP7.4 site being converted to CE Phoenix v1.0.9.7 PHP 8.3
miki
Posts: 5
Joined: Fri Apr 26, 2024 12:52 pm

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

Post 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...
burt
Lead Developer
Lead Developer
Posts: 3002
Joined: Tue Oct 29, 2019 9:37 am
Has thanked: 52 times
Been thanked: 167 times

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

Post by burt »

You must always state your Phoenix version when asking for help.
miki
Posts: 5
Joined: Fri Apr 26, 2024 12:52 pm

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

Post by miki »

I'm sorry.
CE Phoenix v1.0.9.0
heatherbell
VIP Member
VIP Member
Posts: 2315
Joined: Mon Oct 07, 2019 4:39 am
Has thanked: 31 times
Been thanked: 218 times

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

Post 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.
You do not have the required permissions to view the files attached to this post.
ecartz
Lead Developer
Lead Developer
Posts: 2843
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 187 times

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

Post by ecartz »

miki
Posts: 5
Joined: Fri Apr 26, 2024 12:52 pm

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

Post by miki »

Yes.
Solved. Thank you a lot.
Philo2005
Posts: 18
Joined: Fri Mar 26, 2021 7:20 am
Has thanked: 8 times
Been thanked: 1 time

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

Post 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
Post Reply