UPS standard shipping does not work

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hello,

I am trying to use the standard UPS plugin, that is shipped with nopCommerce. Unfortunaltey the UPS shipping option is not displayed.

The system log says: "Shipping (UPS (United Parcel Service)). Error while getting UPS rates One or more errors occurred. (An exception has been raised as a result of client data. Hard error: This measurement system is not valid for the selected country or territory.)"

Tried to change primary measures in under Configuration/Shipping/Measures, but nothing happenend.

See attached a pic below of my configuration. I tried to change some options, but none combination worked. Another system log error before told me that shipping is not possible between countries.

The shop address is germany, the customer's shipment address is also germany. So it is a shipment from and to germany. Is the standard UPS Plugin capable of handling non US shipment? I don't see any alternative plugin in the marketplace!

I am using nop 4.20

4 years ago
What is your Primary measure for Dimension?  (e.g. inches?)
What is your Primary measure for Weight?  (e.g. lbs?)

Have you tried shipping Germany to Germany, and Germany to US, and got same result?
4 years ago
I dove deeper into the data that is submitted to UPS. I checked the trace option of the plugin and the the submitted xml is logged into nop's system log.

1) The submitted weight and dimensions is alwasy set to IN resp. LBS, regardless what I configure in nop.

2) Tried to ship from germany to germany and from germany to US. There is always an error displayed.

Stephan
4 years ago
I have the same problem.  I'm in the UK and it insists of lb and inches which I cannot do because my UPS account will only allow KG and CM.

Seems that this plugin is useless unless you are in the US and I see no one is offering a third party plugin anymore :(

Madness.
Can this be fixed please guys?
4 years ago
Hi Simon,

The source code for this plugin is free and deployed with the nop source code. So, I will try to find the code part that is responsible for this, although this should be better done by the nop developer team.

Kind regards, Stephan
4 years ago
In my opinion nopCommerce still focuses too less on other countries that the U.S. - that is a pitty, because this leads to PHP/MySql Solutions continually dominate the e.g. german eCommerce market.
4 years ago
schurig wrote:
In my opinion nopCommerce still focuses too less on other countries that the U.S. - ...


That's not really accurate or fair.   VAT,  GPDR.  PAngV, to name a few features, are not used in the US.

It would be an effort for the nopC team to test all possible UPS countries.
4 years ago
Of course this is totally subjective... and not necessarily fault of the nop developer team at all! It is the relatively small amount of installations and developers here in germany compared to other big MySQL/PHP eCommerce solutions. Completely unjustified - because nop is a absolutely great piece of software!

But could it be that I am the first user to notice that the UPS plugin cannot be used in Europe due to measurement issues? Can't believe this...
4 years ago
I got this working.  It's not perfect but working for me.
All I did was a quick alteration to the code changing the weight to KG and the dimensions to CM

It's working well for me now in the UK

I don't know if I can publish the revised plugin... but if anyone wants it then drop me a PM

All I changed is this in UPSService.cs as follows.  Don't change "inches" as it breaks if you do.
I did also setup a measurement for CM in my measures... not sure if it was needed.  Make sure your measurement ratios are all set correctly.

        /// <summary>
        /// Used measure weight code
        /// </summary>
        private const string LBS_WEIGHT_CODE = "KGS";

        /// <summary>
        /// Used measure weight system keyword
        /// </summary>
        private const string LBS_WEIGHT_SYSTEM_KEYWORD = "kg";

        /// <summary>
        /// Used measure dimension code
        /// </summary>
        private const string INCHES_DIMENSION_CODE = "CM";

        /// <summary>
        /// Used measure dimension system keyword
        /// </summary>
        private const string INCHES_DIMENSION_SYSTEM_KEYWORD = "inches";

Simon
4 years ago
RE: " Don't change "inches" as it breaks if you do."

What error are you getting?  I suspect it's because you don't have a Measure with system keyword of "cm" set up, as it is not out of the box:
Name            System keyword...
inch(es)        inches
feet            feet
meter(s)        meters
millimetre(s)   millimetres



private (decimal width, decimal length, decimal height) GetDimensions(IList<GetShippingOptionRequest.PackageItem> items)
{
    var measureDimension = _measureService.GetMeasureDimensionBySystemKeyword(INCHES_DIMENSION_SYSTEM_KEYWORD)
        ?? throw new NopException($"UPS shipping service. Could not load \"{INCHES_DIMENSION_SYSTEM_KEYWORD}\" measure dimension");
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.