Class Name

atg.commerce.promotion.CouponDroplet

Component(s)

/atg/commerce/promotion/CouponDroplet

The CouponDroplet servlet bean takes either a promotion object or promotion ID and generates a coupon for it in the Claimable repository.

Input Parameters

promoId (Either this or promotion must be used)
The ID of the promotion used to create the coupon.

promotion (Either this or promoId must be used)
The promotion object used to create the coupon.

Output Parameters

coupon
The coupon object. The claim code for this coupon can be obtained by using coupon.id. Note that claim codes for coupons are case-sensitive. For example, COUP100 and coup100 are two different claim codes.

Open Parameters

output
The open parameter rendered on successful creation of a coupon object.

error
The open parameter rendered if an error occurs during creation of a coupon.

Example

The following example shows the JSP code for the CouponDroplet:

<dsp:importbean bean="/atg/commerce/promotion/CouponDroplet"/>
<h2>here is a coupon that was created: </h2>
<dsp:droplet name="CouponDroplet">
<dsp:param value="promo60001" name="promoId"/>
<dsp:oparam name="output">
   <dsp:valueof param="coupon.id">no value</dsp:valueof>
</dsp:oparam>
<dsp:oparam name="error">
</dsp:oparam>
</dsp:droplet>
 
loading table of contents...