Home › Forums › Ticket Products › Event Tickets Plus › Front End Sales Reports
- This topic has 5 replies, 2 voices, and was last updated 11 years, 5 months ago by
Brian.
-
AuthorPosts
-
November 21, 2014 at 10:46 am #894035
esferabr
ParticipantIs 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
November 21, 2014 at 12:39 pm #894201Brian
MemberHi,
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.
November 24, 2014 at 3:45 am #896806esferabr
ParticipantI 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)?
November 24, 2014 at 8:51 am #897039Brian
MemberOk 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
November 28, 2014 at 5:09 am #901075esferabr
ParticipantThanks, I will try that!
November 29, 2014 at 6:54 am #901890Brian
MemberSounds 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
-
AuthorPosts
- The topic ‘Front End Sales Reports’ is closed to new replies.
