Support

Home Forums Event Espresso Premium EE4 how to hide how many tickets were sold or show unlimited tickets

EE4 how to hide how many tickets were sold or show unlimited tickets

Posted: March 6, 2014 at 4:03 pm

Viewing 22 reply threads


standoutsites

March 6, 2014 at 4:03 pm

EE4:4.8.1reg

How to hide how many tickets were sold in EE4?
And how to make tickets unlimited so it wouldn’t show how many tickets left?
Is there a setting for this or can this only be done from the template?


Garth

  • Support Staff

March 7, 2014 at 9:23 am

Hi,

There is no single way to hide how many tickets are sold without editing the ticket selector templates, but you can set the quantity field to be blank and it will move to unlimited spaces remaining:

http://www.screencast.com/t/VMVvKaX6wRz
http://www.screencast.com/t/HhUurq98

Does that help?


standoutsites

March 13, 2014 at 3:29 pm

Hi Garth,

This is great but not enough. I actually do need to change the ticket selector template. Can you please, help me? My client really doesn’t want to show how many tickets were sold on all of their events. In order not to discourage other people from coming to event if the sold tickets number is low. This should be an option in later releases, I hope. But for now, please tell me which file to edit and how?


Josh

  • Support Staff

March 14, 2014 at 4:57 pm

No template file editing is necessary in this case. The content that you don’t want displayed can be hidden with some CSS by adding the following to your custom stylesheet:

.tckt-slctr-tkt-details-td span:nth-of-type(4),
.tckt-slctr-tkt-details-tbl th,
.tckt-slctr-tkt-details-tbl td:nth-child(3),
.tckt-slctr-tkt-details-tbl td:nth-child(4),
.tckt-slctr-tkt-details-tbl td:nth-child(5),
.tckt-slctr-tkt-details-tbl td:nth-child(6) {
  display: none;
}


standoutsites

March 14, 2014 at 6:14 pm

Josh, this is AWESOME! thank you! one correction. How can I use CSS to ONLY show TICKETS LEFT, but not TICKETS SOLD.


Josh

  • Support Staff

March 14, 2014 at 6:27 pm

You’ll need to modify the second selector above that has the (th) so that instead of hiding all the table headings it hides only the ones you want hidden. Each table heading can be selected using nth-child or nth-of-type.

The same is true for the individual table cells (td) which are already being granularly selected using nth-child in the example code, so you remove the selectors to make the table cells you want displayed.


RJG

March 16, 2014 at 5:58 am

This is very good. Thanks.


RJG

March 16, 2014 at 7:54 am

This option works well, but it blocks my fee. so the space where you can add an additional fee, I added it, but the amount doesn’t show up now.


Dean

March 17, 2014 at 5:21 am

Hi,

Unfortunately the two sections share the same CSS classes, so hiding one will hide the other.

This is not ideal and I have requested additional CSS classes, however I cannot advise when these will be added.

In the meantime, there isn’t much that can be done, unless you want to change code in a core file (really not recommended).


RJG

March 17, 2014 at 8:19 am

Hello Dean,

Is it possible, using the CSS code to simply hide the cell? So the headers will be there, the row will also be there, so they won’t completely collapse (which is the other issue, the formatting is compromised) but simply hide cell specific contents?


RJG

March 17, 2014 at 8:37 am

Also, where is the actual template or code in the core file? I won’t modify it, but it may give me some insight.
Thanks.


Tony

  • Support Staff

March 17, 2014 at 8:56 am

Its actually easier to follow from the front end as there are multiple conditionals within the ticket selector however if you would like to take a look.

event-espresso-core-reg/modules/ticket_selector/templates/

You will find the template for the ticket selector there.

As mentioned it is not recommended to modify core files such as these.


RJG

March 17, 2014 at 9:00 am

Thanks Tony.

What do you mean by it’s easier to follow from the front end?


Tony

  • Support Staff

March 17, 2014 at 9:20 am

Using something like chrome dev tools to inspect the elements will be easier than looking through the code. Still not very straight forward, but neither is the code 😉

So if using chrome, right click on the element of of the ticket selector you are interested in, then click Inspect Element, you can view sepecific elements and work out some CSS to target them http://take.ms/8GdGn


RJG

March 17, 2014 at 9:27 am

Excellent. Thank you for the explanation.


RJG

March 17, 2014 at 12:58 pm

Hello Tony,

I just spent about 4 hours try to fix this and I can’t. Would you help me out please? I just want to remove the cells of:
“This Ticket Sold”, “This Ticket Remaining”, “Total Tickets Sold”, “Total Spaces Remaining”

Would you point me in the correct direction? I don’t fully understand why the code above couldn’t work:

What are the nth-child elements exactly and why do they take out so much and not just those specific cells?

.tckt-slctr-tkt-details-td span:nth-of-type(4),
.tckt-slctr-tkt-details-tbl th,
.tckt-slctr-tkt-details-tbl td:nth-child(3),
.tckt-slctr-tkt-details-tbl td:nth-child(4),
.tckt-slctr-tkt-details-tbl td:nth-child(5),
.tckt-slctr-tkt-details-tbl td:nth-child(6) {
display: none;
}


Tony

  • Support Staff

March 18, 2014 at 5:16 am

nth-child selectors select the child elements of a specific value (the value within the brackets)

If you would like to learn more about them I would recommend reading here as it explains better than I can:

http://css-tricks.com/how-nth-child-works/

The reason for more of the table being removed was due to this selector:

.tckt-slctr-tkt-details-tbl th,

So to remove just the specific values you specified earlier, you can use something like this:

.tckt-slctr-tkt-details-tbl th:nth-child(3),
.tckt-slctr-tkt-details-tbl th:nth-child(4),
.tckt-slctr-tkt-details-tbl th:nth-child(5),
.tckt-slctr-tkt-details-tbl th:nth-child(6),
.tckt-slctr-tkt-details-tbl td:nth-child(3),
.tckt-slctr-tkt-details-tbl td:nth-child(4),
.tckt-slctr-tkt-details-tbl td:nth-child(5),
.tckt-slctr-tkt-details-tbl td:nth-child(6) {
  display: none;
}

Which leaves only Event Date and Event Time.

We have a ticket open to address the complexity of this by adding more classes to the ticket selector which will be included within a future version of Event Espresso (the exact version number I am unsure of of)

Does that help?


RJG

March 18, 2014 at 6:11 am

Hello Tony,

Thank you very much. This is very useful. I just have one question. How can I implement your CSS code without compromising my price modifier(s)?

http://www.gildednights.com/events/gilded-nights-masquerade-winter-wrap-up/

please click on show details and see what happens or how it loos.


Dean

March 18, 2014 at 6:29 am

Hi,

As previously mentioned, the two tables are currently tied using the same CSS, so any CSS changes to one table will affect the other.

As such the only two options are:

1) Edit the template files – not recommended, it’s pretty complicated in their. If you do still want to, they are here

event-espresso-core-reg/modules/ticket_selector/templates/

2) Wait until we add in more CSS classes etc, then use CSS. I cannot say when or even if that will occur, but I have made a request for it as it will make life easier for everyone.


RJG

March 19, 2014 at 9:38 am

Hello Dean,

this is really frustrating, but since we are on the topic, rather than making it happen from the CSS. Could it be possible to create a function in the future which would give the option of showing these pieces of information at will?


Josh

  • Support Staff

March 19, 2014 at 3:47 pm

Hi there,

It’s possible, but the solution will likely be some hooks added or allowing alternate templates to load within the ticket selector.


RJG

March 19, 2014 at 4:37 pm

Hello Josh,

that works.

Riffard


Lorenzo Orlando Caum

  • Support Staff

November 20, 2015 at 7:19 am

Hello again,

There is now a template option available that can be used to hide the tickets sold details and it is available in a current version of Event Espresso 4.

It can be found by logging into your WP dashboard (WP-admin) and going to Event Espresso –> Events –> Templates. Then scroll to the end of the page and look for Ticket Selector Template Settings.

Then look for the Show Ticket Sale Info option and set it to no and then click on Save to save changes.

Thanks


Lorenzo

Viewing 22 reply threads

The support post ‘EE4 how to hide how many tickets were sold or show unlimited tickets’ 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