Adapted from:
Links to Demos and more info at www.niora.com/css-oscommerce.
STEP 1: Upload files
Upload the included file cat_navbar.php to catalog/includes/modules.
Upload the included file superfish.css to catalog/css (you may need to create a folder called 'css' on the catalog level
Upload the included file superfish.js to catalog/javascript (you may need to create a folder called 'javascript' on the ctalog level
Upload the included five background files to the images folder superfish-arrows.png, superfish-background.png, superfish-border.png, superfish-shadow.png and superfish-underline.png
STEP 2: Reference the installed files
If you are using OSCommerce 2.3 or above, skip step 2.
If you are using the OSC to CSS contribution (tableless OSCommerce)
open includes/application_top.php
change:
$stylesheet='<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
';
to:
$stylesheet='<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src=" '.(isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://') . 'ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="javascript/superfish.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="css/superfish.css" />
';
If you are using the Standard OSCommerce place the following references in each catalog page between the <head> and </head> tags:
<link rel="stylesheet" href="css/superfish.css" />
<script type="text/javascript" src=" '.(isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://') . 'ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="javascript/superfish.js"></script>
STEP 3
If you are using the OSC to CSS contribution (tableless OSCommerce)
open includes/template_top.php
just above the closing </head> tag add:
<script type="text/javascript">
$(document).ready(function(){
$("ul.sf-menu").superfish();
});
</script>
If you are using the Standard OSCommerce place the following in each catalog page just above the closing </head> tag:
<script type="text/javascript">
$(document).ready(function(){
$("ul.sf-menu").superfish();
});
</script>
STEP 4: Install the Html in header.php
open includes/header.php
find:
<div id="header-breadcrumbs">
place the following directly above
<!--Superfish Horizontal Navigation bar-->
<div class="clear"></div>
<div class="cat_navbar">
<?php
if ( file_exists(DIR_WS_MODULES.'cat_navbar.php') ) {
require(DIR_WS_MODULES.'cat_navbar.php');
}
?>
</div>
<div class="clear"></div>
<!--end Superfish-->
Operation:
use the CSS in the file superfish.css to design the menu. Additional configuration options can be found in the comments of cat_navbar.php.
OSC to CSS version 2.0: Upgrade
See Demos/Discussion/Support: OSC to CSS upgrade to version 2.0 This contribution upgrades OSC to CSS to OSC to CSS v2.0
Improvements
New FeaturesInstallationOSC to CSS version 2.0 is designed for OSCommerce v2.2 r2a with the OSC to CSS contibution installed. Expect some layout issues, esp. if you have modified your installation of OSC to CSS. The included stylesheet, upgrade.css, contains CSS selectors used in OSC to CSS that should help alleviate these issues. Step 1:Start with your installation of OSC to CSSStep 2:Upload all files in the contribution, overwriting your existing filesStep 3: Open includes/application_top.php find:
$stylesheet='<link rel="stylesheet" type="text/css" href="stylesheet.css">'; replace with:
$stylesheet='<link rel="stylesheet" href="css/reset.css" /> note: the order that these stylesheets are listed is important. You want reset.css to be read first Step 4: Open includes/languages/english.phpremove the span tags from all infobox header definitionsfor example, change:
// categories box text in includes/boxes/categories.php to:
// categories box text in includes/boxes/categories.php Step 5:Open includes/functions/html_output.phpMake sure the following has been changed. (only if you are not replacing html_output.php) add stylesheet control to the text formsreplace function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) { with
function tep_draw_input_field($name, $value = '', $parameters = 'class="input-style"', $type = 'text', $reinsert_value = true) { replace
// The HTML image wrapper function with
// The HTML image wrapper function Step 5.5: If you are using CSS buttons instead replace html_output.php with the same file in v2 set or make the following changesIn includes/functions/html_output.phpreplace with add the following to your styles.css Step 6: Open the remaining catalog pages.Compare with the catalog pages in OSC V2 and make changes.Essentially you are deleting/changing the class designation on a few html tags on each page to match the html tags on the same page of OSC to CSSv2. These are the class designations in the stylesheet upgrade.css. When you are done, you should delete upgrade.css from the css folder. That's it, you're done |