Add to Cart Button with Options Help
gergs11
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jun-15-2017
01:16 PM
Hi, I'm having trouble with an Add to Cart button that has product options/variations. The form works without the options but not with. I can't figure out where I'm tripping up. I've compared my code with the code supplied by the button generator and it seems to be identical. Any help is appreciated!
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="email goes here"> <input type="hidden" name="lc" value="AU"> <input type="hidden" name="item_name" value="Product Title"> <input type="hidden" name="item_number" value="999"> <input type="hidden" name="button_subtype" value="products"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="shipping" value="0"> <input type="hidden" name="add" value="1"> <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_SM.gif:NonHostedGuest"> <input type="hidden" name="on1" value="Size"> <label for="os1">Size</label> <select name="os1" required=""> <option value="" disabled="">Make a selection</option> <option value="4" x 11.5"">4" x 11.5" – $1.00</option> <option value="8" x 20"">8" x 20" – $10.50</option> </select> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="option_select0" value="4" x 11.5""> <input type="hidden" name="option_amount0" value="1.00"> <input type="hidden" name="option_select1" value="8" x 20""> <input type="hidden" name="option_amount1" value="10.50"> <input type="hidden" name="option_index" value="0"> <input type="hidden" name="on2" value="Message"> <label for="os2">Message</label> <input type="text" name="os2" maxlength="200" class="product-message"> <div class="paypal-bar"> <input type="number" name="quantity" value="1" min="1" class="product-qty 77"> <div class="product-price body-copy">$1</div> <input type="submit" name="submit" value="Add To Cart" class="product-submit" alt="Add To Cart"> </div><!--paypal-bar--> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>
2 REPLIES 2
angelleye
Advisor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun-23-2017
11:04 PM
Does your code actually have the 4" values in it instead of actual quotes, or did that happen when you pasted it here? If that's in your actual code, fix those so they are quotes.
Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
MTS_Tiffany
Moderator
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan-18-2018
07:04 AM
Hello,
Quotes cannot be used in item names for the options. Please remove all the quotes and the options should then work.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- How do I set up PayPal Express Checkout on Shopify? in PayPal Payments Standard
- venmo option not showing on smart phone in PayPal Payments Standard
- App selection for Subscription Button in Sandbox Environment
- How to add a second parameter onto the PayPal standard payment code block? in PayPal Payments Standard
- Paypal NVP/SOAP API - Pay in 4 instalment payments in NVP/SOAP APIs