Skip to content

Multibooking discounts #321

Answered by liedekef
Sp0run asked this question in Q&A
Oct 12, 2023 · 1 comments · 5 replies

You must be logged in to vote

eme_eval_multibooking_form_post_filter is for evaluation, it won't change anything and is run before the bookings are inserted into the db. So that'll not work. The problem with multibooking discounts is that I wouldn't know for which event to apply the calculated discount to (because in the end the price is per booking for an event).
You could use the regular discount filter (as above), but you'd need to check also the POST output from the submit to see if all your conditions are met, and then based on that return a discount for that particular booking. An example of checking the POST info is found in eme_eval_multibooking_form_post_filter:

    foreach ($_POST['bookings'] as $key=>$val) …

Replies: 1 comment 5 replies

You must be logged in to vote
5 replies
@Sp0run

@liedekef

@Sp0run

@liedekef

@Sp0run

Answer selected by Sp0run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants