Jump to content

Upload CSV products problem with categories and image


Recommended Posts

Hello,

 

I try to upload with CSV products but i have problem with categories and image.

 

I tried everything but with no luck. THe product always uploads at the home category and not at category "example cat" i want.

"example cat" category is under Home category ... ---> How shall i add the product inside that category ? I tried many ways but no luck !

 

The image is not uploading too. I tried to upload the image with the full path like:

http://www.mydomain.com/img/delete/test-image.jpg

 

 

I get no error after the upload finished.

 

Can someone help please ??

 

Thanks

Link to comment
Share on other sites

When you say you changed the file, what do you mean?

 

I have also been having problems with my catgeories csv upload and the right format for writing the image link, too.

 

I have noticed the hack/ file you're referencing going around the forums as a way to remedy glitches with the version 1.5 csv loading function. Would any of the moderators/ experts be so generous as to offer some advice whether this is legitimite and how to install it? I don't want to make a cobbled mess of trying to change code when I really don't know how, especially if I can get the csv loader to work without it.

 

Here is the jist of my situation:

I tried doing test runs with the csv loader and it had worked fine. Then when I started trying to upload the real deal, the loader doesn't seem to work in the same way. Now child/ sub categories can only be placed in a parent category by describing the parent category number, not the name. Unfortunately I had used the name in my spreadsheets. (The name made more sense to me than just a number, so I figured there was less chance of getting categories mixed up.)

 

Also, I'm having trouble with the image upload. Perhaps I am writing the link the wrong way. I have my image saved in the public-html file as imgimport/picturename.jpg, so I tried entering www.mysite.com/imgimport/picturename.jpg. It doesn't work, but I definitely got the image to upload with the csv loader when I was testing everything out a while back.

 

Perhaps more instructions regarding the csv loading in the userguide would be helpful. It is a great feature, but at present the instructions on the subject are rather scant.

 

Many thanks in advance to the helpful soul who replies!

Link to comment
Share on other sites

Find that file controllers/admin/AdminImportController.php download it and the file that is at the server rename it to AdminImportController.php_BACKUP . Now at your pc open the AdminImportController.php delete its content,copy the code from this site and paste it at your file.

 

Upload and test again. You can always return to the core file be deleting the AdminImportController.php and renaming the AdminImportController.php_BACKUP

 

I would like also to know something official for this bug. I hope someone answers !

Link to comment
Share on other sites

Builders, thank you so much for your reply.

 

I tried following your instructions- I found the adminimportcontroller file, downloaded it, changed the file name on the ftp to adminimportcontroller-backup, copied the code from https://github.com/PrestaShop/PrestaShop/commit/84005fea267ac8fa73d79df391b65e94a4c1e59c and replaced it in the adminimportcontroller file i had downloaded, then reuploaded it to the ftp. Then the csv uploader altogether failed. I then tried removing the old backup version, leaving just the new file, but the csv loader page still failed. Other parts of the site worked, but when you went to the csv uploading page, it just listed a bunch of code.

 

So possibly I didn't copy the right thing from the github page. I just copied all of the code there and pasted it into the deleted 'adminimportcontroller' file then uploaded it- first with the backup version still up, then without it. The site did get back to normal when I left just the original adminimportcontroller file up (which i then took the 'backup' off of, incidentally).

 

I don't have any experience with maneuvering with code, but I just copied everything at the github page and pasted it into the blank page.

 

If you or anyone else has any thoughts whatsoever, do let me know. Hopefully a moderator will add something.

Link to comment
Share on other sites

I am a very newby on Prestashop and I have problems to with uploading a csv file. I use 1.5.3.1. I'f yust installed a new and clean version. Even that dosn't work. After 2 seconds i'f get the message that uploading and copying faild.

 

I'f dropt the problem on te dutch forum. No one could help me. Ho can???

 

Thank you for your help.

 

Siepos

Holland

Link to comment
Share on other sites

That is not the error message I have been getting. I have a couple levels of subcategories. When I upload the file it lists all the categories as (ID: null) cannot be saved , but when I see what is going on at the front end of the shop, it has accepted the top level of categories. So my handful of main categories show up, but none of the two lower tiers of subcategories/ child categories. I'm not listing anything in multiple categories either.

 

Also, the image links aren't working.

 

Is anyone else with subcategories/ child categories having this issue? Maybe if someone is successfully loading this kind of category structure they could send along the right format. I am not sure how to attach my spreadsheet onto a post, but I will look into doing so.

Link to comment
Share on other sites

I resolved the parent/ child categories issue. Apparently it was failing because I had too many characters in my metadescription. I had been getting an error message for too many characters in the metadescriptions, but I didn't make the connection that would cause everything to fail to upload.

 

Now I am also having the problem with all products going to 'home' instead of assigning to their designated category/ categories. I tried again using the github fix, but I know I'm doing something wacky. When I downloaded the file, it looks like it wants to save as a txt file, which doesn't seem right. It is saved as a php on the FTP. Also, the code I copied from github had all those dashes (- ) in front of every line. Is that right? I just highlighted everything in the main window of the github link, copied and pasted in the blank shell of 'AdminImportController' file that I had downloaded from the FTP. Then I reuploaded it (with the original backup version there alongside it). Result- CSV importer crashed until I removed the new file and went back to the old one.

 

Thoughts, anyone?

Link to comment
Share on other sites

I too am new to Prestashop... and getting problems with importing CSV file. It seems to get so far and then tries to do the 'matching' process which I have no idea what I'm supposed to do there.

 

Seems strange that such a basic function doesn't seem to work... or at least not explained very well in the documentation (is there documentation? :unsure: )

Link to comment
Share on other sites

You change the column title in the drop down menu to match what is in the column of your spreadsheet- in case your spreadsheet was organized differently. Also, don't forget to skip 1 line if you imported the CSV with your column titles on it. That way the program will not be trying to process the column title names as if they were products, categories, or whatever you happen to be importing.

 

Hope this helps. Also, as for my original post, I did find the fix for the problem with the CSV loader putting all products into home. I don't have the file at hand, but I did post it on another forum post, so send me a message. I'll dig it up if you can't find it. The problem was in AdminImportController. And if you had a problem installing the github fix, like I did, that one was just a whole file to plug in, so it worked even for someone who doesn't really know how to mess with code (like me.)

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...