Zone Based Rates, $shipping_weight add two decimal places

Open to all! Ask other shopowners for help.
miki
Member
Posts: 8
Joined: Fri Apr 26, 2024 12:52 pm
Phoenix Version: v1.0.9.0

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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 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
Contributor
Posts: 190
Joined: Mon Oct 26, 2020 12:23 pm
Phoenix Version: V1.1.0.7
Has thanked: 54 times
Been thanked: 40 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.1.0.6 PHP 8.3
miki
Member
Posts: 8
Joined: Fri Apr 26, 2024 12:52 pm
Phoenix Version: v1.0.9.0

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...
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 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.
I am not here to build for you.
I am here to build with you. Let's help each other.
miki
Member
Posts: 8
Joined: Fri Apr 26, 2024 12:52 pm
Phoenix Version: v1.0.9.0

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

Post by miki »

I'm sorry.
CE Phoenix v1.0.9.0
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 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
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

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

Post by ecartz »

miki
Member
Posts: 8
Joined: Fri Apr 26, 2024 12:52 pm
Phoenix Version: v1.0.9.0

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

Post by miki »

Yes.
Solved. Thank you a lot.
Philo2005
Member
Posts: 49
Joined: Fri Mar 26, 2021 7:20 am
Phoenix Version: v1.0.8.0
Has thanked: 28 times
Been thanked: 3 times

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


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply