Creating an eShop?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Re: Creating an eShop?

Post by Sindarin »

But you can't maintain that data with a cookie though as it always expires sometime.

I've been reading about sessions and cookies, I think I understand the concept, but I can't figure out what to store for example when a user clicks on "Add to Cart " and "Checkout".
I finally understood the concept. Sessions are somewhat personalized server variables which are maintained on the server and not the client, like if a visitor wants to keep their personal settings on your server and not on their computer. However cookies are more immediate though they can be tampered if your are not careful. Maybe I am missing a couple of things but I think that's the main concept.
Also. What if the user has cookies disabled? Maybe sessions would be a better way to go for transient information.
A lot of web apps today require cookies on, including this board. Javascript and cookies have become a necessity nowadays, which is good for both developers and users. Developers have more options on how to deliver and store information while users have more convenience providing and have that information stored.
Try mine, I've just released a new version.
I'll look into it. :)
I'd say go for it. Yes its hard, but time cannot be created or destroyed, only be allocated. So why not pursue your dreams? You may fall in the process, but if you get back up eventually you'll learn to walk instead of crawl, and run instead of walk. Creating a basic store is actually not that hard, I've done it several times. Since you have a working CMS you just need to be able to store a single photo + price with each page, call it item instead of page, make a basic cart class that stores items in a session, and implement a checkout routine that collects info and stores it in a table. You can administer the thing thru phpmyadmin until you feel like creating yourself an admin panel.
I'd have to say that the admin panel is my favorite part to make in a CMS. :D
Post Reply