Support

Home Forums Event Espresso Premium Think i am getting closer – Thanks to Josh's pre-written fix, not quite there…

Think i am getting closer – Thanks to Josh's pre-written fix, not quite there…

Posted: January 22, 2015 at 8:59 am

Viewing 10 reply threads


Austin

January 22, 2015 at 8:59 am

Upon going over so many fixes – I finally found a post where Josh fixed the multiple attendees issue I am having for another client – however upon using his fix – it breaks the checkout button.
Here was the fix he suggested (which works exactly how I want it to .. minus the broken checkout button)
https://eventespresso.com/topic/no-multiple-attendees/

When I implement it however I get a jquery error and the submit button won’t continue to the next page for payment processing…


Austin

January 22, 2015 at 8:59 am

Okay Lorenzo – So if I use EE3 (since ee4 doesn’t have the same payment gateways) then I can use multiple tickets .. However with multiple tickets it forces multiple repetitions of the main registration questions. I found a thread on this forum which said to use the following custom.js file to remove all the extraneous ‘registration forms’

jQuery(document).ready(function($) {

var $notfirstfname = $(‘.fname’).not(‘:first’)
$(‘.fname:first’).keyup(function() {
$notfirstfname.val ( this.value );
});
var $notfirstlname = $(‘.lname’).not(‘:first’)
$(‘.lname:first’).keyup(function() {
$notfirstlname.val ( this.value );
});
var $notfirstemail = $(‘.email’).not(‘:first’)
$(‘.email:first’).keyup(function() {
$notfirstemail.val ( this.value );
});

$(‘.multi-reg-page’).not(‘:first’).css(‘display’, ‘none’);

});

This works!! But it breaks the button to checkout – is there a work around or fix?


Lorenzo Orlando Caum

  • Support Staff

January 22, 2015 at 1:34 pm

Hi, Event Espresso requires at least an attendee name and email for each pricing option.

Could you link to the support forum post where you found that sample code?


Lorenzo


Austin

January 22, 2015 at 5:14 pm

Yes, sorry I couldn’t find it earlier

https://eventespresso.com/topic/no-multiple-attendees/


Austin

January 22, 2015 at 5:17 pm

Can I delete this topic? My other question was “split” and after all the sleep I have been missing I thought maybe I hadn’t actually posted the question… so I reposted it.. *laughs* so this topic isn’t actually necessary.


Austin

January 22, 2015 at 9:03 pm

Ugg.. I meant to delete the split topic which it looks like you did – not this topic. *sigh*


Austin

January 23, 2015 at 9:16 am

So, how do I get this jquery to cover the multiple registration informations but not the checkout button?


Lorenzo Orlando Caum

  • Support Staff

January 23, 2015 at 9:33 am

Hi, I ran through those steps on a test site and they worked as expected:

https://eventespresso.com/topic/no-multiple-attendees/#post-62292

Did you move the sample Javascript code into a mycustom.js file and upload here:

/wp-content/uploads/espresso/

Also, was the second code sample in the support post added to a child theme’s functions.php file or a site specific plugin?

http://cl.ly/image/411J2N012r3y


Lorenzo


Austin

January 23, 2015 at 9:55 am

I just added the second sample code to the child themes functions php and it broke my site – now to figure out how to back out of that. . .


Austin

January 23, 2015 at 10:00 am

No.. anywhere I stick the ::

<?php

add_action(‘wp_enqueue_scripts’, ‘my_custom_espresso_scripts’);

function my_custom_espresso_scripts() {
global $load_espresso_scripts;

if ( ! $load_espresso_scripts )
return;
// custom script located in /wp-content/uploads/espresso/
wp_enqueue_script(‘my-custom-script’, content_url(‘/uploads/espresso/mycustom.js’), array(‘jquery’), ‘1.0’, true);
}

It breaks the site.


Lorenzo Orlando Caum

  • Support Staff

January 23, 2015 at 12:04 pm

Hi,

Try removing the opening PHP tag.

The opening PHP tag (and a closing PHP tag) is needed if you are creating a separate plugin to add that edit to your site. An example of where those are used would be a site specific plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

If you are adding it to your child theme’s functions.php file, then they will not be needed.

Here is the sample code again which I tested on the current version of Event Espresso 3 along with the current version of the multiple events registration add-on:

https://eventespresso.com/topic/no-multiple-attendees/#post-62292


Lorenzo


Austin

January 23, 2015 at 12:28 pm

It still breaks my check out…
http://pesa.minervadevsites.com/event-registration-2/?regevent_action=load_checkout_page

The confirm button no longer works you can’t get past this page. . .


Austin

January 23, 2015 at 12:30 pm

It works fine for THAT page – but it breaks the ability to ‘confirm and go to the payment page’


Lorenzo Orlando Caum

  • Support Staff

January 23, 2015 at 12:43 pm

Hi, I have a possible lead on why that happens.

This is your events registration page:

http://pesa.minervadevsites.com/event-registration-2/

You also have one here:

http://pesa.minervadevsites.com/event-registration/

[ESPRESSO_EVENTS] can only be used once since it is responsible for registration checkout.

Try removing the duplicate page (trash and permanently delete via WordPress Pages).

Then ensure that the remaining page is published with a single [ESPRESSO_EVENTS] and is set as the selected option for events registration in this location:

WP-admin –> Event Espresso –> General Settings –> Page Settings


Lorenzo

Viewing 10 reply threads

The support post ‘Think i am getting closer – Thanks to Josh's pre-written fix, not quite there…’ 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