Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 Promotional Codes - conditional statement? | Event Espresso - Staging Server
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.