Posted: February 15, 2017 at 1:55 pm
|
Hi, The code linked to only seems to be able to add a fixed dollar amount, where as we would need it to add a percentage on top of what we charge. Is it possible to get the price of that certain ticket from somewhere? I’m also a bit confused on where this code should go. I’ve managed to do the templates just fine, but this is my first foray into hooks and filters. You can take a look at our pricing structure here: Much Appreciated, |
Hi Jason, I’ll follow up with each of your questions below:
You’re correct that the code in the example adds a fixed dollar amount, but the code can be changed to add a percentage amount instead. Here’s a link to a variation of the original gist that shows how to add a percentage surcharge: https://gist.github.com/joshfeck/d4c013dd1b64807fee2e8d4c4d237456
You add the custom code to a custom functions plugin . |
|
|
Hey Josh, You solution worked perfectly, thank you! You should look into building this solution in officially, I think the way you’ve implemented the tax calculation is awesome. Thanks again, |
Hi Jason, The hooks are built into core to add the ability to extend EE to make it fit a very specific use case. A few things to keep in mind is not everyone uses Event Espresso is in Canada, and not everyone in Canada that uses Event Espresso needs to charge different provincial taxes. So for those reasons we’re not planning on adding the additional functions to handle transaction surcharges into core. |
|
|
Hi Josh, Take a look at this site, specifically this section here: “Charging sales tax to out-of-province/territory customers and to foreign customers If you are a vendor in one province or territory and you make sales to residents of another province or territory, what sales taxes do you charge them? When you sell and ship or deliver taxable goods and services to out-of-province/territory customers, the sales tax that applies in your customer’s province or territory is generally applicable.” I completely understand that Canadians are an underwhelming percentage of your userbase though, and it wouldn’t make sense to invest time into it. Thanks again for the help. – Jason |
Hi Jason, You might be surprised that all of the full-time developers of Event Espresso live in Canada, and it’s not a lack of interest or numbers that would prevent us from building specific solutions. My point is even within the group of Canadian users of Event Espresso, they’re not necessarily selling tickets to events to people located outside their province. These same users may need to add surcharges for other things, and that’s why we try to keep things open and extensible. |
|
|
Hi Josh, Thanks for following up, that does make sense. I have another small question pertaining to this. How do I make it so that this question is a system question group – akin to how the personal information group cannot be removed from the primary registrant and is automatically included with every new event. Essentially, I want it so that this question is automatically checked off in every new event for the primary registrant, in case my client forgets to include this question. Thanks for all your help, |
You can assign the question to the Personal Information group by going to Event Espresso > Registration Form > Question groups, then check the box next to the question. You’ll also need to remove the question from what ever question group it’s set to now. |
|
|
Hi Josh, I was doing a bit of testing on this, and I’ve come to realize that if there are multiple attendees, the last attendee’s billing address will be used, and not the primary registrant. How can I change the code to only use the primary registrants billing address? Thanks, |
|
I’ve managed to figure this out after a bit of prodding and hacking, although I still am interested in a better way of doing this. Essentially, the code uses a foreach loop. I simply installed a counter here:
if ( ! empty( $registrations ) ) { I then created these CSS classes (14 is the number that this question is for me) Hope this helps anyone in need. |
Hi Jason, Another approach would be to move the question to its own group, then use the code from this gist to make it so that question group is always checked: https://gist.github.com/joshfeck/70ef3d761d1e3bf4228a1e015ff312b6 |
|
The support post ‘How to implement provincial tax into Paypal Pro onsite payment’ 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.