Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Import with Images

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 08-14-2015, 07:58 PM
 
rowdybunny rowdybunny is offline
 

Advanced Member
  
Join Date: Aug 2014
Posts: 67
 

Default 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
__________________
X-Cart 5.2 & 5.3.3.3
Reply With Quote
  #2  
Old 08-18-2015, 07:37 AM
  seyfin's Avatar 
seyfin seyfin is offline
 

X-Cart team
  
Join Date: May 2004
Posts: 1,223
 

Default 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.
__________________
Sincerely yours,
Sergey Fomin
X-Cart team
Chief support group engineer

===

Check this out. Totally revamped X-Cart hosting
http://www.x-cart.com/hosting.html

Follow us:
https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart
Reply With Quote
  #3  
Old 08-18-2015, 09:24 AM
 
rowdybunny rowdybunny is offline
 

Advanced Member
  
Join Date: Aug 2014
Posts: 67
 

Default 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?
__________________
X-Cart 5.2 & 5.3.3.3
Reply With Quote
  #4  
Old 08-18-2015, 11:13 PM
 
chrisp chrisp is offline
 

Member
  
Join Date: Aug 2015
Posts: 14
 

Default 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
__________________
Business v5.25

Environment
-----------------
PHP: v5.4.35
MySQL: v5.5.42
OS: CENTOS 6.6 i686
cPanel 11.50.0.29
Reply With Quote
  #5  
Old 08-18-2015, 11:13 PM
  seyfin's Avatar 
seyfin seyfin is offline
 

X-Cart team
  
Join Date: May 2004
Posts: 1,223
 

Default Re: Import with Images

Please attach your sample CSV file that can be used to re-create the error.

Thank you.
__________________
Sincerely yours,
Sergey Fomin
X-Cart team
Chief support group engineer

===

Check this out. Totally revamped X-Cart hosting
http://www.x-cart.com/hosting.html

Follow us:
https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart
Reply With Quote
  #6  
Old 08-18-2015, 11:28 PM
 
chrisp chrisp is offline
 

Member
  
Join Date: Aug 2015
Posts: 14
 

Default Re: Import with Images

File attached. Thanks!
Attached Files
File Type: csv products-2015-08-18_import_to_xc2.csv (299.6 KB, 41 views)
__________________
Business v5.25

Environment
-----------------
PHP: v5.4.35
MySQL: v5.5.42
OS: CENTOS 6.6 i686
cPanel 11.50.0.29
Reply With Quote
  #7  
Old 08-19-2015, 02:04 AM
 
rowdybunny rowdybunny is offline
 

Advanced Member
  
Join Date: Aug 2014
Posts: 67
 

Default 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?
__________________
X-Cart 5.2 & 5.3.3.3
Reply With Quote
  #8  
Old 08-19-2015, 06:19 AM
 
chrisp chrisp is offline
 

Member
  
Join Date: Aug 2015
Posts: 14
 

Default 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
__________________
Business v5.25

Environment
-----------------
PHP: v5.4.35
MySQL: v5.5.42
OS: CENTOS 6.6 i686
cPanel 11.50.0.29
Reply With Quote
  #9  
Old 08-19-2015, 02:40 PM
 
rowdybunny rowdybunny is offline
 

Advanced Member
  
Join Date: Aug 2014
Posts: 67
 

Default 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!
__________________
X-Cart 5.2 & 5.3.3.3
Reply With Quote

The following user thanks rowdybunny for this useful post:
qualiteam (08-19-2015)
  #10  
Old 08-19-2015, 08:25 PM
  seyfin's Avatar 
seyfin seyfin is offline
 

X-Cart team
  
Join Date: May 2004
Posts: 1,223
 

Default Re: Import with Images

Thank you for your replies.

I am glad to know that you have managed to sort out the import issues.
__________________
Sincerely yours,
Sergey Fomin
X-Cart team
Chief support group engineer

===

Check this out. Totally revamped X-Cart hosting
http://www.x-cart.com/hosting.html

Follow us:
https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:00 PM.

   

 
X-Cart forums © 2001-2020