JSONADM API Relationship
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!
JSONADM API Relationship
Hi, I can't figure out how to manage the relationships using JSONADM API.
For example, if I want to add a text to an existing catalog item, how can I achieve that?
I am able to add the text but I can't understand how to relate them to the catalog item.
Thank you.
For example, if I want to add a text to an existing catalog item, how can I achieve that?
I am able to add the text but I can't understand how to relate them to the catalog item.
Thank you.
Re: JSONADM API Relationship
We use the Jsonadm API mainly for fetching data and updating things like stocks. Managing relations between domains isn't implemented yet but we are also interested in adding this to the API. If you can create a PR, we will help you to get this done and merge it for sure
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: JSONADM API Relationship
The ai-client-jsonapi package contains an example how to manage releationships and properties:
https://github.com/aimeos/ai-client-jso ... i/Customer
https://github.com/aimeos/ai-client-jso ... i/Customer
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: JSONADM API Relationship
Ok, I studied the code and I saw that the saveRelationships method was already implemented, but the parameter "type" was missing in the $listItem array.
At the moment I solved the problem adding in my extension this line in this file at line 457: https://github.com/aimeos/ai-admin-json ... m/Base.php
I know that isn't a definitive solution but I'm very new to Aimeos, I hope that in the next future I'm able to fix this in a definitive manner.
At the moment I solved the problem adding in my extension this line in this file at line 457: https://github.com/aimeos/ai-admin-json ... m/Base.php
Code: Select all
$listItem->setType( "default" );
Re: JSONADM API Relationship
That should do the job
Can you please create a pull request for your change?
Can you please create a pull request for your change?
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: JSONADM API Relationship
Ok I opened a pull request.
https://github.com/aimeos/ai-admin-jsonadm/pull/4
https://github.com/aimeos/ai-admin-jsonadm/pull/4
Re: JSONADM API Relationship
We've modified you PR a bit because you should still be able to pass the list type in a POST or PATCH request.
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