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?

2
  • What are the parts that you want to remove? Is it something that you have to do manually?
    – Zach L
    Mar 29, 2016 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, 2016 at 15:23

2 Answers 2

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
}
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.

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.