Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hey all,

I have a question. I'm making a site which lists items, with some data like a title, price, quantity etc. Visitors of the site should be able to add these items to something like a shopping cart, which if I was using just PHP would do using the session. I was wondering if I'ts possible to add variables to a couch like session? Example, when I'm at productpage.php and I click 'add to list', it goes to productpage.php?addtolist, and It adds the item to the couch session.

When the user is done, I want to send an email with the list of items they selected, so read the sessions data.

Is this possible with couch? Or can I use the PHP session in a way with couch?

It would be possible to do this using a session in a php file, and call the php file with get or post using Javascript (sending the data from couchcms like id, name, imageurl, price etc with it), make a sendmail.php which send the mail using the php session, but that would make it quite insecure..

Thanks a lot in advance!

Jan
Hi,

Couch has a simple cart module of its own.
If all you need is a cart, you can take a look at it to see if it fits your requirements - viewtopic.php?f=5&t=7377

The link above also documents the tags for setting session data.

Hope it helps.
2 posts Page 1 of 1