Theme Switcher (OpenCart Addon)

Theme Switcher (OpenCart Addon)
Product Code: theme_switcher
Availability: In Stock
Price: $0.00

What does it do:
This contrib adds a new sidebox module for template switching. Great for showcasing multiple templates

Main features:
  * Completely self-contained using the OpenCart module system making it virtually transparent to upgrades (no core files are overwritten)

How to install it:
1) Unzip and upload the contents to the root directory of your OpenCart installation, preserving directory structure
-- No files are overwritten
2) From the admin menu, go to 'Admin->Users->User Groups'. Edit Top Administrator.
3) Find and check the entries for any unchecked files in both modify and access. save.
4) From the admin menu, go to 'Extensions->Module'.
5) Install the module, and click edit to configure.

6) a. EDIT: system/engine/controller.php
   b. FIND:
$file = DIR_TEMPLATE . $filename;

   c. BEFORE, ADD:
// Q: Theme Switcher
        if (isset($this->request->get['theme']) && $this->request->get['theme'] || isset($this->session->data['theme'])) {
            $directories = glob(DIR_APPLICATION . 'view/theme/*', GLOB_ONLYDIR);
            $this->session->data['theme'] = (isset($this->request->get['theme']) && $this->request->get['theme']) ? $this->request->get['theme'] : $this->session->data['theme'];
            foreach ($directories as $directory) {
                if ($this->session->data['theme'] == basename($directory)) {
                    $tmp = explode('/', $filename);
                    $tmp[0] = $this->session->data['theme'];
                    $filename2 = implode('/', $tmp);
                    $file2 = DIR_TEMPLATE . $filename2;
                    if (file_exists($file2)) {
                        $filename = $filename2;

Write a review

Your Name:

Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:

Powered By OpenCart © 2021