Images

Hi, I have a problem with the product images, the images are in tables cscart_images and cscart_images_links, and the server in html/images/detailed/2 directory, but dont shown in my list of products, it seems that lost the relationship between them, previously worked well, let me know what I should do to fix it please.

Thanks!

PM me temporary FTP access so that we can check the issue

Hello!

Hi, I have a problem with the product images, the images are in tables cscart_images and cscart_images_links, and the server in html/images/detailed/2 directory, but dont shown in my list of products, it seems that lost the relationship between them, previously worked well, let me know what I should do to fix it please.

Thanks!

Try to check the permissions for ./images , ./images/detailed и ./images/detailed/2 directories. According to CS-Cart documentation, the images directory and its content should have 777 permissions.

Also, this situation may happen in case you change the value of "MAX_FILES_IN_DIR" constant in config.local.php.

Hello!

Try to check the permissions for ./images , ./images/detailed и ./images/detailed/2 directories. According to CS-Cart documentation, the images directory and its content should have 777 permissions.

Also, this situation may happen in case you change the value of "MAX_FILES_IN_DIR" constant in config.local.php.

We have verified the config.local.php file, the MAX_FILES_IN_DIR parameter has the value 1000 and permissions are at 777, however the images are not displayed, in the directory there are more than 3mm images that are associated with products through DB, there is another way to fix this problem?

Hello!

We have verified the config.local.php file, the MAX_FILES_IN_DIR parameter has the value 1000 and permissions are at 777, however the images are not displayed, in the directory there are more than 3mm images that are associated with products through DB, there is another way to fix this problem?

Ok, in this case it is needed to check where the system is so-to-say finding pictures.

1. Find the product that has the images (according to the database) and find these images in the database (you need the image_id parameter). In the database you will see records like this:

image_id   image_path          image_x   image_y   
247        image_name.jpg      600       600

You need the 247 number.

2. Check the availability of the image. The path to an image is described in the app/functions/fn.image.php file in the fn_attach_absolute_image_paths function:

$path = $object_type . '/' . floor($image_id / MAX_FILES_IN_DIR);

where $object_type is the type of the image, for example, detailed

and floor($image_id / MAX_FILES_IN_DIR) is the minimum ratio of image_id to the max_files_in_dir. In our example, it will be 247 / 1000 and we round it up to the first figure, so we get 0.

According to this function, the images should be in the images/detailed/0 directory. Try to check it directly in the browser: your_site.com/images/detailed/0/image_name.jpg

If the image is available, the problem is somewhere in the code and more detailed examination of the code is required.

3. If there is no specified image in the /images/detailed/0/ directory, try to find this image in the /images/detailed directory.

For example, you find this image in the /images/detailed/3/ directory. Move the image from the /images/detailed/3/ directory to /images/detailed/0/ directory.

After that, the image should appear.

If face issues with it, please, contact us via e-mail: sales@cart-power.com, provide FTP access credentials and we try to help you.