Tickets SKUs no longer auto generating in Event Tickets / Plus

Home Forums Ticket Products Community Tickets Tickets SKUs no longer auto generating in Event Tickets / Plus

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1066694
    Ameet
    Participant

    Previously when it was just WooTickets and Community Tickets, the SKU were deemed unnecessary for the Organizer to fill out when creating a Ticket for woocommerce. I worked with a couple folks there to help come up with an auto generated SKU system based on the Event Id, Organizer ID and name of the ticket which would then help in Paypal reporting for when Split tickets were not being used.

    The format was:
    EventID-OrganizerID-Name+of+the+Ticket
    eg.
    115756-776-advance-ticket

    This helped out immensely in the reporting when businesses like ours would accept all payment, and then pay out organizers after an event was held successfully. It enables one to group by event id or organizer id, else all tickets in paypal end up looking like General Admission, making it very confusing for reporting in Woocommerce as well as Paypal.

    After updating to Event Tickets & Event Tickets Plus, I realized that the SKUs were no longer being auto generated and left blank.

    Was this intentional, or something that didn’t make the jump to the Event Tickets side? I need to get that functionality back and would sincerely appreciate some direction on how and where to tweak to get those SKUs back in place.

    Thx

    • This topic was modified 10 years, 2 months ago by Ameet.
    • This topic was modified 10 years, 2 months ago by Cliff.
    #1067334
    Cliff
    Member

    Hi Ameet. Thanks for your question.

    What code were you using for The Event Calendar v3 + WooTickets that is now not working with The Events Calendar v4 + Event Tickets Plus?

    Starting with that, I may be able to assist you toward your desired customization.

    #1067346
    Ameet
    Participant

    This reply is private.

    #1067434
    Cliff
    Member

    Got ya. Sorry, I thought we were talking about Event Tickets Plus. I now know we’re talking about Community Tickets (which requires Event Tickets Plus).

    Event Tickets Plus definitely has a SKU field when entering new tickets via wp-admin (although not auto-generated).

    I checked v3.12.x and v4.x and the Community Events front-end form doesn’t have a SKU field:

    [caption id="attachment_1067432" align="aligncenter" width="665"]Community Events front-end form on Twenty Fifteen theme Community Events front-end form on Twenty Fifteen theme[/caption]

    Please correct me if I’m wrong: You want an auto-generated SKU assigned when a Community Events front-end form submission has tickets, and the SKU is only visible to site admins (not the front-end Community Events event edit form) — it was there in v3.12.x and you want it back in for v4.x?

    (I hope I got all that right for you! 🙂

     

    #1067441
    Cliff
    Member

    I tested and <span class=”s1″>CE Tickets did lose that functionality from 3.12.1 to 4.0.2 so I’ll file a bug report to get it back in.</span>

    I’ll ping Mr. Z for you about it too.

    Thanks! (please let me know if I got everything correct for you)

    #1067836
    Ameet
    Participant

    “You want an auto-generated SKU assigned when a Community Events front-end form submission has tickets, and the SKU is only visible to site admins (not the front-end Community Events event edit form) — it was there in v3.12.x and you want it back in for v4.x?”

    This is correct. It used to be there and Mr. Z knows what is up so I appreciate it. We literally have ticket being created everyday and they are being bought and our reporting is getting jacked minus those automated SKU. Would you happen to have a temp fix for this as I know the bug may not be fixed and released for a bit?

    #1069943
    Ameet
    Participant

    I added a little hack while I wait for the actual update and fix. If anyone needs it, this works:

    Added to:
    event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php
    In the save_ticket function, I added this at line 450.

    
    //Automatically generate sku:  EVENTID-ORGANIZERID-NAME+OF+THE+TICKET
    $ticket_woo_sku  = $event_id . "-" . get_current_user_id() . "-" . sanitize_title( $ticket->name );
    update_post_meta( $ticket->ID, '_sku', $ticket_woo_sku );
    

    Not the prettiest, but tested and working for me in the interim.

    #1069975
    Cliff
    Member

    Sorry for the delayed reply here. Thanks for sharing your code. However, it looks like you’re editing Event Tickets Plus. I think the best route would be a modification via Community Tickets so as to not affect other usage of Event Tickets Plus (probably doesn’t worry you for your own setup but FYI if others come across this thread).

    I dug into the code for Community Tickets 3.12.1 vs 4.0.2 and saw the src/Tribe/Main.php file in both has function ajax_handler_ticket_save(), which contain $form_data['ticket_woo_sku'] = "{$post->ID}-{$post->post_author}-" . sanitize_title( $form_data['ticket_name'] );

    That looks like what you’re wanting, but I couldn’t get any more helpful information than that for you.

    I’ll update our bug tracker for now.

    Thanks again.

    #1070390
    Ameet
    Participant

    Yes that is where i found it as well, but even in 3.12 i couldn’t see how the actions were getting called.

    
    // compatibility with Event Tickets Plus
    add_action( 'wp_ajax_tribe-ticket-add-Tribe__Tickets__Woo__Main', array( $this, 'ajax_handler_ticket_save' ), 9 );
    add_action( 'wp_ajax_tribe-ticket-edit-Tribe__Tickets__Woo__Main', array( $this, 'ajax_handler_ticket_save' ), 9 );
    

    I search for the where that was getting called and could get into it. That is where i pulled the code and just inserted it for my purposes.

    Again, i’d rather you guys implement it properly and hope you can say it will be in the next update.
    thx

    • This reply was modified 10 years, 2 months ago by Ameet.
    #1071046
    Cliff
    Member

    I can’t guarantee when, but I’ve definitely logged the bug and pinged Z-man. Thanks!

    #1082014
    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.

    #1088710
    Leah
    Member

    Hello,

    Thank you for reporting this issue. We weren’t able to get a fix for it into our upcoming release (4.1). However, please know that the problem is still on our radar and is ticketed within our system to be addressed in a future maintenance release. We’ll do our best to keep you posted when we are able to get a solution in place. Thank you for your patience while we improve and expand our plugins.

    Best,
    Leah

    #1136792
    Geoff
    Member

    Hey Ameet, hope you’re doing well!

    We wanted to follow-up to let you know that we were able to patch this up in Community Tickets 4.2.2, which is now available to download and install if you haven’t done so already.

    Please do be sure to check out our release notes for a full overview of what’s new in the release and feel free to let us know if you run into this or any other issues after the update.

    Thanks so much for your patience while we worked on this!

    Cheers,
    Geoff

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Tickets SKUs no longer auto generating in Event Tickets / Plus’ is closed to new replies.