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 TicketTagged: csv fields, csv uploads
-
AuthorPosts
-
September 2, 2014 at 6:26 pm #14068
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,SatOpen 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
September 3, 2014 at 10:23 am #14122I 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.
September 3, 2014 at 11:03 am #14131Thanks. 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 settingsCheers
September 3, 2014 at 3:58 pm #14177Hi,
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
September 4, 2014 at 7:04 pm #14316wondering 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 imagesIf 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
September 4, 2014 at 7:24 pm #14321Hi,
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
September 4, 2014 at 7:30 pm #14322He-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
September 4, 2014 at 7:54 pm #14324Stiofan will let you know asap,
ThxSeptember 4, 2014 at 8:08 pm #14327Thanks.
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_fieldcheers
September 5, 2014 at 3:24 pm #14402Without geodir…
Thx
September 5, 2014 at 4:53 pm #14429Hello Brian, the values in the multi-select field (in the database) are stored and divided by comma(s). See attachment
September 5, 2014 at 6:06 pm #14455Thanks guys.
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
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket