Need multiple options displayed on check out page
alinart
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Oct-29-2009
02:00 PM
When items are added to the cart... only the first option (no matter which one it is) displays on checkout.
I'm using just a simple javascript integration for paypal. No PHP.
When the customer checks out, there is no indication of what size or color they chose despite having those options available. How can I get more than just the first option to display? I tried adding the option variables that I found in the developers section of paypal but it didn't work.
This is the code on the item page
<select class="item_size"> <option value="S"> S </option> <option value="M"> M </option> <option value="L"> L </option> <option value="XL"> XL </option> <option value="XXL"> XXL </option> </select> <select class="item_color"> <option value="Blk/Wht"> Black/White </option> <option value="Nvy/Pfc"> Navy/Pacific </option> </select> <input value="1" class="item_Quantity" type="text" size="3"> <input type="hidden" class="item_id" value="M1001"> </form> <span class="item_price">$78.00</span>
and this is part of the code in my javascript
this.paypalCheckout = function() { var winpar = "scrollbars,location,resizable,status", strn = "https://www.paypal.com/cgi-bin/webscr?cmd=_cart" + "&upload=1" + "&business=" + this.email + "¤cy_code=" + this.currency, counter = 1, itemsString = ""; if( this.taxRate ){ strn = strn + "&tax_cart=" + this.currencyStringForPaypalCheckout( this.taxCost ); } for( var current in this.items ){ var item = this.items[current]; var optionsString = ""; for( var field in item ){ if( typeof(item[field]) != "function" && field != "id" && field != "price" && field != "quantity" && field != "name" /*&& field != "shipping"*/) { optionsString = optionsString + "&" + field + "=" + item[field] ; } } optionsString = optionsString.substring(1); itemsString = itemsString + "&item_name_" + counter + "=" + item.name + "&item_number_" + counter + "=" + counter + "&quantity_" + counter + "=" + item.quantity + "&amount_" + counter + "=" + this.currencyStringForPaypalCheckout( item.price ) + "&on0_" + counter + "=" + "Options" + "&os0_" + counter + "=" + optionsString; counter++; } if( this.shipping() != 0){ itemsString = itemsString + "&item_name_" + counter + "=Shipping" + "&item_number_" + counter + "=" + counter + "&quantity_" + counter + "=1" + "&amount_" + counter + "=" + this.currencyStringForPaypalCheckout( this.shippingCost ); } strn = strn + itemsString ; window.open (strn, "paypal", winpar); };
Please advise.
1 REPLY 1
skier
Advisor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct-29-2009
02:59 PM
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Buy it Now button with option to offer discount for multiples purchased of the same item in Merchant services (Archive)
- Subscribe button displaying all menu options instead of a drop down in Merchant services (Archive)
- Please explain how to set shipping rate.. in Shipping (Archive)
- Need help creating multi item + drop down buy now button!!! in Merchant services (Archive)
- Buy Not and Pay Now buttons not working in Merchant services (Archive)