Prices feature overviewEdit on GitHub
A price can be attached to an abstract product or a concrete product. The price is stored as an integer in the smallest unit of the currency—for example, for Euro, that would be cents (100 = 1,00 EUR).
Each price is assigned to a price type such as DEFAULT or ORIGINAL. There can be one to N product prices defined for a price type. The price type entity is used to differentiate between different use cases. You use DEFAULT to define the customer’s price at the checkout. You use ORIGINAL to define the previous price of this product like a sale pricing.
The price can have GROSS or NET value which can be used based on a price mode selected by the customer in Yves. For example, you can run the shop in both price modes and select the NET mode for business customers. Price also has currency and store assigned to it.
As a general rule, if a concrete product doesn’t have a specific entity stored, it inherits the values stored for its abstract product. It means that when getting the price entity for a particular product, first, a check is made if a price is defined for the SKU corresponding to that product: if yes, then it returns that price, but if not, then it queries an abstract product linked to that product and checks if it has a price entity defined.
If it still can’t find a price, it throws an exception. It shouldn’t happen if the prices of the products are up to date.
The following diagram summarizes the logic for retrieving the price for a product:
The concerns for the product price calculation are the following:
- Retrieve valid price for the product.
- Calculate the amount of tax.
- Product Option prices selected for the product (warranty or gift wrapping).
Related Business User articles
|BACK OFFICE USER GUIDES|
|Get a general idea of Volume Prices|
|Define prices when creating abstract products and product bundles|
|Edit prices of an abstract product|
|Define prices when creating a concrete product|
|Edit prices of a concrete product|
Are you a developer? See Prices feature walkthrough for developers.
For submitting the form