When setting the product to use the default value, setting the value to false would do it.
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $product = Mage::getModel('catalog/product') ->load($product_id) ->setStoreId($store_id) ->setData($attr, false) ->save(); However, it appears that in category, this doesn't work? What am I missing?
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $category = Mage::getModel('catalog/category') ->load($category_id) ->setStoreId($store_id) ->setData($attr, false) ->save(); This doesn't work either:
Mage::app()->setCurrentStore(SOME_STORE_ID); $category = Mage::getModel('catalog/category')->load($category_id); $category->setAttr(false); $category->save();
$category->isLockedAttribute($attr)