New answers tagged

0

$category_Id = 6; $description="Test1/4"" Test"; $description=html_entity_decode($description) $category = $this->categoryFactory->create()->setStoreId(0)->load($category_Id); $category->setDescription($description); $category->save();


0

try{ $category = $this->categoryRepository->get($categoryId, $storeId); $category->setDescription("Test1/4"" Test° "); $this->categoryRepository->save($category); } catch(\Exception $e){ print_r($e->getMessage()); }


0

/** * @var \Magento\Catalog\Model\CategoryRepository; */ protected $categoryRepository; //eventually replace with interface if you want to ... $category = $this->categoryRepository->get($categoryId, $storeId); $category->setDescription("Test1/4"" Test° "); $this->categoryRepository->save($category); Surrounding with ...


0

Product Attribute You can get product attribute with below code - $product = $this->getProduct(); $ressource = $product->getResource(); $store = $this->_storeManager->getStore(); $ressource->getAttributeRawValue($product->getId(),'attribute_code',$store->getId()); Product Availability public function __construct( \Magento\...


Top 50 recent answers are included