Global Configurations
Get the latest developer guides on Fynd Partners Help
In order to make it easier for merchants to customize themes, you can use JSON to create settings that are accessible through the Fynd platform theme editor.
Config files are related to theme settings. There are two config files
- settings_data.json - This file hosts the saved values of the settings from
settings_schema.json
. - settings_schema.json- This file contains all the theme-level global settings.
settings_data.json
The settings_data.json
file contains the setting values for a theme. For example, you can use the following theme setting to provide the option to the merchant so that he can disable the cart anytime from the theme editor section.
config/settings_data.json
{
"props": [
{
"type": "checkbox",
"id": "disable_cart",
"default": false,
"category": "Cart",
"label": "Disable Cart"
}
]
}
This adds an entry for disable_cart
in settings_data.json
.....
"custom": {
"props": {
"disable_cart": false
}
}
.....
Anytime you change the value of disable_cart
in the theme editor, settings_data.json
is updated with the new value.
Basic Format:
The settings_data.json
file has four parent objects:
list :
It contains current values of all page level settings and theme level settings.current :
Contains current active settings namepreset:
Contains all the presets of the theme by their page name so that whenever someone creates a new theme all theme pages have some default pre-configured sections inside of them.information:
General Information about the theme-like features and once you publish your theme on the theme store it can be helpful to highlight your theme features.
Access this configurations inside theme:
This configuration will be passed as props as page_config
and global_config
you can use these details inside your theme