# Paypal add to cart button with color selection

**URL:** <https://forum.kirupa.com/t/paypal-add-to-cart-button-with-color-selection/292107>\
**Category:** flash\
**Created:** [July 10, 2009, 5:40am UTC](https://forum.kirupa.com/t/paypal-add-to-cart-button-with-color-selection/292107 "2009-07-10T05:40:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ltdesign](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@ltdesign](https://forum.kirupa.com/u/ltdesign)\
**Post date:** [July 10, 2009, 5:40am UTC](https://forum.kirupa.com/t/paypal-add-to-cart-button-with-color-selection/292107/1 "2009-07-10T05:40:09Z")

</div>

Hello,

I am creating a fairly simple clothing site in flash. I have created an add to cart button for paypal and it works perfectly. My questions is…how do I have the buyer specify the color of the garment once they’ve reached the paypal site? In other words, I don’t want a drop down menu on the clothing site. I have the color swatches there and I want the buyer to click “add to cart” and then have the drop down menu appear in paypal. I want them to select their color after leaving the site…To me it just makes the site cleaner and simpler looking.

I have searched and searched and cannot find the anser to this…it seems simple enough to me.

Here’s the code I am using (It is actionscript 2.0):  
on (release){  
var paypalObj = new Object();  
paypalObj[“add”] = 1  
paypalObj.cmd = “\_cart”;  
paypalObj.business = "emailname@company.net";  
paypalObj.item\_name = “Barb Dress”;

paypalObj.item\_number = “0544D”;  
paypalObj.amount = “$198”;  
paypalObj.page\_style = “Primary”; //or whichever style you use  
paypalObj.no\_shipping = “2”;  
paypalOBJ.undefined\_quantity =“1”  
paypalObj.no\_note = “1”;  
paypalObj.currency\_code = “USD”;  
paypalObj.lc = “US”;  
paypalObj.bn = “PP-ShopCartBF”;  
paypalObj.target\_winName = “paypal”;  
paypalObj.shopping\_url = (“[www.clothingsitehere.com](http://www.clothingsitehere.com)”);

```
var sUrl = 'https://www.paypal.com/cgi-bin/webscr—'
    for (var o in paypalObj)
    sUrl += o + "=" + paypalObj[o] + "&";
    trace(sUrl);
    getURL(sUrl,'paypal','POST');         

```

}
