tags:

views:

50

answers:

3

I'm a php noob attempting my first shopping cart. I intend to use paypal checkout when the cart is ready. I'm having fun playing with this but need assistance.

Here is what I got so far: futurekode.com/uikits/store.php

I'm using form post to send the quantities to the cart.php page.

My question is how do I populate the table on the cart.php page with all the info like product name and price? Do I need to setup a database or could I use hidden inputs?

Any advice and sample code is appreciated

Thanks in advance

+1  A: 

Database will be the preference, for persistence, but you can use a session which will be much better than hidden inputs.

Brad F Jacobs
how would I use session for this.. can you give example? Thanks
FutureKode
A: 

As a self-admitted PHP 'noob', would it not be better for you to use a free shopping cart system such as Zen Cart or Cube Cart?

These pre-existing shopping carts will be able to offer you a much quicker solution as you won't need to code them, will likely have better security in place, and even integration with PayPal.

Saladin Akara
It probably would be easier/quicker, but this cart is going to be a very simple operation so I want to do it myself for the challenge and the experience.
FutureKode
A: 

As you said you will be appreciating some code let me first give you the link for PHP Paypal SDK with which you can use following options for your checkout PAYPAL PHP SDK

 DoDirectPayment - Sale
 DoDirectPayment - Authorization
 ExpressCheckout - Sale
 ExpressCheckout - Authorization
 ExpressCheckout - Order
 DoDirectPayment - 3DSecure - Sale 

Just download sdk for php from here reflect your paypal test account changes and enjoy the code

Wazzy