Event information

Home Forums Calendar Products Events Calendar PRO Event information

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #985763
    John Paul
    Participant

    HI.. I need to be able to show the number of tickets available for each event and how many are available and when an event is sold out. I need to be able to see this in a) the event post itself b) the list view and c) in the list widget …which templates do I need to move into the theme child folders? and what code should I add?

    I saw a link about this somewhere on your site before but I cannot find it again…..sorry

    #985769
    John Paul
    Participant

    https://theeventscalendar.com/knowledgebase/adding-sold-out-notices-in-list-view/

    Hi ,, using the info from the link above. I created the new single-event.php file in my child theme folder.. this created the effect of adding “On Sale” in the list view. However, it does not seem to have fetched the info from the span class “tickets-in-stock”. There is no mention of the tickets available in the post event view either (which this link says should be there by default),, so what am I doing wrong??

    #985921
    George
    Participant

    Hi John,

    I wrote a function a while back that will work well for displaying the stock of tickets that remains for a given event. You can see the function here β†’ https://gist.github.com/ggwicz/31f9d9774e938846d635

    If you add that function to your theme’s functions.php file, then wherever you want to display the ticket stock information for an event, just add this where you want the info to display:


    <?php example_displaying_stock_information(); ?>

    And the ticket stock info will display.

    Now, as for where to place this code, if you’re not already familiar with it, please read through our Themer’s Guide to learn about how to override The Events Calendar view in a safe way from within your theme β†’ https://theeventscalendar.com/knowledgebase/themers-guide/

    You seem like you’re already familiar with that, so for a list of relevant files for your desired customizations, hopefully this helps:

    • “the event post itself” => src/views/single-event.php
    • “the list view” => src/views/list/single-event.php
    • “in the list widget” => src/views/widgets/list-widget.php

    I hope that helps!

    Cheers,
    George

    #985949
    John Paul
    Participant

    Thanks for this, I am not good at PHP, but I do know how to create the child theme folders.

    I still will need to be able to see “sold out” when no tickets are left.

    The original instructions seemed to fit the requirements perfectly (they just don’t seem to work). My interpretation of the original instructions suggest it is looking for information that perhaps used to be displayed in the Post default view, but is no longer present now. But looking at the wooticket code, it is clearly netting off the sales from the inventory in order to know when not to accept anymore orders. So it must be possible for the post default view to display the number left.

    The resultant code would then be referencing this element to know what to display.

    OR , do i follow your instructions and we need to add this code into the code you sent from github?

    #985999
    websource
    Participant

    Hi John, Hi George

    I had the idea more than a year ago, see the UserVoice Page: https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/5547825-tickets-allow-users-to-see-how-many-tickets-are-l

    May you support my idea?

    I would really like to get this implemented.
    As you already wrote the Code, couldn’t you implement it soon?

    Thanks
    Brian

    #986013
    John Paul
    Participant

    it seems such a good idea….my client wants to be able to show readers that her events sell well….its good for business

    #986035
    John Paul
    Participant

    ok..so am getting to grips with this πŸ˜‰

    the code I have entered only goes as far as stating when there are either tickets for sale or they are sold out…it is not meant to display the number available !!! ok got it!! so I have to use the code you have suggested to get the ticket count…..

    thanks ,, I will give that a go later this week…

    best

    #986045
    John Paul
    Participant

    actually, I couldnt wait and I tried it — and it worked !!! I can display how many tickets are left and when they are sold out !!!

    MANY THANKS !!!

    #986163
    websource
    Participant

    Hi John

    Would you mind share your site?

    Thanks

    #986166
    John Paul
    Participant

    Hi , no problem,

    it is still in development on a test server at the mo and still early days.

    The site is at http://ltdesigns.eu

    I have only configured the “list” view at the moment, so when you see the site there will be a menu option called “Courses”. Click on this to get the list view. You will notice on the heading for the one event I have on at the moment that it says “On Sale! ” after the course title. When the tickets sell out , this changes to “Sold Out”.

    If you look to the bottom of the post, you will see “tickets remaining: 5″…. I may change the position of this and use some CSS to style.

    I will add the other template views of widget and post later this week/weekend.

    The theme is called iMedica from Brainstorm Force and is a hugely flexible theme that is marketed to the Medical Industry, but I use it for any industry as it is so flexible, it also comes with visual composer and rev slider.. I have had no theme conflicts at all so far.

    To achieve this, I followed the instructions in the posts and links in this thread. I did not change anything.
    All the chnages to the files was doing only using FileZilla FTP client and Notepad, nothing else. Though I did take a backup before changing anything and I took a copy of the original php files and save them to be desktop before the editing.

    Hope this helps. I am away all week, so will have limited time to do any updates until the weekend

    #986168
    websource
    Participant

    Hi John thats great thanks!


    @George
    : Please help us to get this in the Plugin, needed! πŸ™‚

    #986646
    George
    Participant

    I’m glad the code worked John! πŸ™‚ Your patience and your willingness to share with @websource are much appreciated.

    We take your feedback seriously and improving our stock information is something that could indeed make it into a future release – stay tuned to products udpates and read the readmes for new updates, which list new features and tweaks included with the update. I unfortunately do not have specific dates or release numbers in mind here, but hopefully improvements will be made where you’ll find it useful πŸ™‚

    Cheers!
    George

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Event information’ is closed to new replies.