Pergunta

run this sql query but nothing happened::

 UPDATE `catalog_product_entity_text` as pt LEFT JOIN `catalog_product_entity` as p ON p.`entity_id` = pt.`entity_id` SET pt.`value` = CONCAT(pt.`value`,' (',p.`sku`,')') WHERE pt.`attribute_id` = 75 
Foi útil?

Solução

You are using wrong table join in your query. The name details for products are stored in catalog_product_entity_varchar table. First, make sure you have the correct attribute_id (75) value for name attribute.

Use below query to achieve your requirements.

UPDATE `catalog_product_entity_varchar` as pt LEFT JOIN `catalog_product_entity` as p ON p.`entity_id` = pt.`entity_id` SET pt.`value` = CONCAT(pt.`value`,' (',p.`sku`,')') WHERE pt.`attribute_id` = 75
Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top