Support

Home Forums Event Espresso Premium Urgent help please – Promotions not working

Urgent help please – Promotions not working

Posted: August 22, 2022 at 9:58 pm


Adam

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
– Can be used for any live event on our website (but only allowed to be used once in the customer’s cart / session, if they add two different events to their cart we don’t want the $30 to be taken from both events)

Please can anyone help?
Thanks


Tony

  • Support Staff

August 23, 2022 at 5:31 am

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

30OFFCART applies the promotion only to the first event in the cart.

30OFFEVENTS worked as EE promotions normally do.

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/


Adam

August 23, 2022 at 4:00 pm

Hi Tony,

Thanks so much for the reply.
And when creating the promotion code, what do I need to set for the fields:

1. Number of Uses Per Scope Item
2. Total Number of Uses

To achieve the following outcome:
– Available to ‘any’ customer to use within the date range
– Can be used for any live event on our website (but only allowed to be used once in the customer’s cart / session, if they add two different events to their cart we don’t want the $30 to be taken from both events)


Tony

  • Support Staff

August 24, 2022 at 5:20 am

1. Number of Uses Per Scope Item

How many times do you want a promotion to be available for us on a specific event? Unlimited? Leave it blank.

2. Total Number of Uses

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.

– Can be used for any live event on our website (but only allowed to be used once in the customer’s cart / session, if they add two different events to their cart we don’t want the $30 to be taken from both events)

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.


Adam

August 24, 2022 at 5:37 am

Thanks again for the reply.
Sorry for my confusion but can you put it in a ‘person’ / ‘users’ perspective?

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


Tony

  • Support Staff

August 24, 2022 at 6:05 am

Sure but I’m not sure I understand what you are asking.

1. Number of Uses Per Scope Item

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.

2. Total Number of Uses

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.

Event Espresso