According to the API Docs, one can specify an array of attributes as a parameter when retrieving a product. What is the purpose in that?
Magento – Magento SOAP v2 attributes parameter for product
apimagento-1.9soapsoap-api-v2
apimagento-1.9soapsoap-api-v2
According to the API Docs, one can specify an array of attributes as a parameter when retrieving a product. What is the purpose in that?
Best Answer
The parameter
attributes
(it's a Array ofcatalogProductRequestAttributes
) It is used to define which attributes about a product to retrieve in request response.Note that the additional attributes will be returned in through the associative array named
additional_attributes
incatalogProductReturnEntity
.Example to retrive just product title, description, short description and price attributes.
Doing an analogy with Magento Collections, this has an effect similar to
addAttributeToSelect()
method.