Help with Custom Template – Pro Shorcodes – tribe_events_list category

Home Forums Ticket Products Event Tickets Plus Help with Custom Template – Pro Shorcodes – tribe_events_list category

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1070278
    Lady Berry
    Participant

    Hi,

    So following on from a previous support thread:

    Event Grouping By Category?

    I have a couple more questions πŸ™‚

    1. Is it possible to add the Month to the date section of the Pro Shortcode Template – tribe_events_list category ?

    2. Is it possible to add the ticket price beneath my Excerpt that I have added?

    Thanks in advance
    Ben

    #1070296
    Lady Berry
    Participant

    OK, I have answered number 1: by adding

    <span class=”list-dayname”><?php echo apply_filters( ‘tribe-mini_helper_tribe_events_ajax_list_dayname’, date_i18n( ‘F’, $postDate ), $postDate, $mini_cal_event_atts[‘class’] ); ?></span>

    to my custom template- THEME/tribe-events/pro/widgets/modules/single-event.php

    For reference to anyone else who is interested, I found the date masks here:
    https://codex.wordpress.org/Formatting_Date_and_Time

    #1070328
    George
    Participant

    Hey @Ben,

    Thanks for reaching out. We unfortunately cannot help with customizations. Please see this article for more information β†’ https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/

    I’m sorry to disappoint! If other support-related questions arise, don’t hesitate to open a new thread any time.


    Now, before closing this thread, I wanted to touch on your Question #2 since it seems that you’ve already answered your own Question #1. You ask:

    2. Is it possible to add the ticket price beneath my Excerpt that I have added?

    Yes, it is possible to do this. You would need to enter the function tribe_get_formatted_cost() wherever you want the event cost to be displayed in your templates.

    I hope this information helps!

    β€” George

    #1070358
    Lady Berry
    Participant

    That is amazing – thank you so much. Im really sorry for asking an inappropriate question however am so grateful that you pointed me in the right direction really really appreciated.

    Im guessing this is also an inappropriate question but if at all possible do you know if it is possible to add logic to show when a events tickets are sold out (on the same template)?

    EDIT: I have found the function tribe_tickets_get_ticket_stock_message could you show me how i use this in the template ie is it:
    <?php echo tribe_tickets_get_ticket_stock_message() ?>

    Really appreciate all your help, you guys go above and beyond with support.

    Ben

    • This reply was modified 10 years, 2 months ago by Lady Berry.
    #1070931
    George
    Participant

    Hey @Ben,

    Thank you for the kind words. Your questions are indeed outside the scope of support we can provide, so I’m sorry to admit that I will not be able to help with your code-related questions.

    When it comes to how a function is used, I would recommend using a text editor that lets you “search in folder” – then, open up the plugin code and search in its plugin folder for that function name. This will search all of the plugin code files and reveal where the function is used, so you can see how it’s used and then just replicate that method with our own tweaks.

    For example, the function you asked about here is used like this:

    Here is the full file path to where the above code is copied-and-pasted from:


    wp-content/plugins/the-events-calendar/vendor/tickets/src/admin-views/attendees.php

    I genuinely wish you the best of luck with your customizing!

    Thank you,
    George

    #1073362
    Lady Berry
    Participant

    Hi,

    Thanks for the response – Im guessing $ticket is the ticket ID/reference for the ticket that the stock message is required for.

    When using the custom template “single-event.php” how is it possible to pass $ticket (or equivelent) to the function – tribe_tickets_get_ticket_stock_message()

    apologies if this is an unsupported question πŸ™

    #1073395
    George
    Participant

    Hey @Ben,

    You may be able to successfully retrieve tickets by using code like this:


    $woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
    $tickets = $woo_tickets->get_tickets( get_the_ID() );

    if ( ! empty( $tickets ) ) {

    foreach ( $tickets as $ticket ) {
    // Do things with $ticket.
    }
    }

    Your question IS unsupported. All of your questions in this thread are πŸ™‚ I have tried to help despite that fact and hope I have! However, at this point I will now have to close this thread because we cannot keep fielding unsupported questions.

    I do genuinely wish you the best of luck with your customizations.

    Sincerely,
    George

    #1083912
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Help with Custom Template – Pro Shorcodes – tribe_events_list category’ is closed to new replies.