ecuyetx Posted May 14, 2012 Share Posted May 14, 2012 I am trying to upload my products using the Import catalogue function in the admin portal. It offers to map the fields in my csv file and I am trying to map images to certain products but after I load them the images are not showing. I am not sure what format the database is looking for the image file name. I have just loaded a few sample images so far and they are called things like coin1.jpg and coin2.jpg etc. So I have tried using coin1 or coin1.jpg in the field for Master Image, but it still does not seem to hold any of these as the main image for the Product. When I export the database that seems to show that is has accepted coin1.jpg, but at the same time cubecart does not appear to be using it. Can anyone help? Regards Tony E. Quote Link to comment Share on other sites More sharing options...
JulesInFrance Posted May 15, 2012 Share Posted May 15, 2012 Hi, I had similar issues and at the time abandoned the import function as just too painful; I recall I resorted to running a single entry import then manually attached an image to the product record. Finally I exported the catalogue (one entry), deleted the entry then imported the export file. And still it failed to pick up the image. (I also tried import/overwrite and that failed too.) Thinking about it subsequently I'm sure it has to do with the maintenance and caching of images. My guess is the CC5 front end does not use the images you upload, it uses the maintenance, image cache function to create thumb and main images predicated upon the skin in use (so, say, according to the config.xml parameters). For a image to show on your pages you need it to be cached; that may call for uploading you images then importing your catalogue then running maintenance, update image cache to have CC5 build the site copies. Then you may need to close your browser to fully refresh your browser cache too, relaunch and see how that goes. If you've FTP access the thing you need to be certain of is that there's cached versions of the images that'll appear on the site. I hope that helps. J Quote Link to comment Share on other sites More sharing options...
ecuyetx Posted May 15, 2012 Author Share Posted May 15, 2012 Thanks Jules. I didn't fully understand all of that but I will work through it. I have got FTP access and I have looked in the images folder in the store and there is a cache folder with a few image files in it. However it seems to have appended a number to the image file name. So as i only loaded a few samples, I have in different ways, attached different products to the same image at different times using the control panel and when trying to use the import function. So for example I have files called coin1.jpg and coin2.jpg, and in the cache folder there are files called coin1.50.jpg, coin1.168.jpg, coin2.138.jpg and coin2.114.jpg etc. etc. So there are some pictures there, but the file names have been changed, and I guess in some way that code that has been added may relate to the product it is attached to? When you say run maintenance update image cache, the only option I can find under maintenance is to clear the image cache, not upate it. Should I clear the image cache? And then load the images again and then reimport the products? Thanks Tony E. Quote Link to comment Share on other sites More sharing options...
JulesInFrance Posted May 15, 2012 Share Posted May 15, 2012 So far as I'm aware the import catalogue function does not import images. Images uploaded to the server are placed in /images/source/ (you can ignore the /images/cache/ folder; that belongs to CC5). Imported product details only really have two places in the database to go to, _inventory and _image_index; _image_index only holds the image file name so my best guess is that you don't need anything other than file name in your import csv file. Try this; 1. Admin => Advanced => Maintenance => Clear image cache (this purges /images/cache/) 2. Upload your images to /images/source/ (overwrite anything that's already there) 3. Admin => File Manager => Images => Update File List (that should write the contents of /images/source/ to _image_index) 4. Admin => Import Catalogue (set this to overwrite and replace the existing inventory) My logic being that so long as CC5 knows about the images (step 3) then it should cross-reference to them in step 4 (that is write product_id and main_img flag). My best guess is that the import itself cannot populate the _image_index table itself. Try that and let me know if it helps Jules Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 15, 2012 Share Posted May 15, 2012 The numbers appended to images indicate whether they are thumbnails, full size, etc, and they should be there in the cache versions. Go to Images in Admin and use the Update File List tab. Quote Link to comment Share on other sites More sharing options...
ecuyetx Posted May 15, 2012 Author Share Posted May 15, 2012 Jules and Dirty Butter Thanks for your replies. I tried Jules suggestions, went through the steps but no luck I'm afraid. The images are in images/source and I did an update file list and they are in the list of images in the admin control panel (although one of them seems to be there twice now) I assigned the file names of coin1jpg and coin2.jpg etc. to products in the import file and reloaded. But no luck It also makes sense what Dirty Butter said too now as the image cache file now just has 3 files, coin1.270.jpg, coin2.270.jpg and coin3.270.jpg Still not getting there thoough. Thanks for your suggestions though. Tony E. Quote Link to comment Share on other sites More sharing options...
ecuyetx Posted June 7, 2012 Author Share Posted June 7, 2012 Sorry I forgot to come back and confirm that this is all working now. Thanks very much for your help guys. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 7, 2012 Share Posted June 7, 2012 Glad it's solved. It would help others if you explained what had to be done to get it to work. Quote Link to comment Share on other sites More sharing options...
ecuyetx Posted June 7, 2012 Author Share Posted June 7, 2012 Sorry yes, in the end I basically followed Jules' instructions. Must have done something wrong the first time, as it worked at the second attempt. Cleared it all out completely and started from scratch and it worked. Took me a while but I got there in the end. Thanks Jules. I am now looking for a mod to allow me to load multiple images using a bulk upload, but so far I have only found ones which work with v3 and v4. Thanks Tony E. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.