Support

Home Forums Event Espresso Premium Apply a promo code only if two specific classes are purchased?

Apply a promo code only if two specific classes are purchased?

Posted: June 11, 2019 at 6:09 am


Michelle Yaciuk

June 11, 2019 at 6:09 am

We are offering two classes, and want to give a discount or have a code that’s applied ONLY if people register in BOTH.

Is this possible to do in EE4? It’s the only two courses we’re offering over the summer, so I’m hoping EE4’s promo codes can use some logic to detect that two classes are being purchased to make the code valid, OR that the code could detect that the dollar value being purchased is over a certain amount, and apply itself then.

Hopefully this is making sense!


Tony

  • Support Staff

June 11, 2019 at 12:09 pm

Hi there,

Currently, the Promotions add-on does not have this functionality.

Having said that if you are comfortable with PHP it wouldn’t be all that difficult to do the above with a snippet of code, its not going to work with every single use case but you could do something similar to what this snippet does:

https://gist.github.com/Pebblo/d66550019e101a65b021a6fff5ed5c21

That doesn’t do what you are requesting here, it simply checks if there are any promotions that apply to the current events in the cart and if not, removes the Promotion code field altogether from the checkout. You could do something similar based on X and Y event, or pull the transaction total and compare that against a value and remove the promotion code field.

The above obviously depends on how comfortable with PHP you are, if you are not comfortable using PHP we recommend the folks at codeable who may be able to create something for you.

Eventually, in a future version of EE we’d like to include functions like this, for example, we have this on our roadmap:

https://trello.com/c/JjTd8mbE/90-promotions-volume-discounts

Which sounds like it may cover your use case, but those features are not due out soon as we are working on other areas of the plugin.


Michelle Yaciuk

June 11, 2019 at 5:36 pm

Thank you, Tony! I will see what I can do with the above!

The support post ‘Apply a promo code only if two specific classes are purchased?’ 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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Michelle Yaciuk 3 months ago ago

Topic Tags

Notifications

This topic is:
pending
Do NOT follow this link or you will be banned from the site!