Only show stock when less than XX

Home Forums Ticket Products Event Tickets Plus Only show stock when less than XX

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1190448
    John
    Participant

    Is there a way to only show the current stock once it has dropped below a certain level?

    It is a feature of Woocommerce, which I have enabled, but it is not working for this. Any ideas?

    #1191072
    Nico
    Member

    Hi there John,

    Thanks for getting in touch with us! I can help you here…

    Can you please let me know where you want to hide/show the tickets stock?

    I don’t think we are not taking this Woo feature but maybe I can craft a snippet for this.

    Please let me know about it,
    Best,
    Nico

    #1191790
    John
    Participant

    It is the part of the page where you click the number of tickets you want and add to basket.

    We sell event tickets and could start with over 100 available. At this stage I just want to show it as “In stock” then when it gets to a level I decide it shows XX remaining.

    #1192431
    Nico
    Member

    Thanks for clarifying John!

    Let me give this customization a try, I think a simple JavaScript snippet could do the trick here 🙂

    I’ll send it your way when ready,
    Best,
    Nico

    #1194042
    Nico
    Member

    Hey John,

    Thanks for the patience while I worked on this!

    Just add this code to your theme’s (or child theme’s) functions.php file and it should do the trick!

    https://gist.github.com/niconerd/31841add681d5c32f2d7c2ef8ab65915

    The snippets assumes you are using WooCommerce tickets and that jQuery is loaded on the page (true for most cases). If any of those conditions are not true in your site let me know about it and I’ll make some adjustments!

    Best,
    Nico

    #1195983
    John
    Participant

    This reply is private.

    #1196086
    Nico
    Member

    This reply is private.

    #1199038
    John
    Participant

    Seems to be working now.

    Have this as an option you tick somewhere in the settings would be very useful in a future update for others. I assume it takes the amount it does start to show from WooCom?

    #1199219
    Nico
    Member

    Stoked to hear this is working for you John!

    Have this as an option you tick somewhere in the settings would be very useful in a future update for others.

    You are welcome to suggest this feature request at The Events Calendar user voice page, where we gather feedback from our community.

    I assume it takes the amount it does start to show from WooCom?

    Actually the snippet has a fixed number in there. But if you think this will help you out, I can take a look to see how hard is to add this.

    Please let me know about it,
    Best,
    Nico

    #1208879
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Only show stock when less than XX’ is closed to new replies.