Class Name |
|
---|---|
Component(s) |
|
The PriceDroplet
servlet bean returns a price for a given product or SKU. PriceDroplet
should not be confused with PriceItemDroplet, which uses the PricingEngine
to actually calculate the price for a single item.
Input Parameters
product (Either this or sku
must be used)
The product for which a price is desired.
sku (Either this or product
must be used)
The SKU for which a price is desired.
parentSku
If the SKU to be priced is an option in a configurable SKU, this is the base sku item within the context of which the configurable option should be priced.
priceList
The priceList
from which to retrieve the price.
Output Parameters
price
The price repository item.
error
The error that occurred when retrieving the price.
Open Parameters
output
Rendered if the price for the product or SKU is retrieved successfully.
empty
Rendered if there is no price for the given product or SKU. If you are using combined price lists and SKU-based pricing, you can use this parameter to render the SKU-based price if there is no price list price for the item (see the Using Price Lists in Combination with SKU-Based Pricing section of the ATG Commerce Programming Guide for information on how to configure this feature).
Example
The following example illustrates the JSP code for the PriceDroplet
servlet bean:
<dsp:droplet name="/atg/commerce/pricing/priceLists/PriceDroplet"> <dsp:param name="sku" value="sku" /> <dsp:param name="product" value="product" /> <dsp:oparam name="output"> <dsp:droplet name="/atg/dynamo/droplet/Switch"> <dsp:param name="value" param="price.pricingScheme" /> <dsp:oparam name="listPrice"> <dsp:valueof param="price.listPrice" converter="currency">no price</dsp:valueof> </dsp:oparam> </dsp:droplet> </dsp:oparam> </dsp:droplet>