Attribute typename not visible in JSON API
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Attribute typename not visible in JSON API
Hello,
I'm trying to return typename (name of the attribute type) when selecting product or attribute:
or
I get only type code and not type name:
Is this even possible? In the documentation, there is always typename included:
https://aimeos.org/docs/2023.x/frontend ... h-products
Thank you!
I'm trying to return typename (name of the attribute type) when selecting product or attribute:
Code: Select all
/jsonapi/product?id=19557&include=attribute/type
Code: Select all
/jsonapi/attribute?id=3294&include=type
Code: Select all
"attributes": {
"attribute.id": "3294",
"attribute.domain": "product",
"attribute.type": "MKT_Material",
"attribute.code": "MKT10899",
"attribute.label": "Aluminij",
"attribute.status": 1,
"attribute.position": 0
}
https://aimeos.org/docs/2023.x/frontend ... h-products
Code: Select all
...
, {
"id": "25",
"type": "attribute",
"attributes": {
"attribute.id": "25",
"attribute.domain": "product",
"attribute.code": "demo-black",
"attribute.status": 1,
"attribute.type": "color",
"attribute.typename": "Color",
"attribute.position": 1,
"attribute.label": "Demo: Black"
}
},
....
Re: Attribute typename not visible in JSON API
There's no "typename" property available. The documentation is wrong and we've fixed it now.
Up to 2023.10, the type items were not relevant because the type items didn't contain the translations and it was necessary to translate the attribute type code in the client code. Since 2024.x the type items can contain translations to different languages and now, the type items become relevant.
We will add the possibility to fetch the attribute type items in the upcoming 2024.10 (ETA in 6 weeks) to by using "include=attribute.type".
Up to 2023.10, the type items were not relevant because the type items didn't contain the translations and it was necessary to translate the attribute type code in the client code. Since 2024.x the type items can contain translations to different languages and now, the type items become relevant.
We will add the possibility to fetch the attribute type items in the upcoming 2024.10 (ETA in 6 weeks) to by using "include=attribute.type".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Attribute typename not visible in JSON API
Thank you very much for fast response and the implementation. Looking forward to use this feature.
Re: Attribute typename not visible in JSON API
The necessary changes have been added now and you will be able to fetch the attribute type items using "include=attribute.type" starting in version 2024.10
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
