Best way to customize a controller event at checkout step ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 anos atrás
Hi, I created a widget pluggin to customize delivery adress when a customer choose a specific delivery method : here DPD Pickup point. I'll need same customization for "Relais colis" and "Mondial relay".

Goal is : select a delivery pickup point. It's not a pickup point like in nop because it's a delivery method.

Widgetzone is : PublicWidgetZones.OpCheckoutShippingMethodBottom.

I need to customize "Continue" button after delivery method selection.
I think i need to redefine "OpcLoadStepAfterShippingMethod" on CheckoutController.

CheckoutController.cs :
...
        protected virtual async Task<JsonResult> OpcLoadStepAfterShippingMethod(IList<ShoppingCartItem> cart)
...


Is it done by defining a new "RegisterRoutes" in my routeprovider pluggin class ?

Regards,
Laurent
2 anos atrás
Model prepare event will not work for one page checkout ajax call. so best way is override controller action method from your plugin controller i think.
2 anos atrás
Just a thought:  It seems to me that if you can show a Widget on the shipping method selection page, then you don't need to deal with another "LoadStepAfter".
2 anos atrás
New York wrote:
Just a thought:  It seems to me that if you can show a Widget on the shipping method selection page, then you don't need to deal with another "LoadStepAfter".


I agree with you, I have my own controller to collect access point data.
But I want to change shipping address only when user click "continue", not before this event, to avoid this change, if user decide after an access point selection to change his shipping method to another (in this case, shipping address remains the same).
2 anos atrás
It seems a bit confusing that a customer first enters a shipping address, and then has to select another one.  Why can't you set this up using Pickup Points?
2 anos atrás
New York wrote:
It seems a bit confusing that a customer first enters a shipping address, and then has to select another one.  Why can't you set this up using Pickup Points?


Hi New York, in France,  we have shipping partner who provide and manage pickup points.
It's not a warehouse pickup point, we don't have a list of pickup address. Shipping partner provides a web service or javascript pluggin to display and choose  partner pickup address.

For example, this is amazon.fr :

As you can see, shipping address ("Adresse de livraison") is displayed by default. You can send at this address.
You can also choose a pickup point ("point retrait"). I created a red rectangle arround it.

When you click See ("voir"), a map is displayed with user postcode selected by default to limit range.

Then, you can choose a pickup point shipping address.

Shipping address is now updated.

Is it more clear now ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.