Skip Navigation

[Resolved] Using WP Import to import Relatioship Custom fields

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/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 3 voices.

Last updated by Luo Yang 1 year, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2596697
DDMS Custom Field 2.png
DDMS Custom Field.png

Hello,

I'm trying to bulk import posts along with their relationships. I have a one to many relationship setup for two post types

Platforms <<>>Tuners

In that relationship, I have a custom field called "Tuning Categories". It's a checkboxes field with multiple selections:

Brakes
Drivetrain
Exterior
Interior
Power
Suspension

I've attached a couple of pictures of the custom fields as they're setup.

I seem to be successful in being able to update a custom post and adding/modifying a relationship to another post. However, it doesn't look like I can easily update the custom field in the relationship.

I was attempting to update using the following tutorial:

https://toolset.com/course-lesson/import-posts-from-csv-with-relationships-using-wp-all-import/

My site currently isn't live, but I can provide you any additional information you may need to help me.

Thanks in advance!

-Chris

#2596975

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Chris

You wrote that this is a one-to-many relationship, but if you have a relationship field "Tuning Categories" then that suggests you actually have a many-to-many relationship.

The steps to follow are somewhat different for one-to-many and many-to-many relationships, and if you are following the directions for one-to-many relationships in that case it may be problematic.

Can you clarify if the relationship is many-to-many, and is so that you are actually following the directions for many-to-many relatiopnships?

#2597053

Apologies, it’s a many to many relationship, and I was following those instructions.

#2597433

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Do you have a staging site where we could examine the setup, and also the CSV files you would use to import the data? (These could be just a sample of the data, for testing.)

Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.

#2597549

Here is the link to my sandbox:

hidden link

I tried a few different ways with 2 different files. One is test import 1 and the other is testimport2. You can download them from the Manage Imports screen:

hidden link

testimport has all of the data. I was trying to import the tuner, and then connect the model with the tuner and edit the custom checkboxes field with the tuning categories (brakes/drivetrain/exterior/interior/power/suspension). This is a per relationship field: in other words, a single tuner can have multiple models, and a single model can have multiple tuners, but each model-tuner connection can have different categories. For instance, Bamford Rose (the sample data) tunes multiple models of Aston Martins, and it provides different types of parts for each of those. When I tried it this way, it would only add keep one connection (the last one in the sheet) and it would not edit the custom field.

I was able to edit testimport1 to follow the instructions for editing relationships (which places multiple columns in place for each relationship connection). However, this does not allow editing of the custom field for each connection. That's what I'm trying to figure out.

let me know if you need more details.

#2597595

Hello,

Please provide your staging website credentials in below private message box, I need to check settings in admin side,

#2598271

Apologies. I shared the wrong link. It should've been a one click login. See if this works. I re-set the sandbox up.

hidden link

#2598323

Thanks for the details, you are using many-to-many relationship(with intermediary post type), the custom checkboxes field is in intermediary post type, but WP all import plugin does not support this feature, see our document:
https://toolset.com/course-lesson/import-posts-from-csv-with-relationships-using-wp-all-import/#steps-to-be-done-3
section "Steps to be done"


Many-to-many relationships that use the intermediary post type are not supported by the WP All Import plugin.

In this case, you can try the WP Ultimate CSV Importer Pro plugin, see our document:
https://toolset.com/course-lesson/how-to-import-posts-from-csv-files-and-maintain-relationships-when-using-the-csv-importer-plugin/#example-4-many-to-many-relatinship-with-the-intermediary-post-type
section "Example 4: Many-to-many relatinship with the intermediary post type"

#2599383

Well, it's not just the intermediary post. I'm actually able to import to some degree, the relationship between the two post types. What I'm not able to do yet is import the custom field from the relationship from the spreadsheet. I also didn't see it mentioned in the document you posted. Are you able to confirm that I can use that plugin to import the custom field from my relationship before I spend another $149 on another plugin?

#2599987

Since I don't have a copy of WP Ultimate CSV Importer Pro plugin in my localhost, so I can not confirm it can import Toolset checkboxes field of intermediary post type, I have checked their document too:
hidden link
Their document also mentioned it supports:
- Toolset intermediary post type
- Toolset custom checkboxes field

So at least, you can import the intermediary post type posts first, then update the custom checkboxes field value of custom checkboxes field.

And you can check it with their support to confirm it too:
hidden link