Home › Forums › Welcome! › Pre-Sales Questions › Wootickets: Product Templates and custom ticket numbers
- This topic has 7 replies, 2 voices, and was last updated 11 years, 1 month ago by Barry.
-
AuthorPosts
-
February 25, 2013 at 11:31 am #40906Andy WendtGuest
We are setting up an online raffle for a educational non-profit using woocommerce. Everything has worked great except that when we test sell tickets, the customer only receives an order number and not individual ticket numbers.
I have watched your videos and like how they receive a pdf ticket, order number, and verification code.
There are a couple of questions though:
1. How hard would it be to hack your plugin to accept a specific range of range of tickets, I am not adverse to digging into the code (do you have any hints on where/how)?
2. Can we add the ticket to a template from a WooTheme? For example, using the Whitelight Theme I need to maintain the multiple tabs for information and also the pictures of the product.
Thank you for your consideration and flexibility,
Andy Wendt
February 25, 2013 at 11:43 am #40909Andy WendtGuestFor 2. this solved part of my question: https://theeventscalendar.com/support/forums/topic/integarting-with-a-sales-page/
I assume this means that I can assign a template?!?
February 26, 2013 at 9:04 am #41020AndyGuestIt really would only have to be a specific start number. We are only going to be ruffling one product at a time.
February 26, 2013 at 10:30 am #41035BarryMemberHi Andy,
How hard would it be to hack your plugin to accept a specific range of range of tickets
It’s probably possible to change the number used for the ticket ID (if that’s what you mean) but I suspect it may require some knowledge of WooCommerce’s internals just as much as WooTickets’s inner workings.
This sort of customization isn’t something we can help with too much I’m afraid.
Can we add the ticket to a template from a WooTheme?
Again I’m not 100% sure I understand the question, but there are quite a few ways to sell tickets besides the default of a ticket form on the single event page … really you’re limited only by your imagination and WP dev skills here.
February 28, 2013 at 10:03 am #41254commandzParticipantI ended up purchasing the plugin—saved me a bunch of time—and customized the ticket output.
If others are looking for the same sort of thing, what I did is below.
Just below “foreach ( $tickets_list as $ticket ) {” in the-events-calendar/lib/tickets/tribe-tickets.php
mysql_connect(“localhost”, “user”, “pwd”) or die(mysql_error());
mysql_select_db(“database”) or die(mysql_error());//Find the max number in column
$MaxID = mysql_query(“SELECT MAX(column) FROM table “);
$MaxID = mysql_fetch_array($MaxID, MYSQL_BOTH);
$MaxID = $MaxID[0];//ticket logic
$ticket_first = 6034;
$ticket_number = ”;
if ($MaxID === null) {$ticket_number = $ticket_first;} else {$ticket_number = $MaxID + 1;}//Insert into the database
mysql_query(“INSERT INTO table
(holder_name, order_id, ticket_id, security_code, cust_ticket) VALUES(‘$ticket[holder_name]’, ‘$ticket[order_id]’, ‘$ticket[ticket_id]’,’$ticket[security_code]’,’$ticket_number’) “)
or die(mysql_error());February 28, 2013 at 10:15 am #41256commandzParticipantWhat I was doing with the above is sending the information to a separate table (which you will need to create and then changing what was output onto the pdf.
In “the-events-calendar/lib/tickets/tribe-tickets.php” I changed line 244 from “$pdf->Write( 5, $ticket[‘ticket_id’] );” to “$pdf->Write( 5, $ticket_number );”
I also included the code that is in the above post. This allows me to set what the first ticket number is going to be ($ticket_first) and then associate it to original ticket number and order number in the new table.
February 28, 2013 at 10:20 am #41257commandzParticipantAs for the theming question, I was trying to use the default WooCommerce single product display of a product. I circumvented the default wootickets display by creating a new page and inserting the woocommerce shortcode: [product_page id=”99″]
February 28, 2013 at 10:48 am #41262BarryMemberGlad to hear you all found workarounds: since it sounds like you are all sorted and this has now moved out of the domain of pre-sales questions I will now close this thread.
-
AuthorPosts
- The topic ‘Wootickets: Product Templates and custom ticket numbers’ is closed to new replies.