Webiant Logo Webiant Logo
  1. No results found.

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

SearchModel.cs

using Microsoft.AspNetCore.Mvc.Rendering;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;

namespace Nop.Web.Models.Catalog;

public partial record SearchModel : BaseNopModel
{
    public SearchModel()
    {
        AvailableCategories = new List();
        AvailableManufacturers = new List();
        AvailableVendors = new List();
        CatalogProductsModel = new CatalogProductsModel();
    }

    /// 
    /// Query string
    /// 
    [NopResourceDisplayName("Search.SearchTerm")]
    public string q { get; set; }

    /// 
    /// Category ID
    /// 
    [NopResourceDisplayName("Search.Category")]
    public int cid { get; set; }

    [NopResourceDisplayName("Search.IncludeSubCategories")]
    public bool isc { get; set; }

    /// 
    /// Manufacturer ID
    /// 
    [NopResourceDisplayName("Search.Manufacturer")]
    public int mid { get; set; }

    /// 
    /// Vendor ID
    /// 
    [NopResourceDisplayName("Search.Vendor")]
    public int vid { get; set; }

    /// 
    /// A value indicating whether to search in descriptions
    /// 
    [NopResourceDisplayName("Search.SearchInDescriptions")]
    public bool sid { get; set; }

    /// 
    /// A value indicating whether "advanced search" is enabled
    /// 
    [NopResourceDisplayName("Search.AdvancedSearch")]
    public bool advs { get; set; }

    /// 
    /// A value indicating whether "allow search by vendor" is enabled
    /// 
    public bool asv { get; set; }

    public CatalogProductsModel CatalogProductsModel { get; set; }

    public IList AvailableCategories { get; set; }
    public IList AvailableManufacturers { get; set; }
    public IList AvailableVendors { get; set; }

    #region Nested classes

    public partial record CategoryModel : BaseNopEntityModel
    {
        public string Breadcrumb { get; set; }
    }

    #endregion
}