Hey there! I'm currently setting up an OS Commerce site for a client for the first time and am having a bit of difficulty. I've already tried asking the folks on their support forum, but they can't offer an answer.
On the index page of the store, my client wanted some welcome text and store info which is defined by a variable known as TEXT_MAIN. She also wants a description for each category on her site. My problem is that OS Commerce is showing TEXT_MAIN on these other pages and then lists the category description below that. Here's some examples:
Main page:
http://onestopmommy.com/osc/index.php
Mattress page (category description comes after the introduction)
http://onestopmommy.com/osc/index.php/cPath/31
How can I get this TEXT_MAIN to only show on the main page? Here's part of the current code for that page....this forum won't let me post the whole code because its so long. I'd appreciate any help on this!
<?php
/*
$Id: index.php 1739 2007-12-20 00:52:16Z hpdl $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Greenmania Template by www.badeziner.com
Released under the GNU General Public License
*/
require('includes/application_top.php');
// the following cPath references come from application_top.php
$category_depth = 'top';
if (isset($cPath) && tep_not_null($cPath)) {
$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
$category_depth = 'products'; // display products
} else {
$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
$category_parent = tep_db_fetch_array($category_parent_query);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories
} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<meta name="keywords" content="baby, organic, clothing, bedding, toddler clothes, infant clothing, baby clothes, diaper, bedding, duvet cover, sheets, furniture" />
<meta name="description" content="Welcome to One Stop Mommy Organics. We are dedicated to bring you the safest organic bedding, clothes, furniture and toys for your child or baby." />
<meta name="Author" content="badeziner" />
<meta name="Theme" content="Greenmania" />
<meta name="webdesign" content="www.badeziner.com" /></head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<div id="wrapper">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<table width="814" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td style="background: url(images/template/left_border.gif) repeat-y;width:7px;height:100%;"></td>
<td colspan="11" bgcolor="F1F9D6">
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td class="main"><?php echo TEXT_MAIN; ?></td>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->