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

other skin dir depending on user

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-09-2006, 03:29 AM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default other skin dir depending on user

Is it possible to change the skindir location on the fly depending on the type of user.


Like: if user = eq "something"

In smarty.php this is in.

$smarty->template_dir = $xcart_dir."/skin1";
$smarty->compile_dir = $var_dirs["templates_c"];
$smarty->config_dir = $xcart_dir."/skin1";
$smarty->cache_dir = $var_dirs["cache"];
$smarty->secure_dir = $xcart_dir."/skin1";
$smarty->debug_tpl = "file:debug_templates.tpl";
$smarty->assign("ImagesDir",$xcart_web_dir."/skin1/images");
$smarty->assign("SkinDir",$xcart_web_dir."/skin1");


Thnx
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote
  #2  
Old 09-11-2006, 03:04 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: other skin dir depending on user

What are you trying to achieve, just showing a different skin for each usertype?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 09-11-2006, 03:08 AM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default Re: other skin dir depending on user

Yes thats what i want.

Better if it would work with different membership levels.....

thnx
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote
  #4  
Old 09-11-2006, 03:12 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: other skin dir depending on user

Then just use an {if} statement in customer/home.tpl on the line that controls which skin is displayed. No need to change the whole skin directory:

{if $usertype eq "C"}
<LINK rel="stylesheet" href="{$SkinDir}/skin1.css">
{else}
<LINK rel="stylesheet" href="{$SkinDir}/skin2.css">
{/if}

Check the sticky thread on {if} statements for membership level statements.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
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 06:05 AM.

   

 
X-Cart forums © 2001-2020