Support

Home Forums Event Espresso Premium event with coupon and surcharge

event with coupon and surcharge

Posted: February 24, 2014 at 12:27 pm


Mirko Falavigna

February 24, 2014 at 12:27 pm

Hi all,
I have a little problem with an event that have a flat coupon (no %) and a surcharge (in %). Eventespresso, in order to calculate the final price, add the surcharge and after deduct the coupon.
For example: event costs 100$ with 20% of surcharge and 30$ of discount (coupon).
Eventespresso returns: 100 * 1.20 – 30 = 90$

But for accounting reason this is forbidden in Italy, we can’t apply discount on tax/surcharge. The correct operation should be:
100$ – 30$ = 70$ * 1.20 = 84$

Obviously if the coupon is in % there is NOT difference between operations!

How can I invert the operations? Before apply the discount and after that calculate the surcharge

Thank you very much!


Dean

February 25, 2014 at 12:57 am

Hi,

I am assuming this is in EE3? If so, there isn’t an easy way to invert it as it would require core code modifications.

If you really needed to do it, in the includes/admin-files/coupon-management/use_coupon_code.php file is a function called event_espresso_coupon_payment_page

This is a pluggable function meaning it can be copied to a file in your uploads/espresso directory called custom_functions.php (create it if needed) and will over rule the default function so you can modify it as needed.

If you need assistance, we have a list of recommended developers here -https://eventespresso.com/developers/event-espresso-pros/


Mirko Falavigna

February 25, 2014 at 2:31 am

Thank you very much Dean!
In EE4 there is a easier way to do that?


Dean

February 25, 2014 at 3:47 am

Hi,

Yes and no.

Firstly EE4 doesn’t currently have any promo code system in place.

However it does allow you to add discounts (and surcharges) to tickets and these discounts can be ordered so that they come before or after one another and the surcharges, so you can tweak the order exactly. example http://take.ms/yy0Fd

So it will allow it, but right now it will add the discount for every ticket of that ticket type sold.


Mirko Falavigna

February 25, 2014 at 4:05 am

Great Dean!
This will be very useful!!!
I will replace EE3 with EE4 when add-on will be available
Thank you a lot!!!


Dean

February 26, 2014 at 1:07 am

No problem, just remember to keep an eye on our announcements as the plugins and features will be phased in over time.

The support post ‘event with coupon and surcharge’ 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