Webiant Logo Webiant Logo
  1. No results found.

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

CurrentCarts.cshtml

@model ShoppingCartSearchModel

@using Nop.Services.Stores
@inject IStoreService storeService

@{
    var stores = await storeService.GetAllStoresAsync();

    //page title
    ViewBag.PageTitle = T("Admin.CurrentCarts.CartsAndWishlists").Text;
    //active menu item (system name)
    NopHtml.SetActiveMenuItemSystemName("Current shopping carts and wishlists");
}

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

@T("Admin.CurrentCarts.CartsAndWishlists")

  @await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.CurrentShoppingCartListButtons, additionalData = Model })
@await Html.PartialAsync("Table", new DataTablesModel { Name = "carts-grid", UrlRead = new DataUrl("CurrentCarts", "ShoppingCart", null), SearchButtonId = "search-shopping-carts", PrimaryKeyColumn = nameof(ShoppingCartModel.CustomerId), Length = Model.PageSize, LengthMenu = Model.AvailablePageSizes, Filters = new List { new FilterParameter(nameof(Model.ShoppingCartType)), new FilterParameter(nameof(Model.StartDate), typeof(DateTime?)), new FilterParameter(nameof(Model.EndDate), typeof(DateTime?)), new FilterParameter(nameof(Model.StoreId)), new FilterParameter(nameof(Model.BillingCountryId)), new FilterParameter(nameof(Model.ProductId)) }, ColumnCollection = new List { new ColumnProperty(null) { Render = new RenderChildCaret(), Width = "5", Searchable = false, ClassName = NopColumnClassDefaults.ChildControl }, new ColumnProperty(nameof(ShoppingCartModel.CustomerEmail)) { Title = T("Admin.CurrentCarts.Customer").Text, Render = new RenderLink(new DataUrl("~/Admin/Customer/Edit/", nameof(ShoppingCartModel.CustomerId))) }, new ColumnProperty(nameof(ShoppingCartModel.TotalItems)) { Title = T("Admin.CurrentCarts.TotalItems").Text, Width = "150" } }, ChildTable = new DataTablesModel { Name = "products-grid", UrlRead = new DataUrl("GetCartDetails", "ShoppingCart", null), UrlDelete = new DataUrl("DeleteItem", "ShoppingCart", null), IsChildTable = true, Length = Model.PageSize, LengthMenu = Model.AvailablePageSizes, Filters = new List { new FilterParameter(nameof(ShoppingCartItemSearchModel.CustomerId), nameof(ShoppingCartItemSearchModel.CustomerId), true), new FilterParameter(nameof(ShoppingCartItemSearchModel.ShoppingCartType)), new FilterParameter(nameof(ShoppingCartItemSearchModel.StartDate), typeof(DateTime?)), new FilterParameter(nameof(ShoppingCartItemSearchModel.EndDate), typeof(DateTime?)), new FilterParameter(nameof(ShoppingCartItemSearchModel.StoreId)), new FilterParameter(nameof(ShoppingCartItemSearchModel.BillingCountryId)), new FilterParameter(nameof(ShoppingCartItemSearchModel.ProductId)) }, ColumnCollection = new List { new ColumnProperty(nameof(ShoppingCartItemModel.ProductName)) { Title = T("Admin.CurrentCarts.Product").Text, Width = "400", Render = new RenderCustom("renderProductName") }, new ColumnProperty(nameof(ShoppingCartItemModel.Quantity)) { Title = T("Admin.CurrentCarts.Quantity").Text, Width = "150" }, new ColumnProperty(nameof(ShoppingCartItemModel.UnitPrice)) { Title = T("Admin.CurrentCarts.UnitPrice").Text, Width = "150" }, new ColumnProperty(nameof(ShoppingCartItemModel.Total)) { Title = T("Admin.CurrentCarts.Total").Text, Width = "150" }, new ColumnProperty(nameof(ShoppingCartItemModel.Store)) { Title = T("Admin.CurrentCarts.Store").Text, Width = "150", Visible = (await storeService.GetAllStoresAsync()).Count > 1 }, new ColumnProperty(nameof(ShoppingCartItemModel.UpdatedOn)) { Title = T("Admin.CurrentCarts.UpdatedOn").Text, Width = "150", Render = new RenderDate() }, new ColumnProperty(nameof(ShoppingCartItemModel.Id)) { Title = T("Admin.Common.Delete").Text, Width = "100", Render = new RenderButtonRemove(T("Admin.Common.Delete").Text), ClassName = NopColumnClassDefaults.Button } } } })