- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've solved extracting value with the call
products/attributes/151/options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Magento 2 Blogs/Tutorial
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content