Support

Home Forums Event Espresso Premium Alternative to Price Modifier for EE4

Alternative to Price Modifier for EE4

Posted: December 15, 2016 at 12:03 pm

Viewing 12 reply threads


Matt

December 15, 2016 at 12:03 pm

I know that EE4 does not have the price modifier, but I am hoping there might be an alternative that you can suggest.

What I require:

When entering an event, participants have the option to purchase a t-shirt (at extra cost).

I’d rather not set up another ticket option, which I know is one option but its really not ideal.


Josh

  • Support Staff

December 15, 2016 at 12:17 pm

Hi Matt,

There’s some example code that shows how to add a surcharge to the order based on the answer to a registration form question. In which case, the t-shirt option could be captured as a yes/no question in the registration form.

https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/bc_ee_apply_transaction_surcharge.php


Matt

December 15, 2016 at 12:56 pm

Thanks – I will have a good look through that.
Hopefully I can work it out.

Much appreciated.


Matt

December 16, 2016 at 2:26 am

Looking through the code and the instructions written, I see they have set it to just be for the primary registrant.

Do you know if this must be the case? Ideally it needs to be an option for every entrant, regardless of who is registering.


Josh

  • Support Staff

December 16, 2016 at 3:04 pm

Not necessarily. So to use that code as-is, your question options would be set up to be something like “How many t-shirts for this group registration?” Then your answer values would increase the price modifier by x amount. i.e. 1 shirt $20, 2 shirts $40.

If you want to set a tshirt yes/no question for each registration, that’s probably do-able, but the code from that example would need to be refactored quite a bit.


Matt

December 17, 2016 at 12:55 am

I realise this is very specific to the event/question, but the problem then would be no idea of sizes and who ordered what.

Ideally I’d like to have an entered rider be the rider paying extra and also know their size.


Josh

  • Support Staff

December 19, 2016 at 8:44 am

There’s only one payment per transaction though. It’s not like you can divvy up payments within one transaction. Also, you can capture size info in a separate question. Ultimately though, if you want a price modifier function to meet your exact specifications, that’s something that a PHP developer could code up using the same hooks from that example code.


Matt

December 19, 2016 at 10:14 am

I just need to get the answer clear in my head.

– If I use the code (changing name/price, etc), can it be used on a group booking and have the option for each attendee to be asked the question and change price on each attendee depending on the answer?
From what I gather this isn’t possible.

The best alternative if that can not work that I can see if to create separate tickets. Although not ideal, it would go from 2 tickets to 4 tickets – which isn’t too crazy.
It is possible for one person to book multiple ticket types from what I can see?


Josh

  • Support Staff

December 19, 2016 at 10:24 am

The code in the example snippet is not intended to be used for a question that would appear for each attendee. If you want to use that code, you’d have to set a question for the Primary attendee like “How many T-shirts?”. Then each answer option would set a price modifier amount.

It is possible for one person to book multiple ticket types from what I can see?

Yes, however it’s important to remember that each ticket is a registration.


Matt

December 19, 2016 at 10:28 am

OK, thanks.
With multiple ticket types, is that still 1 payment?

I have no issue if 1 person put in details for 4 people, but it would be a problem if they have to pay 4 separate times.
If its just a single transaction, then I think I will go down that route as I would really need to know which person tallies up with each t-shirt purchase.


thomaspointbeach

December 19, 2016 at 10:37 am

I am guessing this could also be used for like VIP access of some kind? Like: Would you like early access? If yes, require a full-length ticket (for instance, if the event were 2 days, require a 2 day ticket in order to add a 1-day early access), or the like? I will have to look at that snippet…


Josh

  • Support Staff

December 19, 2016 at 10:39 am

When someone puts in the details for 4 people, it’s one payment.


Matt

December 19, 2016 at 10:42 am

Thanks Josh.

Viewing 12 reply threads

The support post ‘Alternative to Price Modifier for EE4’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso