Display "Sold Out" in Events list, event page and Calendar

Home Forums Calendar Products Events Calendar PRO Display "Sold Out" in Events list, event page and Calendar

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #969485
    Tommy
    Participant

    Hi,

    I tried following the steps in this thread https://theeventscalendar.com/support/forums/topic/sold-out-events/ but had no luck. I started out by copying the functions to our child theme’s functions.php. Then created /tribe-events/month/single-event.php file inside child theme. When it didn’t worked, created the same file in main theme folder. But it still didn’t worked. Any idea what I am doing wrong?

    As you can see here on our events page http://viaferratanorway.no/event/klatretur-7/2015-06-19/ that tickets are shown as Out of Stock (because for testing purpose I marked the tickets Out of Stock from Woocommerce inventory. But it doesn’t show Sold Out anywhere. Do I need to add the functions to main theme’s functions.php? Do I need to test it out some way other than Out of Stock?

    If it’s easier, can we show available number of tickets some how?

    Thanks!

    #969570
    Nico
    Member

    Hi Tommy,

    Thanks for reaching out on us! Also thanks for trying out a solution from the forum before creating the topic. In this case it appears to be a really old thread so I’ll suggest we start all over and try a simpler solution.

    There’s a knowledge base article covering the process of Adding sold out notices for tickets in List View, the same will work for single event view. The difference is that instead of overriding the ‘single-event-in-list-view’ template, you will override the template for ‘single-event-view’ located at ‘wp-content\plugins\the-events-calendar\views\single-event.php’.

    Template overrides should work well on your child-theme as far as I know. You can append some sample text to the template file copied in your theme just to be sure the override works.

    Please bear in mind that for this to work you have to define a Stock value when adding the ticket to the event in the back-end.

    Please let me know if you could get this working,
    Best,
    Nico

    #969671
    Tommy
    Participant

    Hi Nico,

    Thank you for the detailed response. I followed the instructions in the knowledgebase article. The override didn’t worked on our child theme. But when we tested it on main theme, it worked. We tested it by adding suffix ” – Test” to event title. But it doesn’t show the Sold Out! text anywhere.

    http://viaferratanorway.no/event/klatretur-7/all/
    http://viaferratanorway.no/event/klatretur-7/2015-06-19/ Tickets does show “out of stock message” as I did this: http://screencast.com/t/KRrGVajMip I tried stock quantity 12 and 0 both, but neither worked.

    Any idea what I could be doing wrong? Should I make stock quantities of both tickets to 0? As currently I have only made one ticket type as 0 and other one is still 12, but both are set as out of stock.

    Thanks!

    #969702
    Nico
    Member

    Hey Tommy,

    Sound like we are making progress here 🙂

    To test it on my end, I set the ticket ‘Stock’ to 1 from the Edit Event screen (https://cloudup.com/cD9Al7C0tUy). Then went ahead and made a sample purchase from the site just like a normal user would, and confirmed the order in WooCommerce Admin. The ticket in the Edit Event screen should look like this after the purchase is confirmed: https://cloudup.com/cSDyFqXw3Vq. And the ‘Sold Out’ message should be visible. Can you test it this way?

    One thing I’m not sure about is if you did the template override for ‘single-event’ (as I mentioned) or just ‘single-event-in-list-view’ (as described in the article) or both. Please note that changes made to ‘single-event’ will show in this URL: http://viaferratanorway.no/event/klatretur-7/2015-06-19/, while the ones made to ‘single-event-in-list-view’ will show here: http://viaferratanorway.no/event/klatretur-7/all/.

    Let me know if it does work testing it in the way I described,
    Best,
    Nico

    #971233
    Tommy
    Participant

    Hi Nico,

    I would like to take a moment to appreciate the way you guys are providing support. It tells a lot about your team and how you guys stand behind your product. Kudos!

    I also tested the way you performed the test (1 ticket and made test purchase). And it worked. I can now see “Sold Out” message. But here are some issues:

    I added following code here: /wp-content/themes/betheme/tribe-events/list/single-event.php
    It shows the sold out notice here: http://viaferratanorway.no/event/klatretur-7/all/

    1. Where to add the code to show the same Sold-out notice on actual event page here: http://viaferratanorway.no/event/klatretur-7/2015-06-19/

    2. Where to add the code to show the same Sold-out notice on calendar page here: http://viaferratanorway.no/events/month/ , http://viaferratanorway.no/events/week/

    3. When I add the code, it shows the Sold Out! message twice. http://screencast.com/t/38An8OYJBD
    And when I remove the code, it shows the sold out message once, without formatting. So does this means, the plugin auto-detects and shows the message itself and we don’t need to add any code?

    4. If yes, then where can I change or add CSS for the default sold-out message? http://screencast.com/t/PXVFtqTXx6c5
    Class: wootickets-sold-out

    Thanks!

    #971491
    Nico
    Member

    Hey Tommy,

    Thanks for your kind words 🙂 Happy to hear you’re feeling positive towards the service we provide!

    Jumping back to your issue, glad the test worked!

    1. Where to add the code to show the same Sold-out notice on actual event page here: http://viaferratanorway.no/event/klatretur-7/2015-06-19/

    For single event, yo need to override ‘single-event-view’ template located at ‘wp-content\plugins\the-events-calendar\src\views\single-event.php’. Make a copy of the file to the ‘tribe-events’ folder in your theme, and add the same snippet.

    2. Where to add the code to show the same Sold-out notice on calendar page here: http://viaferratanorway.no/events/month/ , http://viaferratanorway.no/events/week/

    You’ll need to override those views too! You can find the week view in pro (‘wp-content\plugins\events-calendar-pro\src\views\pro’) and month view in (‘\wp-content\plugins\the-events-calendar\src\views’).

    3. When I add the code, it shows the Sold Out! message twice.

    Not sure about why you are getting that message twice! Are you sure you’re not having the code duplicated in your template override?

    4. If yes, then where can I change or add CSS for the default sold-out message? http://screencast.com/t/PXVFtqTXx6c5
    Class: wootickets-sold-out

    You can style both by adding the following snippet to your theme’s stylesheet (located at ‘wp-content/themes/your_theme/style.css’):


    .tickets-sold-out, .wootickets-sold-out{
    color: red;
    }

    Please note that currently Tickets doesn’t play well with recurring events (read the notice in the More Info section at the tickets product page). To test this issues please use tickets in non recurring events.

    Let me know how the customization goes,
    Have a great weekend,
    Nico

    PS: Bear in mind that the ‘views’ folder has moved inside the ‘src’ folder in just released 3.10 versions of the plugins. If you are running an older version the ‘views’ folder should be in the root folder of the plugin (eg: ‘\wp-content\plugins\the-events-calendar\views\’).

    #972005
    Tommy
    Participant

    Everything looks and works great! Thanks again for such a wonderful support, Nico. I’ll get in touch again if I need more help.

    Cheers!

    #972218
    Nico
    Member

    Awesome Tommy 🙂

    I’m going to close this topic – but please don’t hesitate to create new topics if you need help with anything else.

    Best,
    Nico

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Display "Sold Out" in Events list, event page and Calendar’ is closed to new replies.