Woocommerce CSV importer
[resolved] [Plugin: Woocommerce CSV Import] Import directory creation (10 posts)

  1. nyenius
    Posted 3 years ago #

    Hi, very helpful plugin here. :)

    But it doesn't work when first I install it. It says it can't find the import directory. Error on : woocommerce-csvimport-functions.php line 7.

    When I look down to the code, I can't understand why it won't create directory '/csvimport/kqJpL09Wt2'. So I try to add one step to create the '/csvimport/' dir first.

    function wppcsv_handle_csv_import_random () {
    	//try {
    	//create temp directory
    	$upload_dir = wp_upload_dir();
    	$dir = $upload_dir['basedir'] .'/csvimport/' . woocsv_random_string() . '/';
            mkdir($upload_dir['basedir'] .'/csvimport/'); // <<-- I added this line. 
    	//handle upload

    And then it works like a charm! Thanks for writing this up :)

    And after first-time run, I commented the additional code.

    ***PS: I haven't try manually creating the directory through ftp or cpanel though.


  2. holyholy
    Posted 3 years ago #

    hey nyenius I was wondering if you would be able to fix this plugin to import featured images for product through the CSV like from this post here


  3. allaerd
    Plugin Author

    Posted 3 years ago #

    In the installation guide there is a mention that you create the directory by hand. But i like the idea that i create the directory for you. I will make an extra option in the settings part to check and create the directory

  4. allaerd
    Plugin Author

    Posted 3 years ago #

    You now CAN import images and set them as featured image. Here is how:

    Make sure youre picture name is the the same as the SKU. And make sure you have the picture name in the csv and in the same directory as the csv.

    If you need help please let me know!

  5. allaerd
    Plugin Author

    Posted 3 years ago #

    In the settings sections a button will apear if you have not created the directory manual.

    check out version 0.2

  6. nyenius
    Posted 3 years ago #

    wow, nice update about the featured image.

    One I still don't understand is, I don't use /fixed/ directory, so the plugin will make a 'temporary' directory right? How to use the fixed directory? Should I just create a dir called 'fixed' in the 'csvimport'?

    **ps: about the image thing, I think you should open a new thread, so everyone aware of it. :)

  7. allaerd
    Plugin Author

    Posted 3 years ago #

    The image thing was already in from the beginnig :D But you are right i will document it better so people know what to expect.

    The fixes directory i use for first time imports. I copy all my image files there and ONE csv with ftp and just press the button!

  8. nyenius
    Posted 3 years ago #

    Thaaank youuuuu, I just imported 935 item with its images successfuly. Thanks to your description about the image thing.

    And the more great thing about this plugin, is when the SKU is already there, it will update it not insert new record. Cool, helpful feature for updating lot of stocks.

  9. JeriffCheng
    Posted 3 years ago #

    Can I import multiple images for a product?
    One product has many images.

  10. allaerd
    Plugin Author

    Posted 3 years ago #

    Hello Jeriff,

    For now 1 image is it.....i'll try to change it tonight and make multiple image import!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Woocommerce CSV importer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.