nospario Posted February 13, 2013 Share Posted February 13, 2013 (edited) 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 February 13, 2013 by nospario (see edit history) Link to comment Share on other sites More sharing options...
Maury Markowitz Posted February 13, 2013 Share Posted February 13, 2013 I hope you don't mind me asking you a question in the middle of another question… How did you come up with the image URL for your upload file? I put all of my images into a temp folder in /img, and then used: http://xxx.com/img/temp/imagename.png But that didn't work. Link to comment Share on other sites More sharing options...
5ummer5 Posted February 14, 2013 Share Posted February 14, 2013 I have also tried this fix and get the same error as you "the picture cannot be saved" Not sure how it can be fixed but there is a few people out there that need this! Link to comment Share on other sites More sharing options...
nospario Posted February 14, 2013 Author Share Posted February 14, 2013 Maury - I just created the folder on the server via my ftp client. 5ummer5 - It is sooo frustrating isn't it!? Link to comment Share on other sites More sharing options...
Maury Markowitz Posted February 14, 2013 Share Posted February 14, 2013 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 More sharing options...
5ummer5 Posted February 14, 2013 Share Posted February 14, 2013 (edited) 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 February 14, 2013 by 5ummer5 (see edit history) Link to comment Share on other sites More sharing options...
Maury Markowitz Posted February 14, 2013 Share Posted February 14, 2013 I checked my headers after seeing your post but it was the correct one for the images :-( Still not working for me. Your error is different though. Can you PM me a CSV with a single item in it, and the image that goes with it? I'll try it on my machine. Link to comment Share on other sites More sharing options...
5ummer5 Posted February 14, 2013 Share Posted February 14, 2013 I have found the answer that works for me! DON'T use the full URL. What I did was use:- "../imgfolder/name_of_image.jpg" NOT "http://www.mystore.com/imgfolder/name_of_image.jpg" Hope this helps others too!! Link to comment Share on other sites More sharing options...
Maury Markowitz Posted February 14, 2013 Share Posted February 14, 2013 I have found the answer that works for me! DON'T use the full URL. What I did was use:- Interesting... I think there's something odd going on with your DNS or URL re-writing? Link to comment Share on other sites More sharing options...
5ummer5 Posted February 15, 2013 Share Posted February 15, 2013 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 More sharing options...
nospario Posted February 15, 2013 Author Share Posted February 15, 2013 Hi guys, I'm not working today so can't try anything out at the minute. I'll take a look on Sunday perhaps and let you know how I've got on. Link to comment Share on other sites More sharing options...
dommyp Posted February 16, 2013 Share Posted February 16, 2013 not sure if it's relevant, but I replaced the whole code in the file ( from here https://github.com/PrestaShop/PrestaShop/commit/84005fea267ac8fa73d79df391b65e94a4c1e59c ) 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! Link to comment Share on other sites More sharing options...
oorbx Posted February 17, 2013 Share Posted February 17, 2013 (edited) 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 February 17, 2013 by oorbx (see edit history) Link to comment Share on other sites More sharing options...
oorbx Posted February 17, 2013 Share Posted February 17, 2013 SOLUTION ABOUT ASSIGN PRODUCTS TO CATEGORIES AND CORRECT IMPORT IMAGES IS HERE http://www.prestashop.com/forums/topic/225930-csv-import-unable-assign-product-to-category/page__p__1111630__hl__csv__fromsearch__1 Link to comment Share on other sites More sharing options...
5ummer5 Posted February 17, 2013 Share Posted February 17, 2013 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 More sharing options...
oorbx Posted February 17, 2013 Share Posted February 17, 2013 (edited) 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 February 17, 2013 by oorbx (see edit history) Link to comment Share on other sites More sharing options...
S7 Media Ltd Posted March 10, 2013 Share Posted March 10, 2013 The github sorted me out. Thanks! Link to comment Share on other sites More sharing options...
szilaszlo Posted February 21, 2017 Share Posted February 21, 2017 Ver 1.6.1.4. have the same bug Whats now?! (2017!) What have we change in adminimportcontroller.php ? Is it still the solution? Thanks: Lazlo Link to comment Share on other sites More sharing options...
Recommended Posts