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) »
  • Fixed Contribution Options
Pages: 1 [2]

Author Topic: Fixed Contribution Options  (Read 4481 times)

phel0049

  • Guest
Re: Fixed Contribution Options
November 26, 2007, 08:06:22 pm
Quote from: Dave Greenberg on November 21, 2007, 02:56:50 pm
We are fixing this issue in 2.0.

For 1.9, you'll have to do a code hack and some edits in the the database as follows:

1. Code hack - add the following line just below line 353 in CRM/Core/BAO/CustomOption.php
Code: [Select]
$dao->orderBy('weight');
(this is above the $dao->find(); line)

2. Review and modify the "weight" column values in the civicrm_custom_option table as needed to get the sort you want. Look for the records where entity_table is 'civicrm_contribution_page' and you'll find your amount options.

(note that if you modify the amounts in Configure Online Contribution Page >> Amounts ... you may need to repeat step 2 - as the update doesn't necessarily set the weights in the order you see the options listed on your screen)

Re the number 1 suggestion:
I tried to do this - I found my CustomOption.php file, but I don't have the $dao->find part anywhere in my code.  I'm attaching a copy of my file below (saved as a text file).  Given my file code, can you tell me where I should insert the line you mention? Thanks

Marilyn

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Fixed Contribution Options
November 27, 2007, 10:17:08 am
Hmm - I see the following on line 354 of the file you've attached:

Code: [Select]
        $dao->find( );

So the new line would go just above it.
Protect your investment in CiviCRM by  becoming a Member!

phel0049

  • Guest
Re: Fixed Contribution Options
November 27, 2007, 12:38:56 pm
Whoops!  :-[

Sorry about that.  I looked through and couldn't find it and then I did a search and nothing came up, but I must have mis-entered something there.

As a side question to streamline my future tech help requests, what program are you using that numbers the lines on the side (it would be easier for me to figure out where line 354 or whereever my future request if I could figure out how to view with line numbers).

Thanks
Marilyn

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Fixed Contribution Options
November 27, 2007, 01:34:43 pm
I'm not sure if you are a windows or Mac person(I'm a Mac user)

On the Mac I use BBEdit. It has an option to turn on line numbers, or you can just look at the status field(lower left corner of window) for the cursor line/col position.

I don't know if TextMate has the option to label every line, but it does also have the status field(lower left corner of window) for the cursor line/col position.

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Fixed Contribution Options

This forum was archived on 2017-11-26.