cancel
Showing results for 
Search instead for 
Did you mean: 

Custom field on eav_attribute

Custom field on eav_attribute

Hi,

 

I've created a field in eav_attribute table (lets call it custom_field) and now I want this field to be part of the result when consuming the rest/V1/products/attributes.

 

I've try similar solutions, witouht success.

Anyone got the solution for this?

 

3 REPLIES 3

Re: Custom field on eav_attribute

Hi @itreimanpt18a5 

In your case, you need to create extension attribute to get value of custom field with rest api.
Kindly refer below link :
https://www.mageplaza.com/devdocs/how-get-value-custom-attribute-rest-api-magento-2.html

It may help you.
Problem Solved? Click on Kudos & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: Custom field on eav_attribute

Hi @Bhanu Periwal 

 

My issue is at the OrderLoadAfter.php file. The example uses:

 - $order = $observer->getOrder();

 - \Magento\Sales\Api\Data\OrderExtension

 

How can I make it work with the rest/V1/products/attributes?

Re: Custom field on eav_attribute

@Bhanu Periwal any thoughts?