Front End Sales Reports

Home Forums Ticket Products Event Tickets Plus Front End Sales Reports

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #894035
    esferabr
    Participant

    Is it possible to show how many tickets where sold from each event an user has created on his events listing? Example, I am an event organiser, and I want to see on MY EVENTS, how many people bought my tickets, how do I show this information on the MY EVENTS listing? Could you help me? Thanks

    #894201
    Brian
    Member

    Hi,

    That is an interesting customization. I can try to help point you in the right direction.

    This is the file you might be able to add the coding to once moved to your theme: (instruction are in that file where to place it)

    \the-events-calendar-community-events\views\community\event-list.php

    Beyond that it’s possible for sure – but I’m afraid that sort of customization is a bit beyond what we can help you with here on the forum. Some good WP coding knowledge would definitely be required to get it to work.

    Let me know if you have any follow up questions.

    #896806
    esferabr
    Participant

    I have coding skills (I am a developer) but the question is that I am trying to find an easier way to do this and build a smart query to get where I am trying to reach. I can’t find an easy way trough “user events -> event ticket -> sales (for that ticket)

    Could you give me any hint on where should I begin to build this query (tables, joins, ans so on)?

    #897039
    Brian
    Member

    Ok I can try to help out to get started.

    I would start by looking here and seeing the different functions we use from WooCommerce to check ticket stock:

    \wootickets\views\wootickets\tickets.php

    Then you could use this function to get ticket ids:

    function get_tickets_ids( $event_id ) {
    if ( is_object( $event_id ) )
    $event_id = $event_id->ID;

    $query = new WP_Query( array( 'post_type' => 'product',
    'meta_key' => $this->event_key,
    'meta_value' => $event_id,
    'meta_compare' => '=',
    'posts_per_page' => - 1,
    'fields' => 'ids',
    'post_status' => 'publish', ) );

    return $query->posts;
    }

    That is a function in the class-wootickets.php located here:

    \wootickets\classes\class-wootickets.php

    Community Events
    If you would like to add this to the Front End Event List I would look at moving this file to your theme:

    \the-events-calendar-community-events\views\community\event-list.php

    Following the themer’s guide

    https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/

    Then make the edits there to how you would like the stock to show.

    Let me know if you have any follow up questions.

    Thanks

    #901075
    esferabr
    Participant

    Thanks, I will try that!

    #901890
    Brian
    Member

    Sounds good.

    Here is some more coding to help you out. It is a shortcode that shows the amount of attendees for a given event.

    https://gist.github.com/barryhughes/20223522018db6046cc7

    You maybe to use that to get almost what you are looking for and then can modify it from there.

    That is about as much help I can give on customizations, so I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Front End Sales Reports’ is closed to new replies.