How to Include Property Labels in Product Property Attributes Using 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!
- Paulus-Ragnarr
- Posts: 16
- Joined: 15 Oct 2024, 07:02
How to Include Property Labels in Product Property Attributes Using JSON:API?
Hi Aimeos,
I’m working on a JS frontend and focusing on product details, particularly product properties. Is there a way to include the property label within the product property attributes using the JSON:API include?
The reason is that formatting product.property.type directly in the frontend has been challenging. Including the property label would make the process much more straightforward.
Thanks in advance!
I’m working on a JS frontend and focusing on product details, particularly product properties. Is there a way to include the property label within the product property attributes using the JSON:API include?
The reason is that formatting product.property.type directly in the frontend has been challenging. Including the property label would make the process much more straightforward.
Thanks in advance!
- Attachments
-
- Screenshot 2024-11-25 at 1.58.53 PM.png (90.76 KiB) Viewed 14582 times
-
- Screenshot 2024-11-25 at 12.09.40 PM.png (69.18 KiB) Viewed 14582 times
Re: How to Include Property Labels in Product Property Attributes Using JSON:API?
You need Aimeos 2024.10.x and use "include=product.property,product.property.type". Then, the "included" section contains a type item related to the property item.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- PaoloLegaspi
- Posts: 21
- Joined: 07 Nov 2024, 15:02
Re: How to Include Property Labels in Product Property Attributes Using JSON:API?
Hello thanks for the reply.
I’ve updated from version 2024.07.x to 2024.10.x as you suggested and included the query "product,product/property,product/property/type". However, the response still doesn’t include the property label or the product property type.
Are there any additional configurations I need to set up to get these values?
Thanks!
I’ve updated from version 2024.07.x to 2024.10.x as you suggested and included the query "product,product/property,product/property/type". However, the response still doesn’t include the property label or the product property type.
Are there any additional configurations I need to set up to get these values?
Thanks!
Re: How to Include Property Labels in Product Property Attributes Using JSON:API?
Can you please update the JSON:API package to get the required bugfix by executing:
Then, use "include=product.property,product.property.type" to get the product properties and their types.
Code: Select all
composer req aimeos/ai-client-jsonapi:2024.10.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star