Sold out or available tickets in eventlist

Home Forums Ticket Products Event Tickets Plus Sold out or available tickets in eventlist

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #51824
    mamalm
    Participant

    Looking to put sold out in the event list and calendar, not just in the single event page

    I use wootickets for event sales and event cal pro

    #51843
    Barry
    Member

    Hi Mamalm,

    You would need to do a little customization here, so if you haven’t already done so please read up on our Themer’s Guide and this tutorial on safely overriding templates as they will give you the background knowledge you need to do this.

    You then need a means of accessing ticket information from those new locations. This function returns an array of ticket objects for the current post (or you can specify a specific post ID for the relevant event).

    You could then iterate through that array – here is an example that retrieves and displays the price to give you an example of the basic process – except you would be interested here in information about stock levels so you would probably prefer to use $ticket->get_stock_quantity() (as opposed to $ticket->get_price_html() ).

    Whether you want to expose the actual stock level or display an out-of-stock message (and or a combination of those, if for instance you have multiple tickets per event) is something I’ll leave to you 🙂

    #51844
    Barry
    Member

    (To clarify, that first function I referenced should go in your theme’s functions.php file or another suitable location.)

    #51919
    mamalm
    Participant

    Please dumb this down a bit Barry, and yes I have read
    Themer’s Guide and this tutorial on safely overriding templates
    many times and I really dont follow you at all….
    This is NOT a function of your events calendar pro?
    When purchasing both event calendar Pro and wootickets last week I assumed this would be a easy task

    #51937
    Barry
    Member

    Sorry Mamalm, but no this is not a function of Events Calendar PRO. To do what you want to do requires an amount of customization work.

    Let’s take it one step at a time though – have you added this function to your theme’s functions.php file?

    #51943
    mamalm
    Participant

    absolutly, the functions php has been added

    #51954
    Barry
    Member

    Great! Please also add this function in the same place.

    Next, we need to override the list view template (as per the instructions in the themer’s guide) – so you should have a copy in the following location:

    wp-content/themes/{YOUR_THEME}/events/list.php

    #51956
    mamalm
    Participant

    I’m with you

    #51958
    mamalm
    Participant

    This was the part that I didnt follow you

    #51999
    Barry
    Member

    So you’re having trouble with the template override process?

    You should first go to your theme’s directory and create a new sub-directory called events – then please copy the following file:

    wp-content/plugins/the-events-calendar/views/list.php

    And place a copy of that file in your new events sub-directory. Does that make more sense?

    #52003
    mamalm
    Participant

    Template override I have no problem with just the next part of you directions……. Listing sold out on the event cal list an event cal….

    #52013
    Barry
    Member

    OK, so now you need to use those newly added functions from within your list.php template – here’s an example of one way in which you could do this, based on the default list.php template.

    The relevant piece of code can be found on lines 41-55 – you may need to tweak this slightly so that the wording fits your particular style and business model, or to add any other embellishments that you might need 🙂

    In principle the same chunk of code (lines 41-55) can be added to other templates, such as table.php with no or some very minor changes.

    Does that help?

    #52125
    mamalm
    Participant

    This reply is private.

    #52146
    Barry
    Member

    Hi Mamalm,

    Remember that we edited the list.php template – not gridview.php or table.php – so your month view would be unaffected by that change.

    I can’t actually see the problem in any case, so perhaps you’ve resolved it already?

    #52173
    mamalm
    Participant

    Hey Barry, I made the changes to the cal, but a bug shows up when viewing the link I gave you with the firefox browser on a mac only, strange bug in the event cal….

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘Sold out or available tickets in eventlist’ is closed to new replies.