I'm attempting to create a plugin that pulls in price and description for a product from a web service. This plugin also requires its own checkout page with product information at the top, and then the rest of the standard one page checkout below.
I done things like this in the past on ver 1.9 and such by adjusting the core files but I'm attempting to do this via a plugin and I'm looking to answer two questions. One is it possible via a plugin only, and two hints on how I would go about doing it.
You could use the ProductService from Nop.Services or you could write your own. Actually if you need only price and description you should write your own, because there is no point of pulling all the product info from the database.
For the checkouts you could create your own CustomCheckoutController that inherits the CheckoutController and has an Action method which will handle the display of product information.
You could use some kind of Action Filter or override the One Page Checkout View to display the checkout information.
One issue I found is that the servicemodel bindings and endpoint need to be in the web.nop web.config and are not used from the app or web config in the plugin project.
One issue I found is that the servicemodel bindings and endpoint need to be in the web.nop web.config and are not used from the app or web config in the plugin project.
Is the app config getting copied to the Presentation/Plugins/{PluginName} directory?
I have made an Plugin that pulls price from SOAP Service.
1. Override PriceCalculationService (GetFinalPrice and GetUnitPrice) or implement IPriceCalculationService on your own. 2. Add your WebService reference in your plugin project. You can create WebServiceClient with Settings from SettingsService eg.
var myEndpointFromSettings = _settingService.GetSettingByKey<string>("MyPlugin.WebServiceUrl", "http://localhost:9000/GetSomePrice/"); this._client = new MyServiceClient(new BasicHttpBinding(), new EndpointAddress(myEndpointFromSettings));