| Class Name | 
 | 
|---|---|
| Component(s) | 
 | 
The PriceItem servlet bean is used to dynamically price a single item by taking promotions into account. Note that it does not apply order-dependent promotions, but only those that apply at the item level. If you need to show only a static price, you can retrieve the list or sale price directly from the SKU object.
The PriceItem servlet bean is instantiated from atg.commerce.pricing.PriceItemDroplet, which extends atg.commerce.pricing.ItemPricingDroplet.
For information on a servlet bean that can be used to price dynamically a collection of items, refer to PriceEachItemDroplet.
Input Parameters
item (Required)RepositoryItem that represents the item to be priced, or a CommerceItem that can be priced directly. If the supplied item is a RepositoryItem, then a new CommerceItem is created for pricing.
pricingModels
ThePricingModelHolder component is used. This component is resolved through the userPricingModelsPath property.
locale
T
profileprofilePath.
product
elementNameoutput open parameter.
quantity
The Long quantity of the input product that should be priced. This parameter is used when constructing a CommerceItem from the supplied information.
Output Parameters
element
TCommerceItem. This parameter name can be changed by setting the elementName input parameter.
Open Parameters
outputCommerceItem has been priced successfully.
Example
In the following example, the promotions, locale and profile are extracted from the request because they are not supplied as parameters.
<dsp:droplet name="/atg/commerce/pricing/PriceItem"> <dsp:param param="sku" name="item"/> <dsp:param param="product" name="product"/> <dsp:param value="pricedItem" name="elementName"/> <dsp:oparam name="output"> <dsp:valueof param="pricedItem.priceInfo.amount" converter="currency"> no price</dsp:valueof> </dsp:oparam> </dsp:droplet>

