Support

Home Forums Event Espresso Premium How to add instructions below event title and above everything else?

How to add instructions below event title and above everything else?

Posted: July 21, 2015 at 10:30 am

Viewing 24 reply threads


HopFamilies

July 21, 2015 at 10:30 am

I need to add clear instructions on how to register for an event on the event page itself. I don’t want it in the sidebar in case they are on mobile. I’d like to add the instructions below the event title and above the ticket table but I don’t see an option to do so.

It doesn’t make sense to me that the event body text appears lower down on the page well below the registration button.


HopFamilies

July 21, 2015 at 10:44 am

Assuming this is the helper file that’s the single event template: EEH_Event_View.helper.php

What should I name the new template file – single-event.php or something else?


Lorenzo Orlando Caum

  • Support Staff

July 21, 2015 at 10:50 am

Hello, there are a couple options for setting this up.

You could use something like this to add the messaging before or after the event information:

https://gist.github.com/lorenzocaum/2b2d419d092bf13d9116

With the option above, it is one or the other. You won’t be able to insert in within specific areas.

The other option is to setup starter templates (https://gist.github.com/16aac08f099d7c154f04) and then edit the content-espresso_events.php template to add the information around line 26:

http://cl.ly/image/0m1V0L2M391Q

You may also find this resource helpful for an overview of how the templates work together:

https://gist.github.com/lorenzocaum/0a35fe4997992fdb1dc5


Lorenzo


HopFamilies

July 21, 2015 at 8:29 pm

Thanks. I don’t want to add a new message area where I have to edit the code to edit the message. I just want to move “event_has_content_or_excerpt” to be above the ticket selector.

I also setup the starter templates and there’s no difference on the event page except for the event name appearing twice – and the 2nd one being linked to the event itself.


HopFamilies

July 21, 2015 at 8:36 pm

Doh – I spoke to soon. I see how to move elements on the single events page around on content-espresso_events.php. I got rid of the linked event name too – thanks!


Lorenzo Orlando Caum

  • Support Staff

July 22, 2015 at 11:02 am

Hi, glad to hear you were able to figure this out. Did you have any other questions about working with the templates?

Thanks


Lorenzo


HopFamilies

July 22, 2015 at 5:11 pm

The only thing remaining is it seems the string replacement is tricky – sometimes the string replacement doesn’t seem to work. Any tips for that or are there some formatting rules?


Lorenzo Orlando Caum

  • Support Staff

July 22, 2015 at 7:06 pm

Hi, it needs an exact match including any spacing that may be there.

What are you trying to change? A screenshot or a link on your site would be preferable.

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots


Lorenzo


HopFamilies

July 23, 2015 at 1:17 pm

For example, for free tickets the payment page says

“Class” for “Event” is free, so no payment is required and no billing will occur.

I tried to to change is free, so no payment is required and no billing will occur. to is paid directly to the teacher and will not be billed today. like so:

'is free, so no payment is required and no billing will occur.' => 'is paid directly to the teacher and will not be billed today.',

And it did not change.


Lorenzo Orlando Caum

  • Support Staff

July 23, 2015 at 5:37 pm

Hi, this should work for changing the no payment required messaging in registration checkout:

https://gist.github.com/lorenzocaum/433446065b3bb5d50c71

Thanks


Lorenzo


HopFamilies

July 24, 2015 at 8:26 am

Perfect, thanks. I’m also having trouble replacing the text above the ‘free’ notice, where it says No Payment Required. I tried

'No Payment Required' => 'Class Registrations'

But that is not working.


Tony

  • Support Staff

July 27, 2015 at 6:16 am

Hi there,

Within the last link Lorenzo provided above you’ll find this:

'"%1$sNo Payment Required%2$s' => '"%1$s"REPLACE ME"%2$s"',

So your example needs to be:

'"%1$sNo Payment Required%2$s' => '"%1$sClass Registrations%2$s"',

Does that work?


HopFamilies

July 27, 2015 at 7:03 am

Nope – it still says ‘No Payment Required’. Also, it is now only listing 1 free ticket even if more than 1 are chosen. I took out the no payment messaging function completely and it was still only showing 1 free ticket. I’m guessing there is a problem with all the functions I’ve added? Should they be in a specific order?


HopFamilies

July 27, 2015 at 7:16 am

Even leaving ‘REPLACE ME’ in the code doesn’t work. Also, why does the code have the variables for ticket name (%1$) and event name (%2$) in that line? (I tried removing the variables and it still didn’t work).

Regardless, the biggest concern atm is that it only lists 1 free ticket. Do you guys want to take a look? We’d like to open our registration by the end of the week.


Tony

  • Support Staff

July 27, 2015 at 7:26 am

Even leaving ‘REPLACE ME’ in the code doesn’t work. Also, why does the code have the variables for ticket name (%1$) and event name (%2$) in that line?

Sorry I’m not sure what you mean here. Ticket name and Event Name is not what those two are referencing.

That code is from this:

apply_filters(
		'FHEE__registration_page_payment_options__no_payment_required_hdr',
		sprintf(
			__( '%1$sNo Payment Required%2$s', 'event_espresso' ),
			'
', '
' ) );

The %1$s is the h6 tag.
The %2$s is the closing h6 tag.

Its to allow for the most flexibility within the translations.

If you can link me to the event I’ll take a look at where that string is being output from.

I’m guessing there is a problem with all the functions I’ve added? Should they be in a specific order?

Which functions? The translation function should have no issue, are you using one main function for the translations or multiple functions?

However I’m not familiar with the customisations Lorenzo has provided.


HopFamilies

July 27, 2015 at 8:42 am

Here’s the event: http://hopfamilies.com/register/homeschool-co-op-fall-2015/

The ‘No Payment Required’ is on the last page (after providing contact info & answering questions).

That’s fairly minor compared to the big issues remaining:

1) Under ‘No Payment Required’ it only lists 1 free ticket even if multiple free tickets have been selected

2) I’m not capturing attendee names at all. I edited the Qs for attendees and for each ticket it *only* shows the primary registrant name.

Here are the custom functions in use – most are for changing text. I tried removing them completely to see if the listing of free tickets would change but it did not.

//* Change messaging for ticket to registration
function ee_change_ticket_messaging_registration( $translated, $original, $domain ) {

    $strings = array(       
		'INF' => 'N/A',  
		'Price' => 'Due with Registration','Qty*' => '# per class','$0.00 <span class="currency-code">(USD)</span>' => 'Pay later',
                'Attendee Information' => 'Registration Information',
		'This ticket is required and must be purchased.' => 'This fee is required for registration.',
        	'Available Tickets' => 'Registrations',
        	' / ticket' => ' / registration',
		'Ticket Details' => 'Registration Details',
		'Ticket Sale Dates' => 'Registration Sale Dates', 
        	'Please note that a maximum number of %d tickets can be purchased for this event per order.' => 'Please note that a maximum number of %d registrations can be purchased for this event per order.',
        	'The dates when this ticket is available for purchase.' => 'The dates when this registration is available for purchase.',
		'This ticket allows access to the following event dates and times. "Remaining" shows the number of this ticket type left:' => 'This registration allows access to the following event dates and times. "Remaining" shows the number of this registration type left:',
        	'This Ticket<br/>Sold' => 'This Registration<br/>Sold',
        	'This Ticket<br/>Left' => 'This Registration<br/>Left',
        	'Total Tickets<br/>Sold' => 'Total Registrations<br/>Sold',
        	'You need to select a ticket quantity before you can proceed.' => 'You need to select a registration quantity before you can proceed.',
        	'No tickets were added for the event.' => 'No registrations were added for the event.',
       		'Ticket Name and Description' => 'Description',
        	'The following checkboxes allow you to use the above information for only the selected additional tickets/attendees.' => 'The following checkboxes allow you to use the above information for only the selected additional registrants/attendees.',
    );

    if ( isset( $strings[$original] ) ) {
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_change_ticket_messaging_registration', 10, 3 );

//* add jquery to theme
if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
   wp_deregister_script('jquery');
   wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null);
   wp_enqueue_script('jquery');
}

//* customize registration buttons
function ee_view_details_button() {
 return 'Learn More';
}
add_filter ('FHEE__EE_Ticket_Selector__display_view_details_btn__btn_text', 'ee_view_details_button');
function ee_register_now_button() {
 return 'Register Now';
}
add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', 'ee_register_now_button');
function ee_finalize_registration_button() {
 return 'Submit Registration';
}
add_filter ('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__finalize_registration', 'ee_finalize_registration_button');

//* Update the messaging for the congratulations messaging that appears at the top of the thank you page
add_filter( 'FHEE__thank_you_page_overview_template__order_conf_desc', 'ee_change_thank_you_page_congratulations_messaging' );
function ee_change_thank_you_page_congratulations_messaging() {
 return '<h3 class="">Thank you for your registration</h3><h2>If you are paying by check, we must receive your check within 7 days to approve your registration. Please mail the registration fee to:</h2><p>Name<br>Street<br>City State Zip</p><p>If you paid by Paypal your registration will be approved within 24 hours.<p>';
}

//* Set Event Espresso to look for the ticket selector template in the espresso templates folder within the uploads folder for WordPress
add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'ee_custom_ticket_selector_template_location');

function ee_custom_ticket_selector_template_location(){
    return WP_CONTENT_DIR . '/uploads/espresso/templates/ticket_selector_chart.template_show_remaining_tickets.php';
}

//* Adjust the no payment required messaging in registration checkout
function ee_custom_messaging_no_payment_required_registration_checkout( $translated, $original, $domain ) {
    $strings = array(
        '"%1$sNo Payment Required%2$s' => '"%1$s"Class Registrations"%2$s"',
        '"%1$s" for "%2$s" is free, so no payment is required and no billing will occur.' => '"%1$s" is paid directly to the teacher and will not be billed today.',
    );
    if ( isset( $strings[$original] ) ) {
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
}
add_filter( 'gettext', 'ee_custom_messaging_no_payment_required_registration_checkout', 10, 3 );


Tony

  • Support Staff

July 27, 2015 at 9:06 am

The problem with No Payment Required is a rouge ” in the code Lorenzo posted.

Use this:

'%1$sNo Payment Required%2$s' => '%1$sClass Registrations%2$s',

Apologies for the confusion, I’ll ask Lorenzo to update his gist.

1) Under ‘No Payment Required’ it only lists 1 free ticket even if multiple free tickets have been selected

I have confirmed this and issued a ticket for our developers to investigate.

2) I’m not capturing attendee names at all. I edited the Qs for attendees and for each ticket it *only* shows the primary registrant name.

So you are only collecting the ‘Personal Information’ question group for the Primary Registrant and using 2 custom questions for each additional attendee?

If so that’s currently expected behaviour, if you do not require personal info for additional attendee it will use the Primary Registrant info. The custom questions are save within the registration. Click on one of the registrations and view the custom questions within that page, do you see the names there?


HopFamilies

July 28, 2015 at 5:54 am

Thanks – No Payment Required is fixed now 🙂

So you are only collecting the ‘Personal Information’ question group for the Primary Registrant and using 2 custom questions for each additional attendee?
If so that’s currently expected behaviour, if you do not require personal info for additional attendee it will use the Primary Registrant info. The custom questions are save within the registration. Click on one of the registrations and view the custom questions within that page, do you see the names there?

Yes I do. I suppose for a parent-child situation as we have it makes sense, since it’s easier to see that a group of registrations are together. Is there any way to view registrations on a per transaction basis?

Any idea how long it will take to look into the single free ticket issue?


Tony

  • Support Staff

July 28, 2015 at 6:18 am

Is there any way to view registrations on a per transaction basis?

Not currently.

The registrations are associated with a contact, the contact is created based on the Primary Registrants information (when you do not request Personal Info for additional registrant) the contact details are displayed for each registration.

The custom questions are stored within the registration itself (click on one of the non primary registrations and you’ll see the name at the bottom of the registration)

Any idea how long it will take to look into the single free ticket issue?

I don’t have any eta on the ticket currently, I’ll update this thread once the developers know more about the issue.


HopFamilies

July 28, 2015 at 12:53 pm

OK, thanks. I *think* that the free ticket issue might be the last hurdle before registration testing and then opening.


Lorenzo Orlando Caum

  • Support Staff

July 28, 2015 at 1:36 pm

Hi, we do update members once issues have been corrected so we’ll be sure to share an update here once we have more information.

Thanks


Lorenzo


HopFamilies

July 29, 2015 at 10:44 am

Is this unique to our install? Or something others are experiencing too? I *think* that it had been working ok before but I can’t verify.


HopFamilies

August 3, 2015 at 10:50 am

How exactly are y’all investigating without having a login to our site?


Tony

  • Support Staff

August 3, 2015 at 11:51 am

Hi there,

We don’t need a login for your site as we’ve reproduced this locally.

This is not an issue unique to your site but as it is not a common ticket set up (a single paid ticket with multiple free ticket selections) it does not effect most users.

You can hide that section for the time being whilst our developers investigate the code if you prefer. This can be done using some custom css:

#ee-spco-payment_options-reg-step-form > p:first-of-type, #ee-spco-payment_options-reg-step-form > h6 {
    display: none;
}

We recommend using either the My Custom CSS or Reaktiv CSS Builder plugins to add custom styles such as these.


HopFamilies

August 3, 2015 at 1:51 pm

I already hid the list, thx.

Viewing 24 reply threads

The support post ‘How to add instructions below event title and above everything else?’ 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