/// <summary>
 /// Gets a <see cref="ProductBoxModel"/> from <see cref="IProductContent"/>.
 /// </summary>
 /// <param name="product">
 /// The product.
 /// </param>
 /// <returns>
 /// The <see cref="ProductBoxModel"/>.
 /// </returns>
 public static ProductBoxModel GetProductBoxModel(IProductContent product)
 {
     return(new ProductBoxModel
     {
         ProductKey = product.Key,
         Url = product.Url,
         Name = product.Name,
         Image =
             product.GetCropUrl(propertyAlias: "image", height: 350, cacheBuster: false),
         FormattedPrice = product.FormattedPrice(),
         FormattedSalePrice = product.FormattedSalePrice(),
         SalePrice = product.SalePrice,
         OnSale = product.OnSale,
         Price = product.Price
     });
 }
示例#2
0
 /// <summary>
 /// Gets a <see cref="ProductBoxModel"/> from <see cref="IProductContent"/>.
 /// </summary>
 /// <param name="product">
 /// The product.
 /// </param>
 /// <returns>
 /// The <see cref="ProductBoxModel"/>.
 /// </returns>
 public static ProductBoxModel GetProductBoxModel(IProductContent product)
 {
     return new ProductBoxModel
                {
                    ProductKey = product.Key,
                    Url = product.Url,
                    Name = product.Name,
                    Image =
                        product.GetCropUrl(propertyAlias: "image", height: 350, cacheBuster: false),
                    FormattedPrice = product.FormattedPrice(),
                    FormattedSalePrice = product.FormattedSalePrice(),
                    SalePrice = product.SalePrice,
                    OnSale = product.OnSale,
                    Price = product.Price
                };
 }