Webiant Logo Webiant Logo
  1. No results found.

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

CatalogProductsModel.cs

using Microsoft.AspNetCore.Mvc.Rendering;
using Nop.Web.Framework.UI.Paging;

namespace Nop.Web.Models.Catalog;

/// 
/// Represents a catalog products model
/// 
public partial record CatalogProductsModel : BasePageableModel
{
    #region Properties

    /// 
    /// Get or set a value indicating whether to use standard or AJAX products loading (applicable to 'paging', 'filtering', 'view modes') in catalog
    /// 
    public bool UseAjaxLoading { get; set; }

    /// 
    /// Gets or sets the warning message
    /// 
    public string WarningMessage { get; set; }

    /// 
    /// Gets or sets the message if there are no products to return
    /// 
    public string NoResultMessage { get; set; }

    /// 
    /// Gets or sets the price range filter model
    /// 
    public PriceRangeFilterModel PriceRangeFilter { get; set; }

    /// 
    /// Gets or sets the specification filter model
    /// 
    public SpecificationFilterModel SpecificationFilter { get; set; }

    /// 
    /// Gets or sets the manufacturer filter model
    /// 
    public ManufacturerFilterModel ManufacturerFilter { get; set; }

    /// 
    /// Gets or sets a value indicating whether product sorting is allowed
    /// 
    public bool AllowProductSorting { get; set; }

    /// 
    /// Gets or sets available sort options
    /// 
    public IList AvailableSortOptions { get; set; }

    /// 
    /// Gets or sets a value indicating whether customers are allowed to change view mode
    /// 
    public bool AllowProductViewModeChanging { get; set; }

    /// 
    /// Gets or sets available view mode options
    /// 
    public IList AvailableViewModes { get; set; }

    /// 
    /// Gets or sets a value indicating whether customers are allowed to select page size
    /// 
    public bool AllowCustomersToSelectPageSize { get; set; }

    /// 
    /// Gets or sets available page size options
    /// 
    public IList PageSizeOptions { get; set; }

    /// 
    /// Gets or sets a order by
    /// 
    public int? OrderBy { get; set; }

    /// 
    /// Gets or sets a product sorting
    /// 
    public string ViewMode { get; set; }

    /// 
    /// Gets or sets the products
    /// 
    public IList Products { get; set; }

    #endregion

    #region Ctor

    public CatalogProductsModel()
    {
        PriceRangeFilter = new PriceRangeFilterModel();
        SpecificationFilter = new SpecificationFilterModel();
        ManufacturerFilter = new ManufacturerFilterModel();
        AvailableSortOptions = new List();
        AvailableViewModes = new List();
        PageSizeOptions = new List();
        Products = new List();
    }

    #endregion
}