Support

Home Forums Events Calendar Add-on EE Calendar – Color Change for Sold Out Events

EE Calendar – Color Change for Sold Out Events

Posted: March 31, 2014 at 1:55 am

Viewing 1 reply thread


Stephanie C Person

March 31, 2014 at 1:55 am

I’m trying to find a way to help online viewers instantly determine sold-out events from those still available.

Is there a way via CSS to change the color of an event once it’s been sold out? I know it’s possible to use colors variation for the calendar via Event Categories, but I don’t see anything for sold-out events.

Any thoughts?


Dean

March 31, 2014 at 3:33 am

Hi,

It’s possible but would require a template edit as well.

As an example, I added the following to the event_list_display.php about line 42 above the h3 title tag

<?php
$showsoldout = '';
$soldoutcheck = get_number_of_attendees_reg_limit($event_id, 'available_spaces');
if($soldoutcheck === 0) {
	$showsoldout = "soldout";
}
?>

then I added

<?php echo $showsoldout; ?>

to the h3’s class code.

Now I can use CSS to modify the look of events with 0 available spaces (sold out).

This would need to be repeated for single registrations as well.

That’s just an example of course but hopefully you get the idea.

Viewing 1 reply thread

The support post ‘EE Calendar – Color Change for Sold Out Events’ 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