Prices feature overview

Edit on GitHub

A price can be attached to an abstract product as well as to 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.

Each price is assigned to a price type (for example, gross price, net price) and for a price type there can be one to n product prices defined. Price type entity is used to differentiate between use cases: for example, we have DEFAULT and ORIGINAL type where we use it for sale pricing.

The price can have gross or net value which can be used based on a price mode selected by customer in Yves. You can have shop running in both modes and select net mode for business customer, for example. Price also has currency and store assigned to it. Price calculation

Price inheritance

As a general rule, if a concrete product doesn’t have a specific entity stored, then it inherits the values stored for its abstract product. This means that when getting the price entity for a specific 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, then it throws an exception. Basically, this shouldn’t happen if the products have been exported and are up to date.

The following diagram summarizes the logic for retrieving the price for a product: Price retrieval logic

Price calculation

The concerns for the product price calculation are the following:

  • Retrieve valid price for the product.
  • Calculate amount of tax.
  • Price for the options that were selected for the product (for example, frame or fabric).
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
Developer guides

Are you a developer? See Prices feature walkthrough for developers.