Support

Home Forums Event Espresso Premium Displaying Sold out events on mobile

Displaying Sold out events on mobile

Posted: January 30, 2019 at 4:13 pm

Viewing 11 reply threads


paintforfun

January 30, 2019 at 4:13 pm

Hi,
I am displaying events on mobile in a different way than in desktop. On Desktop I am seeing my sold out tickets but not on Mobile. I do want to see sold out events on mobile. please see the link for example: https://www.paintforfun.com.au/events-calendar/

Thanks!


Josh

  • Support Staff

January 31, 2019 at 8:59 am

Hi,

May I ask are there any customizations in place so the event list widget does not display events that cannot be registered for? (which is what appears to be in the mobile view)


paintforfun

February 1, 2019 at 3:47 am

Hi Josh,
I am using a custom plugin that displays upcoming events. I used this plugin by Tony: https://gist.github.com/Pebblo/d0d5f485ae0599e56e20

I then decided which categories I want to display in the widget and created one category that includes many sub categories so for example:
Acrylic Painting category
Watercolour Painting category
I added these 2 categories into a new category: “all events except private”
and this is what I am displaying in the widget.
To be more clear on the issue: When event from Acrylic Painting category is sold out i am not seeing it on mobile version.

I should have specified this information in my first message.
Hoping you can help
thanks!


Tony

  • Support Staff

February 4, 2019 at 5:10 am

Hi there,

I’ve just updated the code used in that Gist to include sold out events, the change you’ll need make on the version running on your site is here:

https://gist.github.com/Pebblo/d0d5f485ae0599e56e20#file-tw_custom_upcoming_events_widget-php-L318

That should then include sold out events for you.


paintforfun

February 4, 2019 at 11:11 am

Thank you it works now.
Can I ask if there is a way to display sold out with the other information i display for the event?
I dont want site visitors to think they can register and make them click through to the event, I only want them to get the impression this is top business and make them feel they need to book something quickly. (but not the sold out events) thanks!


Tony

  • Support Staff

February 4, 2019 at 11:17 am

It depends on what/how you want to output the details, but you can check if the event is sold out using:

$event->is_sold_out()

So you could use something like:

if( $event->is_sold_out() ) {
    echo 'Sold out';
}

Obviously adding your own elements etc to the output.


paintforfun

February 5, 2019 at 11:37 am

Thank you can you advise on where I can place this code to make it show up?


Tony

  • Support Staff

February 6, 2019 at 3:45 am

Sure, where exactly on the widget would you like it to be displayed?

Using this image as an example: https://monosnap.com/file/7XrgY6sJSfxmKQNSVtF1DYxIAoY17w


paintforfun

February 6, 2019 at 4:45 am

just above the venue name.thanks!


Tony

  • Support Staff

February 6, 2019 at 5:08 am

There’s no code in my version of the widget to output the venue so I’m assuming in my example that ‘Nicolinis On The Bay (Elwood)’?

If so you can add it either above or below this line: https://gist.github.com/Pebblo/d0d5f485ae0599e56e20#file-tw_custom_upcoming_events_widget-php-L366


paintforfun

February 7, 2019 at 3:20 am

Hi Tony,
Ive tried that and it didnt show up on screen, no output.
Any thoughts on why?


Tony

  • Support Staff

February 7, 2019 at 4:51 am

I’ll need to see the code you used, can you post the contents of the widget here:

http://wpbin.io/

Then add the URL here and I’ll take a look.

Viewing 11 reply threads

The support post ‘Displaying Sold out events on mobile’ 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