What is the functionality of additional_attributes from catalog & how it's work?


<complexType name="catalogProductReturnEntity">
                    <element name="additional_attributes" type="typens:associativeArray" minOccurs="0"/>

 <message name="catalogProductInfoResponse">
        <part name="info" type="typens:catalogProductReturnEntity"/>

Can you please explain briefly if it possible give me a example?


1 Answer 1


The product in magento use the EAV paradigm.
This means you can add attributes to products without altering the table schema.
But this also has a side effect. you cannot know at any given point what are the attributes of a product just by the main table structure.
Since attributes can be added by the admins from the UI, there is no way to know what elements to list in the WSDL in order to return their values through the API.
In order to accommodate this, magento lists in the wsdl only a few system attributes of the product like sku, type, name, description, ... and provides a way to get the rest of the attribute values via additional_attributes that is a list of key-value pairs.

When making the call to catalogProductInfo you must provide as input the message catalogProductInfoRequest that looks like this:

<message name="catalogProductInfoRequest">
    <part name="sessionId" type="xsd:string"/>
    <part name="productId" type="xsd:string"/>
    <part name="storeView" type="xsd:string"/>
    <part name="attributes" type="typens:catalogProductRequestAttributes"/>
    <part name="identifierType" type="xsd:string"/>

Notice the attributes part. It has the type typens:catalogProductRequestAttributes that is defined like this:

       <complexType name="catalogProductRequestAttributes">
                <element name="attributes" type="typens:ArrayOfString" minOccurs="0"/>
                <element name="additional_attributes" type="typens:ArrayOfString" minOccurs="0"/>

what you put in the additional_attributes in this parameter, you will get back with values in the additional_attributes from the response.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.