Importing Tickets – What is the custom field?

Home Forums Ticket Products Event Tickets Plus Importing Tickets – What is the custom field?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1107435
    Craig
    Participant

    As has been stated elsewhere, it’s not currently possible to import tickets. I’m trying to do so through a WooCommerce product import CSV.

    Using this post – https://theeventscalendar.com/support/forums/topic/importing-tickets-options/ – I’ve been able to set up a Custom Field that accepts _tribe_wooticket_for_event. I can then associate the product with the correct event in my CSV file, and voila, I have a ticket for all of the 400 events I’m importing.

    The problem is coming when I try to import _tribe_tickets_meta from the Event Tickets Plus plugin. This is a big array that gets serialized in the DB.

    In order to get that to import, I would first have to deserialize the array and fit it into a single cell (I think). I’m having a terrible time figuring out how I’d do that.

    Here is the serialized cell:

    a:2:{i:0;a:5:{s:4:”type”;s:4:”text”;s:8:”required”;s:2:”on”;s:5:”label”;s:44:”Please tell us what sewing machine you have.”;s:4:”slug”;s:43:”please-tell-us-what-sewing-machine-you-have”;s:5:”extra”;a:0:{}}i:1;a:5:{s:4:”type”;s:4:”text”;s:8:”required”;s:2:”on”;s:5:”label”;s:12:”Phone Number”;s:4:”slug”;s:12:”phone-number”;s:5:”extra”;a:0:{}}}

    It seems that instead of deserializing the above, I could just give it JSON key->value pairs that it would serialize the right way. Any suggestions on how I’d go about this?

    Once this is answered, there may be a good way to import tickets en masse, which I’m sure would be helpful to a lot of us.

    Thanks!

    #1107646
    Brian
    Keymaster

    Hi,

    Thanks for using our plugins. I can try help out here, but limited in support anything that is not a current feature of the plugins.

    You are correct you have to pull in the Event ID into this meta field: _tribe_wooticket_for_event

    As for the meta I do not have any good information on how to do it.

    You could try to mimic how we save it. You can find that method called save_meta on line 255 of this file:

    event-tickets-plus/src/Tribe/Meta.php

    I can try to help out some more, by answering a specific question, but not able to provide much more on this.

    Thanks

    #1107903
    Craig
    Participant

    Thanks for your reply, Brian.

    Maybe tell me this to get started…What could I var_dump from the single-event.php file in order to see the values from the _tribe_tickets_meta? I’ve tried everything I could think of, but I’m getting ‘null’ every time.

    Thanks,
    Craig

    #1107995
    Brian
    Keymaster

    Hi,

    You might have to pass the ticket product id to get this meta: _tribe_tickets_meta

    If you use the event id it would return null I think.

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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Importing Tickets – What is the custom field?’ is closed to new replies.