cancel
Showing results for 
Search instead for 
Did you mean: 

add to cart

Member

add to cart

I have a current site that has hundreds of products in sorted galleries.  Customers submit email orders currently.  I am testing the "Add to cart" button and it works great.  data wise I only need to set "item_name", "item_number" and "amount" everything else is the same for every product.  I would like to take the entire button code that PayPal generated for me and place it in a function/script and be able to call it with one line of code and pass my values. Is this doable? Need help, please.

 

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="My Account">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="item_name" value="Commercials - Foreclosure">
<input type="hidden" name="item_number" value="ISP-Foreclosure">
<input type="hidden" name="amount" value="200.00">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="Add to Cart">
</form>