You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2017/08/22 08:13:00 UTC

[jira] [Closed] (OFBIZ-9336) Ecommerce login/logout events don't work properly for Shopping Cart

     [ https://issues.apache.org/jira/browse/OFBIZ-9336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-9336.
----------------------------------
       Resolution: Cannot Reproduce
         Assignee: Jacques Le Roux
    Fix Version/s: Upcoming Release

I guess this has been fixed with OFBIZ-9240, please confirm on your side

> Ecommerce login/logout events don't work properly for Shopping Cart
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-9336
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9336
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: Release Branch 15.12, Release Branch 16.11
>         Environment: Linux, PostgreSQL
>            Reporter: Alexander Tzvetanov
>            Assignee: Jacques Le Roux
>             Fix For: Upcoming Release
>
>
> How to reproduce:
> 1. Sign in;
> 2. Add more than two items in the shopping cart;
> 3. Sign out (or close the browser);
> 4. Sign in back again.
> You will see that only one item is restored back in the shopping cart (instead of many). The other items are not restored back there.
> 5. In the system console appears an error that show that you do not have permissions to modify somebody else's  shopping cart.
> This error prevents the items that are in the user's list to be completely restored. Only first item stays restored in the cart.
> What caused this:
> Since I tracked the sign-in process I found the following events order:
> The events that occurred during the login process are:
> 1. Pre-processor calls "keepCartUpdated". However at this time the session context is not still in "signed in" stage, and the shopping cart object is restored as from an anonymous user;
> 2. Log-in has been  called afterwards, and session becomes "signed in" with the user;
> 3. At the end the "logIn" function calls "after-login" section, described in "context.xml" file;
> 4. In "after-login" section, there is again "keepCartUpdated" listed. It is there in order to update the shopping cart with the new context including the logged in user.
> However, because "preprocessor" already called "keepCartUpdated", Ofbiz skipped to call this event handler again. And as a result the shopping card stays "anonymous".
> How I fixed this issue on my side:
> I just renamed "keepCartUpdated" event to "keepCartUpdated1" in the "after-login" section in "context.xml" and shopping cart worked correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)