Table of Contents

Class CartViewModel

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll

CartViewModel represents the rendering context used when a cart is rendered. It is available on the PageViewModel so you can render a minicart in frontend.

public class CartViewModel : ViewModelBase
Inheritance
CartViewModel
Inherited Members

Constructors

CartViewModel()

Initializes a new instance of the CartViewModel class.

public CartViewModel()

Properties

CartOrderlines

Gets or sets the current cart orderlines.

public IList<CartOrderlineViewModel> CartOrderlines { get; set; }

Property Value

IList<CartOrderlineViewModel>

The current cart.

ID

Gets or sets the identifier.

public string? ID { get; set; }

Property Value

string

The identifier.

IsEmpty

Gets or sets the whether the cart is empty.

public bool IsEmpty { get; set; }

Property Value

bool

Cart is empty.

OrderlinesCount

Gets or sets the number of orderlines in the cart.

public int OrderlinesCount { get; set; }

Property Value

int

The number of orderlines.

PaymentFee

Gets or sets the price viewmodel for payment fee.

public PriceViewModel? PaymentFee { get; set; }

Property Value

PriceViewModel

The price viewmodel for payment fee.

PaymentMethod

Gets or sets the payment method.

public string? PaymentMethod { get; set; }

Property Value

string

The payment method.

ProductsCount

Gets or sets the number of products in the cart.

public int ProductsCount { get; set; }

Property Value

int

The number of products.

ShippingFee

Gets or sets the price viewmodel for shipping fee.

public PriceViewModel? ShippingFee { get; set; }

Property Value

PriceViewModel

The price viewmodel for shipping fee.

ShippingMethod

Gets or sets the shipping method.

public string? ShippingMethod { get; set; }

Property Value

string

The shipping method.

TotalDiscount

Gets or sets the price viewmodel for total discount.

public PriceViewModel? TotalDiscount { get; set; }

Property Value

PriceViewModel

The price viewmodel for total discount.

TotalPrice

Gets or sets the price viewmodel for total price.

public PriceViewModel? TotalPrice { get; set; }

Property Value

PriceViewModel

The price viewmodel for total price.

TotalPriceWithoutDiscounts

Gets or sets the price viewmodel for total price without discounts.

public PriceViewModel? TotalPriceWithoutDiscounts { get; set; }

Property Value

PriceViewModel

The price viewmodel for total price without discounts.

TotalPriceWithoutDiscountsFeesAndTaxes

Gets the total price without discounts, fees and taxes.

public PriceViewModel? TotalPriceWithoutDiscountsFeesAndTaxes { get; set; }

Property Value

PriceViewModel

TotalPriceWithoutFees

Gets or sets the price viewmodel for total price without fees.

public PriceViewModel? TotalPriceWithoutFees { get; set; }

Property Value

PriceViewModel

The price viewmodel for total price without fees.

TotalPriceWithoutOrderDiscountsAndFeesAndTaxes

Gets the total price without order discounts, fees and taxes. This is the subtotal of all products with discounts, but without any order discounts, fees and taxes.

public PriceViewModel? TotalPriceWithoutOrderDiscountsAndFeesAndTaxes { get; set; }

Property Value

PriceViewModel

TotalProductsCount

Gets or sets the total count of products in the cart.

public double TotalProductsCount { get; set; }

Property Value

double

The total count of products.

See Also

To top