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
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/
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.
No problem, just remember to keep an eye on our announcements as the plugins and features will be phased in over time.
Viewing 5 reply threads
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.
Support forum for Event Espresso 3 and Event Espresso 4.