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 开发者_JAVA技巧a database or could I use hidden inputs?
Any advice and sample code is appreciated
Thanks in advance
Database will be the preference, for persistence, but you can use a session which will be much better than hidden inputs.
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.
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
精彩评论