JSON Api to get variants
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!
-
- Advanced
- Posts: 114
- Joined: 08 Nov 2019, 11:56
JSON Api to get variants
Hello,
We are using aimoes JSON API into a mobile application. Now we are working on variants into products.
For that, I have created a product with a selection type and also added two different variants based on the color attributes. And I have checked API for the product list too, It returns the product which has type selection.
Now, How do I get all variants of that product? How do I detect that color attr has only variant products and other attributes don't have products?
Thanks & regards
Tejas
We are using aimoes JSON API into a mobile application. Now we are working on variants into products.
For that, I have created a product with a selection type and also added two different variants based on the color attributes. And I have checked API for the product list too, It returns the product which has type selection.
Now, How do I get all variants of that product? How do I detect that color attr has only variant products and other attributes don't have products?
Thanks & regards
Tejas
Re: JSON Api to get variants
Use "&include=product,attribute". That will return selection products with relationships to products and their attributes.
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
Re: JSON Api to get variants
I now get the variants included. However, without the respective price. Can I get the price directly or do I have to send extra Ajax requests?
Re: JSON Api to get variants
Use ""&include=product,attribute,price" to retrieve the product prices too:
https://aimeos.org/docs/latest/frontend ... -resources
https://aimeos.org/docs/latest/frontend ... -resources
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