Import format for clonable field

Support MB Group Import format for clonable fieldResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #24698
    David KraljicDavid Kraljic
    Participant

    Hello,
    We have a custom post type called Disease with a custom field called "Symptom". There will be many symptoms for each Disease. All of this seems to be working fine. Now we need to figure out how to import the data. Importing diseases through WP All Import via csv is easy. But how to import the Symptoms? What format in the csv file should the symptoms be?

    1. All symptoms in one cell? Separated somehow like sysmptom1;symptoms2;symptom3
    2. Many columns, one per symptom?
    #24712
    Long NguyenLong Nguyen
    Moderator

    Hi,

    If you’re going to import/export simple fields (like text, select, radio, checkbox, etc.), then you can use these plugins to do the job:

    https://wordpress.org/plugins/wp-ultimate-csv-importer/
    https://wordpress.org/plugins/wp-ultimate-exporter/

    For complex fields, we need to code for the integration. We’re still working on it.

    Refer
    https://support.metabox.io/topic/import-images-into-custom-table/
    https://support.metabox.io/topic/select-advanced-for-woo-products/

    #24736
    David KraljicDavid Kraljic
    Participant

    Hi Thanks for your response and for the links. Yes, we are already using wp all import so we are aware of how to import data. The question was specifically about claneable fields. What is the format? How are values separated? Can they be imported in one cell with seperators like commas? Or do they need their own file?

    #24737
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I think the format like the serialized string in the database, for example
    a:2:{i:0;s:5:"text3";i:1;s:5:"text4";}

    You can try to use the plugin WP All Export to export the data with custom fields then re-import it.

    #24745
    David KraljicDavid Kraljic
    Participant

    Ok thanks I'll try the export

    #44171
    DannyDanny
    Participant

    It's been 2 years..

    I hope this helps someone with a similar use case to mine - using cloneable fields with text fields.

    I've created a CPT with a cloneable text field to add phone numbers. And settled on using WP All Import Pro to import my CSV, instead of WP Ultimate CSV Importer (will explain why after this).

    I found a snippet in WPAI's documentation to "Convert Comma-separated List into Serialized Array" (https://www.wpallimport.com/documentation/code-snippets/#comma-separated-data-to-serialized-array) and this code works too by replcing the comma with a pipe character.

    So in my CSV with the column with multiple phone numbers, I separated each of it with a pipe character.

    In WPAI, imported the CSV, configured my Custom Field, followed the snippet, replaced the comma with pipe character in the Function Editor, ran the import and lo-behold it worked!

    Now, why didn't I use the other importing plugin?

    • Sorely lacking in documentation
    • Could not figure out how to map my taxonomies with sub-categories from documentation
    • Could not figure out how to write the needed Header Manipulation from documentation

    In conclusion, due to the lack of documentation, I just couldn't use that plugin.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.