Class Name

atg.commerce.promotion.ClosenessQualifierDroplet

Component

atg/commerce/promotion/ClosenessQualifierDroplet

The ClosenessQualifierDroplet renders a list of closenessQualifier items associated with a given order. You can limit the type of closenessQualifiers that are returned by specifying a type: item, order, shipping and tax.

Input Parameters

elementName
Names an output parameter that holds the returned closenessQualifiers. If no value is specified here, the closenessQualifers output parameter is used.

order
The order ID for which you want to access closenessQualifiers. If no order is specified here, the order ID is taken from the active shopping cart. The shopping cart is located through a reference from ClosenessQualiferDroplet.promotionUpsellTools property to the /atg/commerce/promotion/PromotionUpsellTools.shoppingCartPath property.

type
The type of closenessQualifier you want to access. Options include: item, order, shipping, tax, and all. Note that a value of order does not indicate that all closenessQualifiers for an order should be returned, but rather that closenessQualifiers designated for the order item type should be returned. Omitting this parameter causes Promotion Upsells of all types to be returned.

Output Parameters

closenessQualifiers
The list of Promotion Upsells returned for the specified order. This parameter is applicable only when a replacement has not been specified by the elementName input parameter.

errorMsg
The error message to display to the user if an error occurs.

Open Parameters

empty
This parameter is rendered if no Promotion Upsells are returned.

error
This parameter is rendered if an error occurs during processing.

output
This parameter is rendered if Promotion Upsells are returned.

Example

In this example, the ClosenessQualifierDroplet determines whether the active user has earned any shipping-related Promotion Upsells. Excluding the order parameter causes Core Commerce to make this determination based on the items in the current user’s shopping cart. When the user is eligible for a Promotion Upsell, the associated media item displays a message to the user.

<dsp:droplet name="/atg/commerce/promotion/ClosenessQualifierDroplet">
  <dsp:param name="type" value="shipping"/>
  <dsp:param name="elementName" value="closenessQualifiers"/>
  <dsp:oparam name="output">

     <dsp:droplet name="/atg/dynamo/droplet/ForEach">
       <dsp:param name="array" param="closenessQualifiers"/>
       <dsp:param name="elementName" value="closenessQualifier"/>
       <dsp:oparam name="output">

        <dsp:getvalueof id="media_url"
         param="closenessQualifier.upsellMedia" idtype="String">
         <dsp:include page="<%=media_url%>"/>
        </dsp:getvalueof>

       </dsp:oparam>
     </dsp:droplet>

  </dsp:oparam>
</dsp:droplet>

Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices