Commerce Reference Store product detail pages include the store.war/browse/gadgets/pickerPriceAttribute.jspf
page fragment. This page fragment determines how pricing information should be presented on the product detail page. There are two cases: a SKU is currently selected or no SKU is selected.
Rendering Prices for a Selected SKU
When a SKU is currently selected, the price information should reflect the price for that SKU only. In this case, pickerPriceAttribute.jspf
calls store.war/global/gadgets/PriceLookup.jsp
to render the SKU’s price. priceLookup.jsp
calls the /atg/commerce/pricing/priceLists/PriceDroplet
component twice, once with the price list stored in the customer’s priceList
property and a second time with the price list stored in the customer’s salePriceList
property. These two calls allow priceLook.jsp
to determine if the SKU is on sale and, if so, render the price information accordingly. If a sale price exists, priceLookup.jsp
shows sale price followed by the list price in strike-through format. If a sale price doesn’t exist, priceLookup.jsp
simply renders the list price.
This illustration shows the pricing portion of the product detail page for a SKU that is on sale:
This illustration shows the pricing portion of the product detail page for a SKU that is not on sale:
Rendering Prices When No SKU is Selected
When no SKU is selected, the price information should reflect the range of prices for all of the SKUs associated with the product. In this case, pickerPriceAttribute.jspf
calls store.war/global/gadgets/PriceRange.jsp
to render the price range. PriceRange.jsp
uses the atg/commerce/pricing/PriceRangeDroplet
to calculate the highest and lowest prices for a product’s constituent SKUs and then renders the results. This gadget takes sale prices into account when calculating the range, if they exist.