Event Espresso is by far one of the most detailed plugin in the events domain. With a host of features and an equal number of add ons the developers of Event Espresso have managed to bring together a system which can handle most of your online event organization needs effectively.
The one thing that remains constant with respect to any system is the evolution of process. This process could either include fixing any issue that might exist in the current system or adding new features to improve the functionality of the existing system. We are going to discuss the latter. More specifically, we are going to discuss about modifying registration price in event espresso at the time of checkout.
Modifying Registration Price: Use Cases
Why would there be a possible need for modifying registration price in event Espresso? Well there can be many reasons (you will be surprised with the vivid and diverse requirements that users come up with). Let’s dive in and take a look at a few.
Donation Option While Registration
So, have you seen something like below while purchasing tickets for any events?
Here a customer selects tickets for the events for which he wishes to register himself for. Once this has been done and just before checkout the customer has an option to donate a certain amount to charity. If customer selects this option then the donation amount is added to the final registration amount which the customer pays at the time of checkout. So this would be one scenario where there is a requirement of modifying the registration price in Event Espresso at the time of checkout.
Up-sell Related Product
Another scenario where modifying registration price feature can come in handy is while selling products associated with a certain event while registering for the event. So, let us assume there is a basic photography course to be held in the city. While registering the customer can buy various related products like camera, lenses etc which can be useful at the time of the event. These products can be bought along with the event tickets and the price of the products will be added to the final registration price by modifying it. Additionally, the products will be handed over to the customers at the event venue.
The customer could also be given an option to register for a cab service along with event registration. This cab service will essentially be the means of transport for the customer to and from the event. The customer can be charged for this service by modifying registration price of an event at the time of checkout.
Modifying Registration Price: An Approach
So that was about the applications of the feature for modifying registration price at the time of checkout in Event Espresso. Now we’ll discuss a bit about implementing the functionality using the hooks provided by Event Espresso.
- Depending on the requirement the user will have to be provided with fields in event registration form at the time of event registration. These fields in Event Espresso terms will be called question in the admin dashboard. So let us assume that the website is a marathon registration website. Here at the time of checkout the user can select add on products like t-shirts or bands using these additional fields.
- These fields are then associated with the database by providing meta boxes on event page in dashboard. These meta boxes can be provided using the following hooks.
- The values that have been set in the meta boxes in the back end can be saved to the database using the following hooks
- The final step in this customization would be modifying registration price (which is the goal we started out with) using the following hook provided by Event Espresso
Modifying Registration Price: An Interesting Twist
One thing that crossed my mind while writing this article is, “What if the website owners want to deliver the products purchased at the time of event registration to customers?”
This feature I’m guessing would need sizable customization considering there could be various shipping methods. However, if there’s only one shipping method it should be relatively easy. I have a vague idea of how I would go about incorporating this feature…I’ll need some motivation to delve into it further. So, if any of you guys need the functionality please reach out to me in the comments section and motivate me to investigate the approach further.
Images by freepik