0

I need to remove certain part of description from ~200 products.
How should i do it?
I cant do it directly from admin panel.
I thought about exporting all of my products to csv file, modify it and then import it back again.
Is there another way to do that? Something that involves PHP or accessing database?

  • What are the parts that you want to remove? Is it something that you have to do manually? – Zach L Mar 29 '16 at 15:17
  • These products have different description, but that one part i need to remove is the same for all of them. I could do it manually, but it would take some time. – nfk23b Mar 29 '16 at 15:23
0

The fastest way is probably to use a database query. If you want to write a script to do it, you could just put a php script in your root and run it from the command line. It would look something like this:

<?php
require_once('app/Mage.php');
Mage::app('default');
$collection = Mage::getModel('catalog/product')
    ->getCollection()
    //->addFieldToFilter('') //Use filters to select a specific group of products
    ->addAttributeToSelect('description');

foreach($collection as $product) {
    $desc = $product->getDescription();
    // Remove parts of your description here
}
| improve this answer | |
0

If it is the very same thing in all 200 descriptions you can use MySQL syntax:

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

If it is different for every product and you want to quickly update it then you can also view all the descriptions in 'catalog_product_entity_text' table.

| improve this answer | |

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.