$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$category = $objectManager->create('Magento\Catalog\Model\Category')->load($_cat->getId());
$category = $objectManager->create('Magento\Catalog\Model\Category')->load($_cat->getId());
Can you help how we can update category using id ?
ReplyDeleteI am a magento user and here I got great information about magento platform. Now I am working on Magento SMS API to send SMS directly from Magento.
ReplyDelete$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
ReplyDelete$collection = $objectManager->create('Magento\Catalog\Api\CategoryRepositoryInterface');
$store =$objectManager->create('Magento\Store\Model\StoreManagerInterface');
$category = $collection->get($categoryId, $store->getStore()->getId());
return $category->getData();