using System.Xml.Linq; using Nop.Core.Domain.Catalog; using Nop.Core.Domain.Vendors; using Nop.Web.Models.Catalog; namespace Nop.Web.Factories; public partial interface ICatalogModelFactory { #region Categories /// /// Prepare category model /// /// Category /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the category model /// Task PrepareCategoryModelAsync(Category category, CatalogProductsCommand command); /// /// Prepare category template view path /// /// Template identifier /// /// A task that represents the asynchronous operation /// The task result contains the category template view path /// Task PrepareCategoryTemplateViewPathAsync(int templateId); /// /// Prepare category navigation model /// /// Current category identifier /// Current product identifier /// /// A task that represents the asynchronous operation /// The task result contains the category navigation model /// Task PrepareCategoryNavigationModelAsync(int currentCategoryId, int currentProductId); /// /// Prepare top menu model /// /// /// A task that represents the asynchronous operation /// The task result contains the op menu model /// Task PrepareTopMenuModelAsync(); /// /// Prepare homepage category models /// /// /// A task that represents the asynchronous operation /// The task result contains the list of homepage category models /// Task> PrepareHomepageCategoryModelsAsync(); /// /// Prepare root categories for menu /// /// /// A task that represents the asynchronous operation /// The task result contains the list of category (simple) models /// Task> PrepareRootCategoriesAsync(); /// /// Prepare subcategories for menu /// /// Id of category to get subcategory /// /// A task that represents the asynchronous operation /// The task result contains the /// Task> PrepareSubCategoriesAsync(int id); /// /// Prepares the category products model /// /// Category /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the category products model /// Task PrepareCategoryProductsModelAsync(Category category, CatalogProductsCommand command); /// /// Prepare category (simple) models /// /// /// A task that represents the asynchronous operation /// The task result contains the list of category (simple) models /// Task> PrepareCategorySimpleModelsAsync(); /// /// Prepare category (simple) models /// /// Root category identifier /// A value indicating whether subcategories should be loaded /// /// A task that represents the asynchronous operation /// The task result contains the list of category (simple) models /// Task> PrepareCategorySimpleModelsAsync(int rootCategoryId, bool loadSubCategories = true); /// /// Prepare category (simple) xml document /// /// /// A task that represents the asynchronous operation /// The task result contains the xml document of category (simple) models /// Task PrepareCategoryXmlDocumentAsync(); #endregion #region Manufacturers /// /// Prepare manufacturer model /// /// Manufacturer identifier /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the manufacturer model /// Task PrepareManufacturerModelAsync(Manufacturer manufacturer, CatalogProductsCommand command); /// /// Prepares the manufacturer products model /// /// Manufacturer /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the manufacturer products model /// Task PrepareManufacturerProductsModelAsync(Manufacturer manufacturer, CatalogProductsCommand command); /// /// Prepare manufacturer template view path /// /// Template identifier /// /// A task that represents the asynchronous operation /// The task result contains the manufacturer template view path /// Task PrepareManufacturerTemplateViewPathAsync(int templateId); /// /// Prepare manufacturer all models /// /// /// A task that represents the asynchronous operation /// The task result contains the list of manufacturer models /// Task> PrepareManufacturerAllModelsAsync(); /// /// Prepare manufacturer navigation model /// /// Current manufacturer identifier /// /// A task that represents the asynchronous operation /// The task result contains the manufacturer navigation model /// Task PrepareManufacturerNavigationModelAsync(int currentManufacturerId); #endregion #region Vendors /// /// Prepare vendor model /// /// Vendor /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the vendor model /// Task PrepareVendorModelAsync(Vendor vendor, CatalogProductsCommand command); /// /// Prepares the vendor products model /// /// Vendor /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the vendor products model /// Task PrepareVendorProductsModelAsync(Vendor vendor, CatalogProductsCommand command); /// /// Prepare vendor all models /// /// /// A task that represents the asynchronous operation /// The task result contains the list of vendor models /// Task> PrepareVendorAllModelsAsync(); /// /// Prepare vendor navigation model /// /// /// A task that represents the asynchronous operation /// The task result contains the vendor navigation model /// Task PrepareVendorNavigationModelAsync(); /// /// Prepare review models for vendor products /// /// /// Vendor /// Model to filter product reviews /// A task that represents the asynchronous operation /// The task result contains a list of product reviews /// Task PrepareVendorProductReviewsModelAsync(Vendor vendor, VendorReviewsPagingFilteringModel pagingModel); #endregion #region Product tags /// /// Prepare popular product tags model /// /// The number of tags to be returned; pass 0 to get all tags /// /// A task that represents the asynchronous operation /// The task result contains the product tags model /// Task PreparePopularProductTagsModelAsync(int numberTagsToReturn = 0); /// /// Prepare products by tag model /// /// Product tag /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the products by tag model /// Task PrepareProductsByTagModelAsync(ProductTag productTag, CatalogProductsCommand command); /// /// Prepares the tag products model /// /// Product tag /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the ag products model /// Task PrepareTagProductsModelAsync(ProductTag productTag, CatalogProductsCommand command); #endregion #region New products /// /// Prepare new products model /// /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the new products model /// Task PrepareNewProductsModelAsync(CatalogProductsCommand command); #endregion #region Searching /// /// Prepare search model /// /// Search model /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the search model /// Task PrepareSearchModelAsync(SearchModel model, CatalogProductsCommand command); /// /// Prepares the search products model /// /// Search model /// Model to get the catalog products /// /// A task that represents the asynchronous operation /// The task result contains the search products model /// Task PrepareSearchProductsModelAsync(SearchModel searchModel, CatalogProductsCommand command); /// /// Prepare search box model /// /// /// A task that represents the asynchronous operation /// The task result contains the search box model /// Task PrepareSearchBoxModelAsync(); #endregion #region Common /// /// Prepare sorting options /// /// Catalog paging filtering model /// Catalog paging filtering command /// A task that represents the asynchronous operation Task PrepareSortingOptionsAsync(CatalogProductsModel pagingFilteringModel, CatalogProductsCommand command); /// /// Prepare view modes /// /// Catalog paging filtering model /// Catalog paging filtering command /// A task that represents the asynchronous operation Task PrepareViewModesAsync(CatalogProductsModel pagingFilteringModel, CatalogProductsCommand command); /// /// Prepare page size options /// /// Catalog paging filtering model /// Catalog paging filtering command /// Are customers allowed to select page size? /// Page size options /// Fixed page size /// A task that represents the asynchronous operation Task PreparePageSizeOptionsAsync(CatalogProductsModel pagingFilteringModel, CatalogProductsCommand command, bool allowCustomersToSelectPageSize, string pageSizeOptions, int fixedPageSize); #endregion }