Magento 2 How to Insert sku in product title
-
12-04-2021 - |
سؤال
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
المحلول
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
لا تنتمي إلى magento.stackexchange