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

Heres A Tough One For You

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-10-2003, 01:10 PM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default 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
Reply With Quote
  #2  
Old 02-10-2003, 06:25 PM
  brian's Avatar 
brian brian is offline
 

Member
  
Join Date: Jan 2003
Posts: 28
 

Default

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
Reply With Quote
  #3  
Old 02-10-2003, 06:28 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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.

__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #4  
Old 02-10-2003, 06:41 PM
 
kkboris kkboris is offline
 

Newbie
  
Join Date: Jan 2003
Posts: 8
 

Default 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.
Reply With Quote
  #5  
Old 02-10-2003, 07:30 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

http://forum.x-cart.com/viewtopic.php?t=165&highlight=modskinswap
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #6  
Old 02-12-2003, 10:59 PM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default 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
Reply With Quote
  #7  
Old 02-13-2003, 01:34 PM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default 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
Reply With Quote
  #8  
Old 02-13-2003, 11:43 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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.
__________________
ex x-cart guru
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:02 PM.

   

 
X-Cart forums © 2001-2020