Shipping plugin with custom data

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Hi all,
I'd like to create a shipping plugin that needs some additional data. For example, I wanna allow the customer to select if wanna be notified if a checkbox "Send SMS" was checked. I also need display map with pickup points (they are not warehouses but my shipping provider pickup points).
There are too many combinations and too many pickup points to show ratio buttons. It has to be dynamic so I plan to do some frontend in react.js and put it in view. However, I got a problem with saving it to db because nop does not seems to support passing additional data and having a dynamic view in checkout when shipping selection. Be grateful for your help.
3 years ago
If you need to collect additional data, then consider using Checkout Attributes.  (However, they appear in the cart and not on the pickup point or shipping method selection page.)
Otherwise, you're plugin can provide a widget that can be displayed where you want it (and would use AJAX to post the entry\selection back to site).

" display map with pickup points " is already supported.  If your "dynamic" is to pare down the list of pickup points, then maybe you could do that in your plugin (need to override pickup point related methods - e.g. the service that returns list of pickup points).
3 years ago
The map would be more like a google map with many markers and it is not available for all my providers because my provider is like Shipping Station. So it would have to appear in the Checkout page in the Shipping method step. I've tried to create my own table to store data that I need and save data from this step like Guid.NewGuid()__MyShippingProviderName to bind data from my table, but nop checks if input value matches Name of Shipping option.
I've just wanted to avoid overriding this methods because other plugins could not go good with that :( .
3 years ago
I've done something similar and to get it to work had to partially override a controller (checkout controller), service (orderprocessingservice) and at least one view. I wish there were a better/easier way in nopcommerce but to my knowledge there is not. That said, I've had it working this way for a couple of years and it has never been an issue.
3 years ago
RE:  "pickup points" ...  "appear in the Checkout page in the Shipping method step".

The shipping method step happens after the shipping address selection/entry step.  If your need is for pickup points, then I'd think address selection is not needed.  Thus you would create a 'Pickup point provider' plugin.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.