ded Posted March 20, 2010 Share Posted March 20, 2010 Multiple Items....paypal showing empty cart message <form action='https://www.sandbox.paypal.com/cgi-bin/webscr' METHOD='POST'> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="upload" value="1"> <input type="hidden" name="business" value="[email protected]"> <input type="hidden" name="no_shipping" value="2"> <input type="hidden" name="return" value="http://www.website.com/beta/ordercomplete.php?sid=<?php echo $sid; ?>"> <input type="hidden" name="rm" value="2"> <input type="hidden" name="cbt" value="Click Here To Complete Order!"> <?php $query5 = "SELECT * FROM shoppingcart WHERE `sid` = '$sid' ORDER BY `product`"; $result5 = mysql_query($query5,$dbh) or die(mysql_error()); while($row = mysql_fetch_array($result5)) { $count = 0; $rrn = $row['rrn']; $description = $row['sizedesc'] . " " . $row['name']; $product = $row['product']; $query6 = "SELECT * FROM product WHERE `id` = '$product'"; $result6 = mysql_query($query6,$dbh) or die(mysql_error()); while($row = mysql_fetch_array($result6)) { $count = $count + 1; $item_name = "item_name_" . $count; $item_number = "item_number_" . $count; $quantity = "quantity_" . $count; $amount = "amount_" . $count; $shipping = "shipping_" . $count; $price = number_format($row['price']); ?> <input type="hidden" name="<?php echo $item_name; ?>" value="<?php echo $description; ?>"> <input type="hidden" name="<?php echo $item_number; ?>" value="<?php echo $product; ?>"> <input type="hidden" name="<?php echo $quantity; ?>" value="1"> <input type="hidden" name="<?php echo $amount; ?>" value="<?php echo $price; ?>"> <input type="hidden" name="<?php echo $shipping; ?>" value="<?php echo '12.00'; ?>"> <?php } } ?> <input type="hidden" name="currency_code" value="USD"> <input type="submit" value="Checkout"> </form> Link to comment https://forums.phpfreaks.com/topic/195874-paypal-showing-empty-cart/ Share on other sites More sharing options...
ded Posted March 20, 2010 Author Share Posted March 20, 2010 figured it out Link to comment https://forums.phpfreaks.com/topic/195874-paypal-showing-empty-cart/#findComment-1028849 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.