X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Import with Images (https://forum.x-cart.com/showthread.php?t=72592)

rowdybunny 08-14-2015 07:58 PM

Import with Images
 
I am trying to an import that includes images. I have a field called 'images' in my import file and the value in this field is 'product-image.jpg" (this o f course varies for each product).

I have uploaded all of my images for the products being imported to the following directory:

xcart/var/import/images/

I am currently importing 162 products. I created a single product and exported so I can see the format. I then exported the products I would like to import from my old shopping cart and made all needed changes so that it matched what was in my X-Cart export.

I decided to do a test import with only a few products to make sure everything worked as expected, but I got the following critical error:

Error of image loading. Make sure the "images" directory has write permissions.

So I went to the following directory and added write permissions:

xcart/var/import/images/

And I also added write permissions to the following directories as well:

/xcart/var/images/

I tried again and it still did not work so I added write permissions to the following directory as well as all sub directories:

/xcart/var/images/product/

Still no luck. At this point I removed the image field from my test file that had a few products and did the import. This is where it gets strange, not only did it import, but it imported the images as well. I removed these test products, add the images back and imported and everything was working fine.

So I decided it was time to import all 162 products and I am back to the permissions error. However when I cancelled the import and went back to my categories page I noticed that it imported 20 products with images, so I assume the needed folders have the correct permissions.

What am I doing wrong???

Thanks,
Jennifer

seyfin 08-18-2015 07:37 AM

Re: Import with Images
 
When you import products with images, X-Cart will attempt to write new images from the specified image location, for example "xcart/var/import/images/image.jpg", to the xcart/images/product folder. Make sure X-Cart scripts are allowed to write into the corresponding folder and sub-folders.

rowdybunny 08-18-2015 09:24 AM

Re: Import with Images
 
Thanks for the reply. I have set all the folders listed in my original post with the proper permissions. I am also assuming if the permissions were not correct the first several records would not have worked. Is it possible I missed a folder or something else?

chrisp 08-18-2015 11:13 PM

Re: Import with Images
 
Hi Seyfin,

I'm having the same issue. The error I get importing with images is:

"Error of image loading. Make sure the "images" directory has write permissions."

All my /images directories have the proper 0777 write permissions:

- xcart/var/import/images/
- xcart/var/images/
- xcart/images/product

I have ensured all files and directories in my installations have the proper ownership attributes and still I get the Error of image loading.

Is there anything else you can suggest?

Thanks,
Chris

seyfin 08-18-2015 11:13 PM

Re: Import with Images
 
Please attach your sample CSV file that can be used to re-create the error.

Thank you.

chrisp 08-18-2015 11:28 PM

Re: Import with Images
 
1 Attachment(s)
File attached. Thanks!

rowdybunny 08-19-2015 02:04 AM

Re: Import with Images
 
It looks like I missed the permissions for:

- xcart/images/product

When I get back to my desk I will set the permissions for that folder and try again.

I would be interested in knowing why it imported 21 products with the images and then gave the error when the permissions were not set correctly for the one folder?

chrisp 08-19-2015 06:19 AM

Re: Import with Images
 
I think I see the problem with my import - some of the image URLs returned 404 errors. I fixed these and retried the import and it's proceeding without the errors from before. The initial import has finished and now it's on the image resizing. Fingers crossed, this finishes.

Thanks Sergey for your help.

Chris

rowdybunny 08-19-2015 02:40 PM

Re: Import with Images
 
Well I finally got this to work. Not only did I not set the permissions for xcart/images/product I also had two products with the images missing!

Thanks!

seyfin 08-19-2015 08:25 PM

Re: Import with Images
 
Thank you for your replies.

I am glad to know that you have managed to sort out the import issues.


All times are GMT -8. The time now is 10:34 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.