Hi,
I'm working on very similar package (catalog) now and one of the
features is to remember favorite items.
At the moment I'm busy with other things, but I've taken brief thought
about this feature:
'favorite items' needs separate handling than user session because of
some differences:
In user session client-side part (cookies) have lifetime of browser
session - that means once you close the browser, cookie is destroyed
and thus link to server-side session is lost (IMHO this is disputable
if it's bug in Joomla or security feature).
Both will have different expiration time anyway (for security reasons
I can't leave user sessions opened long time).
For this reasons I'll probably need to use another place to store it
server-side (ie. JSessionStorageDatabase table '#__sessions' is being
cleaned of expired user sessions by garbage collector)
At the same time I'd like to use JSession library, I really like how
it's been done - but I'm not sure it's possible to use it if without
modifications.
So my idea is to make further research how it's been done in similar
scenarios and extend JSession library with features I need.
You can forget about using JFactory::getSession becaouse of this line:
$options['expire'] = ($conf->get('lifetime')) ? $conf->get('lifetime')
* 60 : 900;
ps:
I'd be happy to share other ideas/ solutions of the project with you.
On Mar 25, 2:30 pm, Valentin Despa <
i...@vdespa.de> wrote:
> Hello,
>
> I am looking for a solution to the following problem:
>
> In a component, in frontend, I would like to build a sort of a *'shopping
> cart' functionality, where everything that the user adds to the cart, will
> be saved for a defined time* (I wouldn't like to temper with