Jump to content


Photo

I would like to see a shopping cart with paypal example please


  • Please log in to reply
4 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 14 July 2006 - 01:03 PM

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.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 14 July 2006 - 01:07 PM

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.
Legend has it that reading the manual never killed anyone.
My site

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 14 July 2006 - 01:11 PM

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.
<?
$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>
<?
}
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 15 July 2006 - 02:19 AM

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.
Legend has it that reading the manual never killed anyone.
My site

#5 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 15 July 2006 - 02:22 AM

http://simpleshop.org/ - that's what I used as the basis for the cart I wrote (and still use)
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users