Alt Text for Images - Database Table - CS-Cart 3.X version

I need to update ALT Text for each product image as a product name at database level for cs-cart 3.x version.

Any one have clue on database Table Name where ALT column location? If anyone did the same, could you provide UPDATE statement?

Your help is much appreciate.

Hello Raj,

Thank you for your message.

You can find these alternative titles in the cscart_common_descriptions database table where the value for the object_holder field is equal to images. For example, in order to get all alternative titles you should use the following query:

SELECT * FROM `cscart_common_descriptions` WHERE object_holder = 'images'

I hope this information will help you.

Thank you.

Pavel Zyukin

CS-Cart Support team

cscart_product_descriptions contains the UID 'product_id'

cscart_images_links uses the 'product_id' in the 'object_id' column and contains the UID 'pair_id'

cscart_common_descriptions uses the 'pair_id' in the UID 'object_id' column, with the 'description' column storing the alt text.

The following SQL should

UPDATE `cscart_common_descriptions` SET `description` = `cscart_product_descriptions.product` WHERE `object_id` IN (SELECT `pair_id` FROM `cscart_images_links` WHERE `object_id` IN (SELECT DISTINCT `product_id` FROM `cscart_product_descriptions`)) AND `object_holder` = `images`

Please backup before running this SQL statement, I haven't tested it but it is logically sound.

Thank you very much for your inputs. I tried above Update but did not work. There were few syntax errors.

Based on above statement, I did build below update but it's updating only few rows in cscart_common_descriptions. Could you please correct below update statement ?

UPDATE cscart_common_descriptions ccd INNER JOIN cscart_images_links cil

ON ccd.object_id=cil.detailed_id

INNER JOIN cscart_product_descriptions cpd

ON cil.object_id = cpd.product_id

SET ccd.description=cpd.Product

WHERE cil.object_type= 'product'

AND ccd.object_holder = 'images'

Once again, buch of thanks to evevry one.

After little resarch I found that no rows exists on cscart_common_descriptions for cscart_images_links if an product have more than one image…Example: Thumbnail & Popup larger image exists. This could happen when I migration from magento to cs-cart.

Any one experienced similar problem?

Kindly help on inserting missing rows in cscart_common_descriptions.

Also, Is there any tool aviable to check data consistancy in accross all cs-cart ?

Bunch of thanks on reading my post!!


Why don't you alter the images.tpl in your skin and make alt description automatically added from product description on the fly?

I did that and also added title to it the same way and it works fine with google and my sites!