<div dir="ltr">Dear Fernan Aguero,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 26, 2018 at 11:31 AM, Fernan Aguero <span dir="ltr">&lt;<a href="mailto:fernan.aguero@gmail.com" target="_blank">fernan.aguero@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>what is the current recommended way of developing a persistent shopping-cart-style functionality in a catalyst app? </div><div><br></div><div>We would like to be able to support the following:</div><div>i) store session data in the server for logged in users </div></div></blockquote><div> </div><div><span style="color:rgb(255,0,255)">To store session data in the server you only need to identify your logged in user and create the data on the server db. </span><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>ii) keep session data across sessions, and across browsers (e.g. computer at home, resume session using computer at work)</div></div></blockquote><div> </div><div><span style="color:rgb(255,0,255)">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. <br></span></div><div><span style="color:rgb(255,0,255)">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.</span><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>iii) allow users to start working anonymously, then merge session data (shopping cart) smartly upon logging in </div></div></blockquote><div> </div><div><span style="color:rgb(255,0,255)">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.<br></span></div><div><span style="color:rgb(255,0,255)">Then when the user signs up, your app will update the cart owner to your user_id.</span><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks for any pointer. Cheers,<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_-8883498035916062057gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:12.8px">fernan</span></div></div></div>
</font></span></div></div>
<br>______________________________<wbr>_________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-<wbr>bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" rel="noreferrer" target="_blank">http://www.mail-archive.com/<wbr>catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div><br></div></div></div>