Attendee list missing results

Home Forums Ticket Products Event Tickets Plus Attendee list missing results

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1320009
    Jason
    Participant

    Can I just confirm that when I ask a yes/no question in the ticket field set that the answer will populate the exported attendee CSV file. I have asked a couple of conditional questions of my parents (with a required field) and have noticed that the results did not make it onto the CSV file? I have since transferred this question to the Woocommerce Custom Fields plugin at the checkout and am thinking of moving it back to the ticket stage but need to know that it will work.

    Thanks

    Jason

    #1320496
    Shelby
    Participant

    Hi Jason,

    I’m happy to help out here! 🙂

    I believe that none of the attendee responses get included on the export at this time. However, I think that you may find this free extension helpful for adding the attendee information to the WooCommerce order and exporting that way?

    Let me know how that works!

    Best,

    Shelby 🙂

    #1320723
    Jason
    Participant

    Hi Shelby.

    But if I’m adding the attendee data to the woocommerce order (via the extension that you mentioned), how does that populate the attendee list in the export? The code that executes the “export” from the button in the backend to a csv file wouldn’t know about the additional fields at the checkout?

    Thank you

    Jason

    #1321504
    Shelby
    Participant

    Hi Jason,

    I thought that you might possibly be able to export the WooCommerce orders instead of the attendee information to get the kind of reporting you need, since our plugin doesn’t provide that functionality.

    If this is not possible, you’ll need to hire a freelancer to help you out with this. 🙂

    Best,

    Shelby 🙂

    #1321928
    Jason
    Participant

    Hi Shelby,

    I’ve been searching though other parts of this forum and came across these two tickets.

    https://theeventscalendar.com/support/forums/topic/woocommerce-address-field-in-csv/

    https://theeventscalendar.com/support/forums/topic/woocommerce-info-in-csv-export/#dl_post-1244383

    The first one looks to be very similar to what I’m trying to achieve and perhaps with a combination of the second one.

    In essence, with the new custom fields that I’ve created at the checkout to capture important data according to the maker of the custom fields plugin the checkout keys (which I’ve added) have the following structure according to Right Press who made the plugin. Their storage structure is as follows

    _wccf_cf_{key} field value in order meta
    _wccf_cf_id_{key} field id in order meta
    _wccf_cf_data_{key} extra data array in order meta
    _wccf_file_{access_key} file data in order meta

    So, I’ve tried amending the functions tribe_export_custom_add_columns and tribe_export_custom_populate_columns
    starting with the first one taken from the above ticket I mentioned

    function tribe_export_custom_add_columns ( $columns ) {
    $columns[‘wc_first_name’] = ‘First Name’;
    $columns[‘wc_last_name’] = ‘Last Name’;
    $columns[‘wc_address’] = ‘Address’;
    return $columns;
    }

    I’ve changed this to some fields that I’ve set up and prefixed them with the keys above

    function tribe_export_custom_add_columns ( $columns ) {
    $columns[‘_wccf_cf_id_emergency_medical’] = ‘Consent Emergency Medical’;
    $columns[‘_wccf_cf_id_consent_marketing’] = ‘Consent Marketing’;
    $columns[‘_wccf_cf_id_any_other_information’] = ‘Any other Information’;
    $columns[‘_wccf_cf_id_relationship_to_child’] = ‘Relationship to Child’;
    $columns[‘_wccf_cf_id_parents_email’] = ‘Parents E-mail’;
    $columns[‘_wccf_cf_id_home_address’] = ‘Home Address’;
    $columns[‘_wccf_cf_id_parents_name’] = ‘Parents Name’;
    return $columns
    }

    So, in essence, I’ve added the ID first.

    then I’ve changed the code from the above ticket:

    function tribe_export_custom_populate_columns ( $value, $item, $column ) {

    $order = new WC_Order( $item[‘order_id’] );

    $firstname = utf8_decode($order->billing_first_name);
    $lastname = utf8_decode($order->billing_last_name);
    $address = utf8_decode($order->billing_address_1) . ‘ / ‘ . $order->billing_postcode . ‘ / ‘ . utf8_decode($order->billing_city);

    if ( isset($order) ) {

    switch ($column) {
    case ‘wc_first_name’:
    $value = $firstname;
    break;
    case ‘wc_last_name’:
    $value = $lastname;
    break;
    case ‘wc_address’:
    $value = $address;
    break;
    }
    } else {
    $value = ‘-‘;
    }
    return $value;
    }

    to my own version but this time trying to get the value from the field using the storage structure I mention above

    function tribe_export_custom_populate_columns ( $value, $item, $column ) {

    $order = new WC_Order( $item[‘order_id’] );

    $emergencymedical = utf8_decode($order->_wccf_cf_emergency_medical);
    $consentmarketing = utf8_decode($order->_wccf_cf_consent_marketing);
    $anyotherinfo = utf8_decode($order->_wccf_cf_any_other_information);
    $relationshiptochild = utf8_decode($order->_wccf_cf_relationship_to_child);
    $parentsemail = utf8_decode($order->_wccf_cf_parents_email);
    $homeaddress = utf8_decode($order->_wccf_cf_home_address);
    $parentsname = utf8_decode($order->_wccf_cf_parents_name);

    if ( isset($order) ) {

    switch ($column) {
    case ’emergency_medical’:
    $value = $emergencymedical;
    break;
    case ‘consent_marketing’:
    $value = $consentmarketing;
    break;
    case ‘any_other_information’:
    $value = $anyotherinfo;
    break;
    case ‘relationship_to_child’:
    $value = $relationshiptochild;
    break;
    case ‘parents_email’:
    $value = $parentsemail;
    break;
    case ‘home_address’:
    $value = $homeaddress;
    break;
    case ‘parents_name’:
    $value = $parents_name;
    break;
    }
    } else {
    $value = ‘-‘;
    }
    return $value;
    }

    And I’ve added these to the functions.php file in my child theme and this does not work. Any ideas?

    If you are unable to help me… Is there anyone that might have seen this before who can?

    Many thanks

    Jason

    #1322458
    Shelby
    Participant

    Hi Jason,

    I’ll be taking a dive into this in the morning. Just didn’t want you to think you were forgotten!

    Best,

    Shelby 🙂

    #1323290
    Shelby
    Participant

    Hi again Jason,

    So I looked into what you were piecing together and consulted with a team mate, and there are several issues with the code that you sent over. Here’s some feedback, but I’d, again, strongly suggest that you hire a freelancer to help piece this together for you, since these forums aren’t for customizations:

    – instead of
    $order->billing_first_name

    you can use
    $order->get_billing_first_name()

    So it could be that the calls to custom fields are also not right.
    We would recommend that you go step by step, trying to export a _not too_ custom field.

    also there are some other inconsistencies in the code:

    `switch ($column) {
    case ’emergency_medical’:
    $value = $emergencymedical;
    break;
    case ‘consent_marketing’: `

    this should be like:

    `switch ($column) {
    case ‘_wccf_cf_id_emergency_medical’:
    $value = $emergencymedical;
    break;
    case ‘_wccf_cf_id_consent_marketing’: `

     

    And just to reiterate, this feedback is as far as we can take you here. If you need more help, please hire a freelancer.

    Thanks for understanding!

    Shelby

    #1333519
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Attendee list missing results’ is closed to new replies.