Dear Fernan Aguero,

On Thu, Apr 26, 2018 at 11:31 AM, Fernan Aguero <>

> Hello,
> what is the current recommended way of developing a persistent
> shopping-cart-style functionality in a catalyst app?
> We would like to be able to support the following:
> i) store session data in the server for logged in users

To store session data in the server you only need to identify your logged
in user and create the data on the server db.

ii) keep session data across sessions, and across browsers (e.g. computer
> at home, resume session using computer at work)

If you want to keep data across sessions and across browsers and across
computers, that means you must save data on the back end. ie create a table
with cart and cart_products.
Then when user creates a cart you assign it a user_id. That way when your
user logs in another computer you will able to load his cart.

iii) allow users to start working anonymously, then merge session data
> (shopping cart) smartly upon logging in

For this you need to create a cart on the database and associate it with a
user session cookie. then the user will associate multiple products into
his cart and your app will have to save that information on the database.
Then when the user signs up, your app will update the cart owner to your

> Thanks for any pointer. Cheers,
> --
> fernan
> _______________________________________________
> List:
> Listinfo:
> Searchable archive:
> Dev site:
Searchable archive:
Dev site:

Reply via email to