Table of Contents

Class PriceListViewModel

Namespace
Dynamicweb.Ecommerce.ProductCatalog
Assembly
Dynamicweb.Ecommerce.dll

Represents a single quantity-price tier for a product, enabling volume-discount price tables in Razor templates.

public class PriceListViewModel : FillableViewModelBase
Inheritance
PriceListViewModel
Inherited Members

Remarks

A product's quantity prices are exposed as ProductViewModel.Prices — a list of PriceListViewModel entries ordered by quantity threshold. For example, a product might have tiers of 1 unit at $110 and 10 units at $100. Use this to render a pricing table:

@foreach (var tier in Model.Prices)
{
    <tr>
        <td>@tier.Quantity+</td>
        <td>@tier.Price.PriceFormatted</td>
    </tr>
}

Properties

Price

Gets or sets the price for this quantity tier, including formatted and VAT variants.

public PriceViewModel Price { get; set; }

Property Value

PriceViewModel

Quantity

Gets or sets the minimum quantity at which this price tier applies (e.g. 10 means the tier price is used when 10 or more units are ordered).

public double Quantity { get; set; }

Property Value

double

StockLocationId

Gets or sets the stock location ID this tier is associated with. 0 means the tier applies to the default stock location.

public long StockLocationId { get; set; }

Property Value

long

UnitId

Gets or sets the unit ID this tier applies to (e.g. "pcs"). An empty string means the tier applies to the product's default unit.

public string UnitId { get; set; }

Property Value

string

See Also

To top