Skip Navigation

[Resolved] csv

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Waqar 5 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#1339539

i am trying to add judges to my events via csv so it also has the relationships.

hidden link

i have uploaded an example csv file that i have used to upload 600 events , i need to add the judges to the events
i have uploaded , i have also uploaded my judges seperate by csv. both examle files can be found here Download link
hidden link .

i have 2 reltionships for judges

Dog <---> Judges
Event <---> Judges

i want to use the csv for events , the dog<---> judges will be addded manually at a later date.

many thanks , a speedy reply would be wonderful !!
thanks again

#1339597

Hi Martin,

Thank you for contacting us and Minesh has assigned this ticket to me.

I've downloaded the CSV files that you've shared and will be testing them with similar data and post relationships on my test website.

This investigation will take some time but will update you with my findings as soon as this testing completes.

Note: I have the working admin access details for your website from the last ticket, but no changes will be made on it.

regards,
Waqar

#1339613

thankyou waqas both of the example csv work perfect i just cant figure out how to add the judges i need to each event in my main csv thanks again

#1339729

any joy waqas? thanks

#1339883

Hi Martin,

Thank you for waiting.

I've noticed that on your website you're using the "WP All Import" plugin for the import of CSV data, but unfortunately, it doesn't support the import of many-to-many post-relationships, that use the intermediary post type.
( ref: https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/how-to-import-data-from-a-csv-file-using-the-wp-all-import-toolset-types-add-on-plugin/post-relationships/ )

Since the Event <---> Judges and most of the other relationships on your website are indeed many-to-many relationships, with intermediary post type enabled, this import will involve the manual method, that is explained at:
https://toolset.com/documentation/user-guides/importing-content-from-csv-with-post-relationships/
( just as Minesh mentioned earlier ).

The added complexity is that on your website, the events and judges posts have been imported already, which means, that the process should be performed in a way that the duplicate posts are not added.

All this testing and research is going to take more time than I originally anticipated, I'm afraid. My shift for today is almost finished, but I'm sure I'll have some update for you tomorrow, once all these points have been tested.

Thank you for your patience.

regards,
Waqar

#1339889

thank you waqar

#1340723

Hi Martin,

Thank you for waiting.

Based on my tests and research, here are the steps that I'll suggest for the import of Event <---> Judges relationships.

Important note: Please make a complete backup copy of the website, before running this import.

1. Since your website already has the Events and Judges posts, you won't have to import them again. The process to join them in Event <---> Judges relationship, will consist of two pain steps:

a). Importing "Events Judges Intermediary Posts"
b). Importing "Judges" a special custom field value in "Judges" posts, which Toolset will be used later to recognize the relationships.

2. You can download the sample CSV files for this process from this link:
hidden link

To better understand this, let's suppose that we have the following events and judges posts, which need to be connected:

Event 4 <---> Judge D
Event 5 <---> Judge E
Event 6 <---> Judge F
Event 7 <---> Judge G
Event 8 <---> Judge H
Event 9 <---> Judge I

As a result of these required many-to-many relationships, we'll need respective Events Judges Intermediary Posts, which can be set to have the title in this format:

Events Judges: Event Title - Judge Title

i.e.

Events Judges: Event 4 - Judge D
Events Judges: Event 5 - Judge E
Events Judges: Event 6 - Judge F
Events Judges: Event 7 - Judge G
Events Judges: Event 8 - Judge H
Events Judges: Event 9 - Judge I

3. First, we'll need to create a CSV import file, which will add these "Events Judges Intermediary Posts" in the system. Since this post type also has a field "judge panel proper", the values of those custom fields can also be imported during this step.

Please refer to the file "intermediary.csv".
( screenshot: hidden link )

While importing this file through "WP All Import", please make sure to select the correct post type ( Events Judges Intermediary Posts ) and import them as new posts, since they don't already exist. Also map the file columns, so that the first column is used for the post's title and the second one is used for the custom field "wpcf-judge-panel-proper".
( screenshot: hidden link )

4. Once these intermediary posts have been imported, the next step would be to run an import into the child post ( judges ) so that a special custom field value can be added into them.

Please refer to the file "judges.csv".
( screenshot: hidden link )

The objective of this import is to add a custom field value to key "_toolset_associations_event-judge", for judges posts, which need to be linked to the respective event ( and the intermediary post ), in this format:


{!{Title of the event}!} + {!{Title of the intermediary post}!}

While importing this file through "WP All Import", please make sure to select the correct post type ( Judges ) and import to update the existing posts, since they do already exist. Also map the file's columns, so that the first column is used for the post's title and the second one is used for the custom field "_toolset_associations_event-judge".
( screenshot: hidden link )

5. Once, this import has been completed successfully, please go to "WP Admin -> Toolset -> Export / Import -> Associations" and you'll see the available relationships, ready to be imported, by Toolset Types.
( screenshot: hidden link )

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1340833

wow!! thank you waqar thats amazing. can i use the events id rather than title as some event names are duplicated?
im shocked at the lengh you went to for me , thanks again
martin

#1340977

Hi Martin,

You're very welcome and glad my message helped.

The Toolset's bulk association import process only supports title based recognition, so I'm afraid, post IDs can't be used for this.

It would be a good idea to store the post titles of the events with some unique identifiers, in the first place. Depending on how frequently they repeat, you can append the comination of year, month, date or exact date at the end of each event title, to keep them unique.

Examples:

- Event Title (2019)
- Event Title (09-2019)
- Event Title (Sep-2019)
- Event Title (16-09-2019)

...etc

regards,
Waqar