Paypal add multiple fees

  • Delboy
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 149
  • Thank you received: 0

Delboy created the topic: Paypal add multiple fees

Hi Guys, I have a simple question and have created a demo attached.

Scenario:
I have a drop down list with three items

Item One : £10
Item Two: £20
Item Three: £30

I then have a check box which is read only telling the user that a delivery charge of £5 will be added to the total. How do I sum the item i.e.. ITEM ONE: £10 to the delivery charge and pass that figure into the PayPal button.

In the attached file I have managed to pass the item price into the PayPal button but struggling to add the two costs together. Hope someone can help.

File Attachment:

File Name: demo.zip
File Size:11 KB
#236007
Attachments:
  • Posts: 2483
  • Karma: 86
  • Thank you received: 335

mihaela replied the topic: Paypal add multiple fees

Hello,

From what I can see, the delivery checkbox can't be unchecked.

Since it is always checked, the following change in the code is enough to pass the sum in the total field.

In the Actionscript of the "profile" field I've replaced the code with this one:
function ff_profile_action(element, action)
{
    switch (action) {
        case 'change':
var radioGrp = JQuery("[name=\"ff_nm_profile[]\"]");
for (i = 0; i < radioGrp.length; i++) {
  if (radioGrp[i].checked)
  {
       total = radioGrp[i].value
       if(jQuery('[name="ff_nm_Delivery[]"]:checked').val() == "Delivery charge £5.00") {
           total = Number(total) +5;
       }
       ff_getElementByName('totalAmount').value = total;
  }
}
            break;
        default:;
    } // switch
} // ff_profile_action

After you do the change, the total field should be filled in with the correct value.

To pass that value to PayPal follow instructions from here crosstec.org/en/support/online-documenta...l-donation-form.html .

Let me know whether this resolves the issue and whether you've managed to set it for your form.

Regards,

Mihaela
#236018
The following user(s) said Thank You: Delboy
  • Delboy
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 149
  • Thank you received: 0

Delboy replied the topic: Paypal add multiple fees

Always blown away by the level of support on this forum. Worked first time! and a very fast response. Truly appreciate it. Drop me your Paypal and I would happily send you a drink.
#236019
Moderators: ForumSupporttomeperica
Time to create page: 0.078 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

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 and icon packs!

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