Jump to content
Larry Ullman's Book Forums

Adding Products To Cart And View Cart Items (Paypal) - Session User Id


Recommended Posts

I have merged projects one (knowledge) and two (coffee) into my own e-commerce project. However I have some questions.

 

1. When a user adds an item to their cart (I'm selling physical products) to a PayPal cart, I don't want any user to be able to do it, I want it only done by regsitered users who are logged in. How is this achievable?

 

2. I have created an Orders table (based on the one used in Knowledge is Power) but it is pretty redundant at the moment and I have NOT inserted any data into it yet as I have no idea how to use it.

 

I know this sounds rather complicated but help would be very very appreciated please.

Link to comment
Share on other sites

1. have you set up a user table and are you storing user details? When a user logs in, start a session with his username or id. Then you can check that the session username or id is set before giving him the option to add items to the cart.

 

2. it sounds like you're not clear on how your site will work. If I remember correctly, the orders table in the Knowledge is Power site is used to record all the transactions that go through PayPay so if you there are any queries you have a record to refer back to without have to go through PayPal to get the info. I'm sure its all documented in the book so you may want to refer to that chapter.

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...