1

This can be done easily in magento1 with the saveAttribute() -method of Mage_Eav_Model_Entity_Abstract . For example, if you only need to save the is_active -flag for a category, you can do:

$data = new Varien_Object();
$data->setEntityId($categoryId);
$data->setIsActive(1);

Mage::getSingleton('catalog/category')
    ->getResource()
    ->saveAttribute($data, 'is_active');

How can i do it in magento2 without using CategoryRepositoryInterface, only update one attribute?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.