Jump to content
Larry Ullman's Book Forums

Recommended Posts

First off, excellent books. I've read 2 of your other ones as well. They have been helpful, and your way of explaining things gets through to me where other authors have not. 

 

I have been working on an ecommerce site for a few months now. I bought your book to assist me with the shopping cart part of it because I'm fairly new to programming, and I know how critical the actual cart and payment stuff is. I also prefer to not have user registration except for the admin part of it. So my questions are: I may be looking at this wrong, but I was wondering if the carts table you have designed in your book will be storing the same user_session_id  multiple times for each different item in their cart? On the page with the db design, there is a note that customers may be repeated in customers table. A couple pages later, after you have explained about the shopping cart, there is a tip that says customers may be repeated in customers table. Is this a mistake? Should it say carts table?

 

I sort of figured I just didn't understand this, and I created a less elaborate scheme where one table will more or less give me what i need by just putting cookie id, prod id, and qty in one table, and by using joins i can generate what's in their cart. If they checkout, I can then save the necessary order info to an orders table. Is this a bad way to do it, and if so, will you explain how I might be misunderstanding the carts part of your db setup. My book is the kindle edition bought off amazon. Thanks in advance. 

Share this post


Link to post
Share on other sites

Hello. Thanks for the nice words! Much appreciated.

 

Yes, the shopping carts table will store the same session ID multiple times, once for each item per customer. The customers will be repeated in the customers table. The session IDs will be repeated in carts. 

 

I'm not quite following how what you did is different from what the book does. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...