Hi Guys , I hope all of you are doing well,
I have confusion on following two methods .
1: setCustomAttribute
2: addData
Which one should be used while saving product data .
Can anyone guide me with specific reason .
Custom attributes are those added on behalf of a merchant. For example, a merchant might need to add attributes to describe products, such as shape or volume. A merchant can add these attributes in the Admin panel and addData to eav attribute is deprecated now.
To understand more about Custom attribute see below guide.
https://devdocs.magento.com/guides/v2.4/extension-dev-guide/attributes.html
@shraddhash9dd4 wrote:Custom attributes are those added on behalf of a merchant. For example, a merchant might need to add attributes to describe products, such as shape or volume. A merchant can add these attributes in the Admin panel and addData to eav attribute is deprecated now.
To understand more about Custom attribute see below guide.
https://devdocs.magento.com/guides/v2.4/extension-dev-guide/attributes.html
Hello,
Thanks for the information, I will try to figure it out for more. Keep sharing such informative post.
Last week, we took a look into Magento tutorial 18 – how to override core files in Magento and learned overriding principle in Magento as well as overriding model class, helper class and resource model in Magento.