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 CiviEvent (Moderator: Yashodha Chaku) »
  • Event fees tables when one of the price sets is zero
Pages: [1]

Author Topic: Event fees tables when one of the price sets is zero  (Read 1020 times)

DanilaD

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 11
Event fees tables when one of the price sets is zero
July 04, 2010, 01:36:15 am
Hello.

If a price set contains 0 as one of the options, the corresponding item <td> in fees table on event screen will miss necessary class:

Code: [Select]
<td class="price_set_option_group-label">Payment</td>
                        <td></td>
                    </tr>
<tr> <td class="price_set_option-label">Run!</td>
                        <td>0.00</td>
                    </tr>
<tr> <td class="price_set_option-label">Join!</td>
                        <td class="fee_amount-value right">100.00</td>
                    </tr>

Necessary class is applied if I change that option from 0.00 to 0.01.

I've found that a simple change to EventInfo.tpl, located in civicrm/templates/CRM/Event/Page/EventInfo.tpl will solve this problem: change

Code: [Select]
<td{if $feeBlock.value.$idx} class="fee_amount-value right"{/if}>
to

Code: [Select]
<td{if ($feeBlock.value.$idx>=0)} class="fee_amount-value right"{/if}>
Is this a bug or an expected behavior for zero-price options? The table looks broken if I don't fix this.

Regards,
Danila

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Event fees tables when one of the price sets is zero
July 04, 2010, 06:10:41 am
Can you try to replicate this on http://drupal.demo.civicrm.org

Kurund
Found this reply helpful? Support CiviCRM

DanilaD

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 11
Re: Event fees tables when one of the price sets is zero
July 04, 2010, 07:49:13 am
Done

http://drupal.demo.civicrm.org/civicrm/event/info?reset=1&id=17

Please see the attached screenshot.

Code: [Select]
    <div class="section event_fees-section">
        <div class="label"><label>Conference Fee</label></div>

        <div class="content">
            <table class="form-layout-compressed fee_block-table">
                                                                                                                        <tr>
                        <td class="fee_level-label">Zero</td>
                        <td>€ 0.00</td>
                    </tr>
                                                                                                                        <tr>
                        <td class="fee_level-label">More than</td>

                        <td class="fee_amount-value right">€ 100.00</td>
                    </tr>
                                                                                                                        <tr>
                        <td class="fee_level-label">Even more</td>
                        <td class="fee_amount-value right">€ 200.00</td>
                    </tr>
                                                                                                                        <tr>

                        <td class="fee_level-label">Largest</td>
                        <td class="fee_amount-value right">€ 1,000.00</td>
                    </tr>
                            </table>
        </div>

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Event fees tables when one of the price sets is zero
July 05, 2010, 11:59:42 am
Danila - thx for catching this. Now that we allow 0 and negative values for price set fields, I don't think the conditional logic on the display makes sense at all so I've removed it completely.

http://issues.civicrm.org/jira/browse/CRM-6443

Code: [Select]
     <td class="fee_amount-value right">{$feeBlock.value.$idx|crmMoney}</td>
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event fees tables when one of the price sets is zero

This forum was archived on 2017-11-26.