[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] How to store, load and/or delete the cart into/from anotherDB (notuserdb)?
> > > I've no luck with the mail archives. How can I store, load, and delete a
> > > cart from another db (for example carts.gdbm). Per default, the
> > > foundation store uses userdb.gdbm. But I want to use another DB file for
> > > the carts.
> > >
> > Pass the "database" parameter to the [userdb] tag to specify the table
> > you want to use, like this:
> >
> > [userdb function="set_cart" database="carts"]
> >
> I'm in a muddle!
> I've
>
> [set Save Cart]
> mv_todo=return
> mv_nextpage=warenkorb
> save_cart=cart
> [save_cart nickname="[value c_nickname]" recurring="[value
> c_recurring]"]
> [/set]
>
> Shall I use the codes
>
> [set Save Cart]
> mv_todo=return
> mv_nextpage=warenkorb
> save_cart=cart
> [userdb function="set_cart" database="carts"]
> [/set]
>
This will save a cart, into your "carts" table, using the user-supplied
"c_nickname" value:
[userdb function="set_cart" nickname="[value c_nickname]" database="carts"]
The [save-cart] UserTag you were using doesn't accept a "database"
parameter. You could easily modify that tag if you decide that you
need that functionality.
>
> I've no clue to understand you right or to get the rigth light in my
> head. :-(
>
> If a lot of users use the same nickname, it is sure that all different
> user get the right content of the stored basket by his/here username,
> password and nickname?
>
Each user has their own row in the userdb table (and/or the table you
specify to the [userdb] tag). Each user can specify their own set of
nicknames. Saving a cart using a nickname specified by one user will
not overwrite another user's cart, even if the other user specifies the
same nickname.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/