A small bar for demo sites. A visitor opens it, picks any installed theme, and sees the site in that theme for the visit.
- Shopclass 7.0.0 or later
- PHP 8.0 or later
- A demo site (
OSC_DEMO=1)
This plugin is not in the catalogue. It is for demo sites only.
- Download the zip from the GitHub release.
- Open Plugins → Add new plugin and upload it.
- Activate.
Start the site with OSC_DEMO=1. Nothing else is needed. On a site that is not a demo, the bar never shows.
- The bar lists the installed themes and marks the current one. Main theme goes back to the theme set in the admin.
- Each link adds
?theme=<slug>to the page you are on and keeps the rest of the address. Shopclass does the switch and remembers it for the visit. - The plugin sets no cookies and saves no settings.
- It adds nothing to the admin, the API or AJAX requests.
- The bar shows only when two or more themes are installed.
- A visitor who picks a theme gets pages that are not shared-cached.
- Works on shared hosting.
Run the tests with ./tests/run.sh. They need no network. Core is read from ../shopclass, or from SHOPCLASS_CORE.
https://github.com/mindstellar/shopclass-plugin-theme-picker/issues
GPL-3.0-or-later