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

Posted: March 13, 2019 at 2:19 PM Quote #225003
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
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: March 13, 2019 at 8:05 PM Quote #225017
Hello,

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

So may be I assist you..!!
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
I am passionate about new ideas and new way of thinking :-)

Cheers,
Smiten Kalathiya
Posted: March 14, 2019 at 8:40 AM Quote #225053
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 post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.