• Resolved lethargio

    (@lethargio)


    How difficult would it be to modify the plugin to skip empty cells on import? I’m currently using the plugin to update user meta a couple times a month but would rather retain old data for a user if there is no new data to import for a particular cell.

    I don’t have much experience with fgetcsv but might be able to bang my way through this with a little nudge in the right direction.

    Thanks!

    https://www.ads-software.com/plugins/import-users-from-csv-with-meta/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Javier Carazo

    (@carazo)

    lethargio,

    I don’t understand you very well.

    Now: if cell is empty, we don’t update it.

    What do you want? If cell is empty you want to empty the data?

    Thread Starter lethargio

    (@lethargio)

    Sorry I was not clear.

    Let’s say I have a user with a meta key ‘user_school’ and meta value ‘Jefferson’ already present in the database: If I import that user again but the user cell under ‘user_school’ has no value, what happens is the the existing meta value of ‘Jefferson’ gets replaced with an empty value from the empty cell in the csv.

    What I would like to happen is for the import to skip over the empty cell for that user in ‘user_school’ instead of replacing it with the empty value. So after re-importing the user, the ‘user_school’ value will still be ‘Jefferson’.

    If I understand you correctly, the plugin is not supposed to import the empty ‘user_school’ value but instead use existing value of ‘Jefferson’. If this is the case, maybe there is something wrong with my csv format.

    Plugin Author Javier Carazo

    (@carazo)

    Yes, I understand, now all data is updated, even the cell is empty.

    We should have a checkbox to choose:

    • If cell is empty delete post meta
    • If cell is empty do not update the previous value

    Is this correct?

    Thread Starter lethargio

    (@lethargio)

    Yes. That’s exactly what I’m looking for.

    Plugin Author Javier Carazo

    (@carazo)

    Ok, we can do it but we would need you support this new functionality.

    Half an hour of work it would cost 20€ and the improvement would make it free later (here in the repository).

    Tell me.

    Thread Starter lethargio

    (@lethargio)

    Sounds good. I’ll send an email to your contacto@ address from your website for payment arrangements.

    Plugin Author Javier Carazo

    (@carazo)

    Perfect, you can write directly to carazo AT codection DOT com if you prefer.

    Plugin Author Javier Carazo

    (@carazo)

    As the new functionality is made, I am going to close this thread.

    Thank you very much for all!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Skip Empty Cells’ is closed to new replies.