Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Show Remaining Seats | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Show Remaining Seats

Show Remaining Seats

Posted: February 18, 2013 at 3:37 pm

Viewing 9 reply threads


HooplaWD

February 18, 2013 at 3:37 pm

Event Espresso site environment: WordPress 3.5.1. Event Espresso v3.1.30.7.P Events Calendar v2.0.4 Social Media v1.1.4
Purchased Personal License on: 12-4-2012

Event Registration Page: http://www.paintnplay.net/event-registration/?regevent_action=register&event_id=29

I am just looking to show remaining seats available.

I found a similar post on your old forum at http://staging.eventespresso.com/forums/2010/12/show-number-of-remaining-tockets/ , and as suggested I added this code: Available Spaces: [ATTENDEE_NUMBERS event_id=1 type=available_spaces] to the html of the above Registration Page.Then I went to add this code [<?php echo do_shortcode('[ATTENDEE_NUMBERS event_id=1 type=available_spaces]')] to the suggested widget.php, but that PHP file is not with all the themes other php files, or in other common php file locations. Should I create a Widget.php file?

Thank you for your time and expertise.
Leesa

  • This topic was modified 11 years, 11 months ago by HooplaWD.


Jonathan Wilson

  • Support Staff

February 18, 2013 at 4:03 pm

Hello Leesa,

That forum post is outdated. :)

You shouldn’t create a widget.php file. You can modify the registration_page_display.php and move it and registration_page.php both to your uploads/espresso/templates directory.

You will need to add the following code somewhere around line 100 or 101 of registration_page_display.php:

<?php _e('Available Spaces:', 'event_espresso'); ?> <?php echo do_shortcode('[ATTENDEE_NUMBERS event_id="'.$event_id.'" type="available_spaces"]');?>


HooplaWD

February 18, 2013 at 4:13 pm

Hi Jonathan,

Thank you for your speedy response! Were would those two php file reside?


Jonathan Wilson

  • Support Staff

February 19, 2013 at 12:30 pm

Hello,

Sorry for the delay. Those files will be in wp-content/plugins/event-espresso/templates, but need to be moved to wp-content/uploads/espresso/templates to prevent them from being overwritten during an update.


HooplaWD

February 26, 2013 at 10:51 am

Jonathan, That worked like a charm! Thank you!! Any chance there is a way to enlarge the font for the display of

> Available Spaces: 30
??


Sidney Harrell

  • Support Staff

February 26, 2013 at 2:28 pm

You’ll want to wrap that text in a div or span and give it an id so that you can put a rule into your CSS file to modify it.

<span id="availablespaces"><?php _e('Available Spaces:', 'event_espresso'); ?></span> 

and then add the CSS rule to one of the CSS files:

#availablespaces {font-size: 120%;}

Then play with the value to get the size you want.


HooplaWD

February 27, 2013 at 9:10 am

Well, I thought the short code was working. It is, but the math is incorrect. It only displays the correct total if you are actually logged into the wordpress website.

For example, with the below link… the Available Spaces = 30. Four people paid, so total should now display Available Spaces = 26. It does, but you have to be logged in to the website. Once you log out, the total returns to Available Spaces = 30

Event example:
http://www.paintnplay.net/event-registration/?regevent_action=register&event_id=21

Admin screen shot: (shows 4 paid)
http://awesomescreenshot.com/06dzf71f7

I hope you can help.
Thank you!!
Leesa


Dean

  • Support Staff

February 28, 2013 at 2:46 am

Hello Leesa,

I just tested this out locally and both logged in and out it reduced the available spaces count correctly.

Have you tried clearing your browser cache? Or is there a caching plugin on your site and is it caching Event Espresso pages?


HooplaWD

February 28, 2013 at 9:19 am

Hello Dean,

Thank you for your reply! It was a cache setting issue!

Problem solved!

Have a fantastic day!
Leesa


Dean

  • Support Staff

February 28, 2013 at 11:44 pm

Great, glad it’s sorted!

Viewing 9 reply threads

The support post ‘Show Remaining Seats’ 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.

Event Espresso - Staging Server