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)
-   -   other skin dir depending on user (https://forum.x-cart.com/showthread.php?t=24776)

weckie 09-09-2006 03:29 AM

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

balinor 09-11-2006 03:04 AM

Re: other skin dir depending on user
 
What are you trying to achieve, just showing a different skin for each usertype?

weckie 09-11-2006 03:08 AM

Re: other skin dir depending on user
 
Yes thats what i want.

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

thnx

balinor 09-11-2006 03:12 AM

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.


All times are GMT -8. The time now is 08:40 PM.

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