Product Images

Hello,

i am trying to import some product from an external database, but i am having troubles in finding the logic how the product images and options are connected through database tables, i don't find any table where the image is connected with the product id??? and how the option variants like different color of a product are connected with that product.

Can anyone help me with that?

please check images & image link table with object "P". :)

if I am not mistaken they go into the

public_html/var/files/1/exim/backup/images folder

In fact i am trying to understand the logic how a product code is related with more than one photo?? or when i set different colors for the product how changes the product image according to the color (i know that is due to option combinations but since i am trying to import products from an external database i need to know how the tables of products, images and options are connected.

I would be very grateful if someones could help me with this

Look at the code for “image pairs” and the DB table cscart_image_links. The detailed_id relates to the image_id in cscart_images and the id is used to calculate the subdirectory of the actual image file.


Image management in CS-cart needs to be revamped and simplified. The image pair concept is no longer useful with dynamically generated thumbnails.

Note that the type M means main image and A means additional images

Look at the code for "image pairs" and the DB table cscart_image_links. The detailed_id relates to the image_id in cscart_images and the id is used to calculate the subdirectory of the actual image file.

Image management in CS-cart needs to be revamped and simplified. The image pair concept is no longer useful with dynamically generated thumbnails.

Hello,

thanks for answering. I understand that the images are stored in cscart_images table but what confuses me are:

-how the product_id is connected with more than 1 photo??

-how the product image changes when i select a different product color??

-I see also a combination_hash column in cscart_product_options_inventory table but i dont understand this code: 287_1620 in colum combination whats is? combination of product_id and option variant??? what about the value of combination_hash? 1216998941 value

Anyone has an idea about this??

thanks for answering. I understand that the images are stored in cscart_images table but what confuses me are:

-how the product_id is connected with more than 1 photo??

-how the product image changes when i select a different product color??

-I see also a combination_hash column in cscart_product_options_inventory table but i dont understand this code: 287_1620 in colum combination whats is? combination of product_id and option variant??? what about the value of combination_hash? 1216998941 value

1. Please check my post. One object_id is used with two letters (M - main image, A - additional ones)

2. The system checks if there is a combination with image for selected options. If yes, it is displayed

3. The rules is: OPTION ID1_VARIANT ID1_OPTION ID2_VARIANT ID2... etc