Class PriceHelper
- Namespace
- Dynamicweb.Ecommerce.Prices
- Assembly
- Dynamicweb.Ecommerce.dll
PriceHelper class. This class cannot be inherited.
- Inheritance
-
Price
Helper
- Inherited Members
Properties
PricesInDatabaseIncludeVat
Gets a value indicating whether prices in the database include VAT.
Property Value
- bool
true
if prices in the database include VAT; otherwise,false
.
SystemVat
Gets the system VAT.
Property Value
- double
System VAT.
Remarks
This is the VAT percent on prices in database.
Methods
ConvertToPIP(Currency?, double)
Converts the given amount to a value in the smallest monitary unit for the given Currency. If the currency doesn't have a culture, it's assumed that the currency uses 2 decimals.
Parameters
currency
CurrencyThe currency that is used to determine the smallest monitary unit.
amount
doubleThe amount to convert to PIP.
Returns
- long
The converted amount in PIP.
Round(Currency?, double)
Parameters
Returns
Round(int, double)
Parameters
Returns
ShowPrice(Price, PriceContext, Product, bool)
Check if a price should be shown in a list of prices in a given context. Same as Find
public static bool ShowPrice(Price price, PriceContext context, Product product, bool isInformative)
Parameters
price
PriceThe price.
context
PriceContext The price context.
product
ProductThe product.
isInformative
boolif set to
true
[is informative].
Returns
- bool
true
if the price should be shown,false
otherwise.