It's time to hop into the 2020s and offer a dark mode for my customers, but without losing light mode as not everyone likes dark mode. I'm capable of creating a dark mode copy of the default theme (at the moment I'm using a lightly modified version of the default theme), but from what I can see a theme can only be set on the backend. Is it possible to have more than one theme, and allow customers to choose which theme they use?
Not per default.
But you could add a button in the shop to offer visitors the possibility to change.
But you could add a button in the shop to offer visitors the possibility to change.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Doing this on a website really doesn't sound like hopping in to the 2020s to me

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
That's quite alright with me, but how would it be implemented? Let's keep things simple and assume it's nothing more than a hyperlink, turning it into a toggle is something I can do myself but I don't know where to begin implementing this.
For what it's worth, I'm on OpenCart 2.3.0.2 using a lightly modified default theme, the URLs are
catalogue/view/theme/default/
catalogue/view/theme/dark/
At the moment, I'm making changes and editing in the middle of the night when there's no traffic by just moving the CSS file across and I've pretty much got it nailed.
All the better if the change can be saved via a cookie rather than timing out with the session, but it's really not required. I came up with that as I was typing this message.
To the best of my knowledge, NewEgg is the only online store that currently allows users to swap between dark and light mode. I've seen plenty that use dark mode by default, but none that give the user the ability to chop and change at will.paulfeakins wrote: ↑Fri Jan 27, 2023 8:49 pmDoing this on a website really doesn't sound like hopping in to the 2020s to me![]()
Simply use some css.
Creating a second theme I would say is really not requried.
Read this for example: https://web.dev/patterns/theming/theme-switch/
Or: https://dcodemania.com/post/switch-dark ... javascript
Or: https://www.w3schools.com/howto/howto_j ... k_mode.asp
Creating a second theme I would say is really not requried.
Read this for example: https://web.dev/patterns/theming/theme-switch/
Or: https://dcodemania.com/post/switch-dark ... javascript
Or: https://www.w3schools.com/howto/howto_j ... k_mode.asp
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
This suddenly jumped a bit beyond my capabilities, but thanksOSWorX wrote: ↑Sat Jan 28, 2023 1:24 amSimply use some css.
Creating a second theme I would say is really not requried.
Read this for example: https://web.dev/patterns/theming/theme-switch/
Or: https://dcodemania.com/post/switch-dark ... javascript
Or: https://www.w3schools.com/howto/howto_j ... k_mode.asp

The primary things I need to change are:
body {
background-color: #000;
}
.breadcrumb {
background-color: #000;
border: 1px solid #888;
}
.breadcrumb > li {
text-shadow: none;
}
#menu {
border: 0px solid #000;
}
I'm building up the courage to try

Who is online
Users browsing this forum: No registered users and 11 guests