CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Can I customize 'confirm contribution' button?
Pages: [1]

Author Topic: Can I customize 'confirm contribution' button?  (Read 862 times)

ShirleyB

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: drupal 7.15
  • MySQL version: 5.5.27
  • PHP version: 5.3
Can I customize 'confirm contribution' button?
September 09, 2012, 05:51:24 am
I want to change the words on the 'confirm contribution' button on my contribution pages to something like "sign up now". Using Firebug I've identified that this is the relevant bit of html:

<div id="crm-submit-buttons" class="crm-submit-buttons">
<span class="crm-button crm-button-type-upload crm-button_qf_Main_upload">
<input id="_qf_Main_upload-bottom" class="form-submit default" type="submit" value="Confirm Contribution" name="_qf_Main_upload">
</span>
</div>

BUT ... I can't work out which file this is coming from so that I can access and edit it. Could someone point me to the file I need to edit please?

(NB: I think that I should be able to do this through Firebug, because there's an edit button on the Firebug interface. But there doesn't seem to be a way to then save it so once I click away, anything I've edited reverts back to it's original state).

Thanks
Shirley

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Can I customize 'confirm contribution' button?
September 10, 2012, 12:34:07 am
Hi Shirley,
you need to change the template that is used. You can do this with jQuery using this method (depending on what version you are using):
http://civicrm.org/blogs/dave-greenberg/now-its-easier-add-custom-behaviors-templates

Or you have to change the Smarty template as described here:
http://book.civicrm.org/developer/techniques/templates

Hope this helps!
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

ShirleyB

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: drupal 7.15
  • MySQL version: 5.5.27
  • PHP version: 5.3
Re: Can I customize 'confirm contribution' button?
September 10, 2012, 01:49:10 am
Hi, Thanks for the pointers. I'm not competent with jQuery, but the templates route looks promising.

If I've understood the instructions correctly I should create a separate directory for custom templates and copy the existing template file to it, then make the changes to the copy rather than the original. If I then identify the path to custom templates in Global Settings, civiCRM will recognise the directory and look there for the template (this is much the same as the process for customizing a drupal theme I think).

Will this have any affect on other templates or other operations - since civiCRM is apparently now using templates from two different locations, and ignoring the original template in the original location (which I assume I don't delete).

Although I have Firebug installed, I'm not finding it easy to identify the correct template the form is using, although the suggestion to simply 'view source' in a browser will hopefully work.  I'll try working through the instructions at http://book.civicrm.org/developer/techniques/templates and see how it goes.

thanks again
Shirley

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Can I customize 'confirm contribution' button?
September 10, 2012, 01:54:36 am
The 'view source' will work, although you might have to trace your way through the template and find some includes (templates that are copied in during the actual process).
Yes, you have to create your customizing folder and tell Civi about it. This will not affect other operations, CiviCRM always checks if there are templates in this folder and uses it if the template is there. If not, it will use the core one. So you do not have to delete the core template, CiviCRM will simply use your version.
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Can I customize 'confirm contribution' button?
September 11, 2012, 06:12:31 am
What about using "Word Replacements"? Browse to civicrm/admin/options/wordreplacements?reset=1 on your site.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Can I customize 'confirm contribution' button?
September 11, 2012, 06:14:46 am
That could work indeed Hershel! What version of CiviCRM are you using Shirley?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

ShirleyB

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: drupal 7.15
  • MySQL version: 5.5.27
  • PHP version: 5.3
Re: Can I customize 'confirm contribution' button?
September 12, 2012, 02:12:46 pm
I'm using civi 4.1    I have Word Replacement on the admin menu, but I'm not clear how it works. Presumably once you replace one word with another e.g. on the Confirm Contribution button, then you can't use the word contribution anywhere elso on the site?

Shirley

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Can I customize 'confirm contribution' button?
September 12, 2012, 02:45:04 pm
Try "replacing" the phrase Confirm Contribution. It won't affect just the word Contribution alone.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

ShirleyB

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: drupal 7.15
  • MySQL version: 5.5.27
  • PHP version: 5.3
Re: Can I customize 'confirm contribution' button?
September 13, 2012, 02:43:37 am
Brilliant!! That's worked a treat - and a lot easier than trawling through all the tpl files that the one shown on the source code calls :-( 

Now I'm going to experiment to see whether Word Replacement will also deal with longer bits of text, like the standard bit about membership renewals.  Is there a specific limit on the number of characters Word Replacement can accommodate?

Just thinking aloud about that, I could maybe get over any character limit by dividing a sentence into 2 or 3 chunks and replace them separately. So long as I use exact match that shouldn't affect other bits of the site.

really appreciate the help, thanks
Shirley

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Can I customize 'confirm contribution' button?

This forum was archived on 2017-11-26.