Support

Home Forums Event Espresso Premium EE4 Promotion Add-on automatic checkout when price = 0

EE4 Promotion Add-on automatic checkout when price = 0

Posted: October 17, 2017 at 4:28 am


JacquesMivi

October 17, 2017 at 4:28 am

Hello,
We use the EE4 promotion add-on and we would like to change a current pattern.

Current pattern : when a registrant is doing a chekout, he enters his promotion code and if this code leads to a ticket price = 0, then the system automatically and immediately finishes the checkout.

What we would like is that when this case occurs, the registrant enters his promotion code, the price is reduced to 0 but the system doesn’t finish automatically the checkout: the price is shown that it is now 0 and the registrant has to click on “Finish” just like if he does when he finishes a payment or a simple registration that has no payment and no promotion code.

How can we do that please?

Thanks in advance


Tony

  • Support Staff

October 23, 2017 at 6:54 am

Hi there,

To do that you need to override the PROMO.update_payment_info_table() method and whilst its possible to do, personally I think thats going to be more confusing for your users.

You can use the wp_add_inline_script() function to add your own script when the espresso_promotions.js file is loaded.

Here is an example:

https://gist.github.com/Pebblo/2cda262898bffdf002e53270aa3196d2

Note the above is unsupported and quickly tested to confirm it does what is needed, I highly recommend fully testing the above to confirm it does not cause any breakages on your site.

The support post ‘EE4 Promotion Add-on automatic checkout when price = 0’ 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