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) »
  • display id instead of premium
Pages: [1]

Author Topic: display id instead of premium  (Read 1006 times)

Conte01

  • I post occasionally
  • **
  • Posts: 79
  • Karma: -1
  • www.aidboard.com
    • Aidboard
  • CiviCRM version: latest
  • CMS version: Drupal
display id instead of premium
February 14, 2011, 06:58:53 am
hello,

i would like to have the transaction id instead of "premium" displayed when contributions are listed. how could this be managed? what files should i look into?

thans
conte
http://www.aidboard.com

Conte01

  • I post occasionally
  • **
  • Posts: 79
  • Karma: -1
  • www.aidboard.com
    • Aidboard
  • CiviCRM version: latest
  • CMS version: Drupal
Re: display id instead of premium
February 16, 2011, 12:31:11 am
hi

i did on my own :)

in the search.php in /crm/sites/all/modules/civicrm/CRM/Contribute/Selector
i was able to change the header of the premium column by editing this line:

 array(
                                                'name'      => ts('ID'),
                                                'sort'      => 'trxn_id',
                                                'direction' => CRM_Utils_Sort::DONTCARE,

I also set "sort" to trxn_id

in crm/sites/all/modules/civicrm/templates/CRM/Contribute/Form you have to edit Selector.tpl:

line 76: <td class="crm-contribution-trxn_id">{$row.trxn_id}</td>

This should work with other columns as well

Regards,
Conte
« Last Edit: February 16, 2011, 02:31:37 am by Conte01 »
http://www.aidboard.com

Conte01

  • I post occasionally
  • **
  • Posts: 79
  • Karma: -1
  • www.aidboard.com
    • Aidboard
  • CiviCRM version: latest
  • CMS version: Drupal
Re: display id instead of premium
August 29, 2011, 04:14:23 am
hi

recently i updated civicrm to latest version and tried to do this mod again but it does not work. any ideas?

thanks
conte
http://www.aidboard.com

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: display id instead of premium
August 29, 2011, 10:21:24 am
Would be nice if this kind of mod didn't require hacking the core. Is there a template override we could use for this?
Try asking your question on the new CiviCRM help site.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: display id instead of premium
August 29, 2011, 10:30:58 am

I just committed this for 3.4.6

http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmsearchColumns

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: display id instead of premium
August 29, 2011, 04:59:38 pm
Way to go LOBO!
Try asking your question on the new CiviCRM help site.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: display id instead of premium
August 29, 2011, 05:13:10 pm
Perhaps a longer-term solution (since you mentioned that using the hook to overwrite columns is a hack) would be to allow site admin to specify a profile to display search results (similar to the option on contact search, but as a site-wide option, and for more than just contact search... contribution search and contribution tab, for example).
Try asking your question on the new CiviCRM help site.

Conte01

  • I post occasionally
  • **
  • Posts: 79
  • Karma: -1
  • www.aidboard.com
    • Aidboard
  • CiviCRM version: latest
  • CMS version: Drupal
Re: display id instead of premium
August 31, 2011, 01:05:32 am
hi

thanks for the replies. i did it my way again :)

had to add 'trxn_id' on line 94 in search.php.

works again now

thanks
conte
http://www.aidboard.com

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: display id instead of premium
August 31, 2011, 04:14:58 am
Quote from: colemanw on August 29, 2011, 05:13:10 pm
Perhaps a longer-term solution (since you mentioned that using the hook to overwrite columns is a hack) would be to allow site admin to specify a profile to display search results (similar to the option on contact search, but as a site-wide option, and for more than just contact search... contribution search and contribution tab, for example).

Yes, but the hook gives you a lot more power :) (i.e. u can do things like add totals for that contributor in the search result etc)

its a hack (IMO), if you avoid customizing the template, but just "hijack" the columns to send the values you want displayed. In general i think we need to start thinking and figuring out how to get things done and displayed in templates w/o customizing the template!

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • display id instead of premium

This forum was archived on 2017-11-26.