add to cart

SocialPAC
Contributor
Contributor

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>

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.