Jump to content

Images not uploaded when import


Recommended Posts

Hello,

 

I'm trying to do an import of a high number of products but for now I'm just testing.

I created a csv file with just one line, and very few fields like name, ID, active, category, price and images URL.

The product was imported correctly, but not the image.

The image is alredy uploaded on my server, when I type the URL I can see it. 

But when I import, it seems Prestashop didn't handled it as there's no image in the product...

 

The img/p directory was 755 and I changed it to 777 but it didn't change anything.

 

Could anyone help me ?

 

Thanks a lot.

Link to comment
Share on other sites

Thanks for your answers. 

Here"s my csv (I just removed my domain name):

 

ID;Active(0/1);Name;Categories;Price;URL of images
3;1;Customizable bag;Bags;2.72;http://mydomainname/images/custom-bag.jpg
 
I also wanted to say that the URL of the image was tested: when I copy/psate it in my browser I can see the image, so there's no problem here.
Thanks a lot !
Link to comment
Share on other sites

I had no problem importing your csv into a fresh PS 1.6.1.8 installation.

You can see it here: http://prestashop.testlink.be/

 

I have imported it twice:

=> First time with the demo image URL you provided (you can see there is no image).

=> Second time I replaced the image URL with image from demo.prestashop (http://fo.demo.prestashop.com/1-large_default/faded-short-sleeves-tshirt.jpg)

 

 

So I am guessing the problem lies in your image URL.

Since I don't know your image URL, I can not test it for you.

 

 

PS: The products can not be ordered because the column 'Action when out of stock' is not there and there is no stock. By adding this column and the value 2 for each product it will use the settings from Preferences/Product => 'Allow ordering of out-of-stock product'

 

test.zip

Link to comment
Share on other sites

Thanks a lot, you helped me understand what the problem was.

Actually, this site is a development site, which is protected by a htaccess file. 

So when I work on it, I insert the login and password and everything's fine, I'm able to see the image without any problem. 

But when I was doing the import, I guess the script was trying to access the image and couldn't retrive it because of the protection.

So I deactivated the protection and it's working fine, the image was correctly imported. 

 

Thank you very much.

Link to comment
Share on other sites

Great to hear you found the issue.

 

If you would use the maintenace mode, you will not have this issue and the website would not be available for public eyes.

 

Or you could add a domain like image.yourdomain.com to upload your images, then you would have a seperate public_html folder and you can protect the sites folder without protecting the upload folder (it must be a seperate domain, not a subdomain).

In case you use SSL: PrestaShop will generate images in your img folder, so you would also not need a wildcard SSL to make it work.

 

Anyway, glad to help  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...