Replacing Older Paypal Forms With New Code

Generating Paypal button code to replace older HTML forms

Sticky Note Paypal Form Updating
Older Paypal HTML button code is still valid and supported by Paypal. The older version includes the item name, price and other product details directly on the webpages. The newer code, generated in your Paypal account, uses instead an alphanumeric code for the product info.

See Instead…
  • See links in the sidebar on this page
Notes: Both types of order button code (generated and HTML) are valid and both are supported by Paypal, however, you may want to update your forms with the latest generated code. Cart and form buttons are created under "Tools" in your Paypal account. Paypal provides support for all available functions in your account.

Paypal HTML code example:
This is an example of older Paypal HTML code. The following code is included in some older Allwebco templates. Product information (item name, price) is edited directly in the webpage html form code.

<form action="" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="item_name" value="Name of Product">
<input type="hidden" name="amount" value="35.00">
<input type="hidden" name="shipping" value="2.99">
<input type="hidden" name="custom" value="">
<input type="hidden" name="return" value="">
<input type="submit" value="Purchase" onmouseover="this.className='buttonon-order'" onmouseout="this.className='button-order'" class="button-order">

Generated Paypal code example:
The following is an example of newer Paypal form code. It is generated (created) in your Paypal account login under "Tools". It can be used to replace older Paypal form code (this is only sample code, do not copy and use this code).

<form action="" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="000000">
<input type="image" src="" border="0" name="submit" alt="">
<img alt="" border="0" src="" width="1" height="1">

Using generated code with the default template button style
Many Allwebco templates use custom "submit" buttons. In this case you may want to keep the original button "submit" line and not use the created "submit" line. You can remove all the template form code, but maintain the "input" type="image" or type="submit" line in the form code. Then paste in your generated code and remove the "input type="image"" from the created code. See highlighted lines of code above in the 2 examples.

Is the older code outdated?
No. The older Paypal HTML form button code is used on millions of websites around the world. Although Paypal has changed the way button code is added to websites, they still support the older HTML style code due to the millions of websites that it's still in use on.

Advantages of generated code:
  • If you generate your code in your Paypal account you can keep track of all your buttons and also make changes to your items for sale in your Paypal account login, rather than editing the HTML pages.
  • This includes editing prices, return pages, item names, shipping and so on. Although, you may still need to update your HTML pages with any product modifications.
  • You can add more types of options to your Paypal forms like, item size options and price changing options, however, you can also add options to the HTML style forms.
  • Uses less code in each webpage.

Advantages of HTML style code:
  • Editing your "saved buttons" in Paypal can be confusing. Editing HTML style forms may be easier in many cases.
  • If you generate your buttons you will still need to paste the code into HTML pages.
  • With HTML style buttons, you will not need to go back and forth between your Paypal account and website pages testing the forms and updating changes.
  • With HTML forms you can easily view what each item is in your webpage source code. There is less of a chance of having the wrong button for the wrong item.

Related Topics:
Adding a selection or option to a paypal form
Adding shipping to a paypal form

PayPal Account Setup