nop 2.0 Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
I am trying to develop a payment plugin that Integrates to a payment gateway at my webhost. A lot of the guts in this plugin is from PayPalDirect. All has been stripped so only config actually does something atm and I wanted to test the bare minimun before going any further. I have more or less tried everything the last 5 days and can not wrap my brain around why it is failing.

Thought it would be easier if I shared the plugin if someone with plugin knowledge wanted to take a look. I can not really ask this of anyone so its only here for now if someone wants to take a look.

<<LINK REMOVED>>

The plugin installs without problems but when I click configure the plugin fails in ConfigureMethod.cshtml at the following code clock:

@if (!String.IsNullOrEmpty(Model.ConfigurationActionName))
{
    @Html.Action(Model.ConfigurationActionName, Model.ConfigurationControllerName, Model.ConfigurationRouteValues);
}

Execution of the child request failed. Please examine the InnerException for more information.

InnerException: {"The controller for path '/Admin/Payment/ConfigureMethod' was not found or does not implement IController."}

Best regards
11 years ago
dshop wrote:
[...]

Your controller class needs its access modifier set to public.

Edit file: Nop.Plugin.Payments.Curanet\Controllers\PaymentCuranetController.cs
change the following line:
class PaymentCuranetController : BaseNopPaymentController

to:
public class PaymentCuranetController : BaseNopPaymentController


Also on your project References, set their Copy Local property to False. This keeps all the referenced assemblies from being unnecessarily copied to the output folder. After you do this, delete the contents of Presentation\Nop.Web\Plugins\Payments.Curanet and rebuild the project. You only need Description.txt and Nop.Plugin.Payments.Curanet.dll in the output directory (Nop.Plugin.Payments.Curanet.pdb is optional).

After you have rebuilt the project, click the 'Reload list of plugins' button on Admin > Configuration > Plugins and your plugin's Configure link should work.

.
11 years ago
mb wrote:
[...]


YES!!! That was it. Thank you so very much MB :-) Now I can finally continue.

Best regards

Nicki
10 years ago
So for anyone else who has been maddened by this plague for the last several hours like myself ...

Assuming you've tried all the suggestions in this post:
1. Make sure the VIEWS in your plugin are set to EMBEDDED REFERENCE
2. Make sure your project is building and files are copied to the correct PLUGINS folder
3. Make sure your ROUTES are set correctly and that the namespaces match the actual namespace of your project.
4. "Tickle" the web.config and/or global.asax files to force the system to reload the plugins.

All of these are explained in great depth earlier in this thread, but I still was unable to get my project to work.
So, after digging and digging, I finally figured out that this plugin architecture is based on one that was written in another open-source project I have used, Umbraco CMS, so I started looking there for other answers ...

FINALLY - the answer that solved it for me was to make sure that the references you have to System.Web.Mvc are referenced in the NopCommerce/Packages/aspnetmvc folder, rather than the standard C:\program files\... folder.  

For more info see: https://www.nopcommerce.com/boards/t/20445/plugin-controller-not-registering-to-ioc-container.aspx#83398
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.