Support

Home Forums Event Espresso Premium Promotion Add-on Issue

Promotion Add-on Issue

Posted: August 21, 2018 at 10:15 am

Viewing 9 reply threads


spaselca

August 21, 2018 at 10:15 am

Attempting to add promotion code to order. Code is spelled correctly and applied to the correct event. When I click submit promotional code – the dev console displays the following code – >

Uncaught TypeError: PROMO.form_input.val is not a function
at HTMLInputElement.<anonymous> (promotions.js?ver=1.0.12.p:110)
at HTMLDivElement.dispatch (jquery.js?ver=1.12.4:3)
at HTMLDivElement.r.handle (jquery.js?ver=1.12.4:3)

Thanks for any help you can provide


Josh

  • Support Staff

August 21, 2018 at 10:41 am

Hi,

Does the site have any caching plugins configured to move/compress the JavaScript files? If so, it may help to disable that feature of the caching plugin.


spaselca

August 21, 2018 at 10:44 am

Like W3 Total Cache?


Josh

  • Support Staff

August 21, 2018 at 10:46 am

Yes W3 Total cache has that feature, and other plugins do too.


spaselca

August 21, 2018 at 11:45 am

I disabled W3 and I still get the error ?


Josh

  • Support Staff

August 21, 2018 at 11:56 am

You shouldn’t need to disable the whole plugin, just the part that does the minify treatment to the JavaScript files.

Can you add a tester event to the site, set its ticket price to $1.00 so we can test a registration there? We may be able to narrow down what’s causing the error if we can view the console of that page.


spaselca

August 21, 2018 at 12:00 pm

Oh I see! Thanks
Minify is disabled.
here is the test event with $1 tickets
https://www.spas-elca.org/registration/test/


Josh

  • Support Staff

August 21, 2018 at 12:27 pm

May I ask, can you (or whomever made the edits) restore the promotions.js file back to its original state?

For example, here’s line 110 of the file on your site:
var promo_code = PROMO.form_input.val();
here’s line 110 of the same file from the current version of the promotions plugin:
if ( typeof promo_code !== 'undefined' && promo_code !== '' ) {

The way forward will be to start with an unaltered plugin. If you continue to get JavaScript errors with an unaltered plugin we can investigate further.


Josh

  • Support Staff

August 21, 2018 at 12:30 pm

Further to the above, after you restore the file back to its original state, you’ll need to clear your browser’s cache and also the W3 total cache plugin’s cache so the corrections to the file will load.


spaselca

August 21, 2018 at 1:18 pm

That did the trick. Thank you!

Viewing 9 reply threads

The support post ‘Promotion Add-on Issue’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso