Further Problems with UPS Shipping in 1.6 error in pickup type UPS module??

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

Hopefully someone can shed some light on this problem.

When a customer goes through our checkout when they get to the shipping section on the checkoutshippingmethod.aspx page we get the error

shipping options could not be loaded.

now from looking around the forum i found this was an issue and made the relevant changes, howeverthe problem still remains. To try and get a more detailed error message i added the following to the bottom of the parseresponse method in UPScomputationmethod.cs

            if (error.Length > 0)
                LogManager.InsertLog(LogTypeEnum.ShippingError, error, "UPS Shipping Error");

and under the log this gives the following error;

UPS Error returned: UPS Rating Error, Error Code: 111370, Error Desc: Unsupported Pickup Type

so i tried each different pickup type and always get the same message. So i downloaded the PDF for the UPS XML API and found that the pickup type was hardcoded to 3 in the UPS module??

            sb.Append("<Service>");
            sb.Append("<Code>3</Code>");
            sb.Append("</Service>");

is there a reason for this? and (sorry to ask a basic question). How then can i change this to get the selected value from the dropdown menu box?

thanks in advance for the help.
13 years ago
flynny1st wrote:
[...]
and under the log this gives the following error;

UPS Error returned: UPS Rating Error, Error Code: 111370, Error Desc: Unsupported Pickup Type

so i tried each different pickup type and always get the same message. So i downloaded the PDF for the UPS XML API and found that the pickup type was hardcoded to 3 in the UPS module??

            sb.Append("<Service>");
            sb.Append("<Code>3</Code>");
            sb.Append("</Service>");

is there a reason for this? and (sorry to ask a basic question). How then can i change this to get the selected value from the dropdown menu box?

thanks in advance for the help.


The lines you posted:
    sb.Append("<Service>");
    sb.Append("<Code>03</Code>");
    sb.Append("</Service>");


don't refer to the pickup type; it refers to the UPS shipping service and is ignored for the (shop) rate request (it is used for specifying a rate request for a specific shipping service) (UPS "Rating Package - XML Developers Guide.pdf"/"1.8.1 Rate Request.pdf" p6).

I was able to recreate your error code (using United Kingdom as shipped from country and a London postal code). The error you are receiving is related to US options being included in the rate request -these options aren't needed if you are shipping from outside the US.

You can fix by editing file Shipping\Nop.Shipping.UPS\UPSComputationMethod.cs and change lines 94-98 from:

    sb.Append("<PickupType>");    
    sb.AppendFormat("<Code>{0}</Code>", GetPickupTypeCode(pickupType));
    sb.Append("</PickupType>");
    sb.Append("<CustomerClassification>");
    sb.AppendFormat("<Code>{0}</Code>", GetCustomerClassificationCode(customerClassification));
    sb.Append("</CustomerClassification>");

to the following:

    if (String.Equals(countryCodeFrom, "US", StringComparison.InvariantCultureIgnoreCase) == true)
    {
        sb.Append("<PickupType>");
        sb.AppendFormat("<Code>{0}</Code>", GetPickupTypeCode(pickupType));
        sb.Append("</PickupType>");
        sb.Append("<CustomerClassification>");
        sb.AppendFormat("<Code>{0}</Code>", GetCustomerClassificationCode(customerClassification));
        sb.Append("</CustomerClassification>");
    }
    

This refers to version 1.60 and you will need to recompile the project.

.
13 years ago
Thank you so much for that. Problem solved.
13 years ago
Thanks for info. It'll be fixed in the next release
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.