How do I make a cart persistent?
Permalink
I am in the process of moving a site to C5 eCommerce. My client has customers who login and build a cart over several weeks of consideration through numerous login and logout, with browsers closing, PCs being switched off and such.
The current C5 cart appears to be destroyed at the end of a browser session. This is just about OK for an anonymous user, but will not be acceptable for my client's long term users who are used to their cart being persistent across successive logins.
Is there something wrong with my setup, or is non-persistent carts the designed behaviour?
Any tips on how to change this to be persistent?
Ideally I would like to tie a cart to a cookie for anonymous users, and to a user's account for those that login.
The current C5 cart appears to be destroyed at the end of a browser session. This is just about OK for an anonymous user, but will not be acceptable for my client's long term users who are used to their cart being persistent across successive logins.
Is there something wrong with my setup, or is non-persistent carts the designed behaviour?
Any tips on how to change this to be persistent?
Ideally I would like to tie a cart to a cookie for anonymous users, and to a user's account for those that login.
Place the code below in the theme header.
There may be a better solution using events (which Ryan also gave some tips for), but this was quick and easy