I have custom attribute in form of drop down and multiselect.But during product save these are not saving in database like i have a warranty dropdown attribute.
$product->setwarranty($wholedata['product']['warranty']); // Product Warranty
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Try this way:
$product = $this->productRepository->getById($productId); $product->setData($attributeCode, $attributeValue); $this->productRepository->save($product);