Wootickets: Product Templates and custom ticket numbers

Home Forums Welcome! Pre-Sales Questions Wootickets: Product Templates and custom ticket numbers

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #40906
    Andy Wendt
    Guest

    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

    #40909
    Andy Wendt
    Guest

    For 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?!?

    #41020
    Andy
    Guest

    It really would only have to be a specific start number. We are only going to be ruffling one product at a time.

    #41035
    Barry
    Member

    Hi 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.

    #41254
    commandz
    Participant

    I 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());

    #41256
    commandz
    Participant

    What 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.

    #41257
    commandz
    Participant

    As 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″]

    #41262
    Barry
    Member

    Glad 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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Wootickets: Product Templates and custom ticket numbers’ is closed to new replies.