CSV Upload – empty fields, multi-select data

This topic contains 11 replies, has 4 voices, and was last updated by  identity 10 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #14068

    identity
    Lifetime Member
    Post count: 445

    Couple questions on the CSV upload.

    1) If non-mandatory fields are empty, do they need to be included in the CSV and left blank, or do only fields with values need to be included?

    2) If you have the unique listing ID (whatever that field might be called) can you do a partial upload, only overwriting the fields that are included in the CSV?

    3) For a multi-select field, do you need to account for all options…
    example:
    Multi-select for: Days Open
    Field Options: Sun,Mon,Tue,Wed,Thu,Fri,Sat

    Open days = Monday, Wednesday, Friday, Saturday

    CSV would be: Mon,Wed,Fri,Sat OR ,Mon,,Wed,,Fri,Sat

    3b) and if the first is an option, do they need to be in order or would this be ok: Fri,Sat,Mon,Wed?

    cheers

    #14122

    Guust
    Moderator
    Post count: 29970

    I guess you are talking about using the CSV upload at GD > general > CSV and not in phpMyAdmin for example.

    1. I think you need the standard sample file as provided, and just leave the non-mandatory fields blank.

    2. I doubt it, but maybe Stiofan knows. There is no post_id in the sample CSV.

    3. I don’t think you can upload any other fields than the ones provided in the sample CSV.

    #14131

    identity
    Lifetime Member
    Post count: 445

    @guust,

    Thanks. It would be great to get a confirmation from Stiofan if we can. Actually looks like I’ll be uploading a little over 7,000 records, many of which include 2-3 additional fields.

    You mentioned phpMyAdmin….not that I have any idea how to go about it, but I’ll figure it out if need be…

    I wasn’t sure what all could be uploaded/created and/or modified via phpMyAdmin/SQL bulk upload since I’m not sure what the inter-relations may be…if I upload new listings into a detail table, is that standalone or does the system need/expect additional data that might be in some other table.

    Specifically I think I’d be most interested in:
    1 – uploading/modifying listings
    2 – uploading/modifying pricing packages
    3 – uploading/modifying CPT custom fields and settings

    Cheers

    #14177

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    CSV upload can’t be used to edit listing. Just to enter them in the DB.

    For question 3) For a multi-select field, do you need to account for all options…

    Yes you can add any custom fields, but I have to ask how the multiselect is handled in the DB to give you the right format.

    Thx

    #14316

    identity
    Lifetime Member
    Post count: 445

    @paolo,

    wondering if you have follow up info on the multiselect?

    Also, a couple other questions…

    – do custom fields need to be in any particular order? Also assuming they are added in the CSV to the right of the regular GD columns?

    – Since the CSV can only be used to add listings, is there anyway to handle bulk image upload after listings have been entered? Is it possible to do this via phpMyAdmin? I don’t have images yet or in some cases, have them but they aren’t ready, so I don’t know what they would be named, but wondering if it would be possible to:
    a) dump the listings via SQL
    b) “connect” which websites I have images for
    c) name all images accordingly and mass upload them via the WP Media Upload
    d) SQL update the tables with the URL to the respective images

    If you followed all of that, would that be doable or should I hold off on those that I think I’ll have images for and upload once the images are ready?

    cheers

    #14321

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    custom field can be in any order.

    It is doable, but it would be highly complicated. Do you know how to write the right SQL syntax to do all that? I’m not 100% sure I do…

    Would be wiser to wait until you have all your images.

    Thx

    #14322

    identity
    Lifetime Member
    Post count: 445

    He-he, haven’t the faintest idea! But if it wasn’t too complicated, thought I might be able to figure it out.

    Sounds like I’ll set aside those that I think I’ll have images for and load them when the images are ready.

    Any answer on whether multi-select uploads need to account for empty fields?

    cheers

    #14324

    Paolo
    Site Admin
    Post count: 31211

    Stiofan will let you know asap,
    Thx

    #14327

    identity
    Lifetime Member
    Post count: 445

    Thanks.

    And just remembered one more…for the custom fields, do you use the HTML field name as is, or append geodir_ to it.

    example:

    HTML field name: sample_field

    In the CSV, would that be:

    a) sample_field
    b) geodir_sample_field

    cheers

    #14402

    Paolo
    Site Admin
    Post count: 31211

    Without geodir…

    Thx

    #14429

    Simone
    Expired Member
    Post count: 3515

    Hello Brian, the values in the multi-select field (in the database) are stored and divided by comma(s). See attachment

    #14455

    identity
    Lifetime Member
    Post count: 445

    Thanks guys.

    @paolo,

    FYI….not sure if it’s an issue, but I was working on this last night and tried uploading with “geodir_custom_field” and it seems to work. Don’t know if that means that it is needed, it takes it with or without, or I may have messed things up….but the data is showing up and the fields show up in the DB.

    One little issue I did run into when I accidentally mis-wrote the category name was that it uploaded the data, but places it within “no category” and it breaks the mapping (marker_json field is null, even though the lat/long coordinates uploaded within their fields).

    It would be more helpful if it didn’t accept these entries so that the issue could be corrected outside the system instead of hunting and correcting them later.

    cheers

Viewing 12 posts - 1 through 12 (of 12 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount