Home › Forums › Ticket Products › Event Tickets Plus › Only show stock when less than XX
- This topic has 10 replies, 4 voices, and was last updated 9 years, 4 months ago by
John.
-
AuthorPosts
-
November 10, 2016 at 9:21 am #1190448
John
ParticipantIs 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?
November 11, 2016 at 10:33 am #1191072Nico
MemberHi 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,
NicoNovember 14, 2016 at 6:22 am #1191790John
ParticipantIt 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.
November 15, 2016 at 7:50 am #1192431Nico
MemberThanks 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,
NicoNovember 17, 2016 at 11:25 am #1194042Nico
MemberHey 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,
NicoNovember 22, 2016 at 9:38 am #1195983John
ParticipantThis reply is private.
November 22, 2016 at 11:41 am #1196086Nico
MemberThis reply is private.
November 29, 2016 at 7:22 am #1199038John
ParticipantSeems 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?
November 29, 2016 at 9:18 am #1199219Nico
MemberStoked 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,
NicoDecember 21, 2016 at 8:35 am #1208879Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Only show stock when less than XX’ is closed to new replies.
