Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Missing #13

Open
DanielWikman opened this issue Mar 29, 2019 · 3 comments
Open

Documentation Missing #13

DanielWikman opened this issue Mar 29, 2019 · 3 comments

Comments

@DanielWikman
Copy link

There is no documentation online based on what I can find on how to use
"SimpleSelect by URL". Neither is there on YouTube.

I have tried all rest calls that the pim uses for a "regular" attribute,
and a number of others without success.

What url should I point to, to get it working with an existing SimpleSelect attribute?

@karelVanGeerdeghom
Copy link

You should create your own custom api call. If I recall correctly you should return a JsonResponse with

{
    "options": {
        "key": "value",
        ...
    }
}

Then in your controller you just load the attribute and it's options you want.

@DanielWikman
Copy link
Author

What about using an existing simpleselect, those already has an API, controller etc, right?

That is the example I would like to see, rather than re-inventing the wheel.

@karelVanGeerdeghom
Copy link

Depends entirely on what the key/values are that you want to return. In my use-case I needed to return custom reference data entities.
Though I did end up just putting event listeners on my entities and simple updating/creating the flagbit simple select options directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants