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

Grant emailgrant at gmail.com
Mon Dec 21 15:16:11 UTC 2015


>> 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?

- Grant



More information about the interchange-users mailing list