Jump to content

Problems With Images And Categories Using Csv Import


Recommended Posts

Hi,

 

I'm using prestashop version 1.5.3.1 and I have a problem with the CSV import.

 

My problem is that the image field is blank after uploading and only one of the categories is being populated.

 

Here is a line from my CSV file...

 

id;supplier;name;description;price;categories;image_url

AA13;Absolute;50/50 cotton polyester ladies polo shirt;testing description;5.95;Home, Aprons;http://www.pubclothingcompany.com/shop/upload/product_images/AA13.jpg

 

I have applied the following fix which I found in another post...

 

https://github.com/P...0e3ebe473233d07

 

But this only partly fixed the category problem (originally no categories were being set for the product)

 

This is the warning I get for the images now...

 

Product n°1: the picture cannot be saved: http://www.pubclothi...images/K511.jpg

 

I have checked the permissions on the image directories and they are 755 so this should not be the issue, I also checked the allow_url_fopen and safe_mode settings and they are on and off respectively as expected.

 

Please help! :-)

 

Thanks,

 

Richard.

Edited by nospario (see edit history)
Link to comment
Share on other sites

Ok, I have images working!

 

The problem is the *documentation*. If you follow the example CSV it will not work.

 

Start the import as normal, but on the second page where you see the columns with the header pop-ups at the top, look VERY CAREFULLY at the columns at the end... many of the columns in the documentation do not line up with what 1.5.3.1 actually expects. If you select the right headers, presto, in they went.

 

And yes, it's / not \ :-)

Link to comment
Share on other sites

5ummer5 - It is sooo frustrating isn't it!?

 

It sure is! So close to launching but yet so far!!

 

Ok, I have images working!

 

 

The problem is the *documentation*. If you follow the example CSV it will not work.

 

Start the import as normal, but on the second page where you see the columns with the header pop-ups at the top, look VERY CAREFULLY at the columns at the end... many of the columns in the documentation do not line up with what 1.5.3.1 actually expects. If you select the right headers, presto, in they went.

 

And yes, it's / not \ :-)

 

I checked my headers after seeing your post but it was the correct one for the images :-( Still not working for me.

Edited by 5ummer5 (see edit history)
Link to comment
Share on other sites

Interesting... I think there's something odd going on with your DNS or URL re-writing?

 

That is quite possible. It is hard to say with so many different hosting companies with server setups varying so much. All I care about is that they are now going in! :-)

Link to comment
Share on other sites

Hi gentlemen,

 

I already read some topics regarding problems with CSV import, but no solution.

 

I am using prestashop 1.5.3.1

 

First i import categories.csv (it cames without any problems and it input categories properly)

 

Now i want to import products but still no way how to assign to category.

 

 

My family tree is

 

MAIN CATEGORY

SUB CATEGORY

SUB SUB CATEGORY

 

I try to wrote to csv as main category,subcategory,subsubcategory but still all products assign to HOME. i dont understand, no error during import (only friendly url rewrote)

 

i tried :

main category,sub category,sub sub category

main category, sub category, sub sub category

main-category, sub-category, sub-sub-category

 

but anyhow it assign only to HOME.

 

 

Second, how to import images ?

 

i insert urls as:

 

http://mydomain.com/img/image-name/1.jpg, http://mydomain.com/img/image-name/2.jpg, http://mydomain.com/img/image-name/3.jpg

 

(in browser i can open this image correctly, but prestashop didnt import anything)

 

 

Can anybody help me and take me advice ?

 

Many thanks

Edited by oorbx (see edit history)
Link to comment
Share on other sites

not sure if it's relevant, but I replaced the whole code in the file ( from here https://github.com/P...1b65e94a4c1e59c ) and it fixed my problem. I wasn't using multiple categories though, just couldn't seem to upload images using csv file. Hope it helps!

 

Ah yes, I updated that also but it still wouldnt work with the full URL. Only with the relative one. Ive only needed to import to one category per product so far so not come across that issue.

 

However I am starting to import product combination now so we will see how that goes!

Link to comment
Share on other sites

Thanks to GITHUB and to you about adminimportcontroller.php.

 

I just replaced that file to mine, and now it works.

 

I dont understand why you cannot input full path to image, but for me it works

 

if i will input relative /img or without http:// not working for me...

 

assign to category works for me also very well. I input all categories into 1cell, devided by comma and product is properly assign to that.

 

thanks to prestashop developers about github file update.

Edited by oorbx (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 years later...
×
×
  • Create New...