Class Name |
|
---|---|
Component(s) |
|
The GetApplicablePromotions
servlet bean is used to determine which item promotions can be applied to a given product or SKU.
The GetApplicablePromotions
servlet bean is instantiated from atg.commerce.pricing.GetApplicableItemPromotions
.
Input Parameters
item (Required)
A CommerceItem
that can be evaluated directly.
pricingModels
collection of pricing models (promotions) used to price the items. If this value is not supplied, then by default a collection of pricing models from the user’s
ThePricingModelHolder
component is used. This component is resolved through the userPricingModelsPath
property.
product
The object that represents the product definition of the item to evaluate. Typically, items are SKUs. In that case, this is the product of the given SKU.
elementName
The name to use as the parameter set within the output
open parameter.
quantity
The Long or Double quantity of the input product. This parameter is used when constructing a CommerceItem
from the supplied information.
Output Parameters
element
The evaluated CommerceItem
. This parameter name can be changed by setting the elementName
input parameter.
promotions
A collection of promotions that target this CommerceItem
.
Open Parameters
output
The open parameter rendered if the CommerceItem
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/GetApplicablePromotions"> <dsp:param name="product" param="product"/> <dsp:param name="item" param="product.childSkus[0]"/> <dsp:oparam name="output"> <dsp:droplet name="ForEach"> <dsp:param name="array" param="promotions"/> <dsp:oparam name="output"> Promotion: <dsp:valueof param="element.displayName"/><br> </dsp:oparam> </dsp:droplet> </dsp:droplet>