Support

Home Forums Event Espresso Premium Thank you page EE4 -customization

Thank you page EE4 -customization

Posted: August 19, 2019 at 3:07 am

Viewing 5 reply threads


gferenca

August 19, 2019 at 3:07 am

Hi,
i saw few threads about customization of thank you page and i made some changes in event-espresso-core-reg/shortcodes/espresso_thank_you/templates/thank-you-page-payment-details.template.php and event-espresso-core-reg/shortcodes/espresso_thank_you/templates/thank-you-page-transaction-details.template.php but there are still items that i don’t wan’t to show:
1. I would like to hide whole Transaction details
2 In Payment details there is red text “No payments towards this transaction have been received.” which I edited in payment details template but old text is still there.
Also how can i add some fields in Invoice template. I added company name and VAT in registration form and i think that these fields are must have in Invoice template. I tried to add shortcodes in message template but there is something wrong and i get error.
Regards,


Tony

  • Support Staff

August 19, 2019 at 5:31 am

Hi there,

i saw few threads about customization of thank you page and i made some changes in event-espresso-core-reg/shortcodes/espresso_thank_you/templates/thank-you-page-payment-details.template.php and event-espresso-core-reg/shortcodes/espresso_thank_you/templates/thank-you-page-transaction-details.template.php but there are still items that i don’t wan’t to show:

Ok, so you’ve modified core and that’s not something recommend or support. Each time EE is updated those modifications will be lost.

Can you provide some details on what it is you want to do change? You may be better hiding most of the info with CSS but you can also load a custom template from within your theme (preferably a child theme) rather than editing core.

We can point you in the right direction if you let us know what your trying to achieve.

1. I would like to hide whole Transaction details

You can hide that with CSS:

#espresso-thank-you-page-ajax-transaction-dv {
    display: none!important;
}

You can add that in Dashboard -> Appearance -> Customize -> Additiona CSS.

2 In Payment details there is red text “No payments towards this transaction have been received.” which I edited in payment details template but old text is still there.

There’s a filter for that text FHEE__payment_overview_template__no_payments_made.

So you’d create a snippet like this:

https://gist.github.com/Pebblo/e0a716dcc0a8876bffaf7911a9ecf7f9

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

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

Also how can i add some fields in Invoice template. I added company name and VAT in registration form and i think that these fields are must have in Invoice template. I tried to add shortcodes in message template but there is something wrong and i get error.
Regards,

You would add them within the admin:

Event Espresso -> Messages -> Default messages templates -> Invoice.

How/where you add them and the shortcode you use depends on how your collecting that info. You said you’d tried adding them but get an error, can you post the shortcode you used and the error your getting please?

How did you add those questions to the registration? I’m guessin you are asking the primary registrant for those details?


gferenca

August 19, 2019 at 8:10 am

Hi,
thank you for a quick answer,
i think i did something wrong in thank-you-page-payment-details.template.php file:

should i replace this:
echo apply_filters(
‘FHEE__payment_overview_template__no_payments_made’,
sprintf(
__(‘%sNo payments towards this transaction have been received.%s’, ‘event_espresso’),
‘<p class=”important-notice”>’,
‘</p>’
)
);

with your code:

add_filter( ‘FHEE__payment_overview_template__no_payments_made’, ‘tw_ee_no_payments_made_text’ );
function tw_ee_no_payments_made_text() {
return ‘Your custom text here’;
}

———–
Regarding Messages in Invoice, if i check questions that i previously added to Questions in Question Group Address Information, i would like to show them on invoice below these information:
[PRIMARY_REGISTRANT_FNAME] [PRIMARY_REGISTRANT_LNAME]
[PRIMARY_REGISTRANT_ADDRESS]
[PRIMARY_REGISTRANT_ADDRESS2]
[PRIMARY_REGISTRANT_CITY], [PRIMARY_REGISTRANT_ADDRESS_STATE]
[PRIMARY_REGISTRANT_COUNTRY]

Which text should i add into parenthesis,

Thank you!


Tony

  • Support Staff

August 19, 2019 at 8:23 am

should i replace this:

No, you don’t edit the template file at all and you don’t replace any code.

You place the snippet of code I gave you into a custom functions plugin, the link in the above posts guides you on how to create one.

It uses a hook within EE to change the text without modifying core, if you’ve not used hooks before I highly recommend you read this:

https://www.smashingmagazine.com/2011/10/definitive-guide-wordpress-hooks/

Regarding Messages in Invoice, if i check questions that i previously added to Questions in Question Group Address Information, i would like to show them on invoice below these information:

Assuming you are asking those questions to the Primary Registrant you would use:

[PRIMARY_REGISTRANT_ANSWER_*{question text}]

So say you have a question ‘Company Name?’ and the shortcode for that would be:

[PRIMARY_REGISTRANT_ANSWER_*Company Name?]


gferenca

August 22, 2019 at 2:30 am

Hi,
i followed your topic and successfully changed message in Invoice, thank you!
also message in invoice (company and vat) worked great!
thanks,


Tony

  • Support Staff

August 22, 2019 at 2:47 am

Great! I’m glad that worked for you.

Viewing 5 reply threads

The support post ‘Thank you page EE4 -customization’ 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