How to apply scheme 4 of dawn theme to all sections of the store by default

Hello,

I’m using the dawn theme for my shop. I like scheme 4 of the theme as it provides a dark mode look to my page. Nontheless I have to change section by section, and many sections do not allow changing it forcing me to perform all changes via CSS script. Is there any way to set that particular scheme as default so the whole shop can be automatically set to a dark mode style?

Hello @laugonglez ,

Here’s a general guide for you to follow:

  • Go to Online Store → Themes → Actions → Edit code
  • Go to Assets folder → go to theme.js
  • Search for the function or code block that handles the scheme selection or theme initialization. This code is responsible for setting the default scheme.
  • Within that code, look for the section that specifies the default scheme or sets the color scheme for the shop.
  • Modify the code to set the desired scheme as the default. For example, if scheme 4 represents the dark mode look, you might have code similar to this:
// Look for code related to setting the default scheme
var defaultScheme = 'scheme-4'; // Set the desired default scheme here
// Additional code to initialize the theme or handle scheme selection
  • Save and preview

Hope this can help. Let us know if you need any further support.

Ali Reviews team.

1 Like

I’m afraid there is no such file… I’ve been looking for something like that in the code but have been unable to locate it. I’ve also asked in other forums and received similar indications to files that do not exist in the dawn theme code. Is it not the same for everyone? do you have access to the up to date code for this theme and can you provide more specific indications? is dawn a particularly tricky theme to customize? are there any “dark mode” themes I can use that are easier to handle?