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
    Commented Mar 12, 2020 at 6:02
  • how to Insert sku in product title programmatically any idea
    – DK Thakur
    Commented Mar 12, 2020 at 8:07

1 Answer 1

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
    Commented Mar 12, 2020 at 6:11
  • one more question how to Insert sku in product title programmatically any idea
    – DK Thakur
    Commented Mar 12, 2020 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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