Limit UPS shipping options?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
My client has asked that the number of shipping options (ground, air, express, etc) be shortened.  I've managed to do so with the information in these forums for USPS (recompiled after commenting out a few) but have not found how to do the same with UPS.

Can someone tell me what would need to be changed (and where) to limit the number of UPS options displayed to the customer at checkout?

Thanks
13 лет назад
Tangopdx wrote:
My client has asked that the number of shipping options (ground, air, express, etc) be shortened.  I've managed to do so with the information in these forums for USPS (recompiled after commenting out a few) but have not found how to do the same with UPS.

Can someone tell me what would need to be changed (and where) ti limit the number of UPS options displayed to the customer at checkout?

Thanks


Edit file: Shipping\Nop.Shipping.UPS\UPSComputationMethod.cs and the GetServiceName() method at line #277. Comment out the case statements and their return statements in the switch to omit UPS services. In the code below, as an example, the "UPS Next Day Air Early A.M." service has been removed.
private string GetServiceName(string serviceID)
{
    switch (serviceID)
    {
        case "01":
            return "UPS NextDay Air";
        case "02":
            return "UPS 2nd Day Air";
        case "03":
            return "UPS Ground";
        case "07":
            return "UPS Worldwide Express";
        case "08":
            return "UPS Worldwide Expidited";
        case "11":
            return "UPS Standard";
        case "12":
            return "UPS 3 Day Select";
        case "13":
            return "UPS Next Day Air Saver";
        //case "14":
        //    return "UPS Next Day Air Early A.M.";
        case "54":
            return "UPS Worldwide Express Plus";
        case "59":
            return "UPS 2nd Day Air A.M.";
        default:
            return "Unknown";
    }
}

There are also some typos (underlined) in the code at line #282, the line should be
return "UPS Next Day Air";
and at line #290, the line should be
return "UPS Worldwide Expedited";
This refers to code from version 1.70, but the code should be the same, but possibly on different line numbers, for earlier versions. You will need to recompile the Nop.Shipping.UPS project.

.
13 лет назад
Thanks MB

I figured it could be done in the same "fashion" as the USPS code, but I always use caution when editing code as a mistake will cost you more time than asking the question.

Since this is a common thought to people that are presented with over twenty shipping options at check out if they have both USPS and UPS implemented, maybe we could put the two together in a "change shipping options" message/faq for people to find.

Thanks again.
13 лет назад
I have posted a suggestion in the suggestions forum regarding making this part of the store administration instead of having to go in and change code. Not everyone has that capability. Especially if they are a small business they are probably looking for an inexpensive or free solution that they can use to get a store front up and running with a minimal amount of effort. See my post here -

https://www.nopcommerce.com/boards/t/5267/suggestion-capability-to-pick-and-choose-shipping-rates-from-upsusps-etc.aspx

Bill
13 лет назад
poppo101 wrote:
I have posted a suggestion in the suggestions forum regarding making this part of the store administration instead of having to go in and change code. Not everyone has that capability. Especially if they are a small business they are probably looking for an inexpensive or free solution that they can use to get a store front up and running with a minimal amount of effort. See my post here -

https://www.nopcommerce.com/boards/t/5267/suggestion-capability-to-pick-and-choose-shipping-rates-from-upsusps-etc.aspx

Bill


I agree with he suggestion.  Few cart users are going to be able to change code leaving them with asking people in the forums to do it or asking how to do it.

I doubt anyone would need all those shipping options at checkout.  It would just confuse the customer.

Even moving the options to something like an ini file that would be read by the dll would give the cart admin the ability to change the ini file instead of a re-compile.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.