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)
-   -   Heres A Tough One For You (https://forum.x-cart.com/showthread.php?t=1462)

John7 02-10-2003 01:10 PM

Heres A Tough One For You
 
I to be able to switch the template when I switch to a different section.

Example: For the Category Night Life I want a darker night time feel. But for the Wedding Category I want a brighter look and feel to the page.


If someone could assist on this concept it would be greatly appreaciated.

Thanks,

John 7

brian 02-10-2003 06:25 PM

Just an idea, but you could store CSS (either a pointer or the actual CSS code) in the category database (or a separate cross referenced database). This could either replace the existing tags, or you could have specific tags for the category page.

In reality it shouldn't be ~that~ difficult to do.

Brian

B00MER 02-10-2003 06:28 PM

I have a particular mod that I've labeled skin_swap if you want to search the forums for this it may help you in doing what you want, however it requires alot of modification backend wise to the cart in order for this functionality to exist.

:wink:

kkboris 02-10-2003 06:41 PM

Good question, I have a similar problem.
 
My problem is that I have two templates : home and (non-home)
The first is the homepage, the other is everything else.
So when a user comes to the homepage, there is one look
and every other page has a different look.

In the customer file home.tpl calls head.tpl and then calls home_main.tpl .

Basically I need a solution that has two X-Cart templates/setups.

B00MER 02-10-2003 07:30 PM

:arrow: http://forum.x-cart.com/viewtopic.php?t=165&highlight=modskinswap

John7 02-12-2003 10:59 PM

Hmmm perhaps this...
 
I was thinking perhaps somehow I could setup two different home.tpl files and somehow have it switch between the different files. This would in effect allow me to change the look of the page.

Does anyone have any idea on how to make this happen?


Thanks

John7

John7 02-13-2003 01:34 PM

I have an idea!
 
What if I install a second copy of xcart to a different directory but have it use the same database as the first copy.

And then in each copy have it use a different home.tpl

I think this would do what I want.

What do you think? Is this feasable?

John7 8)

funkydunk 02-13-2003 11:43 PM

I think the easiest way would be to amend home.tpl from:

Code:

{* $Id: home.tpl,v 1.39 2002/09/11 11:25:00 zorg Exp $ *}
{ config_load file="$skin_config" }
<html>
<head>

<title>{$lng.txt_site_title}
{if $main eq "catalog"}
{$lng.txt_subtitle_home}
{elseif $main eq "help"}
{$lng.txt_subtitle_help}
{elseif $main eq "cart"}
{$lng.txt_subtitle_cart}
{elseif $main eq "checkout"}
{$lng.txt_subtitle_checkout}
{elseif $main eq "order_message"}
{$lng.txt_subtitle_thankyou}
{/if}
</title>
{ include file="meta.tpl" }
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">
</head>
<body class="background">
{ include file="rectangle_top.tpl" }
{ include file="head.tpl" }

<table border=0 width=100% cellpadding=0 cellspacing=0 align="center">
<tr>
<td class=TableLeft width=150 valign=top>
{ include file="customer/categories.tpl" }
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu eq "Y"}
{ include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{if $active_modules.Gift_Certificates ne ""}


{ include file="modules/Gift_Certificates/gc_menu.tpl" }
{/if}


{ include file="help.tpl" }
</td>
<td width=20></td>
<td valign=top>

{include file="customer/home_main.tpl"}


</td>
<td width=20></td>
<td width=148 valign=top class=TableLeft>
{ include file="customer/menu_cart.tpl" }
{if $login eq "" }
{ include file="auth.tpl" }
{else}
{ include file="authbox.tpl" }
{/if}
{ include file="news.tpl" }


{ include file="poweredby.tpl" }
</td>
</tr>
<tr>
<td class=TableLeft></td>
<td></td>
<td>{ include file="copyright.tpl" }</td>
<td></td>
<td></td>
</tr>
</table>
{ include file="rectangle_bottom.tpl" }
</body>
</html>


to:

Code:

{* $Id: home.tpl,v 1.39 2002/09/11 11:25:00 zorg Exp $ *}
{ config_load file="$skin_config" }
<html>
<head>

<title>{$lng.txt_site_title}
{if $main eq "catalog"}
{$lng.txt_subtitle_home}
{elseif $main eq "help"}
{$lng.txt_subtitle_help}
{elseif $main eq "cart"}
{$lng.txt_subtitle_cart}
{elseif $main eq "checkout"}
{$lng.txt_subtitle_checkout}
{elseif $main eq "order_message"}
{$lng.txt_subtitle_thankyou}
{/if}
</title>
{ include file="meta.tpl" }

{if $cat eq ""}
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">
{elseif $cat eq "put cat number for Nightlife in here"}
<link rel="stylesheet" href="{$SkinDir}/skin2.css">
{elseif $cat eq "put cat number for wedding in here"}
<link rel="stylesheet" href="{$SkinDir}/skin3.css">
{/if}

</head>
<body class="background">
{ include file="rectangle_top.tpl" }
{ include file="head.tpl" }

<table border=0 width=100% cellpadding=0 cellspacing=0 align="center">
<tr>
<td class=TableLeft width=150 valign=top>
{ include file="customer/categories.tpl" }
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu eq "Y"}
{ include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{if $active_modules.Gift_Certificates ne ""}


{ include file="modules/Gift_Certificates/gc_menu.tpl" }
{/if}


{ include file="help.tpl" }
</td>
<td width=20></td>
<td valign=top>

{include file="customer/home_main.tpl"}


</td>
<td width=20></td>
<td width=148 valign=top class=TableLeft>
{ include file="customer/menu_cart.tpl" }
{if $login eq "" }
{ include file="auth.tpl" }
{else}
{ include file="authbox.tpl" }
{/if}
{ include file="news.tpl" }


{ include file="poweredby.tpl" }
</td>
</tr>
<tr>
<td class=TableLeft></td>
<td></td>
<td>{ include file="copyright.tpl" }</td>
<td></td>
<td></td>
</tr>
</table>
{ include file="rectangle_bottom.tpl" }
</body>
</html>


You will need to create two other versions of the skin1.css file and insert the category ids of the two categories that you wanted.


All times are GMT -8. The time now is 12:00 PM.

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