How to read System Config Values? #60
Replies: 3 comments
-
I think it's unortunately not that easy... In the short term, you have two options in my opinion:
@patzick @elkmod I think this topic needs some clarification in the documentation, maybe with examples how to query through the admin api and what to watch out for when doing this. |
Beta Was this translation helpful? Give feedback.
-
That makes sense and is also kinda what I expected... The plugin-endpoint approach is something we have already used for some React-based plugins for the regular storefront and there we also stumbled on the exposed credentials issue, so we implemented a whitelist in the plugin. Admin API via server side seems a good idea for a full Frontends project so we don't always have to update a plugin matching the current Frontends deployment when things change. But yes, I agree that a few lines of info in the documentation would be a good idea ;) |
Beta Was this translation helpful? Give feedback.
-
Like you can read Snippets (via Middelware and new API Client) you can also read Plugin Configurations (Admin Request system-config) now. Look at the snippets example and adjust it to your needs or tell me if we need more detailed Docs about that. |
Beta Was this translation helpful? Give feedback.
-
Maybe I'm blind, but I can't seem to find anything in the frontends documentation about how to read system config values.
I have also not found anything in the store API documentation itself...
Is this really not supported? Or is the documentation simply not done yet?
I mean, I guess one could hardcode everything into the frontend implementation but it would be way nicer if a frontend could be built to adapt itself based on the system config values, as it would allow admins to make simple changes easily without needing a developer every time, just as they are used to with the existing storefront.
If this is really not supported at the moment will that change in the future?
Beta Was this translation helpful? Give feedback.
All reactions