Note that there are some explanatory texts on larger screens.

plurals
  1. POnopCommerce: Resource can not be found.
    primarykey
    data
    text
    <p>$ I am able to create Menu Item in administration section Plugin-->Import Product however when i click on it, it gives me error resource cannot be found. Please help on this matter. I have attached model, view, controller and other related code below. </p> <pre><code>*************Model************* namespace Nop.Plugin.Import.Product.Models { public class ImportProductModel { public string Button1 { get; set; } } } **********Controller************* using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web.Mvc; using Nop.Admin.Models.Catalog; using Nop.Core.Domain.Catalog; using Nop.Core.Infrastructure; using Nop.Plugin.Import.Product.Models; using Nop.Services.Catalog; using ns_5OClock; namespace Nop.Plugin.Import.Product.Controllers { class ImportProductController : Controller { // // GET: /DisplayTime/ public ActionResult Index(ImportProductModel model) { if (!String.IsNullOrEmpty(model.Button1)) { CreateProduct(); } return View(); } // } } *************View (ImportProduct.cshtml) ********** @{ Layout = ""; } @model Nop.Plugin.Import.Product.Models.ImportProductModel &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;button title="Click to Create Products" style="width:300px;height:60px" name="Button1"&gt;&lt;/button&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; ***************Plugin (ImportProduct) ********************** using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Nop.Core.Plugins; using Nop.Web.Framework.Web; namespace Nop.Plugin.Import.Product { public class ImportProduct : BasePlugin, IAdminMenuPlugin { public void BuildMenuItem(Telerik.Web.Mvc.UI.MenuItemBuilder menuItemBuilder) { menuItemBuilder.Text("Import Product"); //menuItemBuilder.Url("/Plugins/ProductImport/Index"); menuItemBuilder.Route("Plugin.Import.Product.ImportProduct"); } } } **************Route Provider **************** using System.Web.Mvc; using System.Web.Routing; using Nop.Web.Framework.Mvc.Routes; namespace Nop.Plugin.Import.Product { public partial class RouteProvider : IRouteProvider { public void RegisterRoutes(RouteCollection routes) { routes.MapRoute("Plugin.Import.Product.ImportProduct", "Plugins/Import/ImportProduct", new { controller = "Import", action = "ImportProduct" }, new[] { "Nop.Plugin.Import.Product.Controllers" } ); } public int Priority { get { return 0; } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload