Welcome, Guest

TOPIC: PayPal calculate amount based on selection

Re:PayPal calculate amount based on selection 5 years 6 months ago #10556

  • TheMuffinMan
  • TheMuffinMan's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6604
  • Thank you received: 444
  • Karma: 104
Thats why I asked on what "action" you would like to fill the hidden input? On submit I guess?
If yes, then you could put that into the ff_validate_submit function (see "Scripts" library and that validation's details)
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 5 years 6 months ago #10566

  • spencelk
  • spencelk's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 9
  • Karma: 0
When I enter this code into begin submit:
$this->execPieceByName('ff_InitLib');

function paypalSetAmountValue(){

if (ff_getElementByName('addVenue1').checked) {
  ff_getElementByName("PayPalSelect").value = 'productName|Two(2) Venues plus p&h|469.95|0';
  }
  
else  {
  ff_getElementByName("PayPalSelect").value = 'productName|One(1) Venue plus p&h|244.95|0';
  }
}

I get this error:
error-20091214.png
Attachments:
Last Edit: 5 years 6 months ago by spencelk.
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 5 years 6 months ago #10586

  • TheMuffinMan
  • TheMuffinMan's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6604
  • Thank you received: 444
  • Karma: 104
remove that first line that says

$this->execPieceByName('ff_InitLib');

It is for pieces, not scripts.
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 5 years 6 months ago #10596

  • spencelk
  • spencelk's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 9
  • Karma: 0
I tried that still the same error. That is when I added that line hoping it would help. where should I be placing the code? right now it is under submit pieces>>begin submit.
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 5 years 6 months ago #10597

  • TheMuffinMan
  • TheMuffinMan's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6604
  • Thank you received: 444
  • Karma: 104
thats wrong, it should go into Scripts "initialization script" since it is javascript. Pieces are php only.

Then you can use that in your custom validations etc.
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
The administrator has disabled public write access.
The following user(s) said Thank You: wartime

Re:PayPal calculate amount based on selection 5 years 6 months ago #10598

  • spencelk
  • spencelk's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Thank you received: 9
  • Karma: 0
I'm not sure I fully understand. I put the js code in advanced options>scripts>initialization scripts but then also in custom validations?

I have tried putting it in both places as well as each separately. I am no longer getting an error it just doesn't do anything. I also tried placing it within the PayPalSelect intscript that did not work nor did the values of my summary fields display.

I appreciate all of your help with this. I hope we can get this working.
The administrator has disabled public write access.
The following user(s) said Thank You: wartime
Time to create page: 0.167 seconds

Lifetime Subscription

Get lifetime access to all of our current and future products and 2 years of professional support -- for just $119 USD.

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, WordPress® plugins, Joomla!® templates   this means, by purchasing a Lifetime 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 1-Year or Lifetime 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!

Supporting the Joomla! Community

Offical Joomla! User Groups and organizers of Joomla! Days, registered at Joomla.org, are supported by Crosstec, worldwide!

If you are running a JUG or organize a Joomla! Day and you need any of our products, just write an email to info@crosstec.org and you'll get a Lifetime Membership for free!

Live Chat Software