Product width and height are swapped when passed to shipping plugins

  • Posts: 39
  • Thank you received: 3
7 years 6 months ago #268193

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5

Well, the subject tells it all. This is probably a minor bug, because swapping width and height values in product description does not affect shipping rates presented to the customer. I did few tests with UPS and CanadaPost shipping plugins and the rates stayed the same (which makes sense).
I found this bug by comparing content of $data and $data values in UPS and CanadaPost plugins with the values in Product description.

Thanks.
Best regards,
B.G.

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

  • Posts: 39
  • Thank you received: 3
7 years 6 months ago #268194

I became curious and "dig" further. I see you use sort($d) function in hikashopShippingPlugin class, which explains why the values are in wrong order. So this is not a bug.
Just out of curiosity - was there any reason of using sort() versus rsort() ? The way it works now all products have width <= length <= height.

Thanks.
Best regards,
B.G.

Last edit: 7 years 6 months ago by lmcbmai.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 6 months ago #268212

Hi,

That's not a bug.
When you go to your UPS or CanadaPost counter to send a package, if you swap the width, length or height together, the package still has the same dimensions. You're just turning the package on itself, why would the shipping rate change ? I don't see why this would be a bug. It's just how it is supposed to be and HikaShop is indeed ordering the dimensions so that it can group the products in the cart together in the most logical way to improve the shipping rates.
For example, if your selling post card products, regardless of how you enter the dimensions in the different products, the algorithm will automatically stack them together in the package as you would do in real life so that you get the most accurate rates possible.

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

  • Posts: 39
  • Thank you received: 3
7 years 6 months ago #268260

Hi Nicolas,

Did you see my previous post? I've mentioned that this is not a bug. :)
The only case when dimensions may matter is when you are shipping something that has "top" marking and should not be turned on the side during shipping, but that probably still does not affect the shipping cost.

Thanks.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum