settings_data.json

The settings_data.json file contains the setting values for a theme based on the settings included in settings_schema.json.

For example, you can use the following theme setting to allow a merchant to choose a color for the page background:

{
  "name": "Colors",
  "settings": [
    {
      "type": "color",
      "id": "color_page_bg",
      "label": "Page background",
      "default": "#FFFFFF"
    }
  ]
}

This adds an entry for color_page_bg in settings_data.json:

...
"color_page_bg": "#FFFFFF"
...

📘

Tip

In this example, the value of color_page_bg is #FFFFFF due to the default setting attribute.

Anytime you change the value of color_page_bg in the theme editor, settings_data.json is updated with the new value.


Location

The settings_data.json file is located in the config directory of the theme:

└── theme
    ...
    ├── config
    |   └── settings_schema.json
    |   ├── settings_data.json
    |   └── settings_presets.json
    └── locales

Schema

The settings_data.json file has only 1 object:

Object

Description

current

Contains all of the setting values that are currently saved in the theme editor.

For example:

{
  "current": {
    "color_page_bg": "#FFFFFF",
    ...
  }
}

Did this page help you?