![WebSphere Commerce Enterprise](../../com.ibm.commerce.base.doc/images/ngent.gif)
Free gift pop-up
Customers can use the free gift pop-up to select
a free gift when they qualify for an order-level promotion.The
free gift chosen by the customer is added to their order during checkout.
Elements of the Free Gift Pop-up page
![Free Gift Pop-up page screen capture](../images/locale/screensnap/smelitefreegift.png)
JSP files
- PromotionChoiceOfFreeGiftsPopup.jspf represents the free gift selection
pop-up window.Includes:
- PromotionChoiceOfFreeGiftsPopupContent.jsp, which populates the pop-up window with content.
e-Marketing Spots
- There are no e-Marketing Spots on the Free Gift pop-up page.
Store functions
- AJAX checkout can be enabled or disabled.
- Promotion code entry field can be enabled or disabled.
- Promotion choice of free gift can be enabled or disabled.
Links and buttons
- 1 When the Select your
free gift button on the shopping cart page is clicked:
- PromotionChoiceOfFreeGiftsPopup is called,
and the PromotionFreeGifts_Context is updated
with the value of the RewardOptionID of the promotion.
This triggers the widget.refresh(renderContext.properties) function to be called in the controller mapped to the Refresh Area defined for the PromotionChoiceOfFreeGiftsPopup.jsp. This triggers the popup to be generated with the data extracted from the RewardOption object.
- PromotionChoiceOfFreeGiftsPopup is called,
and the PromotionFreeGifts_Context is updated
with the value of the RewardOptionID of the promotion.
- 2 When Close is clicked, the popup window is closed and the shopping cart is displayed.
- 3 When the Apply button
is clicked:
- AjaxOrderChangeServiceRewardOptionUpdate is
called if AJAX shopping cart is enabled.
- Double-click handling is implemented using JavaScript to prevent multiple requests from being sent.
- The cursor_wait() method is called and displays the progress bar.
- OrderChangeServiceRewardOptionUpdate is
called if AJAX shopping cart is disabled.
- Double-click handling is implemented using JavaScript to prevent multiple requests from being sent.
- AjaxOrderChangeServiceRewardOptionUpdate is
called if AJAX shopping cart is enabled.
- 4 When the Cancel button is clicked, the popup window is closed and the shopping cart is displayed.