0

I have a problem with a large quantity of my products on my catalog list having the same short description. About 11 thousand items, this will take forever to change individually. I did some research and it seems that I can change these through a php script or through MySQL syntax. However, there is no identifying attributes for these specific 11 thousand items to separate them from the other few thousand items. They are however in their own Category. Can I do a database query and select all items in a specific product category and than replace the short description with something like this

(I found this code in a previous post with a similar problem)

UPDATE catalog_product_entity_text SET value = REPLACE(value, 'Will_replace_this_text_to_blank', '')

That being said, could someone lay out some step by steps to help a newbie out.

0

Untested, but you could try something like this:

UPDATE catalog_product_entity_text SET value = 
    REPLACE(value, 'Will_replace_this_text_to_blank', '')
WHERE attribute_id =
    (SELECT attribute_id FROM eav_attribute WHERE attribute_code = "short_description")
    AND EXISTS (SELECT 1 FROM catalog_category_product WHERE catalog_product_entity_text.entity_id = catalog_category_product.product_id AND catalog_category_product.category_id = {CATEGORY ID HERE});
  • Thank you for your help, I'll test and see if this works. :D – Cordell Briggs Jun 14 '17 at 21:34
  • BTW it assumes you want to replace the value in all store views – simonthesorcerer Jun 14 '17 at 21:37
  • yes, that is precisely what I want. Thank you very much simon! I've updated the code to use the correct category names and entered my specified text. Now All i have to do is save the file and drop it into root, and run the MySQL Query? – Cordell Briggs Jun 14 '17 at 21:56

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.