Hi, I’d like to set up a promotional code that is available for people who wish to purchase Part 1 and Part 2 of an event type simultaneously. I was hoping that it would be possible to write a conditional statement that would allow the coupon code to be applied only when these two items are in the shopping cart. Is this possible? I am comfortable with PHP coding; just need a little guidance as to the correct file etc.
Thanks very much for your assistance!
Wouldn’t the Volume Discounts add on be easier? Set up a specific category for those two events and have the threshold set at two and set the discount.
Hi Dean, I was hoping to use Volume Discounts for a separate purpose (ie. the one you suggested), which I could then apply to all events. Unfortunately it’s not possible to set up multiple ‘types’ of Volume Discount, which forces me to try alternatives for the specific’package deal’ I mentioned. If it’s too difficult, I can always set up a ‘package deal’ as a separate event, but if there is a way to couple Part 1 and 2 through coding, that would be preferable…
There is a filter available, filter_hook_espresso_coupon_results, which takes 3 parameters. You could write a function that checks the events in the session and the code being used and does not allow the code to be applied if both events are not in the session. See includes/functions/cart.php line 336.
The support post ‘Promotional Codes – conditional statement?’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.