Support

Home Forums Event Espresso Premium Event Tickets (2)

Event Tickets (2)

Posted: May 20, 2020 at 3:20 am


He Zhengrui

May 20, 2020 at 3:20 am

Hi all,

I am trying to create an event which is a course that participants are awarded a certificate at the end

Course details:
-1 Day event
-Happens every week on Thursday

Question:
How do I make it such that when a customer selects one ticket, the rest of the dates will be unselectable? (Please See Screenshot)

Also, I noticed the dates below, what is the purpose of that?


Tony

  • Support Staff

May 20, 2020 at 4:18 am

Hi there,

I am trying to create an event which is a course that participants are awarded a certificate at the end

Just to note, Event Espresso does not currently have a certificate feature.

Question:
How do I make it such that when a customer selects one ticket, the rest of the dates will be unselectable? (Please See Screenshot)

Right now we don’t have the option to disable tickets based on a ticket selection.

However, if you are only allowing registrations for a single registrant at a time you can set the “Maximum number of tickets allowed per order for this event” option within the event to 1. That will change the Qt dropwon to a radio button, meaning only a single ticket can be selected.

Will that work for you?

Also, I noticed the dates below, what is the purpose of that?

It lists all of the datetimes within an event, not all users have the date within the ticket so the list gives the user an indication of when the event is and iCal buttons to include within their calendar.

We don’t have an option to remove those but you can easily hide them with CSS:

.single-espresso_events .event-datetimes {
    display: none;
}


He Zhengrui

May 24, 2020 at 5:52 am

Hi Tony,

Thank you for your kind reply;

Just to note, Event Espresso does not currently have a certificate feature.

Yes I am aware that the plugin does not provide certification; my apologies I am trying to say that we will physically award a certificate to the attendee.

you can set the “Maximum number of tickets allowed per order for this event” option within the event to 1. That will change the Qt dropwon to a radio button, meaning only a single ticket can be selected.

This does work for now, thank you!

I would like to check on 2 more things.

1) Is is possible to change the line “Goes on Sale” to “Registration Opens”
2) Likewise, “sales end” to “Registration Deadline”

3) If a customer selects 3 tickets, this means that they must add 3 details of below fields:
`1) Full name
2) Company Name
3) Email address:`
How may i go about this?

Cheers!


He Zhengrui

May 24, 2020 at 5:53 am

Apologies; I also forgot to add item

4) according to the screenshot, how do i change “QTY” to “Select”


Tony

  • Support Staff

May 25, 2020 at 4:57 am

1) Is is possible to change the line “Goes on Sale” to “Registration Opens”
2) Likewise, “sales end” to “Registration Deadline”

Is this on the front-end or in the admin?

For the front end on the ticket selector you can use the snippets here:

https://gist.github.com/lorenzocaum/fcd9ce5ecf2e4375d430

3) If a customer selects 3 tickets, this means that they must add 3 details of below fields:

1) Full name
2) Company Name
3) Email address:

How may i go about this?

We don’t have an option for ‘Full Name’, but you can use ‘First Name’ and ‘Last Name’ (I recommend you do NOT use ‘First Name’ as a ‘Full name’ question as EE will then use that value everywhere that it is expected to pull First Name)

Go to Event Espresso -> Registration Form -> Questions.

Create a ‘Company Name’ question.

Then go to the ‘Question Groups’ tab and edit the ‘Personal Information’ group.

Add the ‘Company Name’ question you just created into that group.

https://eventespresso.com/wiki/add-questions-event-espresso-question-groups/

Now, back in the event, set the ‘Personal Information’ group on ‘Additional Registrants’ (it will be automatically set on the Primary as it is required), this section:

https://monosnap.com/file/SbYGsxdaZwiWs4NzEmDA0v2DNWikX8

Now when you select more than 1 ticket each registrant will be asked those questions.

4) according to the screenshot, how do i change “QTY” to “Select”

You can use a snippet like this:

https://gist.github.com/Pebblo/6c8c3c8d84b9d77608d9116bfe012dec

All of the snippets above can be added to a custom functions plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


He Zhengrui

May 25, 2020 at 6:44 am

Hi Tony,

Thank you for your reply;

It is for front end actually, and after I have added the snippets in, into functions.php on a child theme, it still does not reflect the changes.

Here is the link to the page itself. It is under “Show Details +”

Let me get to working on the stuff you mentioned


He Zhengrui

May 25, 2020 at 7:04 am

Update:

Everything else went well! Thank you Tony;

FYI, I added the custom filter to change “QTY” into “Select*” into the child theme functions.php and it works, so it is probably due to the code snippet


Tony

  • Support Staff

May 25, 2020 at 7:28 am

Here is the link to the page itself. It is under “Show Details +”

Ok, those are different strings than the filters are for, I thought you wanted to change the ticket selector text, not the strings under show details.

For ‘Goes on sale’ in the ticket details use:

FHEE__ticket_selector_chart_template__ticket_details_goes_on_sale

The ticket selector displays ‘upcoming’ tickets and uses the text ‘Goes on sale’ which is the first filter changes, so if you want to change both of those, add the above filter to the original snippet, like so:

add_action( 'FHEE__ticket_selector_chart_template__ticket_details_goes_on_sale', 'ee_custom_messaging_ticket_action_status_goes_on_sale' );
add_action( 'FHEE__ticket_selector_chart_template__ticket_goes_on_sale_msg', 'ee_custom_messaging_ticket_action_status_goes_on_sale' );
function ee_custom_messaging_ticket_action_status_goes_on_sale() {

 echo 'Replace me with new messaging or remove this entire statement to remove the message.';
}

For ‘Sales End:’, you need this hook FHEE__ticket_selector_chart_template__ticket_details_sales_end


He Zhengrui

May 26, 2020 at 7:13 am

Nicely done! it all works. Thank you Tony!

Now, is there any shortcode for me to display slots remaining for a specific event?


He Zhengrui

May 26, 2020 at 7:40 am

After exploring the payment methods and pricing methods on the plugin after reading this article

Link Here

I am still unable to apply a 3.5% tax on payments made through Stripe Payment Gateway.. can you advise on this too ?

Thank you!


Tony

  • Support Staff

May 26, 2020 at 3:13 pm

Now, is there any shortcode for me to display slots remaining for a specific event?

Not a shortcode no, but a snippet like this can do it:

https://gist.github.com/joshfeck/56f30f18ae87af1919c3c462618ee2de

It depends on where you want to display the spaces remaining.

I am still unable to apply a 3.5% tax on payments made through Stripe Payment Gateway.. can you advise on this too ?

Have you set up your tax price type and then set the ticket to be taxable or are you wanting to try and have Stripe automatically apply taxes on their end?


He Zhengrui

May 26, 2020 at 10:05 pm

Hi Tony,

Thank you for your help once again;

For example, I am trying to offer 2 payment methods

1) Bank transfer
if they choose this option, they can just pay the ticket fee by bank transfer

2) Stripe Payment Gateway
if they choose this option, they will be charged 3.5% of the ticket fee as a surcharge

How do I go about this?


Tony

  • Support Staff

May 27, 2020 at 6:15 am

Currently, you can’t as we don’t have an option to add a surcharge based on the payment method chosen by the user.


He Zhengrui

May 27, 2020 at 6:34 am

May I know if there is any way about this? as this is really important for the website, as we are looking to transfer the cost of the transaction fee to the student if they choose to use the payment gateway.

This is actually one of the primary reasons my client agreed to use EE4 as it offers the payment gateways..

hope you can advise on this


Tony

  • Support Staff

May 27, 2020 at 12:57 pm

The closest function we have to this is using a snippet to add a surcharge to the transaction based on a question on the registration form, like this:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/bc_ee_apply_transaction_surcharge.php

So rather than it being based on ‘printing tickets at home’ you question could ask which payment method they will be using and add the surcharge based on the answer.

However, that will not allow the user to switch afterwards if they change their mind and they would need to restart the registration.

Event Espresso currently has no support for surcharges per payment method.


He Zhengrui

May 28, 2020 at 12:40 am

This is good enough!

I have a few questions based on this:

1) I would like to make it by percentage, how do I do that?

2) Because the payment page has two payment methods(bank transfer and stripe), I would just like to hide the respective payment method DIV accordingly using any filters you can suggest to append a CSS{display:none;} or JS to hide the element or perhaps PHP too.

3) in a separate scenario, how may i modify the code to be a deductible instead of an surcharge?

Thanks for bearing with me so far Tony, your help has been much appreciated


Tony

  • Support Staff

May 28, 2020 at 10:54 am

1) I would like to make it by percentage, how do I do that?

Here is an example of using percentage:

https://gist.github.com/joshfeck/d4c013dd1b64807fee2e8d4c4d237456

2) Because the payment page has two payment methods(bank transfer and stripe), I would just like to hide the respective payment method DIV accordingly using any filters you can suggest to append a CSS{display:none;} or JS to hide the element or perhaps PHP too.

You can use the hook from above, then within that based on the selection, hook into FHEE__EEM_Payment_Method__get_all_for_transaction__payment_methods to remove whichever payment method you prefer from the array.

Which reminds me of another option for this, if you use 2 ticket options, one for Bank and one for Stripe you can check the tickets and remove/replace the available payment methods on the fly.

This snippet:

https://gist.github.com/Pebblo/c87f5bf42f18380fa6b218dbc5734a34

Did just that using ‘Check’ in the ticket name.

3) in a separate scenario, how may i modify the code to be a deductible instead of an surcharge?

Pretty much the only difference would be when you add your line item(s), LIN_total would be a negative number rather than positive to show a discount.


He Zhengrui

May 29, 2020 at 2:36 am

You can use the hook from above, then within that based on the selection, hook into FHEE__EEM_Payment_Method__get_all_for_transaction__payment_methods to remove whichever payment method you prefer from the array.

I can’t seem to limit the payment method according to the case method in the code

Link to code here

Link to website link here

I have added the filters in on the case “Bank Transfer”(line58) and “Online Credit Card Payment”(line65) accordingly with filters and function “tw_ee_bank_transfer” and “tw_ee_stripe_payment” respectively and it does not seem to follow

I have also created 2 functions for this purpose on line 78 – 100, can you point to me what might be wrong?


Tony

  • Support Staff

May 29, 2020 at 9:06 am

Actually, I think the problem here is the action hook AHEE__EE_System__core_loaded_and_ready runs too late in the request to filter the payment methods from, so the other option is to filter the payment methods and check the answer to the question from the primary registrant.

Like so: https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/tw_ee_filter_payment_methods_from_reg_answer.php

So remove the add_filter calls and those additional functions, then add the above as a separate function.


He Zhengrui

May 29, 2020 at 2:08 pm

You’re a genius! it works perfectly!

Now back to this:

Pretty much the only difference would be when you add your line item(s), LIN_total would be a negative number rather than positive to show a discount.

I can’t seem to get it to work fully actually, i added the whole bulk of code in the link here

and it seems that 100 and 300 are not working, while the rest are working. any idea why?


He Zhengrui

May 29, 2020 at 2:16 pm

to explain it in detail:

question with -100 does not apply the deduction at all, while the question with -300 adds a surcharge instead.

Thanks Tony for all the support thus far you’ve been a champ. we are at the final stretch I promise and I will get out of your hair


Tony

  • Support Staff

June 1, 2020 at 7:30 am

question with -100 does not apply the deduction at all

That’s because you are using the wrong filter on line 57.

question with -300 adds a surcharge instead.

Your code (with the exception of the above) is working fine for me:

https://monosnap.com/file/AUeNNPtdQ81xY7Ar2k6a4HgzNdQBBe

Are you sure you don’t have another filter replacing the changes in the above function?


He Zhengrui

June 6, 2020 at 1:57 am

Hi Tony,

Thanks for pointing that out; silly me. It works great now!

On a unrelated issue, during checkout process when i select by credit card, I am unable to input my credit card number, expiry and CVC number

screenshot here

any idea why?


Tony

  • Support Staff

June 8, 2020 at 4:57 am

That’s the Stripe payment method and the above can happen if you either haven’t connected your Stripe account, or you have a JavaScript error being thrown on the page.

So starting with the easiest issue, go to Event Espresso -> Payment Methods -> Stripe.

In the ‘Stripe Connect:’ option, does it show a button that says Connect or Disconnect?

On the payment options page, open up Chrome Dev Tools and check the console, any errors?


He Zhengrui

July 3, 2020 at 1:45 am

@Tony, Happy 4th of July soon if you’re in the states!

Hi buddy,

I figured out the error; for the benefit of those who encounter this problem, it seems that an SSL certificate needs to be installed.

To do that, i installed the plugin: Really Simple SSL to get the SSL certificate so stripe payment gateway can run on the page.

Meanwhile, can I ask in regards to this

question with -100 does not apply the deduction at all

That’s because you are using the wrong filter on line 57.

question with -300 adds a surcharge instead.

Your code (with the exception of the above) is working fine for me:

https://monosnap.com/file/AUeNNPtdQ81xY7Ar2k6a4HgzNdQBBe

Are you sure you don’t have another filter replacing the changes in the above function?

Instead of a dropdown select box, is it possible I use:

1) textbox user can enter numbers into e.g 399
2) validation for 2 parts
-number is not more than 500
-can only be an integer

Cheers!


Tony

  • Support Staff

July 7, 2020 at 8:48 am

@Tony, Happy 4th of July soon if you’re in the states!

I’m actually UK based but thank you all the same 🙂

Instead of a dropdown select box, is it possible I use:

1) textbox user can enter numbers into e.g 399
2) validation for 2 parts
-number is not more than 500
-can only be an integer

Likely possible yes, but it’s not something we can walk through or provide support for you’ll need to customize the above snippet to suit your requirements.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 3 months, 3 weeks ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!