X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Simple Theme Switching (https://forum.x-cart.com/showthread.php?t=64859)

rubyaryat 09-15-2012 08:59 AM

Simple Theme Switching
 
This may have been posted already, but to implement a simple theme switching, so that you might show a client a new theme on a store, add the following to init.php (around line 550):


PHP Code:

include_once($xcart_dir '/include/data_cache.php');

//Rubymods
//home.php?alt_skin=20_3-columns
if ($_GET['alt_skin'])
  
$config['alt_skin'] = $_GET['alt_skin'];

/**
 * Initialize alt_skin feature
 */
list($altSkinsInfo$alt_skin_info$alt_skin_dir) = func_get_alt_skin(); 


This will allow you to switch themes by specifying an 'alt_skin' GET parameter in your URL and giving it the value of the theme (get the theme values from your admin at: admin/configuration.php?option=Appearance if you look at the select values for themes).

e.g. home.php?alt_skin=20_3-columns

Hope this helps someone.
Rubyaryat


All times are GMT -8. The time now is 11:22 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.