Support

Home Forums Event Espresso Premium Table View Errors

Table View Errors

Posted: March 22, 2016 at 9:45 am

Viewing 11 reply threads


Robert Zak

March 22, 2016 at 9:45 am

I have downloaded and customized the table-view add-on. It is live on our site here, but there are a few quirks that I can’t seem to resolve on my own.

1) I have the table using the short code “show_expired=false”, which has been working great. The only problem is that this leaves a little grey area for when an event is Active, but I am not longer selling tickets (i.e. once the event has started). So during the duration of the event, the table still lists these events. The problem is that is changes the listed price to say “Free” and the Register button to say “Sold Out”. I tried removing the Active events using the code in this tutorial, but it ended up shutting down my whole site. Is there a what to resolve this?

2) This is a little complicated and I’m not sure where to start. The Category Filter and the table sort options don’t seem compatible. For example, if you visit the site I linked to above, you can use the Category Filter to select Minnesota and that works fine. But then if you want to order the results by date or price, etc. then it brings back in the courses marked with other state categories. How can I get everything to function properly here? (Note that if you arrange the table first, and THEN filter, that works. But I want this to be as user-friendly as possible for our customers.)

3) I am trying to replace the words “Category Filter” with something along the lines of “Select by State”. I have attempted to use a the “event_category_filter_text=”Search by State”” short code that is compatible with other EE4 add-ons, and I have tried editing the functions.php with this, which also shut down my site (this is the gist for my functions.php file currently). I think I am close, but missing a step somewhere. Advice?

Thanks!


Robert Zak

March 22, 2016 at 9:52 am

Update on 3)

I went back to look through the php file, and I noticed the single quotes around ‘Select by State’ were auto-stylized again without my noticing. I replaced them and now the site is back up, with the text replaced!

Any direction for problems 1) and 2) would still be appreciated. Thank you,


Josh

  • Support Staff

March 24, 2016 at 3:03 pm

Hi Robert,

For #1, you can remove the show_expired = false because that’s not needed. The little gray area you’re seeing might be caused some custom CSS that was added?

For #2, you add table_paging = false to the shortcode and that should fix things up for you.


Robert Zak

March 25, 2016 at 12:17 pm

Thanks for the response. I have a couple questions still.

1) The gray area was metaphorical. I meant that removing the Expired events didn’t remove the Active events. So when an event is active, but we are no longer selling tickets (both because the time frame has passed and because of an event selling out), the Register button changes to say “Sold Out” and the price changes to “Free”. Can I get the Active events to not show up in the table, and can I get the sold out events to not have the price change to Free?

2) That did work, but that completely removes the pagination. Am I not able to filter by category and sort without problems, unless I completely remove the pagination like that?

Thanks!


Josh

  • Support Staff

March 25, 2016 at 4:02 pm

For #1 you’d have to modify the query to remove the active events, and the code that you added to add the price column, that sounds like it’s got a bug.

Am I not able to filter by category and sort without problems, unless I completely remove the pagination like that?

That’s correct. The pagination ignores the filters.


Lorenzo Orlando Caum

  • Support Staff

March 25, 2016 at 7:07 pm

Hello,

I updated the tutorial as I found that it showed free when becoming sold out due to ticket sales but not when manually sold out. Go ahead and update using the updated version to resolve that issue:

https://gist.github.com/lorenzocaum/ef6afefd07c9c5f6f681

Note that the line numbers are based off starting with a default version of the file.

Thanks


Lorenzo


Robert Zak

March 28, 2016 at 2:06 pm

Thanks for the input! I will keep the pagination off so the filters work properly then.

And Lorenzo, I updated my file the way you showed, so that it would show “N/A” instead of “Free”. Is there something else I can do here to prevent the active events showing up, like Josh suggested? This is my current code.


Josh

  • Support Staff

March 29, 2016 at 2:27 pm

Hi Robert,

You can change the query so it doesn’t include events that no longer have tickets for sale (they may or may not be active at the moment, the criteria it’s checking for is whether tickets are still on sale). There is some example code in our snippet library and you can find it here:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/de_ee_filter_events_out_with_expired_tickets.php

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


Robert Zak

March 30, 2016 at 7:40 am

Josh, would adding that code also remove events that are sold out? I would like courses that are sold out to stay on the list and say sold out. I just don’t want events that are happening to say “Free” and still be listed.


Josh

  • Support Staff

March 30, 2016 at 8:34 am

It will still display sold out events so long as their ticket sale end date hasn’t passed yet.


Robert Zak

March 30, 2016 at 9:52 am

Perfect, I think that did the trick! Thanks Josh


Lorenzo Orlando Caum

  • Support Staff

March 30, 2016 at 10:35 am

Hi Robert,

I’ll update your support post to resolved. If you need help with anything else, then feel free to reach out to us here:

https://eventespresso.com/support/forums/


Lorenzo

Viewing 11 reply threads

The support post ‘Table View Errors’ 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