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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Price field ordering not working.
Pages: [1]

Author Topic: Price field ordering not working.  (Read 697 times)

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Price field ordering not working.
June 14, 2011, 05:22:18 am
I have had trouble reordering price sets on my own site, and can reproduce the problem on both the 3.4 and 4.0 demo sites.

People may not notice it at first, because it depends on how/when you enter the price options.

If you create a price field and enter all the options at that time, then the options are given sequential order numbers and you can rearrange them as you want at a later stage using the ordering arrows.

However, a problem arises if you want to go back and add other options to that price field.  The steps to see the problem are as follows:

    Create a price field and enter, say, 3 price options letting civicrm give them order numbers 1 to 3. save the price field.
    Use the 'new option for price field' button to create three new options setting the 'order' to 4, 5 and 6 respectively.


Now preview the price field.  You would expect to see:

    1st item created originally
    2nd item created originally
    3rd item created originally
    1st item created as an extra which you set to order 4
    2nd item created as an extra which you set to order 5
    3rd item created as an extra which you set to order 6


but instead you see:

    1st item created originally
    1st item created as an extra which you set to order 4
    2nd item created as an extra which you set to order 5
    3rd item created as an extra which you set to order 6
    2nd item created originally
    3rd item created originally



Now it is nearly impossible to get them back into the order you want using the ordering arrows as they don't do what you expect.

What has happened is that the 3 options you created later as extra options have all been saved with order = 1, instead of order = 4,5 or 6 as specified.

Now you have 4 options saved with order = 1, one option saved with order = 2 and one option saved with order = 3.  The four options with order = 1 act as an ordered block.  You can't (easily) change the order within that block of 4 using the arrows and they (usually) jump as a block when you try to move other items up or down.

So that is the bug, but I have no programming skills to suggest a fix and I don't know how I go about reporting it as a bug.
« Last Edit: June 14, 2011, 05:41:43 am by jchester »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Price field ordering not working.

This forum was archived on 2017-11-26.