Mark Steggles
Mark Steggles

Reputation: 5573

coding first php cart - advice needed

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

Upvotes: 1

Views: 257

Answers (3)

Wasim Karani
Wasim Karani

Reputation: 8886

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

Upvotes: 0

Saladin Akara
Saladin Akara

Reputation: 2548

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.

Upvotes: 0

Jim
Jim

Reputation: 18853

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

Upvotes: 1

Related Questions