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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • CiviEvent Suggestions (Moderator: Michał Mach) »
  • Having a Maximum number of different tickets
Pages: [1] 2

Author Topic: Having a Maximum number of different tickets  (Read 7499 times)

yautja_Cetanu

  • Guest
Having a Maximum number of different tickets
June 30, 2009, 07:36:58 am
We're using CiviEvent to host thai boxing matches. We want to sell different tickets with different amounts at different prices. This will be especially be useful for the tables where there will be one table for each number. We are also wanting to add the ability for a user to upload a seating plan and sell the tickets based on that (Therefore each table will have a table number from the seating plan and they could buy all the seats at a table).

So we will be modding CiviEvent in 2 ways:

1) Include an easy way to upload a seating plan and for that to be displayed in the template
2) Mod CiviCRM so instead of looking at "Max number of participants" it looks to the number of tickets remaining for each ticket where the tickets available will be set in the "Price Set" form.

Does anyone know if this has been done already? If not we're planning on doing this ourselves anyway, does anyone have any advice or ideas for this? Finally if we do mod this into CiviCRM. Is this the kind of thing we should give back to the community somehow?



Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Having a Maximum number of different tickets
June 30, 2009, 12:25:24 pm
Setting maximum counts on price set items for events has definitely come up as something some folks need. I'm not aware of anyone working on code for this at the moment. If you're interested in developing something that could be integrated into the core codebase at some point - a good starting point is to write a blog post describing the requirements and describing your planned approach (both data model changes and proposed user interface for admin side and for registrants).

If you want to move ahead on this - let me know and I'll make sure you have permissions to post a blog on civicrm.org

(You might want to check out Chris Iven's blogs on his work integrating the "price set" concept into Memberships: http://civicrm.org/blog/4679)
Protect your investment in CiviCRM by  becoming a Member!

yautja_Cetanu

  • Guest
Re: Having a Maximum number of different tickets
June 30, 2009, 12:41:57 pm
Thanks for your reply Dave,

Well we have a deadline to implement this feature for our website 1 and a half weeks away so we are definitely developing it in a way that will be usable. You've already assisted reeking here: http://forum.civicrm.org/index.php?topic=8650.msg37380#new who is working on it.

So that main issue will be building this in such a way that can fit in with CiviCRM (best practises, etc). I'll speak to Reeking and figure out if its best if I post things or he does.
« Last Edit: June 30, 2009, 01:37:12 pm by yautja_Cetanu »

yautja_Cetanu

  • Guest
Re: Having a Maximum number of different tickets
July 01, 2009, 05:02:03 am
Spoken to my team of people. You've helped them before. Reekingofrandomness (Rob) and andrewbelcher are in my team of developers. Me (Jamie) and Rob are just students who used to work together on a church community based website, recently we've been employed for a Thai Boxing Gym which is very exciting. Anyways, from an academic point of view I just love Open-source stuff so I'm hoping anything they pay us to make that isn't already out there, we're hoping we can turn those things into patches and modules. I might post a list of the proposed changes we're making to CiviCRM in the near future so people can tell us if its worth getting it usable to others.

So before we post anything on any blogs. We'll use this thread to discuss our design brief. We want to make two seperate modifications (Please note I'm not a web developer so I'm sure andrew and Rob will correct me on things as we go along!)

1) Seating Plan upload
Add a field that allows easy upload of a seating plan (an image file). And add something in the template that makes it each to change how the seating plan is displayed. (Seatings plans can be whatever you like, but we'll put numbers on them to show the different areas, its likely that this will be displayed in the purchasing tickets screen, not in the event info screen)

2) In the Price Sets. In the Page Edit a price set. Next to Price will be another column called "Number" (people can suggest something better) where the number of tickets can be set. I thought this should not be in "Edit price numbers" so that different groups could still pay different amount but would deduct from the remaining tickets.

-(Maybe here it would be good to have another column called "Tickets Remaining")
- All the current features that apply to "Maxiumum number of participants" should apply to tickets. Don't know exactly what that is. But obviously that means a ticket should count as "Sold out" and not be selectable for a user. If there are waiting list features this should apply to individual tickets, not whole events. Refunds and cancellations should apply to individual tickets not events. And anything else we can find.
- I don't know if this should completely replace "Maximum number of Participants" or work alongside it.

-We will then find a way of reporting ticket sales using Interamind's reporting tools for VirtueMart (Although obviously that is specific to us)


Rob and Andrew - Want to talk about how this will be done technically?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Having a Maximum number of different tickets
July 01, 2009, 12:14:12 pm
Hi Jamie, Rob and Andrew - A few comments on your design thoughts (so far):

1) Seating Plan - You might be able to accomplish this w/o any coding. You can embed an <img /> tag pointing to the Seating Plan (via URL) in the Online Registration -> Introductory Text field (which accepts HTML). Alternately you can create a custom copy of the online registration template - templates/CRM/Event/Form/Registration/Register.tpl - and add the Seating Plan there. (These ideas assume that your client has one venue w/ a single seating plan.)

2) Ticket count limits:
Adding the "Maximum Count" field to the Edit Price Set Field screen makes sense. This would be linked to a new max_count column to the civicrm_price_set_field table.

I think this feature can be "in addition to" Max Participants at the event level - since that's optional.

The civicrm_line_item table stores the "purchased" items when price sets are used - so you can get your current totals from there.

Tickets remaining should probably be a derived (calculated and possibly cached) value rather than a DB column.
Protect your investment in CiviCRM by  becoming a Member!

reekingofrandomness

  • Guest
Re: Having a Maximum number of different tickets
July 02, 2009, 10:47:48 am
Quote from: yautja_Cetanu on July 01, 2009, 05:02:03 am
2) In the Price Sets. In the Page Edit a price set. Next to Price will be another column called "Number" (people can suggest something better) where the number of tickets can be set. I thought this should not be in "Edit price numbers" so that different groups could still pay different amount but would deduct from the remaining tickets.

-(Maybe here it would be good to have another column called "Tickets Remaining")

At the moment, we have it so that you can set a maximum number of tickets available on the Price Field edit form. It's probably not appropriate to have a 'Tickets Remaining' column on the price set page because Price Sets should probably be specific to venues rather than to specific events

The next job is to get the front end of events relying on the price set information rather than anything else.


And yeah Dave, I agree with you about deriving the number of tickets remaining. It's just about how and where we display it.
« Last Edit: July 02, 2009, 10:55:36 am by reekingofrandomness »

yautja_Cetanu

  • Guest
Re: Having a Maximum number of different tickets
July 02, 2009, 12:08:03 pm
Hi there Dave,

We've got a demo of it working in our back-end, working on the styling now. Do you think we could have access to a blog and post our involvement in that blog as you suggested?

I don't know if you can do this but would it be possible for us to have access to a branch of the SVN so we could upload our changes directly? Or would you prefer some other method of collaborating on this as we are obviously quite new to the community?

Finally, we found bits of the developer documentation hard to follow (with regards to hooks and stuff), would you like I to contribute to that? To be honest I think we'll just post suggested documentation into the forum (especially because we're only looking at civicrm with joomla at the moment) so it might be better for you guys to look at our code before we suggest any documentation.

Thanks

Jamie

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Having a Maximum number of different tickets
July 03, 2009, 09:47:20 am
Hi Jamie - responses inline:
Quote from: yautja_Cetanu on July 02, 2009, 12:08:03 pm
We've got a demo of it working in our back-end, working on the styling now. Do you think we could have access to a blog and post our involvement in that blog as you suggested?

Cool! I've updated your civicrm.org login so you can now post blogs :-) Details of the implementation (and screenshots too) would be great.

Quote from: yautja_Cetanu on July 02, 2009, 12:08:03 pm
I don't know if you can do this but would it be possible for us to have access to a branch of the SVN so we could upload our changes directly? Or would you prefer some other method of collaborating on this as we are obviously quite new to the community?

I think the best approach for now is to share the details of your implementation with us / the community and then to submit a patch with your modifications as an issue on the issue tracker.

Quote from: yautja_Cetanu on July 02, 2009, 12:08:03 pm
Finally, we found bits of the developer documentation hard to follow (with regards to hooks and stuff), would you like I to contribute to that? To be honest I think we'll just post suggested documentation into the forum (especially because we're only looking at civicrm with joomla at the moment) so it might be better for you guys to look at our code before we suggest any documentation.

I would just get an account on the doc wiki and make changes / improvements as needed. If there's an area where you're not sure "how it works" or want clarifications prior to documenting - then it makes sense to use the forum.
Protect your investment in CiviCRM by  becoming a Member!

yautja_Cetanu

  • Guest
Re: Having a Maximum number of different tickets
July 07, 2009, 01:19:53 am
Cool ok we'll do that :)

Would it be possible to give reekingofrandomness and andrewbelcher access to posting in my blog?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Having a Maximum number of different tickets
July 07, 2009, 09:32:06 am
As far as I know, each Drupal user has their own blog. So either they can post from your login ("bad behavior" - but ok I guess if you trust them) - or let me know and I can give them each permission to post their own blogs.
Protect your investment in CiviCRM by  becoming a Member!

reekingofrandomness

  • Guest
Re: Having a Maximum number of different tickets
July 07, 2009, 02:43:30 pm
Development on this is still going on, just having a small problem with smarty.

I've made a method called getRemaining($fieldID, $eventID); and that works.

In the CRM_Event_Form_Registration::preProcess() I have these lines (around 271)

Code: [Select]
$this->_priceSetId = $priceSetId;
                $priceSet = CRM_Core_BAO_PriceSet::getSetDetail($priceSetId);

                //Add the number remaining to each priceSet involved.
                foreach( $priceSet[$priceSetId]['fields'] as $fieldId => $field )
                {
                $priceSet[$priceSetId]['fields'][$fieldId]['num_remaining'] = CRM_Core_BAO_PriceField::getRemaining($fieldId,$eventID);
                }

                $this->_priceSet = CRM_Utils_Array::value($priceSetId,$priceSet);
                $this->_values['fee'] = CRM_Utils_Array::value($priceSetId,$priceSet);
                $this->set('priceSetId', $this->_priceSetId);
                $this->set('priceSet', $this->_priceSet);

and it's there further down aswell.

The problem is that, whereas in the template file all the other fields are accessed by {$form.$element_name.num_remaining}, I can only get to it by {$element.numremaining}.

I don't know where numremaining is coming from and I don't know why num_remaining isn't. It does work..but i can't guarantee it will work all the time =P

reekingofrandomness

  • Guest
Re: Having a Maximum number of different tickets
July 07, 2009, 03:17:01 pm
Here's a screen of the back end:

(http://i642.photobucket.com/albums/uu150/rlmumford/screenshot_priceSet_availability_mo.jpg)


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: Having a Maximum number of different tickets
July 07, 2009, 05:04:27 pm
Quote from: reekingofrandomness on July 07, 2009, 02:43:30 pm
The problem is that, whereas in the template file all the other fields are accessed by {$form.$element_name.num_remaining}, I can only get to it by {$element.numremaining}.

i dont think num_remaining is a form element, hence u cannot get it via $form....

however u should be able to get it via the priceSet variable which is also exposed to smarty, which is why u see it via $element.num_remaining

ping us on IRC if u have more questions

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

SportZone

  • Guest
Re: Having a Maximum number of different tickets
July 20, 2009, 08:34:46 pm
Would this module be able to display who has bought the tickets at each table so that during the registration process a person may see who they will be sitting with? I imagine that this would need to be an option when registering so if they don't want their name displayed then it won't show up. This way people can choose to sit with their friends unless their friends don't want them to.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Having a Maximum number of different tickets
August 06, 2009, 09:06:35 pm
FYI - I was just at the NY Meetup and someone had exactly this issue - they have capacity issues on tickets, not people.  some people buy tables (8 people) and they have special tickets (VIP) ,etc.  They wanted tickets to work like participant maximums.  We have a similar requirement.  note I can see this for both events and contributions with premiums.

Note that event reporting is designed around participants, but sometimes "tickets" are more relevant.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • CiviEvent Suggestions (Moderator: Michał Mach) »
  • Having a Maximum number of different tickets

This forum was archived on 2017-11-26.