X
27271

Ticket #27271 Public [Closed]

ICS Import Addon - Import Categories to each event

  • Hi,

    i purchased the eventon plugin and the ics importer addon. In the ics file i want to import exists the field “category” for each event.

    I followed your instructions on
    http://www.myeventon.com/documentation/add-support-additional-ics-fields/
    to check the “category” key in the $ics_data array and to check and/or create the wp term (aka. eventon “Event Type” and”Event Type 2″) object for each category name. This works fine. But how can i assign the imported events with the corresponding “Event Type”? I need a hook after the event was stored and therefore has an ID and i need the ics data to this event. Or is it possible to store the “Event Type” IDs temporarily in the event object?

    Is there a way to add the “Event Type” to an event when importing with the ics importer addon?

    Thanks for your replay!
    Greetings. Chris

     

    BY: dailyseven - Feb 8,2017 AT 6:57AM - 3 years ago
    • By: dailyseven Feb 8,2017 AT 4:56PM - Posted 3 years ago - #27315

      Here is an example

      BEGIN:VEVENT
      CATEGORIES:Feiertag
      DTSTART;VALUE=DATE:20110112
      DTEND;VALUE=DATE:20110116
      DTSTAMP:20110121T195741Z
      UID:1koigufm110c5hnqd4@google.com
      CREATED:20110119T142901Z
      DESCRIPTION:Project xyz Review Meeting Minutesn
      Agendan1. Review of project version 1.0 requirements.n2.
      Definition
      of project processes.n3. Review of project schedule.n
      Participants: John Smith, Jane Doe, Jim Dandyn-It was
      decided that the requirements need to be signed off by
      product marketing.n-Project processes were accepted.n
      -Project schedule needs to account for scheduled holidays
      and employee vacation time. Check with HR for specific
      dates.n-New schedule will be distributed by Friday.n-
      Next weeks meeting is cancelled. No meeting until 3/23.
      LAST-MODIFIED:20110119T152216Z
      LOCATION:
      SEQUENCE:2
      STATUS:CONFIRMED
      SUMMARY:test 11
      TRANSP:TRANSPARENT
      END:VEVENT

      I added a filter for “evoics_additional_data_validation” and successfully managed to add the event type found in the “CATEGORIES” value with

      $result = wp_insert_term(
      $category,
      ‘event_type’,
      array(
      ‘slug’ => sanitize_title($category)
      )
      );

      Now i have an “Event Type” with the name “Feiertag” in this example

      But how can i assign the new term/category to the event object?

    • By: dailyseven Feb 10,2017 AT 6:12AM - Posted 3 years ago - #27499

      Is there a chance to get support for my ticket?

    • By: Ashish Rai Feb 12,2017 AT 8:19AM - Posted 3 years ago - #27678

      Thank you for your messages, I am going to assign this ticket to Ashan and he will be able to take it from here and find you a solution. Please allow some time for him to get back to you, we greatly appreciate your patience and thank you for being a eventon customer!

    • By: Ashan Perera Feb 14,2017 AT 9:55AM - Posted 3 years ago - #27948

      You know the documentation was lacking on saving part i have updated the doc http://www.myeventon.com/documentation/add-support-additional-ics-fields/ please take a look there are pluggable hook already in place for saving the field values that you can use to run your insert_term() and in the doc step 3 show where it pass the created event id as $post_id

      Cheers Mate!

    • By: dailyseven Feb 20,2017 AT 4:11PM - Posted 3 years ago - #28748

      Hi,

      thanks for the update of the documentation page. It helped a lot.

      Now i use the action “evoics_save_event_custom_data” with
      add_action(‘evoics_save_event_custom_data’, ‘evoics_save_inloop’,10,3);

      Inside the function i save the categories from the ics to the post with
      wp_set_object_terms( $post_id, $category_name, ‘event_type’);
      or
      wp_set_object_terms( $post_id, $category_name, ‘event_type_2’);

      Greetings. Chris

    • By: Ashan Perera Feb 21,2017 AT 9:54AM - Posted 3 years ago - #28792

      ok great. if you have any further questions or concerns please create a new ticket.

You must login to reply to this ticket

HelpDesk

Welcome to EventON helpdesk.

EventON is the #1 Best selling event calendar plugin for WordPress websites in envato marketplace.

Checkout EventON