Support

Home Forums Event Espresso Premium Show Remaining Seats

Show Remaining Seats

Posted: February 18, 2013 at 3:37 pm


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 https://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, 2 months ago by  HooplaWD.


Jonathan Wilson

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

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

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

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

February 28, 2013 at 11:44 pm

Great, glad it’s sorted!

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