Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / A Templates CSS not being called.

A Templates CSS not being called.

Views: 1,741

Results 1 to 10 of 10
27 Apr 2011, 1:42 AM
#1
jacobbushnell avatar

jacobbushnell

New Zenner

Join Date:
Mar 2010
Location:
Bonners Ferry, Idaho
Posts:
69
Plugin Contributions:
0

A Templates CSS not being called.

Hello, I moved a cart over to a new server yesterday and for some reason the template does not load the CSS files. The only one being included is the print_stylesheet.css . (I checked this by viewing the source of the page)

I verified all the other sheets exist. I can access them by typing the path to the css folder under the template. I checked permissions. and tried renaming the .htaccess file to .htaccess_OFF.

I then installed another sample template I had and it does load the CSS!

So, on my original server (still running fortunately) I got the working template file and uploaded it to the new server as a copy... Still no joy.

Im kinda running out of ideas. Any one know what might be going on here? That very same template is working fine on the first server!

I am using version 3.9d
Have a few modules installed including:
-AdvancedShipping module by CEON

  • QuickCheckout
    -Magic SEO URL Rewriter

Thank you,
Jacob Bushnell

27 Apr 2011, 2:34 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: A Templates CSS not being called.

A link to this for troubleshooting?

27 Apr 2011, 4:30 PM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: A Templates CSS not being called.

I think you just need to drop the _new from your stylesheet name.

Hope this helps!

27 Apr 2011, 4:33 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: A Templates CSS not being called.

Alas it's not as simple as dropping the "new". Any file that starts "stylesheet" and is in the right place should be loaded. But I can't see any attempt being made by your site to load any stylesheets. Have you made changes to your template's common.html_header.php file?

27 Apr 2011, 4:38 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: A Templates CSS not being called.

Viewing your source, there is no reference to a template

27 Apr 2011, 4:44 PM
#7
jacobbushnell avatar

jacobbushnell

New Zenner

Join Date:
Mar 2010
Location:
Bonners Ferry, Idaho
Posts:
69
Plugin Contributions:
0

Re: A Templates CSS not being called.

@ kuroi - No, I have not modified the html_header.php file....

@ kobra - Yes, that is what I am noticing... Where it is called?

Below is the html_header.php file:

<?php
/**
 * Common Template
 *
 * outputs the html header. i,e, everything that comes before the \</head\> tag <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: html_header.php 6948 2007-09-02 23:30:49Z drbyte $
 */
/**
 * load the module for generating page meta-tags
 */
require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
/**
 * output main page HEAD tag and related headers/meta-tags, etc
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>
<title><?php echo META_TAG_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="The Zen Cart™ Team and others" />
<meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" />
<?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />

<?php
/**
* load the loader files
*/

if($RI_CJLoader->get('status')){
	$directory_array = $template->get_template_part(DIR_WS_TEMPLATE.'auto_loaders', '/^loader_/', '.php');
	
	$loaders_check = $RI_CJLoader->get('loaders');
	if($loaders_check == '*' || count($loaders_check) > 0){
		while(list ($key, $value) = each($directory_array)) {
		/**
		* include content from all site-wide loader_*.php files from includes/templates/YOURTEMPLATE/jscript/auto_loaders, alphabetically.
		*/
			if($loaders_check == '*' || in_array($value, $loaders_check))
				require(DIR_WS_TEMPLATE.'auto_loaders'. '/' . $value);
		}
	}
	
	$RI_CJLoader->loadCssJsFiles();
	$files = $RI_CJLoader->processCssJsFiles();
	foreach($files['css'] as $file)
		if($file['include']) include($file['string']);
		else echo $file['string'];
		
	foreach($files['js'] as $file)
		if($file['include']) include($file['string']);
		else echo $file['string'];
}
//DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
?>
</head>
<?php // NOTE: Blank line following is intended: ?>
27 Apr 2011, 4:46 PM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: A Templates CSS not being called.

That's not the standard Zen Cart header_html file. It seems to be using some sort of a custom loader. Did this come with your template, or is it part of some mod you've installed?

27 Apr 2011, 4:50 PM
#9
jacobbushnell avatar

jacobbushnell

New Zenner

Join Date:
Mar 2010
Location:
Bonners Ferry, Idaho
Posts:
69
Plugin Contributions:
0

Re: A Templates CSS not being called.

Ah HA! good catch. I went back to my file of mods and found that in file in a css_javascript_loader mod!

27 Apr 2011, 4:53 PM
#10
jacobbushnell avatar

jacobbushnell

New Zenner

Join Date:
Mar 2010
Location:
Bonners Ferry, Idaho
Posts:
69
Plugin Contributions:
0

Re: A Templates CSS not being called.

I just deleted the file and all is well again. THANK YOU so much for your help guys, I'v been banging my head on this all day yesterday and today.
:clap: