Product.getPriceModel().getPrice()
. However, Commerce Cloud
Digital also supports tiered prices, meaning that higher quantities receive
a lower price. In this case, the merchant typically wants to display a table
of price points on product detail pages. Therefore, the ProductPriceModel
provides the method getPriceTable() to retrieve a table of these prices.
If a merchant wants to know not only what the price of a given product is,
but what price book the price was derived from, this class provides the
method getPriceInfo(). This class also provides methods to lookup
product prices in specific price books by name and quantity. See
getPriceBookPrice(String).getPrice()
but instead of just
returning the price value, it returns a ProductPriceInfo
which contains additional information such as the PriceBook which defined
the price and the percentage discount this price point represents.
If the product represented by this model is an option product, option
prices will be added to the price book price if the price model was
initialized with an option model.
If no price info could be found, null is returned.ProductPriceInfo
(s), calculated based
on base price quantity 1.00. This will return an empty list if getPriceInfo() would return null, and if there is
only one price info in the collection it will be the same price info as getPriceInfo(). Two or more price infos
indicate that there are that many price books that meet the criteria for returning the price shown in the
storefront.The product sales price per unit is returned for the current session currency. Hence, the using this method is only useful in storefront processes.
The price lookup is based on the configuration of price books. It depends on various settings, such as which price books are active, or explicitly set as applicable in the current session.
If no price could be found, MONEY.N_A is returned.
ProductPriceInfo
(s), calculated based on base price quantity 1.00.getPrice()
but instead of just
returning the price value, it returns a ProductPriceInfo
which contains additional information such as the PriceBook which defined
the price and the percentage discount this price point represents.
If the product represented by this model is an option product, option
prices will be added to the price book price if the price model was
initialized with an option model.
If no price info could be found, null is returned.getPrice(Quantity)
but instead of
just returning the price value, it returns a
ProductPriceInfo
which contains additional information such
as the PriceBook which defined the price and the percentage discount this
price point represents.
If the product represented by this model is an option product, option
prices will be added to the price book price if the price model was
initialized with an option model.
If no price info could be found, null is returned.ProductPriceInfo
(s), calculated based
on base price quantity 1.00. This will return an empty list if getPriceInfo() would return null, and if there is
only one price info in the collection it will be the same price info as getPriceInfo(). Two or more price infos
indicate that there are that many price books that meet the criteria for returning the price shown in the
storefront.The product sales price per unit is returned for the current session currency. Hence, the using this method is only useful in storefront processes.
The price lookup is based on the configuration of price books. It depends on various settings, such as which price books are active, or explicitly set as applicable in the current session.
If no price could be found, MONEY.N_A is returned.
The product sales price per unit is returned for the current session currency. Hence, the using this method is only useful in storefront processes.
The price lookup is based on the configuration of price books. It depends on various settings, such as which price books are active, or explicitely set as applicable in the current session.
If no price could be found, MONEY.N_A is returned.