Fixed: UPS Shipping Module for NOPCommerce 1.90

NopCommerce 1.90 gives bad UPS Quotes

Example of bad shipping calculationThis post will give examples of bad calculations along with a link at the bottom for the corrected code. This information is provided for free, and I don't seek to recover money for the added benefit this provides your NOPCommerce 1.90 site; please do not assume that there is some type of warranty or guarantee that this will work; I encourage you to first deploy this in a test environment.

If you use the ups shipping module with NopCommerce 1.9, hopefully you've noticed that the shipping calculations are wrong if you ship more than one package.

It appears that the program logic used confuses UPS package requirements with shipment requirements, thus incorrectly calculating the dimensions it sends to UPS for a quote.

You can read up more on this issue at the NOPCommerce Forum http://www.nopcommerce.com/boards/t/4531/ups-shipping-calculation-issue-if-multiple-items-are-added-to-cart.aspx

Examples of Incorrect Shipping Calculations

One package of product A, shipping cost: $25.41one package shows correct amount

Two packages of product A, shipping cost: $122.61two packages give wrong amount

Product A and Product B, shipping cost: $29.14two different products example

Product A and Two of Product B, shipping cost: $62.31one product A and two product B example

Examples of Correct Shipping Calculations

One package always gives the correct amount ($25.41).

Here, two of the same comes out to $27.82 (not $122.61).
example of two of same package with good shipping calculation

Product A and B cost $39.32 (not $29.14)one of two different products working

One product A and two of B cost $64.73 (not $62.31).of of each and 2 of another working

 

The correct code and compiled DLL

Here is the UPSComputationMethod.cs file, if you have the source code, you can replace yours with this one and recompile.

If you don't have the source code version, here is the compiled DLL of Nop.Shipping.UPS.dll and the program debug database file (which i don't think you actually need) Nop.Shipping.UPS.pdb; There is a folder called BIN, make of copy of the current Nop.Shipping.UPS.dll (DO NOT LEAVE THE COPY IN THE BIN FOLDER AS THIS CAN CAUSE PROBLEMS) replace the Nop.Shipping.UPS.dll with the one you downloaded here, your website will automatically restart when it detects the new file. Test your shipping calculations to confirm they're correct.

Comments
Only registered users can leave comments.
Comment text: