cancel
Showing results for 
Search instead for 
Did you mean: 

Manufacturer Code

SOLVED

Manufacturer Code

Ciao a tutti,

 

Sto cercando di memorizzare tramite API Rest il valore dell'attributo gl_manufacturer_code per poi poterlo visualizzare nel backend.

Come faccio ad ottenere l'ID relativo al manufacturer code scelto da memorizzare per quell'attributo?

 

Grazie

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Manufacturer Code

I've solved extracting value with the call

 

products/attributes/151/options

 

 

 

View solution in original post

3 REPLIES 3

Re: Manufacturer Code

If your attribute has value, Based on that Label value you can get the id from attribute.

For getting Attribute id you need to required attribute code and attribute label.

Based on the above variable,

Get attribute option id from option label.

 

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Manufacturer Code

Thank you for answer.

I use GuzzleHttp client to manage products atrributes.

My problem is that I have to insert a value for manufacturer code and first of all I have to check if this code is present and extract its ID.

If this is not present, I have to create a new record, read created ID and insert it in gl_manufacturer_code JSON attribute

 

Re: Manufacturer Code

I've solved extracting value with the call

 

products/attributes/151/options