Add or move Success and Error notification to a common base controller

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 Jahre weitere
Hi,

During the development of my payment plugin, i wanted to display a Succes or Error notification after saving the plugin settings, like Nop does when saving all the other settings (after you click save a notification text is displayed under the admin menu).

But after looking in the code I discovered that the ErrorNotification and SuccessNotification methods are available in the BaseNopController.
This is why they cannot be used in a plugin, because (in my case) it's using the BaseNopPaymentController, which doesn't have these methods.

I nice solution will be a "CommonBaseAdminController" as the base controller for the BaseNopController and all the plugins base controllers and move the Success and Error methods in there (and maybe other common stuff needed in the future).
10 Jahre weitere
Hi Marco,

Thanks a lot. I've just created a work item
6 Jahre weitere
olandese wrote:
Hi,

During the development of my payment plugin, i wanted to display a Succes or Error notification after saving the plugin settings, like Nop does when saving all the other settings (after you click save a notification text is displayed under the admin menu).

But after looking in the code I discovered that the ErrorNotification and SuccessNotification methods are available in the BaseNopController.
This is why they cannot be used in a plugin, because (in my case) it's using the BaseNopPaymentController, which doesn't have these methods.

I nice solution will be a "CommonBaseAdminController" as the base controller for the BaseNopController and all the plugins base controllers and move the Success and Error methods in there (and maybe other common stuff needed in the future).


Does anybody has any solution for this?

Quick response will be highly appreciated.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.