0

i want to get the description of all products in the magento store for all stores. After that i want to change something in the description and update that description in the database. Is this possible? how does the SQL query looks like?

0

You can use this SQL to select all product descriptions from database:

SELECT 
    *
FROM
    catalog_product_entity_text
WHERE
    attribute_id IN (SELECT 
            attribute_id
        FROM
            eav_attribute
        WHERE
            attribute_code LIKE 'description'
                AND entity_type_id IN (SELECT 
                    entity_type_id
                FROM
                    eav_entity_type
                WHERE
                    entity_type_code LIKE 'catalog_product'))

Since all product descriptions is saved in catalog_product_entity_text table, you can modify above sql to change the description the way you want. If you need to modify using information from other table, e.g. add product name to description, I think you would better go with a php script.

1
  • i do everything with PHP. That query seems to work. Thank you
    – Ifaruki
    Mar 18 '20 at 9:47
0

Your SQl Query Look Like

UPDATE `catalog_product_entity_text` SET `value` = 'Change text' WHERE `catalog_product_entity_text`.`value_id` = 25;

Table structure

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.