Creating the Difference

Show Sub Total in Events Manager Booking Form

Posted on: 10-10-2018
Categories: HTML, JavaScript, PHP, Snippets Tags: , ,
Show Sub Total in Events Manager Booking Form

If you are using Events Manager, you can choose between two types of bookings: single bookings mode and multiple bookings mode.

Multiple Bookings Mode does not only allow your visitors to add more than one type of ticket and/or event to their cart, but it will also show a nice overview of the costs, taxes and total before submitting the booking.

Show sub total in single bookings mode.

Unfortunately, when you’re using Events Manager in single bookings mode (like me) that option is never shown. But I did want/need to show my customers a sub total before sending them off for an online iDeal payment. So I have created this little snippet.

Setp 1: Copy the ticket-single template file.

This is important:
Do NOT try to use this snippet in any other way than as described below. Putting it in your functions.php or Code Snippets plugin will resolve in fatal errors! Please make sure you are using the exact correct path as described below.

Copy the template file ticket-single.php
from: /wp-content/plugins/events-manager/templates/forms/bookingform/
to: /wp-content/themes/YOUR THEME FOLDER/plugins/events-manager/forms/bookingform/

Please read the official Events Manager doumentation on how to use template files.

Step 2: Modify the copied ticket-single.php

Open the file your just copied to the sub-sub-sub directory of your theme folder and paste the following snippet at the end of the file, so below the “//do not delete ?>” comment.

Step 3: Edit if needed.

The code above is based on the Dutch currency formatting (decimal commas) and BTW is the Dutch word for Taxes. Edit the code to localize to your personal needs. Please see the comments in the code for instructions.

Note: Coupon discounts (a EM Pro feature) are not taken in this method of subtotalling (yet)…