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) »
  • Early bird discounts with price sets
Pages: [1] 2

Author Topic: Early bird discounts with price sets  (Read 7536 times)

breity

  • Guest
Early bird discounts with price sets
January 30, 2010, 03:14:06 pm
So, we have an event that has several different tickets prices, plus one optional item that attendees can add (registering for a competition).  This can be achieved nicely using a price set event fee structure (one required radio button set for the ticket price plus an optional checkbox for the competition registration).

We also have 3 different early registration discounts.  We are using an online registration page with Paypal processing.  It seems the only way to accomplish this is to set up several different ticket price options in the price set and manually enable the correct one and disable the others depending on the date.  The optional item price never changes.  This is a bit more cumbersome than the very convenient early discount sets that are available for the regular fees option, but doable.

The problem with this work-around, though, is that we also have staff members and VIPs who we'd like to register as well (manually by an admin).  These people will get free tickets, so we'd like to register them with a price of $0.  So I can add a price option to the price set with $0 for each ticket type.  Unfortunately, there is no way to register a new participant and use the $0 price option because only the active price option shows up when registering.  This isn't a problem when using the regular event fee structure (no price sets), because an admin can choose which discount set to use when registering a participant.

Is there any way to allow an admin to choose an option from a price set that is set to inactive?

Does this make sense?  Any ideas?  Any plans to allow early bird discounts along with price sets?  Thanks for any help.
« Last Edit: January 30, 2010, 03:26:35 pm by breity »

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Early bird discounts with price sets
January 30, 2010, 04:30:17 pm
Does this help? http://forum.civicrm.org/index.php/topic,10194.0.html
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Early bird discounts with price sets
January 30, 2010, 05:39:43 pm
Quote from: breity on January 30, 2010, 03:14:06 pm
Is there any way to allow an admin to choose an option from a price set that is set to inactive?

Does this make sense?  Any ideas?  Any plans to allow early bird discounts along with price sets?  Thanks for any help.

Would be great for you to get a developer to build this and/or sponsor the core team to do so. I suspect its a 50 hour project or so. Some of the requests that have come up are:

1. allow "admin only" price fields AND "admin only" event fee levels

2. allow price sets to be modified via a hook

3. early bird discounts for pricesets (this might be a bit more involved and take more hours)

lobo
« Last Edit: February 01, 2010, 10:49:37 am by Dave Greenberg »
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mhm

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
Re: Early bird discounts with price sets
March 16, 2010, 05:48:12 pm
Just wanted to chime that I'd love to see #3, or an alternate version (such as allowing both price sets AND Regular Fees [with only the regular fees using the signup by discounts] on the same event.  Would that be easier to implement?

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: Early bird discounts with price sets
March 16, 2010, 07:38:04 pm
would be great if you can get a developer to build this and/or sponsor the core team to do so

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

mhm

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
Re: Early bird discounts with price sets
March 17, 2010, 09:09:46 am
Will look into doing that. Thoughts on how many hours and/or how difficult my alternate might be?

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: Early bird discounts with price sets
March 17, 2010, 09:46:27 am

our initial estimate is 50 hours. Your addition of regular fees + price set will add some more hours to that estimate, not sure whether we'd want that since u can simulate the regular fees as a price field

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

mhm

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
Re: Early bird discounts with price sets
March 17, 2010, 10:07:33 am
Do you not think it would be simpler to allow both regular fees and price sets? (As opposed to allowing sign-up by discounts on price sets?)

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: Early bird discounts with price sets
March 17, 2010, 10:12:05 am

no.the code is currently structured so its either a regular amount or a priceset. changing that would probably require touching a lot more files, IMO. but i might be wrong. When you hire a developer, that person could investigate and scope it out

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

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Early bird discounts with price sets
December 15, 2010, 06:35:07 pm
Rather late comment I know, but someone else might come across this like I have whilst searching for help

Quote
We also have 3 different early registration discounts.  We are using an online registration page with Paypal processing.  It seems the only way to accomplish this is to set up several different ticket price options in the price set and manually enable the correct one and disable the others depending on the date.  The optional item price never changes.  This is a bit more cumbersome than the very convenient early discount sets that are available for the regular fees option

We also need to use price sets for our events.  I plan to cope with early-bird prices as follows.  Set up the 'standard' price set, with the no-discount prices  Copy the price set (a one click process) and add early-bird to it's title.  Go in and change the prices to the early-bird values. 

All this can be done during the initial event set up.

When you set up the event choose "Price set - early-bird" for your price set.  When the early-bird offer ends, just go in to Manage events and change the price set to "Price set - standard" .  This is a quick, no pressure way to make the change - much easier than enabling and disabling individual prices within a set can be extend to any number of discount sets.

mhm

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
Re: Early bird discounts with price sets
December 15, 2010, 07:07:39 pm
Heh, that's actually exactly the solution I came up!

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: Early bird discounts with price sets
December 15, 2010, 07:50:48 pm
The buildAmount hook now supports price-sets :) (in CiviCRM v3.3)

So you can potentially use the hook to provide discounting for your price-set based events

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

mhm

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
Re: Early bird discounts with price sets
December 15, 2010, 08:07:52 pm
I knew I was excited for 3.3 for a reason!

sanchez

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Early bird discounts with price sets
January 02, 2011, 06:47:41 pm
Quote from: breity on January 30, 2010, 03:14:06 pm
We also have 3 different early registration discounts.  We are using an online registration page with Paypal processing.  It seems the only way to accomplish this is to set up several different ticket price options in the price set and manually enable the correct one and disable the others depending on the date.  The optional item price never changes.  This is a bit more cumbersome than the very convenient early discount sets that are available for the regular fees option, but doable.

Table civicrm_price_field contains the price fields that compose price sets.
In that table there are already two fields: active_on, which has a comment "If non-zero, do not show this field before the date specified", and expire_on, commented "If non-zero, do not show this field after the date specified".

That is nice!  I just went there with phpmyadmin and changed the value of those fields to appropriate dates.

Only problem is that the actual filtering is not working/implemented and the price fields still show up.

I have been looking and trying to understand the DAO, maybe a very small code change based on the logic that deals with inactive fields will do the trick. Seems to be an easy thing to figure out. Any clues?

Apis more modoque

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: Early bird discounts with price sets
January 02, 2011, 07:18:10 pm

I took a quick look at the code and figured that there is no logic that implements this filtering at the price field level

all the price set code is here:

CRM/Price/BAO/Set.php

You'll need to modify the functions there to implement this logic. You'll also need to modify the price set editing code to allow users to modify these dates via the online forms

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

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Early bird discounts with price sets

This forum was archived on 2017-11-26.