I want to delete custom options value of a product programatically without deleting the option.

How to do that?


This is the way for do this:

This code will delete all options values but not the options.

$product= Mage::getModel('catalog/product')->load(PRODUCT_ID);

foreach ($product->getOptions() as $_option) {
        $values = $_option->getValues();
        foreach ($values as $v) {

                echo $v->getTitle();

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