Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

List.cshtml

@model ProductSearchModel

@using Nop.Core.Domain.Catalog;

@{
    //page title
    ViewBag.PageTitle = T("Admin.Catalog.Products").Text;
    //active menu item (system name)
    NopHtml.SetActiveMenuItemSystemName("Products");
}

@{
    const string hideSearchBlockAttributeName = "ProductListPage.HideSearchBlock";
    var hideSearchBlock = await genericAttributeService.GetAttributeAsync(await workContext.GetCurrentCustomerAsync(), hideSearchBlockAttributeName);
}

@if (Model.LicenseCheckModel.BlockPages != true)
{
    

@T("Admin.Catalog.Products")

@T("Admin.Common.AddNew")
@if (!Model.IsLoggedInAsVendor || Model.AllowVendorsToImportProducts) { //a vendor cannot import products } @await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.ProductListButtons, additionalData = Model })
@await Html.PartialAsync("Table", new DataTablesModel { Name = "products-grid", UrlRead = new DataUrl("ProductList", "Product", null), SearchButtonId = "search-products", Length = Model.PageSize, LengthMenu = Model.AvailablePageSizes, Filters = new List { new FilterParameter(nameof(Model.SearchProductName)), new FilterParameter(nameof(Model.SearchCategoryId)), new FilterParameter(nameof(Model.SearchIncludeSubCategories), typeof(bool)), new FilterParameter(nameof(Model.SearchManufacturerId)), new FilterParameter(nameof(Model.SearchStoreId)), new FilterParameter(nameof(Model.SearchWarehouseId)), new FilterParameter(nameof(Model.SearchVendorId)), new FilterParameter(nameof(Model.SearchProductTypeId)), new FilterParameter(nameof(Model.SearchPublishedId)) }, ColumnCollection = new List { new ColumnProperty(nameof(ProductModel.Id)) { IsMasterCheckBox = true, Render = new RenderCheckBox("checkbox_products"), ClassName = NopColumnClassDefaults.CenterAll, Width = "50" }, new ColumnProperty(nameof(ProductModel.PictureThumbnailUrl)) { Title = T("Admin.Catalog.Products.Fields.PictureThumbnailUrl").Text, Width = "100", Render = new RenderPicture(width: 100) }, new ColumnProperty(nameof(ProductModel.Name)) { Title = T("Admin.Catalog.Products.Fields.Name").Text }, new ColumnProperty(nameof(ProductModel.Sku)) { Title = T("Admin.Catalog.Products.Fields.Sku").Text, Width = "100" }, new ColumnProperty(nameof(ProductModel.Price)) { Title = T("Admin.Catalog.Products.Fields.Price").Text, Render = new RenderCustom("renderColumnPrice") }, new ColumnProperty(nameof(ProductModel.StockQuantityStr)) { Title = T("Admin.Catalog.Products.Fields.StockQuantity").Text }, new ColumnProperty(nameof(ProductModel.Published)) { Title = T("Admin.Catalog.Products.Fields.Published").Text, Width = "80", ClassName = NopColumnClassDefaults.CenterAll, Render = new RenderBoolean() }, new ColumnProperty(nameof(ProductModel.Id)) { Title = T("Admin.Common.Edit").Text, Width = "80", ClassName = NopColumnClassDefaults.Button, Render = new RenderButtonEdit(new DataUrl("Edit")) } } })
} @*import products form*@ @*export selected (XML). We don't use GET approach because it's limited to 2K-4K chars and won't work for large number of entities*@
@*export selected (Excel). We don't use GET approach because it's limited to 2K-4K chars and won't work for large number of entities*@