WebSphere Commerce Enterprise

Troubleshooting: Guest shopping in the advanced B2B direct store

When you try to log on to the storefront in an advanced B2B direct store, the Logon URL is used to log on to the system. If information already exists for the guest shopper, the guest shopper's basic information, such as their shopping cart, is merged with the registered user. You might experience the following problem with the shopping cart merge because of multiple pending shopping carts for the registered user.

Problem

Since only the LogOn URL is used in the storefront, there are multiple pending shopping carts for the registered user.
Note: By default, guest shopping is not supported in the advanced B2B direct store.

Solution

To merge the multiple shopping carts into a single shopping cart, customize the Stores\WebContent\AdvancedB2BDirect\UserArea\AccountSection\LogonSubsectionUser\UserLogonForm.jsp file. In the UserLogonForm.jsp file, replace <input type="hidden" name="URL" value="<c:out value="${continueAfterLogonURL}"/>" id="WC_UserLogonForm_FormInput_URL_In_Logon_1"/> with the following code snippet:
<c:url var="orderMove" value="OrderItemMove">
				<c:param name="URL" value="OrderCalculate?URL=StoreCatalogDisplay"/>
				<c:param name="page" value="account"/>
				<c:param name="fromOrderId" value="*"/>
				<c:param name="toOrderId" value="."/>
				<c:param name="deleteIfEmpty" value="*"/>
				<c:param name="continue" value="1"/>
				<c:param name="createIfEmpty" value="1"/>
				<c:param name="calculationUsageId" value="-1"/>
				<c:param name="updatePrices" value="1"/>
				<c:param name="storeId" value="${storeId}"/>
			</c:url>
			<input type="hidden" name="URL" value="<c:out value='${orderMove}' />" id="WC_RememberMeLogonForm_FormInput_URL_In_Logon_1" />
Note: This code snippet is provided only as an example. The parameters might be different in other scenarios to meet different requirements.