For example the product type is a dropdown but only allows the user to select from products already defined in the store. The difference is that these settings offer specialized and pre-selected info for the user to choose from. Specialized settings are defined the same way as regular settings. This will take an array of objects with a value and label each. Radio and Select typesīecause radio and select types have multiple values to choose from, the settings definition will also require an options attribute. jpg file, and the id is 'logo.png', the image will now be saved as a. The file will be saved with the name and format that is defined in the id. It is noteworthy that images uploaded this way will be saved in the themes Assets folder. The value of each is set in the type attribute ValueĪllows the user to input a single line text fieldĪllows the user to select from radio buttonsĪllows the user to select from a drop-downĪllows the user to check a box return a true or false value The following table describes regular input types allowed. To provide additional info about the option to the end user. To define a default value for the option. It is how the settings are references in the theme.ĭescribes to the user what the option is for. This allows you to group customizations into logical sections making it easier for the end user to find all the options.Įach regular setting has 5 attributes : type, id, label, default, info Typeĭefines the type of input the option takes In the case below, the sidebar will have two labels "Colors" and "Logo". When you click on that, the options will slide in and you can choose from a color picker a new color for either "Border Colors" or "Body Text". In the case above, on the sidebar for the customization settings you'll see a label "Colors". "info" : "this will be the colors for borders" So your file will start something like this:Įach option is then an object inside the settings array. Each group will have a name and then a group of settings defined in an array. Within that, you can group related options together. In the settings_schema.json file, all the data is encolsed by. Here there should be a right hand side panel showing you the customization options. You can see the options from the admin panel when you select online store > themes and click customize theme button on the top right hand side. Found in the config folder of your Shopify theme, this file allows you to use json objects to define options for the end user to pick from. Shopify offers a simple yet extensive way to do this with the settings_schema.json file. When creating a theme to sell, or even just one for a client, it's nice to be able to give the end user the ability to customize the store a little. Making a Theme Customizable with Settings
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |