Technote

(troubleshooting)
Empty shopping cart after clicking the 'Forgot Password' link on the Registration page
Problem(Abstract)
Your shopping cart is empty after clicking the 'Forgot Password' link on the Registration page in the Consumer Direct store. Your shopping cart is empty when you arrive on the Password reset page.
Cause The logoff command is called before ResetPassword. Calling the logoff command resets the current user to the generic one (userID -1002). This will also make the shopping cart empty because the generic user does not have authority to have a shopping cart. Diagnosing the problem The following scenario will make the shopping cart empty:

On the Consumer Direct storefront, follow these steps:

  1. Make sure you are logged off.

  2. Add a product to the cart.

  3. Go to the registration (logon) page. (sign-in link at the top right of the storefront).

  4. Click the Forgot Password link.

Resolving the problem Change your flow and bypass the logoff command so you can go directly to the Password reset page.

  1. Locate the following file: Stores.war\ConsumerDirect\Snippets\Member\Registration\
    RememberMeLogonForm.jsp

  2. Make a backup copy of the file under a different name.

  3. Open the RememberMeLogonForm.jsp file.
    Locate the following snippet
            <c:url var="ForgetPasswordURL" value="Logoff">
            <c:param name="langId" value="${param.langId}" />
            <c:param name="storeId"
                 value="${param.storeId}" />
            <c:param name="catalogId"
                 value="${param.catalogId}" />
            <c:param name="state"
                 value="forgetpassword" />
           </c:url>

  4. Check your struts-config-ext.xml file to make sure this view matches PasswordResetForm.jsp.
    Change the ForgetPasswordURL value to ResetPasswordGuestErrorView.
            <c:url var="ForgetPasswordURL"
                   value="ResetPasswordGuestErrorView">
            <c:param name="langId"
                   value="${param.langId}" />
            <c:param name="storeId"
                   value="${param.storeId}" />
            <c:param name="catalogId"
                   value="${param.catalogId}" />
            <c:param name="state"
                   value="forgetpassword" />
           </c:url>

This change will ensure that you are redirected to the Password Reset page which asks for your login.
 

Document Information

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