Posted: August 22, 2022 at 9:58 pm
Hello, I cannot for the life of me work out how to generate a $30 discount coupon code that gives this outcome: – Available to ‘any’ customer to use within the date range Please can anyone help? |
|
Hi there, Currently, Event Espresso does not support discounts that apply to the cart itself only events within the cart. That means if you have a promotion that can be applied to all events and then 2 or more of those events are added to the cart the promotion is applied to both, for a promotion to apply specifically to the cart total we would need another promotion ‘scope’, specifically targeting the total (again, we don’t currently have that available). However, I did think of a possible workaround for this using some custom code and one of the hooks within the promotions add-on. It won’t work for all use cases but may help you here. Rather than targeting the cart total, I’ve hooked into the function which pulls in the promotions ‘applicable items’ in the background and just swapped it out for the ‘first’ item it finds. So then EE only applies the promotion to the first event in the cart, it’s not quite the same as a cart promotion but may work for you. The way it does this is to check for the word ‘CART’ (case insensitive) within the promotion code used, you could change that out for something else if preferred. When testing this I used 2 different promotions: https://monosnap.com/file/S7YdZE6e0u1OTsrPdwbfSXKtrJHRAv
You can find the code for that here: https://gist.github.com/Pebblo/724f8d94b1019b8209ad62a70eb728b8 You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
Hi Tony, Thanks so much for the reply. 1. Number of Uses Per Scope Item To achieve the following outcome: |
|
How many times do you want a promotion to be available for us on a specific event? Unlimited? Leave it blank.
How many times in total can the promotion be used? Say for example ‘first 100 people to register use code 30OFFCART for 30% off’, then the Total Number of uses is 100. Or leave blank for unlimited so its based purely on the date range.
The 2 settings above have no effect on this as its not something we support, the snippet I gave you gets you something closer to it, but as long as your promotion has ‘uses’ available it should work. |
|
Thanks again for the reply. Sally, Mary, Bob want to buy a ticket with the coupon we give them and many other people as well. The coupon is available for use for any event |
|
Sure but I’m not sure I understand what you are asking.
Is the total number of times a promotion can be used per scope item, in this case its events. So the number of times a promotion can be used on a specific event. If that was 2 the promotion would only be allowed be to used a total number of 2 times per event.
Is the total number of times the promotion can be used overall. A setting of 1 means the promotion code can only be used once and is then invalid. Neither of the above options is on a per-user basis, it’s based on the promotion. Setting both of those to be blank would mean any number of people/users can use the promotion code until the expiry dates. |
|
The support post ‘Urgent help please – Promotions not working’ 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.