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) »
  • Changing elements on the Contribution Search Page
Pages: [1]

Author Topic: Changing elements on the Contribution Search Page  (Read 1912 times)

BarisArt

  • Guest
Changing elements on the Contribution Search Page
March 01, 2008, 01:57:04 am
Hi there,

I'm trying to change the status selection options on the Contribution Search Page.
Right now it is possible to select the status 'Completed', 'Pending' or 'Cancelled'.
However, we would like the possibility to also select 'In Progress' as status.

How could this be done? I am afraid I still don't get how these forms are build.
In templates\CRM\Contribute\Form|Search\Common.tpl I found this:

<td class="label">{ts}Status{/ts}</td>
<td>{$form.contribution_status.html}</td>

But I cannot find the file which defines which statuses should be shown? Where is this contribution_status.html being constructed?

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: Changing elements on the Contribution Search Page
March 01, 2008, 11:12:42 am

Please read: http://civicrm.org/architecture/

to get a better idea of how the forms are built and how tempaltes are used

Also note that "In Progress" is being obsoleted in 2.1 You should use Pending (which means the same things (IMO))

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

BarisArt

  • Guest
Re: Changing elements on the Contribution Search Page
March 01, 2008, 03:13:13 pm
Thanks lobo, I will read the architecture.

Good to know that In progress will become obsolete.
We decided to use it because we needed an extra step between Pending and Completed. Why?

- We do an offline contribution and the payments status will be set to Pending.
- We debit the money from the participant's bank account (one-time deposit) and put its status on In progress.
- The participant can withdraw this debit for the time of 1 month. If this hasn't been done after 1 month, we change the Payment status into Completed.

I think we have to find another way to keep track this.

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: Changing elements on the Contribution Search Page
March 01, 2008, 04:27:45 pm

We were planning to obsolete it since we were not using it and it was left there by mistake (or so we think).

Note that even if we obsolete it, you can extend any of our option value pairs with your own specific ones. (Advantages of using a database for such tables).

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

gastrit

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 2
  • CiviCRM version: 4.2.2
  • CMS version: 7.8
  • MySQL version: 5.1.41
  • PHP version: 5.3.2
Re: Changing elements on the Contribution Search Page
November 22, 2011, 04:28:26 am
This is an old topic but seems to still be in effect. In the search page for contribution (and advanced search) I only get to choose 'Completed', 'Pending' or 'Cancelled'. Not my own specified statuses. I want to search for (for example) my own status 'Old debt' but can't.

If you add a custom status you should also be enable to search for contribution with that status. Do I need to use the search builder for this?

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: Changing elements on the Contribution Search Page
November 22, 2011, 06:32:20 am

can u check and debug the code here:

CRM/Contribute/BAO/Query.php

search for the comment

Code: [Select]
// Remove status values that are only used for recurring contributions or pledges

we build the list of contribution status there. hardcoding the numbers 5 and 6 is not great, but i suspect that might be the cause of your bug

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

gastrit

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 2
  • CiviCRM version: 4.2.2
  • CMS version: 7.8
  • MySQL version: 5.1.41
  • PHP version: 5.3.2
Re: Changing elements on the Contribution Search Page
November 22, 2011, 12:34:27 pm
You were right!

It's hardcoded to remove status id 5 and 6 from the option list because the coder thinks those are only used for recurring contribution/pledges. Maybe that is a good thing for many people I don't know. But we use the contribute module for regual payments and are using the In Progress for payments that are only partly paid (which is quite common to do by the members of my client org). And we may also want to use the Overdue and a custom status.

I just removed the these two lines to make it work:
unset( $statusValues['5']);
unset( $statusValues['6']);

Then In Progress and Overdue shows up and the search is performed ok. Thanks a lot Lobo!

// Jonas

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: Changing elements on the Contribution Search Page
November 22, 2011, 02:54:52 pm

yes, i'm not very sure why we do that. Seems a bit wierd, IMO

if there are other folks that run into the same issue, we'll revisit and potentially fix that code

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

Martin Fuggle

  • I post frequently
  • ***
  • Posts: 172
  • Karma: 3
    • Travel and Photography
  • CiviCRM version: 4.2.x, 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 6.x and 7.x
  • MySQL version: 5.1.36-cll
  • PHP version: 5.3.6
Re: Changing elements on the Contribution Search Page
July 14, 2013, 11:08:28 pm
This was not an issue in 4.2.9 but having just upgraded to 4.3.5 I can no longer see In Progress or Overdue. We use this for membership payments that are not fully paid since there is no easy way of allowing a part paid membership and then be able to add new contributions to it. So having upgraded to 4.3.5 I have to see why this issue remains and from what I can tell the code still contains the unset statements as stated. Why has this change been made?

Cheers
Martin Fuggle
« Last Edit: July 14, 2013, 11:21:58 pm by Martin Fuggle »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Changing elements on the Contribution Search Page

This forum was archived on 2017-11-26.