Page 1 of 1

PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 2:47 pm
by Adendum
I suspect I am being dumb here...........

I require several Paypal "Add to Cart" buttons on a page. And one of them requires some options before clicking the button. I'm using the in-built PayPal eCommerce buttons and have set up a few on one page. In sandbox testing they seem to work OK. However I just added a button with an option and when testing I am not seeing the option from the option text box.

I've added a button. Added a form edit box. I've given the edit box a name and used that name in the PayPal button for both the label and the option. Each PayPal button has a unique name.

So what have I missed or misunderstood?

Re: PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 4:47 pm
by Pablo
The PayPal button and/or the option field should not be on a form.

Basically it works like this:
1) Add the PayPal button
2) Add an option field
3) Select the option field in the Options section of the PayPal button to associate it with the button

Re: PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 5:06 pm
by Adendum
support wrote:The PayPal button and/or the option field should not be on a form.

Basically it works like this:
1) Add the PayPal button
2) Add an option field
3) Select the option field in the Options section of the PayPal button to associate it with the button
Yup - that's how it is. No form as the extension puts that all together (nice touch). It's odd though...if I copy all the buttons to a blank page they work as expected.

So there must be something on the page they don't like. Prime candidate is a jQuery Tabbed section as that's where all the buttons are now - several in each tab).

Re: PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 5:09 pm
by Adendum
And I'm getting a lot of these.................

Code: Select all

Bad Request

Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.

Cookie: Apache=10.191.114.13.1285771644683675; KHcl0EuY7AKSMgfvHl7J5E7hPtK=Op_B5TvcPeA_u4xTrJlcb9wdjOYuq0HWDHZsCOBSP-J3ysvuax7jNrnjjIAYUm2MFOh60jIXvly4Szd0; cookie_check=yes; jNS36F3v1LVZP8Qp0a2pJWhXNKy=d3DOlEGtNRPyEcuengcuaVkdgy06yxwmd7qn34TWHQkcIE6cFfx_RFxmz72jhdulzDjvCWA7Kg3swIMsyf1V_Nm-yTO; DH4puLeRqX6BpunfdurQO8Swi28=6bjprJE8lxyulILqU-j0N6QErjcXZnufUa9lqOHvO8-N9ovTjhwPxWJO5lQe4RobeMyMaUUbGrG7PFA84zFWWBHQJFqsqpTWRwLdc_ySbu6uqjz9P1IIE5LZBflq9fLbSWu-LvQXp3-XfjaNCpm51VgRld3DlCoBnEMDW8OpjINf8l9kYwi_yr6epo2aQ3cVloSQaW; ..........and so on!

Re: PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 5:15 pm
by Pablo
I don't think the options will work on a tab. A jQuery Tab is also a (complex) form. So the PayPal button will think that the option is part of the form and ignore it.

Re: PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 8:02 pm
by Adendum
Kind of....the simple Add to cart buttons work OK in a jQuery tabbed are but anything with an option box fails.

So, I need to find another way of handling those :(

Re: PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 8:44 pm
by BaconFries
HI Paul untested so this may or may not work...since a jQuery is a form in its own way/right you need to make it think it is a form but still keep its main functions, so try this open the jQuery tabs HTML and insert the following in the
Before Tag
<form target="PayPal" action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin:0;padding:0;">
and then add</form> to the After Tag
As mentioned untested it may or may not work

Re: PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 8:51 pm
by Adendum
Hi Bacon,

Thanks for that but too late......I've gone for a simple CSS menu to open a series of independent pages in an iframe. So you get the same 'look' as a jQuery Tabbed area and in hindsight I think I prefer it as there is more control and it's easier to manage.

:)

And hey - you should be resting!!!!

Re: PayPal "Add to Cart" and Options

Posted: Tue Jul 10, 2012 8:58 pm
by BaconFries
lol I know I know..... but you know the old saying "No rest for the wicked" ...just trying to stop myself from going insane or I will die of boredom