Shopping cart persistence for anonymous users

1,272 views
Skip to first unread message

Kishor

unread,
Oct 31, 2008, 1:44:07 PM10/31/08
to ATG_Tech
Hi All,

I have a requirement to persist shopping carts for anonymous users.
Based on ATG documentation, I changed userprofile repository and
defaulted autoLogin property to true, and set the following properties
in ProfileRequestServlet component
loadOrdersOnAutoLogin=true
persistentAnonymousProfiles=true
persistAfterLogout=true
sendLoginEventForNewPersistentAnonymousProfiles=true
verifyBasicAuthentication=false

Apart from this I set the following property in ShoppingCart component
persistOrdersForAnonymousUsers=true

After this, when I access the ATG commerce site as anonymous user,
from the logs I see that a anonymous profile id is being generated in
the CookieManager class and if I add items to shopping cart the order
is being saved in the database (DCSPP_ORDER table).

However, the DYN_USER_ID cookie is being set to expire immediately
after the session ends. So, if I close the browse window and access
the site again as anonymous user, a new anonymous user profile is
being created and the shopping cart is not being restored.

Any help in resolving this issue is greatly appreciated.

Thanks,
Kishor

aman bedi

unread,
Oct 31, 2008, 2:14:29 PM10/31/08
to atg_...@googlegroups.com
Hi,
 
You need to configure the CookieManager component -
sendProfileCookies=true
profileCookieMaxAge=(value in seconds). - This is originally set to -1 which is for transient(session) cookies and thats the reason the cookie is not persisted after the browser is closed.
 
Regards,
Aman Bedi

Kishor

unread,
Oct 31, 2008, 2:22:27 PM10/31/08
to ATG_Tech
Hi Aman,

Thanks for the reply. I missed mentioning it in the original post. I
did sent the sendProfileCookies = true and profileCookieMaxAge
properties in the CookieManager class. And the results as expected for
registered users (i.e. DYN_USER_ID cookie is being sent with the
correct expiration date and when the registered user accesses the web
site autoLogin functionality is working). However, these settings are
not working for anonymous users.

Thanks,
Kishor

On Oct 31, 11:14 pm, "aman bedi" <bedi.a...@gmail.com> wrote:
> Hi,
>
> You need to configure the CookieManager component -
> sendProfileCookies=true
> profileCookieMaxAge=(value in seconds). - This is originally set to -1 which
> is for transient(session) cookies and thats the reason the cookie is not
> persisted after the browser is closed.
>
> Regards,
> Aman Bedi
>

Kishor

unread,
Nov 3, 2008, 4:07:01 AM11/3/08
to ATG_Tech
Hi All,

I figured out the issue. I made the config changes to /atg/
userprofiling/ProfileRequestServlet component and not the /atg/dynamo/
servlet/dafpipeline/ProfileRequestServlet component and hence the
issue. I changed the /atg/dynamo/servlet/dafpipeline/
ProfileRequestServlet component's configuration and it is working fine
now.

Thanks,
Kishor
Reply all
Reply to author
Forward
0 new messages