WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. nyenius
    Member
    Posted 1 year 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.

    <?php
    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. 
    
    	mkdir($dir);
    	//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.

    http://wordpress.org/extend/plugins/woocommerce-csvimport/

  2. holyholy
    Member
    Posted 1 year 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

    http://wordpress.org/support/topic/plugin-woo-product-importeradd-featured-image-from-csv-url-grab?replies=4#post-3240924

  3. allaerd
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year ago #

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

    check out version 0.2

  6. nyenius
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  10. allaerd
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.