Reply to topic
Tufduc New Community Member
New Community Member
Posts: 1
Kudos: 0
Accepted Solutions: 0

Multiple item buy now button



I am looking for a little help from the experts out there Smiley Happy


I have a custom Buy Now button that i am trying to create. I has 3 drop down menus for different items and each menu has different price options. I realize that this has to be a custom code and can't be generated with Paypal's button creator.


I have also been to the "Welcome to the BCES™ Button Code Example Site"


I am pretty sure that my coding is close, and that i am missing something fairly simple.



Note: Enter "Bob" as the user name


Here is the Code:




<SCRIPT language="JavaScript">
function noEntry() {
if (document.ducwc.os0.value.length<1) {
alert("Please fill in Your Account User Name");
return false; }
else { return true; }

// -->

<form action="" name="ducwc" method="post" onSubmit="return noEntry()">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="page_style" value="DUCwc">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">
<input type="hidden" name="business" value="email">
<input type="hidden" name="item_name" value="DUCwc 3 Valley Gap Booking">
<input type="hidden" name="on0" value="Your DUCwc Username">Your DUCwc Username
<input type="text" name="os0" maxlength="60"><br><br>
<input type="hidden" name="item_name_1" value="DUCwc 3 Valley Gap Booking">
<input type="hidden" name="on1" value="Hotel Accomodation">Hotel Accomodation
<select name="os1">
<option value="Single">Single $120.00</option>
<option value="Double">Double $140.00</option>
<input type="hidden" name="option_index" value="1">
<input type="hidden" name="option_select0" value="Single">
<input type="hidden" name="option_amount0" value="120.00">
<input type="hidden" name="option_select1" value="Double">
<input type="hidden" name="option_amount1" value="140.00">
<input type="hidden" name="item_name_2" value="BBQ and Ghost Town Tour">
<input type="hidden" name="on2" value="BBQ">BBQ and Ghost Town Tour
<select name="os2">
<option value="Not Attending">Not Attending $0.00</option>
<option value="1 Attending">1 Attending $25.00</option>
<option value="2 Attending">2 Attending $50.00</option>
<option value="3 Attending">3 Attending $75.00</option>
<option value="4 Attending">4 Attending $100.00</option>
<input type="hidden" name="option_index" value="2">
<input type="hidden" name="option_select0" value="Not Attending">
<input type="hidden" name="option_amount0" value="0.00">
<input type="hidden" name="option_select1" value="1 Attending">
<input type="hidden" name="option_amount1" value="25.00">
<input type="hidden" name="option_select2" value="2 Attending">
<input type="hidden" name="option_amount2" value="50.00">
<input type="hidden" name="option_select3" value="3 Attending">
<input type="hidden" name="option_amount3" value="75.00">
<input type="hidden" name="option_select4" value="4 Attending">
<input type="hidden" name="option_amount4" value="100.00">
<!-- -->
<input type="hidden" name="item_name_3" value="3VG T Shirt">
<input type="hidden" name="on3" value="3VG T Shirt">3VG T Shirt
<select name="os3">
<option value="None">None $0.00</option>
<option value="Small">Small $30.00</option>
<option value="Medium">Medium $30.00</option>
<option value="Large">Large $30.00</option>
<option value="X-Large">X-Large $30.00</option>
<option value="XX-Large">XX-Large $30.00</option>
<input type="hidden" name="option_index" value="3">
<input type="hidden" name="option_select0" value="None">
<input type="hidden" name="option_amount0" value="0.00">
<input type="hidden" name="option_select1" value="Small">
<input type="hidden" name="option_amount1" value="30.00">
<input type="hidden" name="option_select2" value="Medium">
<input type="hidden" name="option_amount2" value="30.00">
<input type="hidden" name="option_select3" value="Large">
<input type="hidden" name="option_amount3" value="30.00">
<input type="hidden" name="option_select4" value="X-Large">
<input type="hidden" name="option_amount4" value="30.00">
<input type="hidden" name="option_select4" value="XX-Large">
<input type="hidden" name="option_amount4" value="30.00">

<input type="image" src="" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="" width="1" height="1">





Thanks in advance!

0 Kudos
skier Volunteer Advisor
Volunteer Advisor
Posts: 5444
Kudos: 580
Accepted Solutions: 221

Re: Multiple item buy now button

[ Edited ]

You need a script to manage the logic for adding the dropdown prices, you do have a script for the user name however, what you really need to a bit of scripting to calculate the amounts from the drop down selections.   One way to what you have in mind would be this example.   It already has two dropdowns that include prices, it can be tweaked to have 3 or more and easily changed from an Add to Cart to a Buy Now.    You can even take an example like this one and tweak it.   






0 Kudos