- Posts: 36
- Thank you received: 4
shipping by weigth - minimum weight g vs Kg
4 years 9 months ago #337686
by hkeyzer
shipping by weigth - minimum weight g vs Kg was created by hkeyzer
-- url of the page with the problem -- :
www.safka.co.nz/
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.21
-- PHP version -- : 7.3.25
-- Browser(s) name and version -- : firefox 91.0.2
-- Error-message(debug-mod must be tuned on) -- : When we set-up a new shipping method by weight. We enter maximum weight as 5kg.
If we then enter the minimum weight as 0kg - the shipping selection works fine.
However if we enter the minimum weight as 0g - we get the wrong shipping option.
Shouldn't minimum weight as 0g give same result as 0kg ?
Thanks
When we set-up a new shipping method by weight. We enter maximum weight as 5kg.
If we then enter the minimum weight as 0kg - the shipping selection works fine.
However if we enter the minimum weight as 0g - we get the wrong shipping option.
Shouldn't minimum weight as 0g give same result as 0kg ?
Thanks
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.21
-- PHP version -- : 7.3.25
-- Browser(s) name and version -- : firefox 91.0.2
-- Error-message(debug-mod must be tuned on) -- : When we set-up a new shipping method by weight. We enter maximum weight as 5kg.
If we then enter the minimum weight as 0kg - the shipping selection works fine.
However if we enter the minimum weight as 0g - we get the wrong shipping option.
Shouldn't minimum weight as 0g give same result as 0kg ?
Thanks
When we set-up a new shipping method by weight. We enter maximum weight as 5kg.
If we then enter the minimum weight as 0kg - the shipping selection works fine.
However if we enter the minimum weight as 0g - we get the wrong shipping option.
Shouldn't minimum weight as 0g give same result as 0kg ?
Thanks
Please Log in or Create an account to join the conversation.
4 years 9 months ago #337701
by nicolas
Replied by nicolas on topic shipping by weigth - minimum weight g vs Kg
Hi,
Well, it's a matter or floating point calculations in PHP and rounding.
The calculations don't always produce round numbers.
And when the result is 0.001 you might consider it as 0 if the unit is the gram, but if the unit is the ton, it means that it's 1kg and thus non negligeable.
So when you define min/max weights, it's better to use the same unit as your products weight.
Well, it's a matter or floating point calculations in PHP and rounding.
The calculations don't always produce round numbers.
And when the result is 0.001 you might consider it as 0 if the unit is the gram, but if the unit is the ton, it means that it's 1kg and thus non negligeable.
So when you define min/max weights, it's better to use the same unit as your products weight.
Please Log in or Create an account to join the conversation.
Time to create page: 0.176 seconds