Webiant Logo Webiant Logo
  1. No results found.

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

IProductModelFactory.cs

using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Orders;
using Nop.Web.Models.Catalog;

namespace Nop.Web.Factories;

/// 
/// Represents the interface of the product model factory
/// 
public partial interface IProductModelFactory
{
    /// 
    /// Get the product template view path
    /// 
    /// Product
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the view path
    /// 
    Task PrepareProductTemplateViewPathAsync(Product product);

    /// 
    /// Prepare the product overview models
    /// 
    /// Collection of products
    /// Whether to prepare the price model
    /// Whether to prepare the picture model
    /// Product thumb picture size (longest side); pass null to use the default value of media settings
    /// Whether to prepare the specification attribute models
    /// Whether to force redirection after adding to cart
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the collection of product overview model
    /// 
    Task> PrepareProductOverviewModelsAsync(IEnumerable products,
        bool preparePriceModel = true, bool preparePictureModel = true,
        int? productThumbPictureSize = null, bool prepareSpecificationAttributes = false,
        bool forceRedirectionAfterAddingToCart = false);

    /// 
    /// Prepare the product combination models
    /// 
    /// Product
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product combination models
    /// 
    Task> PrepareProductCombinationModelsAsync(Product product);

    /// 
    /// Prepare the product details model
    /// 
    /// Product
    /// Updated shopping cart item
    /// Whether the product is associated
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product details model
    /// 
    Task PrepareProductDetailsModelAsync(Product product, ShoppingCartItem updatecartitem = null, bool isAssociatedProduct = false);

    /// 
    /// Prepare the product reviews model
    /// 
    /// Product
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product reviews model
    /// 
    Task PrepareProductReviewsModelAsync(Product product);

    /// 
    /// Prepare the customer product reviews model
    /// 
    /// Number of items page; pass null to load the first page
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the customer product reviews model
    /// 
    Task PrepareCustomerProductReviewsModelAsync(int? page);

    /// 
    /// Prepare the product email a friend model
    /// 
    /// Product email a friend model
    /// Product
    /// Whether to exclude populating of model properties from the entity
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product email a friend model
    /// 
    Task PrepareProductEmailAFriendModelAsync(ProductEmailAFriendModel model, Product product, bool excludeProperties);

    /// 
    /// Prepare the product specification model
    /// 
    /// Product
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product specification model
    /// 
    Task PrepareProductSpecificationModelAsync(Product product);
}