-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathAddToCartResultVm.cs
More file actions
38 lines (24 loc) · 1.04 KB
/
AddToCartResultVm.cs
File metadata and controls
38 lines (24 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using SimplCommerce.Module.Catalog.Models;
using SimplCommerce.Module.Core.Services;
namespace SimplCommerce.Module.ShoppingCart.Areas.ShoppingCart.ViewModels
{
public class AddToCartResultVm
{
private readonly ICurrencyService _currencyService;
public AddToCartResultVm(ICurrencyService currencyService)
{
_currencyService = currencyService;
}
public string ProductName { get; set; }
public string ProductImage { get; set; }
public CalculatedProductPrice CalculatedProductPrice { get; set; }
public decimal ProductPrice { get; set; }
public string VariationName { get; set; }
public int Quantity { get; set; }
public int CartItemCount { get; set; }
public decimal CartAmount { get; set; }
public string ProductPriceString => _currencyService.FormatCurrency(ProductPrice);
public string CartAmountString => _currencyService.FormatCurrency(CartAmount);
public string CategoryName { get; set; }
}
}