[Skip to main content](#vessel-content)

#   Product width and height are swapped when passed to shipping plugins

##

- **[lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")**
- [![lmcbmai's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/49603-lmcbmai "View lmcbmai's Profile") Topic Author
- [ Offline](/forum/user/49603-lmcbmai)

Less More

- Posts: 39
- Thank you received: 3
-
-

9 years 6 months ago [\#268193](#268193) by [lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")  *[Product width and height are swapped when passed to shipping plugins](/forum/28-shipping-methods/889969-product-width-and-height-are-swapped-when-passed-to-shipping-plugins#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.")* was created by *[lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg5OTY5LXByb2R1Y3Qtd2lkdGgtYW5kLWhlaWdodC1hcmUtc3dhcHBlZC13aGVuLXBhc3NlZC10by1zaGlwcGluZy1wbHVnaW5zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")**
- [![lmcbmai's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/49603-lmcbmai "View lmcbmai's Profile") Topic Author
- [ Offline](/forum/user/49603-lmcbmai)

Less More

- Posts: 39
- Thank you received: 3
-
-

9 years 6 months ago -  9 years 6 months ago [\#268194](#268194) by [lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")  Replied by *[lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")* on topic *[Product width and height are swapped when passed to shipping plugins](/forum/28-shipping-methods/889969-product-width-and-height-are-swapped-when-passed-to-shipping-plugins#268194 "-- 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.")*

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 &lt;= length &lt;= height.

Thanks.
Best regards,
B.G.

Last edit: 9 years 6 months ago by [lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg5OTY5LXByb2R1Y3Qtd2lkdGgtYW5kLWhlaWdodC1hcmUtc3dhcHBlZC13aGVuLXBhc3NlZC10by1zaGlwcGluZy1wbHVnaW5zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

9 years 6 months ago [\#268212](#268212) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product width and height are swapped when passed to shipping plugins](/forum/28-shipping-methods/889969-product-width-and-height-are-swapped-when-passed-to-shipping-plugins#268212 "-- 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.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg5OTY5LXByb2R1Y3Qtd2lkdGgtYW5kLWhlaWdodC1hcmUtc3dhcHBlZC13aGVuLXBhc3NlZC10by1zaGlwcGluZy1wbHVnaW5zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")**
- [![lmcbmai's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/49603-lmcbmai "View lmcbmai's Profile") Topic Author
- [ Offline](/forum/user/49603-lmcbmai)

Less More

- Posts: 39
- Thank you received: 3
-
-

9 years 6 months ago [\#268260](#268260) by [lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")  Replied by *[lmcbmai](/forum/user/49603-lmcbmai "View lmcbmai's Profile")* on topic *[Product width and height are swapped when passed to shipping plugins](/forum/28-shipping-methods/889969-product-width-and-height-are-swapped-when-passed-to-shipping-plugins#268260 "-- 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.")*

Hi Nicolas,

Did you see my previous post? I've mentioned that this is not a bug. ![:)](/media/kunena/emoticons/3.png ":)")
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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg5OTY5LXByb2R1Y3Qtd2lkdGgtYW5kLWhlaWdodC1hcmUtc3dhcHBlZC13aGVuLXBhc3NlZC10by1zaGlwcGluZy1wbHVnaW5zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.055 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
