Save selected Pick-up point in order

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 anni tempo fa
I'm implementing a shipping plug-in where the customer can select a desired pick-up point.
Using google maps, the pick-up points are shown to the customer.

For this implementation, the plug-in is linked to the DPD pick-up points.

The pick-up points are selected in a radius closest to the customer's shipping address.

An example can be seen on the following screenshot:
http://www.bizoes.com/nopcommercePickUpPoint.jpg

I've gotten to the part where shipping address coupling to the plug-in works perfectly.

Only thing left to do is store the selected pick-up point ID into the order.

The idea was to save this in a property of the order.
But I'm unable to access the order at shipping method level.

There is a work item for Full support for in-store pickup:
https://nopcommerce.codeplex.com/workitem/10242

Maby this will present a solution once released...

Meanwhile, any ideas on how to implement this ?

(current version of nopCommerce: 3.20)
9 anni tempo fa
What are you returning as the Name of the shipping method?  ShippingMethod is a field on the order, and contains the name of the selected method. (What is NL10021-is that the PointId?)
In other words, change from "In-Store Pickup" to selected DPD.
9 anni tempo fa
Yes, the pointId is NL10021 in that example.
I allso had an idea to change the Shipping Method name to something like: "DPD Pick-Up point : NL10021"

But what would be a good location/method to do this?
There is no entry point into the shipping method once the methods are shown?

Only solution/workaround I have so far is to insert the parcelShopID into HttpContext.Current.Cache.
And catch that later in the PostProcessPayment and to save it into the order as PurchaseOrderNumber.
9 anni tempo fa
(Where do you "insert the parcelShopID into HttpContext.Current.Cache."?)

Maybe javascript to change the value on submit

<input id="shippingoption_0" type="radio" name="shippingoption" value="In-Store Pickup___Shipping.FixedRate" checked="checked">
9 anni tempo fa
The ID is saved in the cache when the user clicks on a specific pick-up point. This is done using Jquery and a webmethod in a separate asmx class.

It's not completely clear how the shipping option will be correctly saved when I set it as the value of the radiobutton.
The user first selects "DPD pick-up point" as shipping option and then uses the google maps to point out his desired location.

There is no way to access the order from within a shipping plug-in?
9 anni tempo fa
There is no Order until the confirm (action) calls _orderProcessingService.PlaceOrder()

It looks like changing the value of the radio input won't work so easily - the SelectShippingMethod checks to see if it's one of the values previously stored in shippingOptions
        public ActionResult SelectShippingMethod(string shippingoption)
...
            var shippingOption = shippingOptions
                .Find(so => !String.IsNullOrEmpty(so.Name) && so.Name.Equals(selectedName,
9 anni tempo fa
Indeed. Thanks for the insight.

First I wasn't completely following. But I've implemented it, changing the value to for example:
value="DPD Pick-up point: BE10639 KADERS DHAENE___Shipping.DPD".

And indeed, the selectshippingmethod sees it's not a registered method.
So we're stuck there.

For now I'll implement it using the cache method. Reading it at the payment method.
There I can save it in the order.

But it's not really interesting as an of-the-shelf shipping method...

Will there be a feature for this in release 3.40?
4 anni tempo fa
Hi,

I know this thread was started a long time ago, but where did you manage to get with it? I've got a customer wanting the DPD Ship to Store integrating, and for what I've seen online, the DPD API docs are shocking!

Thanks,
Craig
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.