WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Bulk CSV Import (Mass Upload)

[Resolved] Bulk CSV Import (Mass Upload)

  • After looking around and not being able to find a Bulk CSV Importer for the wonderful Events Manager wordpress plugin, I commissioned a coder to develop a Bulk CSV Import add-on that does not modify any core code files (so you can update wordpress and plugins freely). It is a very simple integration and clean and I tested it on my own site many times. The plugin saved me HOURS of manual entry time and cost when having to add hundreds of events to my site.

    Just trying to recoup my costs so grab it if it is what you are looking for.

    http://csvbulkimport.wordpress.com/

    http://wordpress.org/extend/plugins/events-manager/

Viewing 15 replies - 1 through 15 (of 42 total)
  • angelo_nwl

    @angelo_nwl

    NetWebLogic Support

    thanks for sharing.

    Hi, the page doesnt exist or no link can be found for this? I have waited with baited breath for an importer – so much so I actually moved from events manager to tablepress just so I could import items in bulk. This would be a great addition (again)

    Plugin Author Marcus

    @netweblogic

    shame that went down, but there’s two others for anyone interested:

    https://github.com/soixantecircuits/wp-events-manager-importer
    http://em.cm/importer-exporter

    Can you attach some example of CSV file?

    Thx, BR

    Plugin Author Marcus

    @netweblogic

    I haven’t had time to test these so i have no samples to share

    for http://em.cm/importer-exporter

    an example csv is here
    http://pastebin.com/TaEB9GBQ
    note that the column locations are not important (I think) as the importer converts the data to a named array; it is the name of the column headings (the first row) that are crucial and must match that as defined in the class.EM_ImpExpImport.php file.

    there is a small fix to the file
    /wp-content/plugins/events-manager-import-export-0.0.3-alpha/class.EM_ImpExpImport.php in order that it will read your event start/end date+time. Line 480 onwards – see commented out sections in the below code- previously it was hardcoded to start each event at midnight.

    http://pastebin.com/SCd33zCT

    Note also that the end three columns are custom event attributes defined within our Events Manager instance, and the headers should match EXACTLY the event attributes you define in E.M.

    Note also that you can define multiple categories for a single event by enclosing them in double quotes, comma separated within the quotes. Excel’s .CSV MSDOS format copes with this well, despite my initial reservations that the additional comma inside the quotes would break the import; it did not.

    Note also that I have pre-defined the location within Events Manager, then instead of risking having the importer create extra location entries via geocoding, I simply give it the exact name of a pre-existing location and the import routine matches this for you.
    i.e. I have not tested uploading an event at an unknown location

    this worked for me: I am a php and Events Manager novice. be warned.

    (thankyou to Marcus and the author of the importer (WebAware.com.au) for your wonderful software)

    Plugin Author Marcus

    @netweblogic

    @steve098 thank you for sharing your findings. i will likely point people here now so they see all the options 🙂

    I’m giving it a try:

    I’ve replaced the php code and setup a .csv file with columns to match steve098.

    When I import an event with dtstart of 07/31/2013 11:00:00 and dtendof 07/31/2013 11:45:00. The actual date that is shows on the event itself is 07/07/2015 11:00:00 and 07/07/2015 11:45:00.

    I’ve created the csv file in Excel and tried messing with formatting the cell as text and date.

    can you post the first two lines of your csv to pastebin so we can have a look at your header and a sample post?
    (please open your csv in Notepad or similar, not Excel)

    my suspicions lie with the date format being spewed out from Excel.
    I have this set to a custom number format in Excel

    dd/mm/yyyy hh:mm:ss

    My limited PHP knowledge tells me that the import is looking for a dtstart/dtend in the format d/m/Y H:i:s (lines 483 and 489 of Class.EM_ImpExpImport.php) see php date formats
    yours is perhaps producing a csv with m/d/Y?

    The dtstart and dtend are indeed in m/d/Y in your csv. You could try either switching the importer code over to m/d/Y or just adjusting your csv to match d/m/Y

    your csv is tab delimited. (csv stands for Comma Separated Values!)my interpretation of the importer code is that it should be able to handle tab delimiters (the csv import library dynamically detects the delimiter), but is not a scenario I have tested. Play it safe and stick with commas? If you have commas in your event, this appears to be ok, so long as the field is surrounded by double quotes (as per the ‘categories’ field in my example CSV

    You mention you are producing your CSV from Excel, and this is probably the cause of your headaches:
    try my suggestions above, which are
    1) format the dtstart and dtend cells in Excel to be custom number format dd/mm/yyyy hh:mm:ss
    1) export from excel in .csv (MS-DOS) format

    make sure to examine your output csv file in Notepad or other text editor to check for proper formatting.

    I do appreciate the work of Steve as well as Marcus for pointing us to the importer. It does work well, except that I can’t get the dates to work myself. If I put in the fix that Steve suggested, I get a class error and that is throwing me off. I get the code that he put in and it appears correct, but doesn’t work for me for some reason.

    I did output my file to Textwrangler on my Mac to verify and it is formatted properly,
    ,07/08/2013 16:00:00,07/08/2013 18:00:00,
    That is the dtstart and dtend portion of my file in the line above. Here is the error I get, which I’m not sure as to why:

    >> Error
    Call to undefined function date_create_from_format() in /home4/jhetrick/public_html/demo-mm/wp-content/plugins/events-manager-import-export-0.0.3-alpha/class.EM_ImpExpImport.php on line 483
    << End of error

    Seems to be a php error code and I’m not that good with this stuff. Maybe with an hour or so on Google I can figure it out, but I’m running fully updated WP. I can check my host for PHP and MySql versions.

    Any thoughts?

    99% sure it’s your PHP version on your host. One of the date functions called in create_from_format requires 5.3 minimum I think. I forget the exact version requirements and functions.
    what’s your PHP version?

    I do appreciate the work of Steve as well as Marcus for pointing us to the importer. It does work well, except that I can’t get the dates to work myself. If I put in the fix that Steve suggested, I get a class error and that is throwing me off. I get the code that he put in and it appears correct, but doesn’t work for me for some reason.

    I did output my file to Textwrangler on my Mac to verify and it is formatted properly,
    ,07/08/2013 16:00:00,07/08/2013 18:00:00,
    That is the dtstart and dtend portion of my file in the line above. Here is the error I get, which I’m not sure as to why:

    >> Error
    Call to undefined function date_create_from_format() in /home4/jhetrick/public_html/demo-mm/wp-content/plugins/events-manager-import-export-0.0.3-alpha/class.EM_ImpExpImport.php on line 483
    << End of error

    Seems to be a php error code and I’m not that good with this stuff. Maybe with an hour or so on Google I can figure it out, but I’m running fully updated WP. I can check my host for PHP and MySql versions.

    Any thoughts?

    Sorry, about the double post! My mistake. I will look that up now.

Viewing 15 replies - 1 through 15 (of 42 total)
  • The topic ‘[Resolved] Bulk CSV Import (Mass Upload)’ is closed to new replies.