Home Forums Plugins Product Importer Deluxe Support [Resolved] How to add images from external URL

This topic contains 5 replies, has 3 voices, and was last updated by  Michael Visser 1 year, 7 months ago.

Welcome to our community support forums! We're here to help - but if you have an urgent request for a Pro Plugin, you will get a prioritised response through our Premium Support page.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28502

    fresky
    Participant

    I want to upload new products with external images and I just can’t figure it out. My .csv file looks like this:

     

    SKU,Product name,Category,Price,External link,Image

    0003,Product name,category name,10.95,http://www.google.com,http://iamageurl.com/image00001.jpg

    I then go to Import > Product > Upload file and import > it recognizes all fields

    I check Assigned an external URL column for Products in the CSV file. What it does is download and place the image00001.jpg in wp-content/uploads/2013/04 but it does not show up in frontend.

    ————————

    So, as I see the image already downloaded I further tested with new .csv:

    SKU,Product name,Category,Price,External link,Image

    0003,Product name,category name,10.95,image00001.jpg

    and check Assigned an image column for Products in the CSV file + re you merging changes into existing Products?

    The result is still no image in frontend. So, can somebody indicate how to import images from external URLS please?

    #28516

    fresky
    Participant

    It seems that the Image size to be imported from external URL must be certain size, larger than last time I tested. So now, with the new size it imports the pictures fine.

    However, after I import a new product and image is displayed fine, I import the same .csv file with some changes + checking merging changes into existing Products. Changes are not working, product is not updating.

    #28519

    fresky
    Participant

    From what I found out:

    1. If you upload a csv without column Sale Price (and only put column Price), it will NOT be possible to update the price.

    2. In order to update the price you have to put both Price and Sale Price columns in csv. In case the product has no discount, Price=Sale Price and the Sale price will not be displayed in frontend. Then, when you want to update the price, just update both prices.

    …..

    etc

    #28709

    Michael Visser
    Keymaster

    Hi fresky, your original issue of the image not importing is new to me. This has worked in the past and has seen no major change in recent releases. I’ll reproduce this and resolve this promptly, can you please confirm what e-Commerce platform you are using.

    Regarding the Price column requirement this is required by WP e-Commerce to create new Products (Price must be a positive amount) and may have spilled over to Jigoshop and WooCommerce, if so I’ll remove this. When merging Products Price should not be required which I will adjust accordingly.

    #37159

    dutchnet
    Participant

    Failure downloading images

    When I import a csv file the import module tells me it can not download the images.
    When I do a wget of the same URL I get the image fine from the external URL.
    I can open the same URL in a browser and can see the image in my browser.

    Below is one line of the import file
    Yanec TN-326M Magenta (Brother);Toners;;59.95;YTN478;P0172303;Yanec;8718717078640;1;Yanec TN-326M Magenta (Brother);Yanec toners drukken haarscherpe pagina?s af van top kwaliteit en dat allemaal voor een voordelige prijs. Met een nieuwe toner in de laserprinter kun je weer een hele tijd vlekkeloos afdrukken.;http://www.rdstatic.com/Prodimg/DOC268981/yanec-tn-326m-magenta-brother_300x300.jpg

    Is there a special requirement for PHP modules to be able to download images from extrenal url-s?

    #46171

    Michael Visser
    Keymaster

    Just closing old topics, to clarify during the image import process we first check whether the domain of the image matches the current WordPress domain and switch to calling the file by filepath if possible, otherwise we default to using wp_remote_fopen() for fetching the image contents and passing the data stream onto wp_upload_bits which saves it to the WordPress Media as an Attachment.

    There are checks built in during the image import process including:
    – Checking the file exists at that filepath
    – Checking the file exists at that URL
    – Checking the image filesize is not empty
    – Checking the image dimensions (if allow_url_fopen is enabled)

    wp_remote_fopen first attempts to use the PHP function fopen() to download the file contents and then falls back to using cURL.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘[Resolved] How to add images from external URL’ is closed to new replies.