Along with other common promotion elements, you can include promotion upsell opportunities in your promotion template. To do so, create a screen-segment
within the ui-description
to contain the upsell information. The screen-segment
should contain one or more line
elements to provide the closeness qualifier information.
The screen-segment
should also include the display-once=true
attribute. In Oracle ATG Web Commerce Merchandising, users can create promotion upsells directly from a promotion only during the initial promotion creation (additional options are available to users for creating promotion upsells; see the ATG Merchandising Guide for Business Users).
For example, consider a promotion “Spend over $100, get free shipping”. The closeness qualifier in this case is “spend over $X”. The user interface for this would be similar to the following:
<screen-segment display-name-resource="closenessQualifierTitle" display -once="true"> <line> <label id="spend_label" display-name="Amount to spend:"/> <textInput id="spend_textInput" placeholder-name="spend_value"/> </line> </screen-segment>
The matching item-properties
section in template must contain a property
named closenessQualifiers
, which contains the PMDL information required to build the closeness qualifier. The property would be similar to the following:
<item-properties> <property name="closenessQualifiers"> <item-properties> <property name="pmdlRule"> <![CDATA[ <pricing-model> <qualifier> <comparator name="greater-than-or-equals"> <value>order.priceInfo.amount</value> <constant> <data-type>java.lang.Double</data-type> <string-value> ${spend_value} </string-value> </constant> </comparator> </qualifier> </pricing-model> ]]> </property> </item-properties> </property> </item-properties>
You cannot nest multiple item-properties
elements within a property
element.