Support

Home Forums Custom Files Add-on (EE3) Adding seats available to the espresso_table

Adding seats available to the espresso_table

Posted: October 3, 2013 at 11:50 am

Viewing 5 reply threads


infosolwebadmin

October 3, 2013 at 11:50 am

Quick question, I want to add a column in the espresso_table that would show how many spaces are available for any class in the table. I’ve modified the espresso_table code a few times before, so I am familiar with how to add a new column and heading. I’m just unsure of the PHP I would need to use in bottom half of the table that would pull in the number.

Thanks!


Josh

  • Support Staff

October 3, 2013 at 12:05 pm

Hi Yolande,

You’ll want to refer to the shortcode documentation for the options on how you want to display this eg available spaces/registration limit:

https://eventespresso.com/wiki/shortcodes-template-variables/#attendee-numbers

The template code will be a bit different in that the event ID variable on the ESPRESSO_TABLE template is $event->id

So available spaces would be:

<?php echo do_shortcode('[ATTENDEE_NUMBERS event_id="'.$event->id.'" type="available_spaces"]');?>


infosolwebadmin

October 3, 2013 at 12:24 pm

Awesome, thank you Josh! Is there any way to get the number to be centered inside of it’s cell? Here’s an example, just looks kind of goofy when the number is off to the left of the cell:

http://events.infosol.com/testing-page/


Jonathan Wilson

October 3, 2013 at 12:29 pm

Hi Yolanda,

You could try adding the CSS below to the style.css file of your theme. Or, you could add it to a custom CSS plugin.

/* Center table text */
.td-group {
	text-align: center;
}


infosolwebadmin

October 3, 2013 at 4:43 pm

Thanks Jonathan, that did the trick. I have one last question, I’ve got a column in my table that has an ‘Add to Cart’ link. Is it possible to display the add to cart link as an image instead of just text? I looked into this a while back but can’t remember what I found out.

Thanks again for all your help!


Sidney Harrell

October 3, 2013 at 5:29 pm

You can add something like:

.ee_add_item_to_cart {
    background: url("wp-content/themes/focus/images/gray/button.png") repeat scroll 0 0 rgba(0, 0, 0, 0);
}

Replace that url with your button image, of course.

Viewing 5 reply threads

The support post ‘Adding seats available to the espresso_table’ 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