cancel
Showing results for 
Search instead for 
Did you mean: 

Difference Between setCustomAttribute And addData In EVA Attributes

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Difference Between setCustomAttribute And addData In EVA Attributes

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 .

1 REPLY 1

Re: Difference Between setCustomAttribute And addData In EVA Attributes

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