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) »
  • Custom event price according to role or changeable by admin
Pages: [1]

Author Topic: Custom event price according to role or changeable by admin  (Read 2509 times)

timhan07

  • Guest
Custom event price according to role or changeable by admin
June 18, 2009, 04:46:42 am
Hi,

I would like to be able to apply variying fees to registrants based on their role example: attendee will pay ticket price, voluteer will be free, speaker will be free....

Our online system will be used so people can register but we will call them to arrange payment and confirm details.

Is there a way to do this currently? or an extra module?

timhan07

  • Guest
Re: Custom event price according to role or changeable by admin
June 18, 2009, 05:40:51 am
Found a way around it, I guess I will just set up discount sets and have to delete and re-register the contacts manually specifying the discount set.

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: Custom event price according to role or changeable by admin
June 18, 2009, 05:48:16 am
I am assuming you will be adding participant role in profile so that people can select their role. So may be you can do some show/hide of fee radio buttons based on selected role using some javascript or jquery

Kurund

Found this reply helpful? Support CiviCRM

timhan07

  • Guest
Re: Custom event price according to role or changeable by admin
June 18, 2009, 06:11:51 am
I would rather allow only events administrators to change the participant role i.e. online registration assumes everyone is an attendee but then the administrator will change the participant role afterwards when finalising registration / after payment is received.

I could look at writing something to change the event fee when the role is changed.

I suppose a workaround would be to create various discount sets for before today and then apply them manually as event volunteers etc would contact us to register anyway (or us contact them).

Online registrations would really only be for paying attendees.

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: Custom event price according to role or changeable by admin
June 18, 2009, 06:29:14 am

You can potentially use the discount mechanism for this

check: http://civicrm.org/node/566

you can give folks a 100% discount, i.e. free registration and it works quite nicely

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

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: Custom event price according to role or changeable by admin
June 18, 2009, 06:42:56 am
Just in case you want to show/hide fee amount when user selects participant role, you need to add this code in Register.tpl:

Quote
Index: templates/CRM/Event/Form/Registration/Register.tpl
===================================================================
--- templates/CRM/Event/Form/Registration/Register.tpl   (revision 21948)
+++ templates/CRM/Event/Form/Registration/Register.tpl   (working copy)
@@ -185,6 +185,39 @@
             hide("crm-submit-buttons");
         }
     }
+   
+    cj( function( ) {
+        showHideFees( );
+    });
+   
+    cj("#participant_role_id").change( function( ) {
+        showHideFees( );
+    });
 
+    function showHideFees( ) {
+        var role = cj("#participant_role_id :selected").val();
+        cj("input[name=amount]").each( function( ) {
+            if ( role == 1 ) {
+                var showFeeValue = 268;
+            } else if ( role == 2) {
+                var showFeeValue = 269;
+            } else if ( role == 3 ) {
+                var showFeeValue = 270;
+            } else if ( role == 4 ) {
+                var showFeeValue = 269;
+            }
+           
+            var elem = cj(this).attr('id');
+                           
+            if ( cj(this).val() == showFeeValue ) {
+                cj(this).attr( 'checked', 'checked' );
+                cj( "#" + elem).show( );
+                cj( "#" + elem).next( ).show( );
+            } else {
+                cj( "#" + elem).hide( );
+                cj( "#" + elem).next( ).hide( );
+            }
+        });
+    }
 </script>
 {/literal}

HTh

Kurund
« Last Edit: June 18, 2009, 06:44:53 am by Kurund Jalmi »
Found this reply helpful? Support CiviCRM

timhan07

  • Guest
Re: Custom event price according to role or changeable by admin
June 18, 2009, 07:40:22 am
Thanks Guys,

Like the look of the event coupon / discount  :o but think I'm gonna have to read up on Drupal developement / CiviCRM not entirely sure how to create / implement the module...

I'm Relatively new to both...

When i'm in the right frame of mind i'll have a stab at implementing it and might possibly develop a module to allow discount coupons to be generated and emailed to various contacts.

As much as I love learning there just isn't enough time in the day (and my boss doesn't appreciate me ignoring client calls...)!


 
« Last Edit: June 18, 2009, 08:44:09 am by timhan07 »

Slovak

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 3
    • My website
  • CiviCRM version: 3.4.x, 4.2.x
  • CMS version: Drupal 6.x, 7.x
  • MySQL version: 5.5.29
  • PHP version: 5.3.10
Re: Custom event price according to role or changeable by admin
February 05, 2010, 06:25:11 pm
Would the code above still be applicable to hide fee levels based on selected role to CiviCRM 3.0.2?

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: Custom event price according to role or changeable by admin
February 05, 2010, 07:22:19 pm
Quote
Would the code above still be applicable to hide fee levels based on selected role to CiviCRM 3.0.2?

Yup, it should work.

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Custom event price according to role or changeable by admin

This forum was archived on 2017-11-26.