How to pass Nop.Webs Model to CustomPlugin's view?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Please help me ... I have plugin and for this plugin i have controller whitch should return Categories with SubCategories as View.
This is my Plugins Controller witch is returning View, where i want to use Nop.Webs CategoryModel...


this is my View...

Please Help me....Thank you
5 years ago
Hello,

Please post your view and method code as well as your custom model code.

So may be I assist you..!!
5 years ago
Controller which should return Nop.Web's category model
  public class AllCategoryController : BaseController
    {
      
        public ActionResult AllCategories()
        {
            CategoryModel model = new CategoryModel();
            return View("~/Plugins/Widgets.AllCategory/Views/AllCategory.cshtml",model);
        }
    }

View which is returning

@using Nop.Web.Models.Catalog
@model CategoryModel
@{
    Layout = "_ColumnsOne";
}
<h2>The </h2>
@foreach (var item in Model.CategoryBreadcrumb)
{
    <p>@item.Name</p>
}



the category model is from nop.web and it is returning null whyyy i dont know ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.