2 PayPal buttons

  • edify
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 50
  • Thank you received: 2

edify created the topic: 2 PayPal buttons

I have a form which sells a product and I have been using the "PayPalSelect" code provided by you and this has worked perfectly until now.

Now the client wants to offer a discount but only to those who have a voucher code.

I have created 2 sections which are revealed if you enter the correct voucher code.

the problem is I need 2 PayPal buttons and I cannot call them both "PayPalSelect" so I called the first 1 PayPalSelect and the second PayPalSelect2.

I changed the Action Script to reflect this:

function ff_PayPalSale_action(element, action)
{
switch (action) {
case 'click':
ff_getElementByName('PayPalSelect2').value = 'Clothesline Canopy|0|' + ff_getElementByName('priceSale').value + '|0';
ff_validate_submit();
break;
default:;
} // switch
} // ff_PayPalSale_action

However if I choose the first section without sale price it goes to PayPal with the correct price, the second does open up PayPal but does not pass the price.

I also changed the Action Code for the dropdown with the sale price

function ff_priceSale_action(element, action)
{
switch (action) {
case 'change':
ff_getElementByName('PayPalSelect2').value = element.value;
break;
default:;
} // switch
} // ff_priceSale_action

I'm not really sure where I'm going wrong. I know that it says "DO NOT CHANGE" on the PayPalSelect but wondered if this is somehow pre programmed.

You can view this form here: form

I also have 2 separate forms created - 1 at full price and 1 at sales price - if it is not possible to have 2 PayPal buttons could I set up a form that either opens one form or the other?

Thanks
Lynda
#235165
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2360
  • Karma: 85
  • Thank you received: 316

mihaela replied the topic: 2 PayPal buttons

Hello,

Unfortunately, it is not possible to have two Paypal buttons on the same form because they won't function.
You haven't set anything wrong, that is the default behavior since only one PayPal button should be used per page.

You wrote, "I also have 2 separate forms created - 1 at full price and 1 at sales price - if it is not possible to have 2 PayPal buttons could I set up a form that either opens one form or the other?". That is what I was going to suggest you in this case.

You can create an additional form on which a user can choose to go to one form or the other(sales or full price).

Maybe this example can help you to achieve what you want: crosstec.org/en/support/online-documenta...-on-select-list.html .

Let me know whether this helped.

Regards,

Mihaela
#235169
Moderators: ForumSupporttomeperica
Time to create page: 0.034 seconds

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans & templates!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here