UPS Real time Shipping Integration

kuntesh thakker asked on March 30, 2015 12:14

Hi,

Please help me out i have completed integration using https://docs.kentico.com/display/K82/Implementing+custom+shipping+carrier+providers . How deliveryitem class will be added in a UPS Package . Now also i want to call UPS Custom integrated Class located at AppFolder . How it (GetPrice and GetServices) will be called from Content management .

Correct Answer

Suneel Jhangiani answered on March 30, 2015 12:46

You compile your Custom Shipping Provider to a new assembly with the CMS.Discoverable attribute. This allows Kentico to detect it and allows you to select the assembly on the Store Settings -> Shipping -> Carriers configuration page (note you also specify the class name on this page). Once this is done the Services will show up on the Store Settings -> Shipping -> Shipping options configuration page (ie. the GetServices function will be called on that screen).

The GetPrice function will also be called by Kentico when the relevant service is chosen during the checkout process.

As for calling the UPS Custom Integrated Class in the AppFolder, I would move this class into the Custom Shipping Provider. You would then be able to instantiate and reference it from within your shipping provider code. I wouldn't pass the deliveryitem class to the UPS class, instead use the routines that are already in that class and send in the necessary variable accordingly during the GetPrice method in your custom Shipping Provider.

0 votesVote for this answer Unmark Correct answer

Recent Answers


kuntesh thakker answered on March 30, 2015 13:12

Thanks for the answer , you mean a custom module and a module project to represent my carrier , This i will be able to see in Store Settings -> Shipping -> Carriers configuration page . I recreated new Module with WebApplication Project added to my kentico Website.

0 votesVote for this answer Mark as a Correct answer

kuntesh thakker answered on March 30, 2015 13:35 (last edited on March 30, 2015 13:35)

I was Able to get my Module Carrier in Store Settings -> Shipping -> Shipping options configuration page (ie. the GetServices function will be called on that screen). But Shipping Options will be also Real time according to Shipping Address . In that case what Should i do.

0 votesVote for this answer Mark as a Correct answer

Suneel Jhangiani answered on March 30, 2015 15:08

I'm not sure what you mean by Shipping Options will also be in real-time?

However, I would suspect that you don't actually need a ShippingOptions configuration page for the integrating with UPS. You would simply use the GetPrice function in your custom carrier provider to connect to the UPS web service and retrieve the shipping price based on the delivery address and the items passed in.

A custom UI for ShippingOption is only necessary if you want to extend the Kentico UI for allowing a store administrator to configure addition information. For example, I have created a Zone based provider for a carrier. This uses a custom UI to allow a store administrator to specify which countries are in which zones and to assign pricing to each zone. In the GetPrice method I simply lookup the Zone and return the price accordingly.

0 votesVote for this answer Mark as a Correct answer

kuntesh thakker answered on March 30, 2015 15:16

From Shipping Option , I mean I need to show the available UPS Shipping to the Users which is returned ny the UPS Service along with Price

0 votesVote for this answer Mark as a Correct answer

Suneel Jhangiani answered on March 30, 2015 15:38

The shipping Selection webpart should do this automatically, by presenting a drop down list of options with the price appended. If not, check that the ShippingSelection Form Control is being passed the DisplayShippingOptionPrice = true (it should be the default setting).

0 votesVote for this answer Mark as a Correct answer

kuntesh thakker answered on March 30, 2015 16:19

Yes in that control I am getting configured Shipping options right now there i want UPS methods, So for that We Dont need to add custom Shipping Provider ? Or need to add new Webpart for the same . GetServices Method we dont need ?

0 votesVote for this answer Mark as a Correct answer

Suneel Jhangiani answered on March 30, 2015 19:49

This has got a bit messy due to the fact it's been spread across the 3 threads.

However, I think I have answered this if you look at the other threads.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.