Support

Home Forums Event Espresso Premium Amount Due incorrect in event registration completion summary page

Amount Due incorrect in event registration completion summary page

Posted: February 27, 2015 at 8:13 am


Renee deVilliers

February 27, 2015 at 8:13 am

Hi,

I was testing an event registration, and noticed that after completing the registration form and clicking confirm after the event-registration page shows the data users enter, and I click confirm, the summary posts this:

Your registration is not complete until admin approves.
Amount due: C$0.00
Your Registration ID: 45-54f07d4f5333d

We are using pre-approval requirement. And I had made NO PAYMENT. The Amount Due should reflect the cost of the course: $254.25 NOT zero, since the user only gets a payment link once admin has approved their registration. No payment process has occurred at this point in registration.

Also, I want to edit the default message on this page. “Your registration is not complete until admin approves.” I want to change this. Where and how do I do that?

Please advise how I can fix both these issues.

Thanks!


Renee deVilliers

March 2, 2015 at 11:07 am

Hi, I noticed that this support ticket might have been overlooked, as you have addressed all the other tickets I posted at around the same time as this one. I am needing to find a solution for this Amount Due: $0 problem I am having, since the site is live, and we have people registering for classes. Please advise. Thanks


Tony

  • Support Staff

March 2, 2015 at 12:28 pm

Hi Renee,

I have created a ticket to investigate the Amount: $0 issue.

I have a preliminary fix that we will need to run through testing, but if you are comfortable editing PHP files you can apply this yourself.

Within \event-espresso\includes\process-registration\pending_approval_page.php

On line 74 you will find:

$event_cost = $attendee->amount_pd;

Change that to:

$event_cost = $attendee->total_cost;

That should fix the issue of $0

Changing the “Your registration is not complete until admin approves.” string can be done a couple of ways. You can follow the guide here:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/

To translate the phrase.

Or

Go to event-espresso/templates/ and copy pending_approval.php

Then place that within wp-content/uploads/espresso/templates/

Edit the file the to keep it update safe, you will find that string on line 5.


Renee deVilliers

March 10, 2015 at 1:18 pm

Hi Tony,

I edited the file (\event-espresso\includes\process-registration\pending_approval_page.php) as you suggested, and the amount is correct now,

Also, I did place my pending_approval.php file with edited line 5 where you suggested, and I did NOT get revised content – it is still the line “Your registration is not complete until admin approves.”

It doesn’t seem to be picking up the pending_approval.php information.

This is what I have in my pending_approval.php file:

<div id="espresso_confirmation_display" class="event-display-boxes">	
<?php //Pending Approval Page Template ?>
	<h3><?php echo $fname ?>,</h3>
		<p class="instruct"><?php _e('Your registration is not complete until approved by All About Dogs. Once it is approved you will receive an email with payment instructions. Thank you for choosing All About Dogs.', 'event_espresso'); ?></p>
		<p>
			<span class="event_espresso_name section-title"><?php _e('Amount due: ', 'event_espresso'); ?></span> 
			<span class="event_espresso_value"><?php echo $org_options['currency_symbol']?><?php echo $event_cost; ?></span>
		</p>
		<p><span class="section-title"><?php _e('Your Registration ID:', 'event_espresso'); ?> </span><?php echo $registration_id ?></p>
</div>

Please help. My calendar is live, and people are going to begin using it to register.

Thanks.


Lorenzo Orlando Caum

  • Support Staff

March 10, 2015 at 2:32 pm

Hi there,

Just a quick reminder that any edits to the core plugin will be lost on a software update.

Try this sample coding:

function ee_preapproval_messaging_edits( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Your registration is not complete until admin approves.' => 'Your registration is not complete until approved by All About Dogs. Once it is approved you will receive an email with payment instructions. Thank you for choosing All About Dogs.',
        'Billing will only occur after the attendee has been approved by the event organizer. You will be notified when your registration has been processed. If this is a free event, then no billing will occur.' => '',
    );
 
    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_preapproval_messaging_edits', 10, 3 );

It can be added to your child theme’s functions.php file (do not include the opening php tag) or a site specific plugin:

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

The second entry is will be needed as we’ve clarified the pre-approval messaging in the new maintenance release of Event Espresso 3 (released today). Part of that messaging is repetitive since you already have similar messaging in the first part of the gettext filter.


Lorenzo

The support post ‘Amount Due incorrect in event registration completion summary page’ 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