PAYPAL SHOPPING CART
LESSON FOUR
EXPANDING THE SHOPPING CART
INTRODUCTION | EXPLAINING THE CODE | THE DOWNFALLS | EXPANDING THE SHOPPING CART | VIEWING THE SHOPPING CART | LAST NOTE

PayPal's Shopping Cart has seven fields of information. Three are in the hidden form code: "item_name", "item_number" and "amount"; and four are optional objects designated "on0", "on1", "os0" and "os1" and are viewed and selectable by the potential purchaser. The latter four mentioned are combined in the previous code example. "on0' is combined as the title with the selection of "on1" and "os0" is combined as the title with the selection of "os1". This does not need to be the case and permits more information to be passed on about the item up for sale.

The following code is for a T-SHIRT with a DRUNKIN COW printed on it. It sells for $21.95. This information can be found as hidden static data in the lower part of the PayPal code. In the upper part of the code you will see the optional objects: "on0", "on1", "os0" and "os1", collecting select results for the STYLE of the T-Shirt, The SIZE, the COLOR and the PLACEment of the design (front or back).

The HTML code is in Gold and the PayPal specific code is in Yellow.

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<table>
<tr>
<td>
<div align="center">
<p>STYLE<br>

<select name="on0">
<option value="Style=YOUTH">YOUTH
<option value="Style=LADIES">LADIES
<option value="Style=MENS">MENS
</select>

</p>
</div>
</td>
<td>
<div align="center">
<p>SIZE<br>

<select name="on1">
<option value="Size=SMALL">SMALL
<option value="Size=MEDIUM">MEDIUM
<option value="Size=LARGE">LARGE
<option value="Size=X-LARGE">X-LARGE
</select>

</p>
</div>
</td>
<td>
<div align="center">
<p>COLOR<br>

<select name="os0">
<option value="Color=WHITE">WHITE
<option value="Color=BLACK">BLACK
<option value="Color=BLUE">BLUE
</select>

</p>
</div>
</td>
<td>
<div align="center">
<p>PLACE<br>

<select name="os1">
<option value="Place=FRONT">FRONT
<option value="Place=BACK">BACK
</select>

</p>
</div>
</td>

</tr>
</table>

<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="someone@somewhere.com">
<input type="hidden" name="item_name" value="T-SHIRT">
<input type="hidden" name="item_number" value="DRUNKIN COW ">
<input type="hidden" name="amount" value="21.95">
<input type="hidden" name="return" value="http://www.yoursite.com/thankyou.html">
<input type="hidden" name="cancel_return" value="http://www.yoursite.com">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
</form>

The above HTML Code will look like this on line:

STYLE

SIZE

COLOR

PLACE


A viewer would select a MENS style, LARGE size, BLACK color and desire the design placed on the BACK. The shopping cart would present the below capture for review and purchase.

This just about covers the use of PayPal's Shopping Cart. There is just one small and minor item we'll cover next. When you are ready click HERE