MIx of Fixed and Variable Ticket Prices

WordPress Event Management, Calendars & Registration Forums General Question MIx of Fixed and Variable Ticket Prices

This topic contains 2 replies, has 2 voices, and was last updated by  George Bounacos 7 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25859

    Stephen,

    Great plugins. I’ve enjoyed helping out a nonprofit with their charity event.

    My question has to do with mixing variable and fixed price ticketing.

    This is for a golf tournament and people can buy a ticket for the golf event itself or a sponsorship or they can make a donation.

    Ideally, I could love to have three separate forms that add up to one amount. Can I do that?

    The other question is regarding a donation amount. I would like the visitor to key in the amount of an additional donation they would like to make or for someone who wants to donate, but doesn’t play golf.

    Can you help me with either of these?

    George

    P.S. The form is at http://www.sparcsolutions.org/golf

    George Bounacos
    #25865

    You could create different ticket types: sponsorship, ticket or donation. You would have to be careful here though, as ‘donation’ and ‘sponsorship’ would be considered tickets by the plug-in. This might seem confusing for the user who receives an e-mail with their “tickets”.

    Additionally, you can’t set an event wide limit – as donations and sponorships will count towards that. So you would just have to rely on the limit placed on the individual ticket (this is fine, unless you want more than one ticket type that you are actually treating as a ticket).

    Lastly, it’s possible to allow the user to add a donation, but it’s a solution that would have to be developed. I would proceed as follows:

    1. Add a field via the form customiser or (preferably) the Form API. The number type would work, but only allows integer values.

    2. Load some javascript that listens for a value that has been entered, and alters the ‘cart’ total. There is an example of how this is done in the VAT plugin – the difference is, that is adding a fixed percentage, rather than a dynamic amount. That plug-in also adds a row with the VAT amount, which you could include for the donation amount if required.

    3. Then server-side, you alter the booking total based on the value stored against your donation field (see the tutorial on the Form API on retrieving that value). The VAT plug-in also adds rows to the e-mail

    4. Lastly, for PayPal, you will need to alter the cart object set to Paypal: https://github.com/stephenharris/Event-Organiser-VAT/blob/02c7aeda3e881ceb082ce60f83576394481b7be4/includes/vat.php#L151-L179. If you inspect the $cart variable you’ll see the individual items in the cart, you can add an additional ‘donation’ item.

    Stephen Harris
    #25873

    Hello, Stephen. Many thanks for your thoughtful reply. I will be sure to share your input with the dev who will be working on this.

    Best,
    George

    George Bounacos
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.