shipping by weigth - minimum weight g vs Kg

  • Posts: 28
  • Thank you received: 3
2 years 11 months ago #337686

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

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 11 months ago #337701

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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum