Quote:
Originally Posted by Fellow Eskimo
|
shopping cart + paypal PP
------------------------------
head section image_template
HTML Code:
<script language="javascript" type="text/javascript">
<!-- BEGIN
function flip(rid)
{
current=(document.getElementById(rid).style.display == 'none') ?
'block' : 'none';
document.getElementById(rid).style.display = current;
}
function ReadSize (form1)
{
if (form1.selectSize.value == 1)
{
form1.item_name.value = "<IMAGE_TITLE>, 5x8";
form1.amount.value = 20.00;
}
else if (form1.selectSize.value == 2)
{
form1.item_name.value = "<IMAGE_TITLE>, 8.5x11";
form1.amount.value = 35.00;
}
else if (form1.selectSize.value == 3)
{
form1.item_name.value = "<IMAGE_TITLE>, 11x14";
form1.amount.value = 50.00;
}
else
{
form1.item_name.value = "<IMAGE_TITLE>, 13x19";
form1.amount.value = 70.00;
}
}
// End -->
</script>
body section image_template
HTML Code:
<div id="cart">
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="YOUR EMAIL HERE">
<input type="hidden" name="currency_code" value="CURRENCY">
<input type="hidden" name="item_name" value="">
<input type="hidden" name="amount" value="">
<select name="selectSize" onchange="ReadSize (this.form);">
<option value="Select a Size">Select a Size:</option>
<option value="1">5x8” ($20)</option>
<option value="2">8.5x11” ($35)</option>
<option value="3">11x14” ($50)</option>
<option value="4">13x19” ($70)</option>
</select>
<input type="submit" value="Add to Cart">
</form>
<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="jasondunsmore@gmail.com">
<input type="hidden" name="display" value="1">
<input type="submit" value="View Cart">
</form>
</div>