I am trying to get a flash based button to work with PayPal. I have managed to get flash file to send to PayPal - its very similar to any standard javascript button (for a single item to PayPal) however, there are some other fields in Paypal on0 - os0 that can be used to add other parameters to the button such as color, or size, or whatever - this is generally done as an option menu like this -
<SELECT name=os0>
<OPTION value="none selected" selected> Please Select Color</OPTION>
<OPTION value="Red">Red</OPTION>
<OPTION value="Black">Black</OPTION>
<OPTION value="Green">Green</OPTION>
</SELECT>
Also a field for the amount of items would be: <input size="2" value="1" name="quantity"> (you can see in the code I already have, the quantity set to 1, but would prefer the user to be able to specify the quantity required through an input area on the page.
Mostly all the buttons I have found for Flash deal with the "Buy it Now" feature, which in itself is good , but very, very limited. Is there a way to add an option drop menu to the flash file and an input field so a user can choose a color (using os0) and a size using (on0) with the input field (set the paypal.quantity="" so then the input number is used other than 1.
This is the code I have on the button on the first frame - this code does work - I have tested it a lot - but I do'nt know how to add the other features.
I've tried adding a dropmenu to my flash file, but it ignores it and uses the code, and ignores the input field - I think I'm doing it wrong somehow - does anyone know how to add these options to what I have here....?
There are other feature I would like to add such as the ability to set a maximum and minimum amount of items to be ordered, but I'll get to them another time - right now, the ability to order a (?) number of items, and the choice of color is imperative - I can then add this to my item details page for ordering purposes...
<SELECT name=os0>
<OPTION value="none selected" selected> Please Select Color</OPTION>
<OPTION value="Red">Red</OPTION>
<OPTION value="Black">Black</OPTION>
<OPTION value="Green">Green</OPTION>
</SELECT>
Also a field for the amount of items would be: <input size="2" value="1" name="quantity"> (you can see in the code I already have, the quantity set to 1, but would prefer the user to be able to specify the quantity required through an input area on the page.
Mostly all the buttons I have found for Flash deal with the "Buy it Now" feature, which in itself is good , but very, very limited. Is there a way to add an option drop menu to the flash file and an input field so a user can choose a color (using os0) and a size using (on0) with the input field (set the paypal.quantity="" so then the input number is used other than 1.
This is the code I have on the button on the first frame - this code does work - I have tested it a lot - but I do'nt know how to add the other features.
Code:
on (release) {
//create the LoadVars that will hold our paypal information
var paypal = new LoadVars();
//specify the business, amount of the item, shipping, etc.
paypal.cmd="_cart";
paypal.upload="1";
paypal.business="4848";
/// Item Information
paypal.item_name="Clevis Hook"
paypal.item_number="CLEV_01";
paypal.amount="4.50";
paypal.quantity="1";
paypal.taxable="1";
paypal.undefined_quantity="1"; /// this is for my cart use
//// Shipping Information
paypal.calc_method="C";
paypal.lot_size="1";
paypal.weight_lbs="0";
paypal.weight_oz="6";
paypal.length="";
paypal.width="";
paypal.height="";
paypal.package="T";
paypal.insure="0";
paypal.on0="Color";
paypal.supp_handling_fee="";
paypal.origin_code="92307";
//// Carrier Special Services
paypal.addl_handling_ups="1";
paypal.pod_ups="1";
paypal.sig_ups="1";
//send our information to PayPal, including all the optional variables we have collected from customer
paypal.send("[URL unfurl="true"]http://www.thisgoestomypaypalcart.com/cart/","cartwindow","POST");[/URL]
}
//this is purely for the animation, nothing more
on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(11);
}
I've tried adding a dropmenu to my flash file, but it ignores it and uses the code, and ignores the input field - I think I'm doing it wrong somehow - does anyone know how to add these options to what I have here....?
There are other feature I would like to add such as the ability to set a maximum and minimum amount of items to be ordered, but I'll get to them another time - right now, the ability to order a (?) number of items, and the choice of color is imperative - I can then add this to my item details page for ordering purposes...