I need to remove all custom option from all magento products. I have about 4k products. and all has custom option. now we don't need custom option. so we need to need to remove all. Is the any simple solution as if I can remove all custom option easily
thanks
Preferably don't directly execute a database query, but use magento models:
<?php
require_once 'app/Mage.php';
Mage::init();
Mage::getModel('catalog/product_option')->getCollection()->walk('delete');
This -will- use multiple queries to delete your product options, but it should not be a big issue for 4000 products.
If you need to remove all custom options from all products at once, then you can execute the following SQL query in your database:
delete from catalog_product_option
But be sure to backup your database first. Did you mean something like that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With