Price
Overview of the main price classes
classDiagram
direction BT
class Price {
CurrentPrice
ListPrice
ActiveFrom
}
class ProductVariant {
ProductVariantId
Name
Fields
}
class Product {
Id
Url
Images
Videos
Files
Breadcrumbs
Fields
}
ProductVariant --> Price
Product "1" --o "1..n" ProductVariant
A Price
is associated with a specific ProductVariant
.
It has a CurrentPrice
(sometimes also just referred to as "Price")
that holds the current price for the this particular product variant.
It also has a ListPrice
that is the normal price the product is sold for.
If the product is on sale then the CurrentPrice
is lower than the ListPrice
.
The Price
has an ActiveFrom
field that is optional.
If it has no value, then this price is always the current price
for the product variant. If ActiveFrom
is set, the price is only valid
from this point in time. This enables you to model price campaigns
by creating multiple prices, and it translates directly to the price model in Bizzkit Ecommerce Search.
Example campaign
Consider a product variant that has the following prices:
| CurrentPrice | ListPrice | ActiveFrom | |---|---|---|---| | 100 | 100 | null | | 80 | 100 | 2022-01-01 08:00:00 | | 100 | 100 | 2022-01-08 08:00:00 |
It will cost 100 and not be on sale until 8 AM the 1st of January 2022. Then it will cost 80 and be on sale for a week. Then it will go back to the old price, 100, from then on.
Currency and VAT
Prices are persisted in a specific segmentation. The currency and VAT comes from the segmentation instead of storing it together with each price value.