redarrow Posted July 14, 2006 Share Posted July 14, 2006 Hi there hope everyones ok and can help.At the moment i need to see a shopping cart and also the way you have inplemented the pay pal code please cheers.As you know, i no how to program a shooping cart but need to know the best way so any examples would be grate as i dont wont to spend wasting hours getting it wrong.This is also sometihnk i want to study so plase help cheers.as simple as ever cheers. Quote Link to comment https://forums.phpfreaks.com/topic/14580-i-would-like-to-see-a-shopping-cart-with-paypal-example-please/ Share on other sites More sharing options...
AndyB Posted July 14, 2006 Share Posted July 14, 2006 There's all sorts of information relevant to this available from the Merchant Tools section of www.paypal.com - information, guides, sample code, etc. is all there. Quote Link to comment https://forums.phpfreaks.com/topic/14580-i-would-like-to-see-a-shopping-cart-with-paypal-example-please/#findComment-57872 Share on other sites More sharing options...
redarrow Posted July 14, 2006 Author Share Posted July 14, 2006 Andy, I have been on that sight for 4 months once and we all agreed that the site of paypal was confusing so if you got a example of your own would be more usefull as i trust the user on here as the codes on paypal are all confussing or wrong cheers mate.Creating the shoppping cart is a more thing i need to know like the database format.as you can see i understand the paypal theory know its the cart i need to know cheers.[code]<?$sql = "SELECT * FROM PRODUCTS where ID=" . $ID;$result = @mysql_query($sql);while ($row=mysql_fetch_array($result)){?><form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_xclick"><input type="hidden" name="business" value="xyzzy@xyzzy.com"><input type="hidden" name="item_name" value='<?php echo($row['description']) ?>'><input type="hidden" name="item_number" value='<?php echo($row['id']) ?>'><?$Cost = $row['price'];$SandH = $row['weight'] * $ship_factor;$Price = $Cost + $SandH;?><input type="hidden" name="amount" value='<?php echo($Price) ?>'><input type="hidden" name="no_note" value="1"><input type="hidden" name="currency_code" value="USD"><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"></form><?}?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/14580-i-would-like-to-see-a-shopping-cart-with-paypal-example-please/#findComment-57873 Share on other sites More sharing options...
AndyB Posted July 15, 2006 Share Posted July 15, 2006 I think I understand - maybe not. You want to build your own cart but use PayPal's checkout, i.e. use the data from your shopping cart table to construct a single PayPal 'pay now' form for the complete order and the final total, rather than your users being whizzed off to PayPal's cart for every item they add an item to the cart.If that's what you want, the database structure is not much more than id, item descr, price, session_id and you select items with the same session number to display the cart contents to the user. Quote Link to comment https://forums.phpfreaks.com/topic/14580-i-would-like-to-see-a-shopping-cart-with-paypal-example-please/#findComment-58271 Share on other sites More sharing options...
AndyB Posted July 15, 2006 Share Posted July 15, 2006 http://simpleshop.org/ - that's what I used as the basis for the cart I wrote (and still use) Quote Link to comment https://forums.phpfreaks.com/topic/14580-i-would-like-to-see-a-shopping-cart-with-paypal-example-please/#findComment-58272 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.