Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How can I ignore stylesheets?

How can I ignore stylesheets?

Locked

Views: 2,579

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
28 Sep 2007, 9:38 PM
#1
mateogp avatar

mateogp

New Zenner

Join Date:
Sep 2007
Location:
Frankfort, Illinois, United States
Posts:
21
Plugin Contributions:
0

How can I ignore stylesheets?

I have a problem. I'm trying to insert a dynamic menu, however the stylesheets built into the shopping cart completly mess it up.

Does anyone know how to ignore the stylesheets just for 1 section then let it continue on??

Here is a copy of my tpl_header.php

<?php
/**
 * Common Template - tpl_header.php
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_header = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
 */
?>
<!--[if IE]>
<link href="<?=DIR_WS_TEMPLATE?>css_ie/style_ie.css" rel="stylesheet" type="text/css">
<![endif]-->
<?php

	require('tpl_tmfuncs.php');
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
  echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
   echo htmlspecialchars($_GET['info_message']);
} else {

}
?>


<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div class="dt main" >
  <div class="dt l1">
    <div class="dt l1x">
      <div class="dr">
        <div class="dc l1x_c1 pos1"><a href="<?=zen_href_link(FILENAME_DEFAULT)?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.gif'); ?></a><br>
        </div>
        <div class="dc l1x_c2"><?php echo zen_image(DIR_WS_TEMPLATE.'images/spacer.gif','','1px','20px'); ?><br>
          <?

  if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    $lng = new language;
  }

  reset($lng->catalog_languages);

  while (list($key, $value) = each($lng->catalog_languages)) {
    echo '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . zen_image(DIR_WS_LANGUAGES.$value['directory'].'/images/'.$value['image'], $value['name'], '', '', '') . '</a>';
  }

?><br><?php echo zen_image(DIR_WS_TEMPLATE.'images/spacer.gif','','1px','7px'); ?><br>
		  <?=zen_draw_form('currencies', zen_href_link(basename(ereg_replace('.php','', $PHP_SELF)), '', $request_type, false), 'get')?>

<?

    if (isset($currencies) && is_object($currencies)) {

      reset($currencies->currencies);
      $currencies_array = array();
      while (list($key, $value) = each($currencies->currencies)) {
        $currencies_array[] = array('id' => $key, 'text' => $value['title']);
      }

      $hidden_get_variables = '';
      reset($_GET);
      while (list($key, $value) = each($_GET)) {
        if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
          $hidden_get_variables .= zen_draw_hidden_field($key, $value);
        }
      }
    }

?>

        <?=zen_draw_pull_down_menu('currency', $currencies_array, $_SESSION['currency'], 'class="form_total form_2" onchange="this.form.submit();"') . $hidden_get_variables . zen_hide_session_id()?>
</form>	          <br>
        </div>
        <div class="dc l1x_c3 pos2">
          <div class="txt1"> Search:<?php echo zen_image(DIR_WS_TEMPLATE.'images/spacer.gif','','6px','1px'); ?>
		  <?php
							
							#SEARCH
echo zen_draw_form('quick_find', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get').zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
//zen_draw_hidden_field('search_in_description', '1');
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
    echo zen_draw_input_field('keyword', '', ' class="form_total form_1" value="" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';"') . zen_image(DIR_WS_TEMPLATE.'images/spacer.gif','','4px','1px'). zen_image_submit('1_'.BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'');
  } else {
    echo zen_draw_input_field('keyword', '', ' class="form_total form_1" value="" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';"'). zen_image(DIR_WS_TEMPLATE.'images/spacer.gif','','4px','1px'). zen_image_submit('1_'.BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'');
  }
  #SERCH END
  ?>
																				
																			</form>
            <br>
          </div>
        </div>
      </div>
    </div>
  </div>

<div id="headerWrapper">
<!--bof-navigation display-->

<!--eof-navigation display-->
<?  ?> 
<!--bof-branding display-->
<div id="logoWrapper">
    
	<?  ?>
	
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
    <div id="taglineWrapper">
<?php
          /*    if (HEADER_SALES_TEXT != '') {
?>
      <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?php
              } */
?>
<?php
              if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                if ($banner->RecordCount() > 0) {
?>
      <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>
<?php
                }
              }
?>
    </div>

<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
</div>

<!--eof-branding display-->

<!--eof-header logo and navigation display-->

<!--bof-optional categories tabs navigation display-->
<?php
if (CATEGORIES_TABS_STATUS == '1') { ?>



<?


  require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php');
}
?>
<!--eof-optional categories tabs navigation display-->

<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>

  <div class="dt l2">
    <div class="dt l2x">
      <div class="dr">
        <div class="dc" style="height:40px">
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>

 </div>
      </div>
    </div>
  </div>
<?php
}

 ?>
<!--eof-header ezpage links-->



  <div class="dt l2">
    <div class="dt l2x">
      <div class="dr">
        <div class="dc">
		<div><a href="<?=zen_href_link(FILENAME_DEFAULT)?>"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m1.jpg')?></a><a href="<?=zen_href_link(FILENAME_SPECIALS)?>"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m2.jpg')?></a><a href="<?=zen_href_link(FILENAME_PRODUCTS_NEW)?>"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m3.jpg')?></a><a href="index.php?main_page=products_all"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m4.jpg')?></a><a href="<?=zen_href_link(FILENAME_REVIEWS)?>"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m5.jpg')?></a><?php if ($_SESSION['customer_id']) { ?>
    
	<a href="<?=zen_href_link(FILENAME_ACCOUNT)?>"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m6.jpg')?></a><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m7.jpg')?></a>
<?php
      } else {
        if (STORE_STATUS == '0') {
?>
<a href="<?=zen_href_link(FILENAME_CREATE_ACCOUNT)?>"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m6.jpg')?></a><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?=zen_image(DIR_WS_TEMPLATE.'buttons/'.$_SESSION['language'].'/menu/m7.jpg')?></a>
<?php } } ?></div>
        </div>
      </div>
    </div>
  </div>
      <div class="dt l3">
    <div class="dt l3x" style="padding-bottom:10px;">   
<?php } ?>
<?php include("http://198.170.93.216/misc/menu.htm"); ?> // I tried adding this but it get effected by the stylesheet.

My idea was to add <?php include("http://198.170.93.216/misc/menu.htm"); ?> (you can see this on the way bottom) but i keeps getting effected by the stylesheet...

I'm going nuts with this, any ideas???

Thanks!

28 Sep 2007, 11:13 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How can I ignore stylesheets?

It is being affected by the stylesheet because it uses some of the same tags as current Zen Cart code does. If you change the tags in your menu.htm file (perhaps by adding menu_ to the front of all of them), they won't be affected.

Another possibility is that your file is using plain vanilla HTML elements which are taking on the default ZC styles. You can change this if you want by wrapping the whole file in a div and giving it an id (like id="myMenu") and adding declarations like
#myMenu a { color: #006699; }
to your stylesheet. These will override the standard ones.

Your last problem is that you have a Template Monster template, which eliminates a lot of the functionality and stylability that is standard in Zen Cart. Depending on what you are trying to do, the TM template might be interfering with it - we don't know all the changes they make and can't easily troubleshoot them.