How Product Link Stored In Database?

I beleave this question is only for experts to guide me how to insert url using database.

I have developed an addon which will import all products from shopify and also from other cms websites but I don't understand how the images links are stored in database.

please guide me how can i save image links.

I think cscart_products is main database which have any field to link with image and url stores in cscart_images but the question is their relation how these are linked with eachother.

detailed answer will be really appricated.

The cscart_products and cscart_images tables are linked through the cscart_images_links one. Object ID should be equal to product ID

The cscart_products and cscart_images tables are linked through the cscart_images_links one. Object ID should be equal to product ID

Hi EcomLabs

thank you for your answer but still my confusion is there.

I have linked some images successfully but some was not done because there are 3 folders in images>detailed folder

those 3 folders are numbered like below.

0

1

8

sometimes it works if i store in 0 folder but sometimes it works if i save in 1 folder.

what is exactly these folders are and how we know which folder is being used for a specific product location?

If you review the code in fn_images.php for the function fn_attach_absolute_image_paths(), in the 'functions' directory it will answer your question(s). The numeric values are the result of the image_id / MAX_FILES_IN_DIR site constant.