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) »
  • Require Price Set Item for First Participant Only
Pages: [1]

Author Topic: Require Price Set Item for First Participant Only  (Read 563 times)

joshathedone

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 0
  • CiviCRM version: Civicrm4
  • CMS version: Drupal 7
  • MySQL version: 5.1.41
  • PHP version: 5
Require Price Set Item for First Participant Only
November 09, 2012, 08:00:48 am
My org is in the planning stages of running a conference at a hotel.  Attendees have to purchase a hotel room (it's how the venue is making their money), but there can be up to two attendees in a room.  We have no problem with making attendees register together as most are couples.  However, we do have to collect information from each attendee which precludes me simply making a price set option that increments by two. I am trying to figure out how to make the hotel fee required for the first attendee but not the second, which I assume is going to require some ind of hack.  Any ideas?   

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Require Price Set Item for First Participant Only
November 14, 2012, 06:01:17 am
This probably does require custom code. You could make a template "extra" file and use jQuery to hide payment options. Then on the first page you hide the "zero" dollars option and they must pay. On subsequent pages, the JS selects the zero dollars option and then sets left in CSS to -1000 so they never see it.

That's one way to do it. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

kharding

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 4
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 7
  • MySQL version: Recent
  • PHP version: 5.3.16
Re: Require Price Set Item for First Participant Only
November 14, 2012, 11:01:58 am
If there are up to two attendees in a room, can you include a profile in the form (on the bottom) that is a "Room partner" or something like that, that collects the name of the second person?

Have your price set have a "number of attendees" field, that increments the registrants by one or two. Radio box or select should do it.

The additional profile can have instructional text that says "fill this out to register the person staying with you" or something like that.

Maybe?

joshathedone

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 0
  • CiviCRM version: Civicrm4
  • CMS version: Drupal 7
  • MySQL version: 5.1.41
  • PHP version: 5
Re: Require Price Set Item for First Participant Only
November 16, 2012, 02:37:38 pm
@kharding... That's actually not a bad solution.  The only issue is that in this case we have to collect a "conference fee" per person and a room fee per room.  If I add the profile on to the bottom then I am going to have to check and see if they paid the conference fee for two people.  I don't think there is a way to make the information required only if a specific price option is selected?  Is there a way to flag fields as required with jquery perhaps?

@Hershel - So what you are saying is...

1. Create a price set that has a $0 option for the room.
2. On the first participant, hide the $0 option, either with jquery or js.
3. Create a special template for additional participants.
4.  On that page, hide the room payment option with css and select 0 with jquery.

If I go that route, would there be a way to make it so someone could only register one additional participant?  The hotel is limiting to two participants per room.

Thanks for the suggestions!

joshathedone

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 0
  • CiviCRM version: Civicrm4
  • CMS version: Drupal 7
  • MySQL version: 5.1.41
  • PHP version: 5
Re: Require Price Set Item for First Participant Only
November 16, 2012, 04:12:17 pm
Or I suppose I could use css to hide the other number of event participants ;D

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Require Price Set Item for First Participant Only

This forum was archived on 2017-11-26.