View Full Version : How to create your own shopping basket
Weirfire
Sep 28th 2004, 2:06 am
I'm considering several options for building my own shopping basket with PHP.
I'm thinking of using cookies to store the potential customers current choices of purchase. Would this be a wise decision or are there better solutions out there?
xml
Sep 28th 2004, 2:45 am
Cookies and session IDs are the main choices.
There can be some security risks with cookies, e.g. people could copy cookies (highly unlikely). This can easily be stopped by encrypting the data etc.
Amazon use the cookie method. Session ID's might screw with Googlebot and friends.
Foxy
Sep 28th 2004, 3:50 am
You should have a look at oscommerce
http://www.oscommerce.com/
It is open source and accepts NOCHEX for the english market :)
Fishing Forum
Sep 28th 2004, 4:01 am
Have a look at Cubecart (http://forums.cubecart.com/site/home/)
Very easy to use and mod plus supports most gateways
Helpful forum as well
Weirfire
Sep 28th 2004, 4:37 am
I think I might timestamp the cookies, hence making it almost impossible to copy.
Thanks for the links. I'm building a content management system however to sell my own shopping cart to businesses. I was worried about the security risk of cookies as xml stated so thought I'd ask what everyone else uses.
Would it even matter though if someone copied the cookies? If you display the items on the screen before checkout then it doesnt really matter whether you can copy them or not.
mopacfan
Sep 28th 2004, 6:41 am
I highly suggest using a database to store the session information. It's much more reliable than cookies, especially when the user has cookies turned off. If they do and you put up a message that they need to enable cookies, say bye-bye to a potential customer. You can set a session on the server and track by IP address as a backup if you have a database to store the rest of the session information.
Foxy
Sep 28th 2004, 6:46 am
I highly suggest using a database to store the session information. It's much more reliable than cookies, especially when the user has cookies turned off. If they do and you put up a message that they need to enable cookies, say bye-bye to a potential customer. You can set a session on the server and track by IP address as a backup if you have a database to store the rest of the session information.
Thats good advise mopacfan as I lost some customers for the very reason that the cookies were turned off.
Help Desk
Sep 28th 2004, 9:26 am
OS commerce seems to be the best. Some hosts even install it for you by default.
Weirfire
Sep 28th 2004, 3:20 pm
Thanks guys. Will definitely look into sessions now. I've heard they are nasty little things to learn though.
mushroom
Sep 28th 2004, 5:52 pm
I think I might timestamp the cookies, hence making it almost impossible to copy.
$id=uniqid(); could be what you are looking for.
http://fr.php.net/manual/en/function.uniqid.php
Weirfire
Sep 29th 2004, 2:04 am
Nice one mushroom
Thanks
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.