Posted: October 29, 2016 at 10:10 am
|
Hi, We have used this short code “[ESPRESSO_TICKET_SELECTOR event_id=event id]” on a custom template but there is some issue with the error message box. As you can see here: http://adheds.staging.wpengine.com/events/sdf/ if you will hit the “Register Now” button without choosing quantity, then only page refresh with no alert or no warning to choose the quantity. However on the default page it is working fine. Please let me know how to fix it so that when user clicks the the button without selecting the quantity of the ticket, we can show the error/warning to the user. Thanks. |
Hi there, Where do you have that shortcode set? Are you using do_shortcode() to run the above or adding the shortcode within a visual content builder? |
|
|
Hi Tony, We have created a new single-espresso_events.php template which overrides yours template, and we are using do_shortcode() function in order to get the desire outcomes of the shortcode. Thanks, |
Instead of using the do_shortcode() function, you can call the ticket selector function ( |
|
|
Hi Josh, Thanks for your reply. However I have added the function espresso_ticket_selector() directly into the template instead of do_shortcode() as per your comments, but it is still not working as you can see here: http://adheds.staging.wpengine.com/events/sdf/ Will you please check again. Below is the format I have used into the template: <?php echo espresso_ticket_selector($postId); ?> <?php echo espresso_ticket_selector($event_id = $postId); ?> |
Since Event Espresso doesn’t automatically load its error message script on every page, we’ll probably need to see the full template code that’s in use to be able to offer you some advise on how to get that error message to appear. Is that something you can post into a paste bin or a gist, then link here? |
|
|
OK. Thanks Josh. Please find the link of template code: http://pastebin.com/saN1q1bt |
Wow, no loop there, or any WordPress functions to load styles in the header or scripts to the footer? So on which ever pages where you’re displaying an ESPRESSO_TICKET_SELECTOR short code, you add this to the top of the template right after the opening PHP tag:
If you can add a real WordPress loop in that template the above might help. And you most likely will need to change near the top of the page where you have all the scripts and styles, you change it to use the |
|
The support post ‘Ticket Selector Shortcode not showing error message.’ 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.