Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Simple Theme Switching

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-15-2012, 08:59 AM
  rubyaryat's Avatar 
rubyaryat rubyaryat is offline
 

eXpert
  
Join Date: Feb 2003
Location: Canada
Posts: 289
 

Default 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
__________________
Rubymods.com - Your X-Cart services partner for over 9 years.
Modules offered: FedEx labels, Live currency rates, GeoIP, Order Audit, Multiple e-goods.
X-Cart Store Hosting, project management and affiliates program available.
4.2.3 gold [Unix]
Reply With Quote

The following user thanks rubyaryat for this useful post:
ADDISON (09-15-2012)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:25 AM.

   

 
X-Cart forums © 2001-2020