Mike D:
OK, so since my problem wasn't obvious to me I figured I'd upgrade my site from 1.5.1 to 1.5.4, which I was really dreading but I figured it'd help bring the problems to light.
I think the culprit is numinix's CSS/JS Loader add-on I have installed which I was required to install in order to run the Fast and Easy Checkout plugin. At the time I installed it I really wanted to have an expedited checkout process with the option to not have to create an account. I still would rather prefer to have a fast-as-possible checkout process 'without account' but now it's absolutely necessary that my site is responsive.
The problem seems to be that the CSS/JS Loader changes the html_header.php file to:
<?php
/**
* Common Template
*
* outputs the html header. i,e, everything that comes before the \</head\> tag <br />
*
* @package templateSystem
* @copyright Copyright 2003-2010 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 6 2012-05-07 21:43:01Z numinix $
*/
/**
* 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 if (isset($canonicalLink) && $canonicalLink != '') { ?>
<link rel="canonical" href="<?php echo $canonicalLink; ?>" />
<?php } ?>
<?php
/**
* load the loader files
*/
if($RI_CJLoader->get('status') && (!isset($Ajax) || !$Ajax->status())){
$RI_CJLoader->autoloadLoaders();
$RI_CJLoader->loadCssJsFiles();
$files = $RI_CJLoader->header();
foreach($files['css'] as $file)
if($file['include']) {
include($file['src']);
} else if (!$RI_CJLoader->get('minify_css') || $file['external']) {
echo '<link rel="stylesheet" type="text/css" href="'.$file['src'].'" />'."\n";
} else {
echo '<link rel="stylesheet" type="text/css" href="min/?f='.$file['src'].'&'.$RI_CJLoader->get('minify_time').'" />'."\n";
}
foreach($files['jscript'] as $file)
if($file['include']) {
include($file['src']);
} else if(!$RI_CJLoader->get('minify_js') || $file['external']) {
echo '<script type="text/javascript" src="'.$file['src'].'"></script>'."\n";
} else {
echo '<script type="text/javascript" src="min/?f='.$file['src'].'&'.$RI_CJLoader->get('minify_time').'"></script>'."\n";
}
}
//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: ?>
```
>
> Would it be as easy as changing a few lines in that html_header.php file so that the responsive things fire the way they're supposed to? It seems if I want to retain my current plugins I may have to delve into auto_loaders, which I'm not dying to get into right now.
>
> I'm also considering, much to my chagrin, ditching the plugins in order to get this to work as the SEO aspects of having my site responsive I think outweigh an expedited checkout process.
>
> Any thoughts? I appreciate everybody's input on the matter.
I am using the css loader too, without any problems. This is how my merged html_header looks like.```php
<?php
/**
* Common Template
*
* outputs the html header. i,e, everything that comes before the \</head\> tag <br />
*
* @package templateSystem
* @copyright Copyright 2003-2012 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 6 2012-05-07 21:43:01Z numinix $
* Altered by rbarbour (ZCAdditions.com), Responsive DIY Template Default for 1.5.x (65)
* Modified by Anne (Picaflor-Azul.com) Winchester Respnsive v1.0
*/
/**
* 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
*/
?>
<?php
// (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
if (!class_exists('Mobile_Detect')) {
include_once(DIR_WS_CLASSES . 'Mobile_Detect.php');
$detect = new Mobile_Detect;
}
// (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
?>
<!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="Zen4All" />
<meta name="generator" content="shopping cart program by Zen Cart®, http://www.zen-cart.com eCommerce" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes" />
<?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 if (isset($canonicalLink) && $canonicalLink != '') { ?>
<link rel="canonical" href="<?php echo $canonicalLink; ?>" />
<?php } ?>
<?php
/**
* load the loader files
*/
if ($RI_CJLoader->get('status') && (!isset($Ajax) || !$Ajax->status())) {
$RI_CJLoader->autoloadLoaders();
$RI_CJLoader->loadCssJsFiles();
$files = $RI_CJLoader->header();
foreach ($files['css'] as $file) {
if ($file['include']) {
include($file['src']);
} else if (!$RI_CJLoader->get('minify_css') || $file['external']) {
echo '<link rel="stylesheet" type="text/css" href="' . $file['src'] . '" />' . "\n";
} else {
echo '<link rel="stylesheet" type="text/css" href="min/?f=' . $file['src'] . '&' . $RI_CJLoader->get('minify_time') . '" />' . "\n";
}
}
foreach ($files['jscript'] as $file) {
if ($file['include']) {
include($file['src']);
} else if (!$RI_CJLoader->get('minify_js') || $file['external']) {
echo '<script type="text/javascript" src="' . $file['src'] . '"></script>' . "\n";
} else {
echo '<script type="text/javascript" src="min/?f=' . $file['src'] . '&' . $RI_CJLoader->get('minify_time') . '"></script>' . "\n";
}
}
}
// DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
// (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
if (COLUMN_WIDTH == '0' || (in_array($current_page_base, explode(",", 'popup_image,popup_image_additional')) )) {
echo '';
} else {
$responsive_mobile = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/' . 'responsive_mobile.css' . '" />';
require($template->get_template_dir('responsive_mobile.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/responsive_mobile.php');
$responsive_tablet = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/' . 'responsive_tablet.css' . '" />';
require($template->get_template_dir('responsive_tablet.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/responsive_tablet.php');
$responsive_default = '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/' . 'responsive_default.css' . '" />';
echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . '/' . 'responsive.css' . '" />';
if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isMobile' or $detect->isTablet() && $_SESSION['display_mode'] == 'isMobile' or $_SESSION['display_mode'] == 'isMobile') {
echo $responsive_mobile;
} else if ($detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode'] == 'isTablet' or $detect->isTablet() && $_SESSION['display_mode'] == 'isTablet' or $_SESSION['display_mode'] == 'isTablet') {
echo $responsive_tablet;
} else if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $_SESSION['display_mode'] == 'isNonResponsive') {
echo '';
} else {
echo $responsive_default;
}
}
if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isTablet() && $_SESSION['display_mode'] == 'isDesktop' or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode'] == 'isNonResponsive' or $detect->isTablet() && $_SESSION['display_mode'] == 'isNonResponsive' or $_SESSION['display_mode'] == 'isNonResponsive') {
$fluidisFixed = 'fluidIsFixed';
} else {
$fluidisFixed = '';
}
// (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)
?>
<script src="<?php echo $template->get_template_dir('css_browser_selector.js', DIR_WS_TEMPLATE, $current_page_base, 'jscript') . '/css_browser_selector.js' ?>" type="text/javascript"></script>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<?php // NOTE: Blank line following is intended: ?>
```