I am trying to modify the confirmation and final page (not sure of the name) for contributions and events. I want to modify the templates like described in this post - Why does the Contribution page amounts appear as a quanity?.

A few questions:

  1. How do I find what template to modify?
  2. How do I know where to put the custom template?
  3. Is it best to just modify the template or to put this in an extension? I already have an extension with some simple JS.

I appreciate the help.



You're looking for the Confirm and ThankYou templates - they live here - for Contribution pages (and tree structure is very similar for Event):

enter image description here

Two options to override them:

  1. add a custom_templates directory in the System Settings -> Directories - mimic this entire three.

  2. or yes put it into your extension! I like that option better as I tend to forget about custom_php and custom_tpl when I upgrade sites. Same thing - in your extension -> copy the entire tree starting with templates - of course rename everything. Perhaps you already used civix to create your extension? Then you should already have a templates/ directory ready to be used!

  • Excellent - enjoy! Jul 6 '16 at 17:45
  • Karin, Turns out the table comes from templates/CRM/Price/Page/LineItem.tpl - is very easy to remove the columns I do not want. But I want them in some cases and not others. For example if it is an event AND they have ordered multiple tickets. Is there a way to find what variables are available in Smarty? Thanks!
    – Josh
    Jul 11 '16 at 4:09
  • add &smartyDebug=1 to the url of your page; for a nested template (as in your case), add the tag {debug} in the template itself. You need permission "view debug output" to be able to see debug info. Jul 11 '16 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.