[ic] Load saved cart (but don't clobber)

Stefan Hornburg (Racke) racke at linuxia.de
Sun Dec 27 08:52:15 UTC 2015


On Wed, 23 Dec 2015 06:15:31 -0800
Grant <emailgrant at gmail.com> wrote:

> >>> Can I have the saved shopping cart associated with a user's
> >>> account loaded when they log in but combined with the current
> >>> cart contents instead of clobbering it?  
> >>
> >> Just put in a postlogin_action that calls the [load-cart] tag, it
> >> already merges by default, something like this in catalog.cfg
> >> should do it I think (untested):
> >>
> >> UserDB default postlogin_action [load-cart]  
> >
> >
> > I switched from this:
> >
> > [userdb function=get_cart nickname=shopping_cart]
> >
> > to this:
> >
> > [load-cart name=shopping_cart]
> >
> > and it's merging but if the same item is in the current cart and
> > loaded from the saved cart then they end up as separate line items.
> > Can I have them either de-duplicated or incremented in quantity on
> > the same line?  
> 
> 
> Isn't there a catalog config line for this?  I can't remember what
> it's called.

SeparateItems No

Regards
	Racke


-- 
Perl and Dancer Development

Visit our Perl::Dancer conference 2015.
More information on https://www.perl.dance.




More information about the interchange-users mailing list