Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding more than 10 lines to a paypal dropdown

Tags:

html

paypal

Using the PayPal website, I created a drop down list of items for a website and an "add to cart button":

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_s-xclick">
  <input type="hidden" name="hosted_button_id" value="J793S02EGAQ92">
  <table>
    <tr>
      <td>
      <input type="hidden" name="on0" value="Capacity">
      <center>Select Size:</center>
      </td>
    </tr>
    <tr>
      <td>
      <select id="selectDirect" name="os0">
      <option value="Small">SMALL - $10</option>
      <option value="Medium">MEDIUM - $20</option>
      <option value="Large">LARGE - $30</option>
      </select>
      </td>
    </tr>
  </table>

  <input type="hidden" name="currency_code" value="GBP">
  <center><input type="image" src="./add-to-shopping-cart.png" border="0" name="submit" alt="Add to Cart" width=150px></center>
  <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>

My problem is that they limit the number of dropdown items to 10, but I need more like 20. Apparently, this is possible, but the code has to be created manually and not automatically generated from PayPal website.

I'm not really sure what this means - I know how to manually add more lines to the dropdown button by just adding them in the HTML. But I assume that it's a little more complicated that, as the items need to link back to PayPal somehow.

I found this post about it, but it's 5 years old so it seems like some of the advice is out of date.

If anyone could offer any advice that would be appreciated. Even just an explanation of how my HTML tells PayPal what to add to the cart etc.

like image 546
user1551817 Avatar asked Feb 14 '18 05:02

user1551817


People also ask

How do I add more options to PayPal?

PayPal offers three options by default, but you can add more by clicking "Add Another Option" or reduce it to two by clicking "Remove Option."

Where are my saved buttons in PayPal?

Click Tools at the top of the page to navigate to the My Saved Buttons page. Then, click the PayPal Buttons item on the Tools page; Note: If you do not see Tools at the top of the page, click the Merchant Services tab, then click My saved buttons under Tools and settings on the right.


2 Answers

There is a limitation for the dropdown menu for hosted button. It will only allow up to 10 item.

You will need to code the button mannualy.

To make it easy, you can create the button from your PayPal account and on STEP 2, UNCHECK the "Save Button at PayPal".

When you retrieve the code, click "Remove code protection" this will give you a free-text code. You can then add more item into the dropdown list.

The data will be transferred back to PayPal eventhough the customer choose the additional item in the dropdown list.

like image 187
pp_haikal Avatar answered Oct 04 '22 12:10

pp_haikal


  • Generate the HTML for the first ten options
  • Generate the HTML for the second ten.
  • Append the <option>s from the second set of options into the HTML for the first one, it should have the correct option values that PayPal wants for that os0 field used in the dropdown you showed as an example
like image 38
Juan Mendes Avatar answered Oct 04 '22 13:10

Juan Mendes