Add Multiple Products to Cart, along with Product Option(s)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I currently have a solution for adding multiple items to a cart, with varying quantities and prices, using the following code (see below), and would like to add an option for a personalised message, which shows up as part of the PayPal order, perhaps as a separate (non-chargeable?) item.
I've tried the on0 and os0 variables, etc., but to no avail. Any ideas? I would like, if at all possible, to keep all the order details in PayPal (rather than complicate things by separately storing the personalised message product option on the client website).
<form action="https://sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top" id="buynow">
<input type="hidden" name="business" value="my[at]business.com">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="currency_code" value="GBP">
<!-- gift voucher 5 -->
<input type="button" value="-" class="qtyminus btn btn-default" field="quantity_1">
<input type="text" name="quantity_1" value="1" class="qty form-control">
<input type="button" value="+" class="qtyplus btn btn-default" field="quantity_1">
<input type="hidden" name="item_name_1" value="5 GBP voucher" id="item_name_1">
<input type="hidden" name="amount_1" value="5.00" id="item_amount_1">
<!-- gift voucher 10 -->
<input type="button" value="-" class="qtyminus btn btn-default" field="quantity_2">
<input type="text" name="quantity_2" value="0" class="qty form-control">
<input type="button" value="+" class="qtyplus btn btn-default" field="quantity_2">
<input type="hidden" name="item_name_2" value="10 GBP voucher" id="item_name_2">
<input type="hidden" name="amount_2" value="10.00" id="item_amount_2">
<input type="submit" value="Buy with PayPal">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
Any help would be greatly appreciated.
Cheers
Liam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, what you could do is to add a text field that would be the description or personalised message and then concatenate to the item_name like for example: "10 GBP voucher - Happy Anniversary Joe" where the last part after the "-" has been concatenated from the text field. You can eventually check via Javascript if any possible way to achieve that.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Shipping options are not appearing in my cart through link or button. in PayPal Payments Standard
- Seller "Buy now" button - unable to edit a button in PayPal Payments Standard
- Remove PayPal Pay Later option from paypal checkout page. in PayPal Upgrade Community
- What happened to PayPal Buttons?! in PayPal Payments Standard
- PayPal Buttons in PayPal Payments Standard