Dimensional Weight -- Error in code?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Dimensional Weight -- Error in code?

Post by sfeher » Tue Jun 19, 2018 3:02 am

Folks --
Not a massive issue, but something that just created some headache for me.

UPS Dimensional Weights are a massive topic on these threads, but I've never seen this before.
The calculation for DW is highlighted here:
https://www.ups.com/us/en/help-center/p ... ntBlock-12

Note the calculation leverages a "divisor" for the calculation. International and domestic package services ought to use this same calculation. According to the link above, the "divisor" has only two alternatives: 136/Daily Rate and 166/Retail Rate. This conflicts with the code shown in the "editproduct" page where there's a popup to display the dimensional weights.

The UPS page (linked above) makes me think that the divisor should be identical for BOTH international and domestic. In my case, the client believes it should be 139.
In the editProduct.aspx.cs page, on line 132, we have the following entry:

Code: Select all

decimal productDimensions = _Product.Height * _Product.Width * _Product.Length;
                    // weight in pounds
                    decimal domesticWeight = productDimensions / 166;
                    decimal internationalWeight = productDimensions / 139;
Note that it's changed the divisor for domestic and international, not different rate class.

1.) This is hardcoded, so it's not checking the rate class on the shipping configuration to see which divisor to use. Is that part of the next version of Able? Does the divisor actually get changed based on rate class?

2.) This is just a display -- not the actual shipping rate. Does anyone know if the right divisor is used in the actual shipping charges? (I haven't dug into that yet).

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Dimensional Weight -- Error in code?

Post by Katie » Thu Jun 21, 2018 12:40 am

Hi Steve,

I opened a bug report. We need to check the API guide and perform some testing to clarify what the change is about. I was confused by UPS stating the divisor depends on the rate class. No other articles (that I can find) mention this.

I'll give you an update as soon as I hear anything.

Can you use any of the UPS online tools to get the dimensional weight calculation and compare to what is shown in AC?

Thanks
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Re: Dimensional Weight -- Error in code?

Post by sfeher » Tue Jun 26, 2018 1:48 am

Hi Katie --
I was away for a couple days. Sorry for my late response.

I don't see anything on UPS.com to confirm the dimensional weight calculation is accurate versus UPS. The client (and their UPS Rep) have confirmed that THEIR negotiated divisor on the Dimensional Weight ought to always be 139, regardless of class. I didn't know that UPS would negotiate this point.... good to know!

Additional learning point:
When creating an account in AbleCommerce for UPS -- it is NOT enough to generate an Account with the same ShipperNumber. You need to use the same UPS UserID and Password with which you sign-in to UPS.com in order to obtain the same negotiated rates. I'm unsure if this is a change, but I seem to recall that you used to be able to simply create anything with the same Shipper Number and get the same rates. Not so any more.

Negotiated Rates now being returned correctly.... as intended.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Dimensional Weight -- Error in code?

Post by Katie » Wed Jun 27, 2018 10:55 pm

Here is some specific info:

Retail rates for domestic shipments:

Divide the cubic size in inches by
166 to determine dimensional weight
in pounds. Increase any fraction to the
next whole pound.

Retail rates for international shipments:

For export and import shipments,
divide the cubic size in inches by 139
to determine the dimensional weight.
Increase any fraction to the next whole
pound.

Page # 16 for more details about retail rates:

https://www.ups.com/assets/resources/me ... _rates.pdf

Dimensional weight calculation for Dialy Rates

Divide the cubic size in inches by 139
to determine the dimensional weight
in pounds. Increase any fraction to
the next whole pound.

This applies to both domestic and international shipments.

Page # 16 for more details about daily rates:

https://www.ups.com/assets/resources/me ... _rates.pdf

Actual calculations in provider code don't need any updates.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Post Reply