Jump to content
ecuyetx

Products not picking up images from sub folder

Recommended Posts

Having read some articles regarding issues with large numbers of images, I have created a subfolder under images/source, called 2020-images. 

I have loaded a number of images in this folder and have assigned them to products through an Import inventory, but the Products whose images are in the subfolder are all showing "No Image Available". I thought it might be a version problem, but have upgraded to version 6.2.9, and that has not resolved the problem.

The website / store is kbcoins.com and there are around 15,000 products, many of which have 2 images each, although many products do not have any images.

I must admit I cannot understand how Cubecart can find the images in the subfolders anyway, but it seemed to be standard practice for people to split them across subfolders, but it is clearly not working for me, but I don't understand what I have done or not done I'm afraid. (I have refreshed the files list. I can see the images in the images File Manager, the subfolder is there and all the images are showing in the list) 

Any help would be much appreciated

Regards

Tony E.

 

Share this post


Link to post
Share on other sites

This product:

https://www.kbcoins.com/store/double-florins-1887-victoria-arabic-1.html

is using the image IMG_8200.JPG, and there is a derived version at 270 pixels wide (/store/images/cache/IMG_8200.270.JPG).

However, there is a problem with a derived version for 138 pixels wide (/store/images/cache/IMG_8200.138.JPG) that would be used for the Category page (double-florins). The image is there, but CubeCart has determined this image does not exist. The source image also exists (/store/images/source/IMG_8200.JPG).

To solve this discrepancy, I would first look make sure CubeCart has had its internal cache cleared. If the '138' image still is missing, I would then use an external database utility (such as phpMyAdmin, a tool usually included in your hosting account's control panel).

Look at CubeCart_filemanager and find IMG_8200.JPG. Note its 'file_id' number. Then look at CubeCart_image_index and filter for only that file_id. Make sure there is a relevant record and that the product_id is that for this product, and the 'main_img" has a '1' value. (PLEASE NOTE: the 'main_img' column is an ENUM type - meaning it holds one value from a specified set of string values: a '0' or a '1'. This might not be obvious when using the database utility.)

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hi BSmither 

thanks for taking the time to look at my issue. Sorry for the slow response. I started a response last week and then got caught up in something else.

The main problem I am having is, I don't think the same as the one you are describing here. There are some Porducts, all shown on the home page of the store, which have no images at all.

I think I have a database issue. The fileIDs of the images on the FileManager do not match the numbers on the Image_index.  I tried to attach images here but it did not seem to allow me to. It said the files were too big, but they weren't so I will try to load up separately

Thanks

Tony E.

 

DB-image-index-extract.PNG

Other images

DB-filemanager-extract.PNG

And finally 

DB-inventory-extract.PNG

Edited by ecuyetx

Share this post


Link to post
Share on other sites

The highlighted rows from CubeCart_filemanager show what you are wanting.

From this table, what do the rows have for file_ids of 58194 and 58195?

 

Share this post


Link to post
Share on other sites
Posted (edited)

Well that is interesting as I thought they were not in the table, but I have found that they are, and they have the correct files names, but they have a filepath of "null" while the others have the correct file path of 2020-images, see attached. 

I think the database is in a bit of a mess? 

Regards

Tony E

DB-filemanager-extract-2.PNG

Edited by ecuyetx

Share this post


Link to post
Share on other sites

The pilepath of NULL simply means that the source image is expected to be found at /images/source/.

Are there copies of IMG_19414.JPG and IMG_19415.JPG in the folder /images/source/?

 

Share this post


Link to post
Share on other sites

No they are only in 2020-images. I was trying to split the image files across different folders as I had read that if you have too many in one folder it can be a problem. Should I just copy them all across to the source folder?

Share this post


Link to post
Share on other sites

It might be tedious, but I would recommend editing the filepath in the database CubCart_filemanager table to change the pertinent rows from NULL to 2020-images/ instead of trying to do this one image at a time in CubeCart's admin.

 

Share this post


Link to post
Share on other sites

Thanks BSmither, as you say may be tedious as there are 2250 images to deal with, but at least you have diagnosed the problem for me, so thanks very much for your help

Regards

Tony E.

Share this post


Link to post
Share on other sites

It might be better to run an UPDATE query against a known range of file_id values. Then, if there are any non-relevant records unintentionally caught in that specified range, switch only those back to NULL.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...