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

Using Template on 2 Different Colored Backgrounds

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-14-2003, 03:46 PM
  disneyana's Avatar 
disneyana disneyana is offline
 

Senior Member
  
Join Date: Sep 2002
Location: Columbus, OH
Posts: 116
 

Default Using Template on 2 Different Colored Backgrounds

I have a problem with the /skin1/customer/main/cart_totals.tpl file. It is called from cart.php (which has a LIGHT colored background) and cart.php?mode=checkout (which has a DARK colored background). No matter what I change the CSS font colors to, the text cannot be read on one of the pages. Any suggestions?

I was thinking of doing an {if} statement, but I'm not sure of the syntax. Something like {if page=/customer/cart.php} display WHITE font}
{else} display BLACK font
Any comments are greatly appreciated!
__________________
- disneyana
4.0.17
Reply With Quote
  #2  
Old 04-14-2003, 04:26 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

I'm not expert here but it occured to me that you could just define another css style for one of the pages and then you could set the colours of the text independently.

You would have to alter skin1.css and copy and rename a field. Then call that style in the template of your choice or just replace the name of the style being called already.

I hope this works. That's what I would try.
Reply With Quote
  #3  
Old 04-14-2003, 10:36 PM
 
funkydunk funkydunk is offline
 

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

Default

or, in home.tpl put in:

Code:
{if mode eq "checkout"} <link rel="stylesheet" href="{$SkinDir}/skin2.css"> {else} <link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"> {/if}
__________________
ex x-cart guru
Reply With Quote
  #4  
Old 04-16-2003, 03:51 AM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

Hi Disneyana,

In case if you don't want to create another CSS file, because you basically want to add a dark background to your checkout page.

I'm assuming you're using dialog.tpl to display your cart.php frames.

In your dialog.tpl,
Code:
<TABLE border=0 cellPadding=2 cellSpacing=0 {$extra}> <TR> <TD height="20" class=DialogTitle background="{$ImagesDir}/dialog_bg.gif" valign=bottom>{$title}</TD> </TR> <TR><TD class=DialogBorder><TABLE border=0 cellPadding=10 cellSpacing=0 width="100%"> <TR> {*==============================*} {if $mode eq "checkout"} <TD class=DialogBoxCSSForYourDarkBackGround> {else} <TD class=DialogBox> {/if} {*==============================*} {$content} </TD></TR> </TABLE></TD></TR> </TABLE>

CSS file:
Code:
.DialogBoxCSSForYourDarkBackGround { background-color: your-dark-color; color: opposite-of-your-dark-color }
I hope that is what you're looking for. If not, then please ignore my rambling.

Have a good night!
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #5  
Old 04-16-2003, 01:33 PM
  disneyana's Avatar 
disneyana disneyana is offline
 

Senior Member
  
Join Date: Sep 2002
Location: Columbus, OH
Posts: 116
 

Default

Hey Guys,

Thanks for the suggestions. I've tried both and still cannot get the font color to switch. When I view the source for /customer/cart.php?mode=checkout it still references skin1.css even though the {if} statement is telling it to use skin2.css. Any other ideas? Time is of the essence. Thanks! - Jeff
__________________
- disneyana
4.0.17
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 05:35 PM.

   

 
X-Cart forums © 2001-2020