Technote

(troubleshooting)
Free gift promotion is lost for a guest user
Problem(Abstract)
When you enable persistent cookies in WebSphere Commerce, a guest user is able to add items to the shopping cart and is able to view the same shopping cart on a new separate browser window on the same computer.
The guest user then enters a promotion code to add a free gift to the shopping cart. When the same user opens a new web browser, again on the same computer, they see the added item and the "free" gift in the shopping cart, but the "free" gift is no longer free. There is a cost associated with the gift.
Symptom Cause This is a known issue in WebSphere Commerce. When the guest user views the shopping cart on the second browser, the shopping cart is migrated from the "original" guest user to the "new" guest user. The issue prevents the promotion to migrate successfully across the guest shopping carts.
This issue happens only for a guest shopper and for a free gift promotion, when persistent session is enabled in WebSphere Commerce. Resolving the problem This is a known issue in WebSphere Commerce and is fixed by APAR JR27841. Please contact IBM Support to obtain this APAR.

After installing the APAR, there are changes needed to be made on the shopping JSP in order for this APAR to take effect:

This change is required for the ConsumerDirect store model only since the business-to-business store model already has this change in place.

For every JSP page that makes the call to OrderCalculate, pass in the additional parameter calculationUsageId=-1. Otherwise, the discount won't be calculated and the free gift will not be recognized as free.

For example, for the MiniShopCartDisplay.jsp located under the Stores.war/ConsumerDirect/include, make the following change:

<%-- Display the MiniShopCart image --%>
<td align="right" class="s_text" id="WC_MiniShopCartDisplay_TableCell_3_1">
<a href="OrderCalculate?calculationUsageId=-1&URL=OrderItemDisplay?errorViewName=OrderItemDisplayViewShiptoAssoc&storeId=<c:out value="${WCParam.storeId}"/>&catalogId=<c:out value="${WCParam.catalogId}"/>&orderId=." class="s_link" id="WC_MiniShopCartDisplay_Link_2_1">
<img src="<c:out value="${jspStoreImgDir}${vfileColor}cart.gif"/>" border="0" alt="<fmt:message key="MINI_CART" bundle="${storeText}" />" /></a>
</td>
<td align="left" valign="middle" class="s_text" id="WC_MiniShopCartDisplay_TableCell_3_2">
<a href="OrderCalculate?calculationUsageId=-1&URL=OrderItemDisplay&errorViewName=OrderItemDisplayViewShiptoAssoc&storeId=<c:out value="${WCParam.storeId}"/>&catalogId=<c:out value="${WCParam.catalogId}"/>&orderId=." class="s_link" id="WC_MiniShopCartDisplay_Link_2_2">
 

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21294147