1

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

0

1 Answer 1

0

Try this way:

$product = $this->productRepository->getById($productId);
$product->setData($attributeCode, $attributeValue);
$this->productRepository->save($product);

Reference:

https://magento.stackexchange.com/a/229280/75828

Not the answer you're looking for? Browse other questions tagged or ask your own question.