0

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 
2
  • why are you insert SKU in the product title? you can upend SKU last of product title using a plugin – Devidas Mar 12 '20 at 6:02
  • how to Insert sku in product title programmatically any idea – DK Thakur Mar 12 '20 at 8:07
1

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
2
  • yup its working thankyou so much – DK Thakur Mar 12 '20 at 6:11
  • one more question how to Insert sku in product title programmatically any idea – DK Thakur Mar 12 '20 at 8:06

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.