payment plugin in version 2.6

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi all,
I developed some new plugin in version 2.6 and I have always the same message about the configuration view:

InvalidOperationException: The view 'Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Themes/Decestheme/Views/PaymentCartadiCreditoOffLine/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.cshtml
~/Themes/Decestheme/Views/PaymentCartadiCreditoOffLine/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.vbhtml
~/Themes/Decestheme/Views/Shared/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.cshtml
~/Themes/Decestheme/Views/Shared/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.vbhtml
~/Views/PaymentCartadiCreditoOffLine/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.cshtml
~/Views/PaymentCartadiCreditoOffLine/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.vbhtml
~/Views/Shared/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.cshtml
~/Views/Shared/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.vbhtml
~/Administration/Views/PaymentCartadiCreditoOffLine/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.cshtml
~/Administration/Views/PaymentCartadiCreditoOffLine/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.vbhtml
~/Administration/Views/Shared/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.cshtml
~/Administration/Views/Shared/Nop.Plugin.Payments.CartadiCreditoOffLine.Views.PaymentCartadiCreditoOffLine.Configure.vbhtml]
   System.Web.Mvc.ViewResult.FindView(ControllerContext context) +318674
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +129
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +23
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +177
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.Mvc.<>c__DisplayClassa.<EndProcessRequest>b__9() +23
   System.Web.Mvc.<>c__DisplayClass4.<Wrap>b__3() +12
   System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +38
   System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Action action) +65
   System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result) +71
   System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1072

[HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.]
   System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +3050063
   System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +77
   System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +28
   System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +22
   System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +497
   System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues) +88
   ASP._Page_Administration_Views_Payment_ConfigureMethod_cshtml.Execute() in c:\Sviluppo\IlDecespugliatore.it\Presentation\Nop.Web\Administration\Views\Payment\ConfigureMethod.cshtml:14
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +81
   System.Web.WebPages.StartPage.RunPage() +19
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +65
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +220
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +303
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +23
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +177
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970061
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Any suggestion please....

Thanks in advance

Massimo
11 years ago
did you add the route for the configuration? something like

routes.MapRoute( "Plugin.Payment.CartadiCreditoOffLine.Configure" ,
"Plugins/PaymentCartadiCreditoOffLine/Configure" ,
new { controller = "PaymentCartadiCreditoOffLine" , action = "Configure" } ,
new[] { "Nop.Plugin.Payment.PaymentCartadiCreditoOffLine.Controllers" }
                ) ;


Add the appropriate names and namespaces
11 years ago
Yes I did ... The problem will be in other side..
11 years ago
did you marked your views as embedded?
11 years ago
Sorry .. How I can define a view embedded? I think it should be a right suggestion but please clarify me if possible..
Thanks
11 years ago
in Visual Studio, select the view, next in the properties windows set the build action as "embedded resource"
11 years ago
I suggest you start looking at this:
https://www.nopcommerce.com/docs/77/how-to-write-a-nopcommerce-plugin.aspx

this will save you a lot of time.
11 years ago
I will try with your suggestions ... I have already created some plugin in nop commerce 2.5 and before.
Now I tried to duplicate one of this old plugin and it does not works .. Probably will be a stupid issue but the solution is not so easy ..

Thanks again.
11 years ago
View as "embedded resource" solved the issue!!
Thanks to all you .. fantastic !

Many thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.