Re: [Catalyst] how to do persistent session data (aka shopping cart) in catalyst?

2018-04-26 Thread Fernan Aguero
Thanks for all the responses.

So, it's just a matter of using standard Catalyst::Plugin:Session, and
maybe also Catalyst::Plugin::Session::Store::DBIC and then write some
business logic to either use the session_data from the sessions table
(anonymous user) or the session_data from the users table (logged in user)?
I'd appreciate if you can share more details on the implementations
(plugins you use/recommend?)

I'm asking because we used to have an old catalyst app relying on
Catalyst-Plugin-Session-PerUser for this, but it's currently broken. It
used to work well with the older (deprecated) Authentication::Store::DBIC,
but switching to the current Catalyst-Authentication-Store-DBIx-Class
breaks it.

Anyway, I assume that so far, with the info we have, we will have to
rewrite the logic within Catalyst-Plugin-Session-PerUser in our app.

Cheers,

--
fernan

On Thu, Apr 26, 2018 at 11:54 AM, Hector Azpurua 
wrote:

> Hi Fernan,
>
> The I did for a small/medium size enterprise it was:
>
>- Cart data is stored at DB level, so the information can be
>replicated among all devices and browsers sessions.
>- If an Anonymous user has cart data and then log in, then merge
>previous stored cart with the new cart (business rules apply here).
>
> It wasn't difficult to implement using the already available catalyst
> plugins and, if needed, JSON serialization.
>
> Good luck!
>
>
> 2018-04-26 11:31 GMT-03:00 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
>> ii) keep session data across sessions, and across browsers (e.g. computer
>> at home, resume session using computer at work)
>> iii) allow users to start working anonymously, then merge session data
>> (shopping cart) smartly upon logging in
>>
>> Thanks for any pointer. Cheers,
>>
>> --
>> fernan
>>
>> ___
>> List: Catalyst@lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive: http://www.mail-archive.com/ca
>> tal...@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>>
>>
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/
> catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>


-- 
fernan
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] how to do persistent session data (aka shopping cart) in catalyst?

2018-04-26 Thread Hector Azpurua
Hi Fernan,

The I did for a small/medium size enterprise it was:

   - Cart data is stored at DB level, so the information can be replicated
   among all devices and browsers sessions.
   - If an Anonymous user has cart data and then log in, then merge
   previous stored cart with the new cart (business rules apply here).

It wasn't difficult to implement using the already available catalyst
plugins and, if needed, JSON serialization.

Good luck!


2018-04-26 11:31 GMT-03:00 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
> ii) keep session data across sessions, and across browsers (e.g. computer
> at home, resume session using computer at work)
> iii) allow users to start working anonymously, then merge session data
> (shopping cart) smartly upon logging in
>
> Thanks for any pointer. Cheers,
>
> --
> fernan
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/
> catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/