Easy CSV Importer 6.0.3   

Mar 26th, 2011 // In: Easy CSV Importer // By: Comments 3

I’ve just uploaded the latest BETA version. There are few changes since 6.0.2 and that version seems very stable. The big change in 6.0.3 is the completion of a new feature. I’ve added Post to Data Syncronization, the ability to edit your posts made using Easy CSV Importer and apply your manual changes to the project database table.

How Post to Data Sync Works

When you click the Update button on the Edit Post page. The plugin will use a filter in the hooks.php file which calls a function named eci_editpostsync, also in the hooks.php file. That function first checks to see if the user has activated this feature on the Settings page, that is a global switch setting. It checks if the post being saved belongs to an Easy CSV Importer project, it does that by checking some default custom fields. Once ECI establishes that your post was created by the plugin, it then gets that posts project data. It checks if the user has activated the Post to Data Sync feature within the project. This can be done within the Update panels on the Project Configuration page.

Now, once it establishes that it is an ECI post, the user wants Post to Data Sync and has just edited a page. It then compares all of the posts custom fields against the projects csv file titles. Where an exact match is found, that custom fields key/column title and the custom fields new value edited by the user. Is added to an Update query.

Post Main Content – That explains custom fields but we still have the main content. The main content is currently put into a default column, there is no current way to select the project table column that you want the content to be updated to. This is a change that will be added as soon as someone feeds back to me on their experiance with the feature. When I provide users with the ability to select their content column, they will be able to maintain even html content. This allows us to use that content elsewhere, maybe export it for other users etc.

Updating Custom Fields Does Not Sync

Currently the only way to trigger the sync action is by using the main Edit Post page Update button. This processes the entire post but I’ve already considered that users may want to edit a single custom field. You can update custom fields by clicking on their own update button. If there is a hook to do this, I can have the new value updated to the database. Until then, you must use the main Edit Post page Button to make Post to Data Sync work.

Other Changes

  • Post to data sync global setting added, acts as a main switch
  • Post to data sync project configuration option added to Updating panels
  • The log will not be activated on installation anymore
  • Can undo changed to cannot undo in eci_deleteproject
  • Removed some inhert lines from eci_printcsv
  • The menus on the Update Settings panel now show as No (off) by default instead of Yes (on)
  • Saving update settings now applys correct setting to auto file processing,does not state that it is activated when not
  • When saving update settings, only the features you active are confirmed in messages now
  • Plugin version is saved on installation in its own option table record update_option( ‘eci_installversion’,$ecicurrentversion )
  • Post to data sync, content column updated, requires either a fresh installation on version 6.0.3 or user selects their own column

Tags: - -

3 Responses so far.

  1. nuno says:

    Hi Ryan,
    I’m testing this functionality in version 6.1.7
    It doesn’t work.
    After a lot of attempts I figured out that the $finalquery in eci_i_hooks.php
    is created without the commas, like this:
    UPDATE wp_porto SET CdPostal = 4400-628IdEscola = 14Localidade = Vila Nova de GaiaZona = Coimbra WHERE eciid = 14

  2. Ryan Bayne says:

    Thanks I will look into it. We’re on 6.2.1 so it may be fixed already but I’ll double check. I will email the latest beta to you.

  3. Ryan Bayne says:

    Yes your right this needed fixing. That tells you how many people use this feature, not a lot.

Leave a Reply

You must be logged in to post a comment.