Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

There is a file named Update_header_manufacturers.sql in the Database_Files directory that needs to be ran to add the new fields to the database.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

I have a question about Stylesheet.

 

I made these changes to fit our design:

 

h1 {

font-family: Verdana, Arial, sans-serif;

font-size: 14px;

font-weight: bold;

color: #863131;

}

 

It looks fine in IE, but in Firefox, the font is still large and the text is still black. Is there something I can do so that it looks the same in Firefox?

 

Thanks

Link to comment
Share on other sites

You can use em's instead of px's to ensure the size is the same in all browsers but the fact that the color didn't change in FireFox means you are looking at a cached page. You'll need to force an update to clear that.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thank you. I'll try the em's. I don't think the color is a cache problem. It was a fresh install of Firefox on a different computer. I suspect it might be the actuall color, although it it seems to work for the rest of the text. I'll try some different colors and see what happens.

 

Thanks again.

Link to comment
Share on other sites

if someone wouldn't mind compiling a v 2.5.9, i have added a newsdesk support for the header tags controller

 

###Author
http://www.bristleconeweb.com - Jonathan Stanley

###Description
Very simple contribution.  Articles written for your site can help generate free search engine traffic, however they work alot better if the title tags correspond.  This contri will change the title tag to include the article and category in the following  format:
article name: Blue Widget
category: Gadgets
store name: Joe's Toy World
*Title Tag would be: Blue Widget Gadgets Joe's Toy World

###Install Instructions
***note, in order to use this contribution you must have the newsdesk contribution as well as the webmakers header tags generator
***this has been tested and working with header tags v2.3 contribution combined with newsdesk 1.48.2



1)BACKUP

2)If this is a fresh install, you should be able to copy the header_tags.php file to /includes folder and you are done!  Otherwise, open /includes/header_tags.php

3)Look for
// Define specific settings per page:
switch (true) {

4)Insert the following immediately after the switch statement

// NEWSDESK_INDEX.PHP etc
  case ( 	strstr($_SERVER['PHP_SELF'],'newsdesk_index.php') or 
	strstr($PHP_SELF,'newsdesk_index.php') or
	strstr($_SERVER['PHP_SELF'],'newsdesk_info.php') or 
	strstr($PHP_SELF,'newsdesk_info.php')):
	$the_newsdesk_query = tep_db_query("
	SELECT
		categories_name
	FROM
		" . TABLE_NEWSDESK_CATEGORIES_DESCRIPTION . " 
	WHERE 
		categories_id = '" . $HTTP_GET_VARS['newsPath'] . "' 
	AND language_id='" . $languages_id . "'");
	$the_newsdesk_category = tep_db_fetch_array($the_newsdesk_query);
	$the_title = $the_newsdesk_category['categories_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
	if ($HTTP_GET_VARS['newsdesk_id'] != ''){
		$the_newsdesk_id_query = tep_db_query("
		SELECT
			newsdesk_article_name
		FROM
			" . TABLE_NEWSDESK_DESCRIPTION . " 
		WHERE 
			newsdesk_id = '" . $HTTP_GET_VARS['newsdesk_id'] . "' 
		AND language_id='" . $languages_id . "'");
		$the_newsdesk_article = tep_db_fetch_array($the_newsdesk_id_query);
		$the_title = $the_newsdesk_article['newsdesk_article_name'] . ' ' . $the_title;
		}

	break;

5) Enjoy

Link to comment
Share on other sites

No, please don't add that here. It is the sort of thing that makes updating contributions a nightmare. It should be uploaded to the newsdesk contribution since only the people using newsdesk has a use for it.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

It's right where it needs to be for all to see. One could also say it doesn't belong posted at the NewsDesk contribution because only those with HTC would have a need for it. :rolleyes:

 

yourmanstan, careful with the self promoting web address, the team has been removing posts and contributions with them. an email address would be better, obfuscated of course.

Edited by surfalot
Link to comment
Share on other sites

Can someone help. I've installed HTC in my shop and followed all the instructions. All options appear in admin and i get no errors. However, when i make changes in admin, they don't seem to appear in the catalog. I've added tags for the index page and text and tags for a gifts category page and there are no errors. When i go to the pages however, i look at source code and no meta tags are added plus there is no extra description on gifts page. What has happened here?

 

The the only changes i had made to basic shop prior to install was changed category names using breadcrumb technique from knowledge base and added extra options to company information box.

 

Any guidance here as to what is wrong would be greatly appreciated!

Link to comment
Share on other sites

That most likely means PRODUCTS_DESCRIPTION is not defined in the incudes/database_tables.php file. You shoudl verify that it is.

 

Jack

 

hi jack, i too have the exact same problem with HTC_V_2.5.8 . i checked both the includes/database_tables.php and the MySQL db and both have 'products_description'. but i get the error.

 

1146 - Table 'thriftsh_p_os1.PRODUCTS_DESCRIPTION' doesn't exist

 

select * from PRODUCTS_DESCRIPTION

 

[TEP STOP]

 

any more suggestions?

 

Thank You

Link to comment
Share on other sites

hi jack, i too have the exact same problem with HTC_V_2.5.8 . i checked both the includes/database_tables.php and the MySQL db and both have 'products_description'. but i get the error.

 

1146 - Table 'thriftsh_p_os1.PRODUCTS_DESCRIPTION' doesn't exist

 

select * from PRODUCTS_DESCRIPTION

 

[TEP STOP]

 

any more suggestions?

 

Thank You

 

Never mind i used google to use phpmyadmin to import the header.sql file and it said it was successfull!

 

thanx!

Link to comment
Share on other sites

I can't modify the index.php because i cannot find the code i must change!!!!Can anyone help me do that..???Thanks in advance!!!

 

1)

FIND:

 

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

 

REPLACE with:

 

<?php

// BOF: Header Tag Controller v2.5.7

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE; ?></title>

<?php

}

// EOF: Header Tag Controller v2.5.7

?>

 

2)

Around line 70:

 

Find

 

if ($category_depth == 'nested') {

$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

 

and replace with

 

if ($category_depth == 'nested') {

$category_query = tep_db_query("select cd.categories_name, c.categories_image, cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

 

3)

Around line 78:

 

Find

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

 

and replace it with

 

<td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

<?php if (tep_not_null($category['categories_htc_description'])) { ?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><h2><?php echo $category['categories_htc_description']; ?></h2></td>

</tr>

<?php } ?>

 

4)

Around line 247:

 

Find

 

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

and replace it with

 

if (isset($HTTP_GET_VARS['manufacturers_id']))

$db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

else

$db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");

 

$htc = tep_db_fetch_array($db_query);

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><h1><?php echo $htc['htc_title']; ?></h1></td>

 

 

5)

Around line 298

 

Find

 

<td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

 

REPLACE with

 

<td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, $category['categories_htc_title_tag'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

<?php if (tep_not_null($htc['htc_description'])) { ?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><h2><?php echo $htc['htc_description']; ?></h2></td>

</tr>

<?php } ?>

 

index.php

 

<?php
/*
 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 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>
<?php
// BOF: Header Tag Controller v2.5.7
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: Header Tag Controller v2.5.7
?>
<META name="description" content="Gadgets Toys, PC, MAC from iTECH">


<META name="keywords" content="Gadgets, gizmos, gift ideas, valentine's, gifts, presents, big boys toys, travel accessories, cool gadgets, novelty gifts, toys, games, Computers, Mac, Machintosh, Οθόνες, τηλεοράσεις, περιφερειακά, ">

<META name="Distribution" content="Global">
<META name="Rating" content="General">
<META name="Copyright" content="2005">
<META name="Author" content="iTECH">
<META name="Language" content="gr-Greece">
<META name="Robots" content="index,follow">
<META name="Revisit-After" content="2 days">

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="780" cellspacing="0" cellpadding="0" align="center">
 <tr>
<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 //-->
<?php
 if ($category_depth == 'nested') {
$category_query = tep_db_query("select cd.categories_name, c.categories_image, cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '15'); ?></td>
  </tr>
  <TR>
<TD>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
			  <!--DWLayoutTable-->
			  <tr>
			  <td width="7"></td>
				<td width="18" height="34" valign="top">
					  <img src="images/prohead/infohead_01.gif" width="18" height="34" alt=""></td>
			<td height="34" background="images/prohead/infohead_02.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0">
			  <!--DWLayoutTable-->
			  <tr>
				<td width="70%" class="prodtitle">
					  <b><?php echo HEADING_TITLE; ?></b></td><td align="right" width="30%" class="prodtitle">
					  </td>
			</tr>
			  </table></td>
			<td width="18" valign="top">
					<img src="images/prohead/infohead_03.gif" width="18" height="34" alt=""></td>
	</tr>
		</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2" class="featured">
		  <tr>
<?php
if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
  $category_links = array_reverse($cPath_array);
  for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
	$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
	$categories = tep_db_fetch_array($categories_query);
	if ($categories['total'] < 1) {
	  // do nothing, go through the loop
	} else {
	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
	  break; // we've found the deepest category the customer is in
	}
  }
} else {
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
}

$number_of_categories = tep_db_num_rows($categories_query);

$rows = 0;
while ($categories = tep_db_fetch_array($categories_query)) {
  $rows++;
  $cPath_new = tep_get_path($categories['categories_id']);
  $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
  echo '				<td align="center" class="smallText" width="' . $width . '" valign="top"><a class="featured" href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
  if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
	echo '			  </tr>' . "\n";
	echo '			  <tr>' . "\n";
  }
}

// needed for the new products module shown below
$new_products_category_id = $current_category_id;
?>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
	  </tr>
	</table></td>
  </tr>
</table></td>
<?php
 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
					 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
					 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
					 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
					 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
					 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
					 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
					 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

asort($define_list);

$column_list = array();
reset($define_list);
while (list($key, $value) = each($define_list)) {
  if ($value > 0) $column_list[] = $key;
}

$select_column_list = '';

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  switch ($column_list[$i]) {
	case 'PRODUCT_LIST_MODEL':
	  $select_column_list .= 'p.products_model, ';
	  break;
	case 'PRODUCT_LIST_NAME':
	  $select_column_list .= 'pd.products_name, ';
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $select_column_list .= 'm.manufacturers_name, ';
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $select_column_list .= 'p.products_quantity, ';
	  break;
	case 'PRODUCT_LIST_IMAGE':
	  $select_column_list .= 'p.products_image, ';
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $select_column_list .= 'p.products_weight, ';
	  break;
  }
}

// show the products of a specified manufacturer
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
  } else {
// We show them all
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
  }
} else {
// show the products in a given categorie
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
  } else {
// We show them all
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
  }
}

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
	  $HTTP_GET_VARS['sort'] = $i+1 . 'a';
	  $listing_sql .= " order by pd.products_name";
	  break;
	}
  }
} else {
  $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
  $sort_order = substr($HTTP_GET_VARS['sort'], 1);
  $listing_sql .= ' order by ';
  switch ($column_list[$sort_col-1]) {
	case 'PRODUCT_LIST_MODEL':
	  $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
	case 'PRODUCT_LIST_NAME':
	  $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
	case 'PRODUCT_LIST_IMAGE':
	  $listing_sql .= "pd.products_name";
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
	case 'PRODUCT_LIST_PRICE':
	  $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
  }
}
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '15'); ?></td>
  </tr>
  <TR>
<TD>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
			  <!--DWLayoutTable-->
			  <tr>
				<td width="18" height="34" valign="top">
					  <img src="images/prohead/infohead_01.gif" width="18" height="34" alt=""></td>
			<td height="34" background="images/prohead/infohead_02.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0">
			  <!--DWLayoutTable-->
			  <tr>
				<td width="70%" class="prodtitle">
					  <b><?php echo HEADING_TITLE; ?></b></td><td align="right" width="30%" class="prodtitle">
					  </td>					<?php


// Get the right image for the top-right
$image = DIR_WS_IMAGES . 'table_background_list.gif';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['manufacturers_image'];
} elseif ($current_category_id) {
  $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['categories_image'];
}
?>
			</tr>
			  </table></td>
			<td width="18" valign="top">
					<img src="images/prohead/infohead_03.gif" width="18" height="34" alt=""></td>
	</tr>
		</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
  </tr>
</table></td>
<?php
 } else { // default page
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">


  <tr>
	<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '14'); ?></td>
	</tr>
		<tr>
				<td width="100%" height="34" valign="top" align="center">
					  <img src="images/title/welcome.gif" width="377" height="34" alt=""></td>
			</tr>
			<tr><td height="15"></td></tr>
			<tr><td>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			  <!--DWLayoutTable-->
			  <tr>
				<td width="100" height="76" valign="middle" align="right">
					  <img src="images/title/welcome_page.gif" width="76" height="74" alt=""></td>
			<td width="300" valign="top" class="welcomed" style="PADDING-RIGHT:2px; PADDING-LEFT:10px"><?php echo tep_customer_greeting(); ?><br><br><?php echo TEXT_MAIN; ?></td>
			</tr>
		</table></td></tr>

		</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	 <tr valign="top">
		<td width=100% align="center"><?php include(DIR_WS_MODULES . FILENAME_FEATURED); ?></td>
	  </tr>
	  <tr valign="top">
		<td width=100% align="center"><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
	  </tr>
<?php
include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>
	</table></td>
  </tr>
</table></td>
<?php
 }
?>
<!-- body_text_eof //-->
 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Just finished installing HTC and I'm getting these error messages on my admin page:

 

Warning: main(includes/boxes/header_tags_controller.php): failed to open stream: No such file or directory in /Library/WebServer/WebSites/.../catalog/admin/includes/column_left.php on line 22

 

Warning: main(includes/boxes/header_tags_controller.php): failed to open stream: No such file or directory in /Library/WebServer/WebSites/.../catalog/admin/includes/column_left.php on line 22

 

Fatal error: main(): Failed opening required 'includes/boxes/header_tags_controller.php' (include_path='.:/Library/PHP4/lib/php') in /Library/WebServer/WebSites/.../catalog/admin/includes/column_left.php on line 22

 

I'm spent about an hour doing searches but can't find anything similiar for a fix.

Link to comment
Share on other sites

That most likely means PRODUCTS_DESCRIPTION is not defined in the incudes/database_tables.php file. You shoudl verify that it is.

 

Jack

 

Thanx for the reply. I have posted my database_tables.php file as I think PRODUCTS_DESCRIPTION has already been defined.

 

Rgds, John

http://www.officialvinyl.com

 

<?php

/*

$Id: database_tables.php,v 1.1 2003/03/14 02:10:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// define the database table names used in the project

define('TABLE_ADDRESS_BOOK', 'address_book');

define('TABLE_ADDRESS_FORMAT', 'address_format');

define('TABLE_BANNERS', 'banners');

define('TABLE_BANNERS_HISTORY', 'banners_history');

define('TABLE_CATEGORIES', 'categories');

define('TABLE_CATEGORIES_DESCRIPTION', 'categories_description');

define('TABLE_CONFIGURATION', 'configuration');

define('TABLE_CONFIGURATION_GROUP', 'configuration_group');

define('TABLE_COUNTER', 'counter');

define('TABLE_COUNTER_HISTORY', 'counter_history');

define('TABLE_COUNTRIES', 'countries');

define('TABLE_CURRENCIES', 'currencies');

define('TABLE_CUSTOMERS', 'customers');

define('TABLE_CUSTOMERS_BASKET', 'customers_basket');

define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', 'customers_basket_attributes');

define('TABLE_CUSTOMERS_INFO', 'customers_info');

define('TABLE_LANGUAGES', 'languages');

define('TABLE_MANUFACTURERS', 'manufacturers');

define('TABLE_MANUFACTURERS_INFO', 'manufacturers_info');

define('TABLE_ORDERS', 'orders');

define('TABLE_ORDERS_PRODUCTS', 'orders_products');

define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', 'orders_products_attributes');

define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', 'orders_products_download');

define('TABLE_ORDERS_STATUS', 'orders_status');

define('TABLE_ORDERS_STATUS_HISTORY', 'orders_status_history');

define('TABLE_ORDERS_TOTAL', 'orders_total');

define('TABLE_PRODUCTS', 'products');

define('TABLE_PRODUCTS_ATTRIBUTES', 'products_attributes');

define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD', 'products_attributes_download');

define('TABLE_PRODUCTS_DESCRIPTION', 'products_description');

define('TABLE_PRODUCTS_NOTIFICATIONS', 'products_notifications');

define('TABLE_PRODUCTS_OPTIONS', 'products_options');

define('TABLE_PRODUCTS_OPTIONS_VALUES', 'products_options_values');

define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', 'products_options_values_to_products_options');

define('TABLE_PRODUCTS_TO_CATEGORIES', 'products_to_categories');

define('TABLE_REVIEWS', 'reviews');

define('TABLE_REVIEWS_DESCRIPTION', 'reviews_description');

define('TABLE_SESSIONS', 'sessions');

define('TABLE_SPECIALS', 'specials');

define('TABLE_TAX_CLASS', 'tax_class');

define('TABLE_TAX_RATES', 'tax_rates');

define('TABLE_GEO_ZONES', 'geo_zones');

define('TABLE_ZONES_TO_GEO_ZONES', 'zones_to_geo_zones');

define('TABLE_WHOS_ONLINE', 'whos_online');

define('TABLE_ZONES', 'zones');

?>

Link to comment
Share on other sites

Just finished installing HTC and I'm getting these error messages on my admin page:

 

Warning: main(includes/boxes/header_tags_controller.php): failed to open stream: No such file or directory in /Library/WebServer/WebSites/.../catalog/admin/includes/column_left.php on line 22

 

Warning: main(includes/boxes/header_tags_controller.php): failed to open stream: No such file or directory in /Library/WebServer/WebSites/.../catalog/admin/includes/column_left.php on line 22

 

Fatal error: main(): Failed opening required 'includes/boxes/header_tags_controller.php' (include_path='.:/Library/PHP4/lib/php') in /Library/WebServer/WebSites/.../catalog/admin/includes/column_left.php on line 22

 

I'm spent about an hour doing searches but can't find anything similiar for a fix.

It means you didn't upload the required files. There is a catalog directory in the contribution. Upload everything in there to your shop, keeping the same file structure of course.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanx for the reply. I have posted my database_tables.php file as I think PRODUCTS_DESCRIPTION has already been defined.
Hmm, this is a strange one. You could try editing the database file to read 'products_description' instead of PRODUCTS_DESCRIPTON, being sure to use the single quotes. I can't see why it is missing the definition but that appears to be what is happening.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hmm, this is a strange one. You could try editing the database file to read 'products_description' instead of PRODUCTS_DESCRIPTON, being sure to use the single quotes. I can't see why it is missing the definition but that appears to be what is happening.

 

Jack

Oups! B)

The constants in the database_setup.php need to be TABLE_PRODUCTS_DESCRIPTION not PRODUCTS_DESCRIPTON. Looks like all the table constants used in database_setup.php need to be updated.

 

coxj2901, while you are waiting for the updated file, just make these changes:

 

replace: PRODUCTS_DESCRIPTION with TABLE_PRODUCTS_DESCRIPTION

replace: CATEGORIES_DESCRIPTION with TABLE_CATEGORIES_DESCRIPTION

replace: MANUFACTURERS_INFO with TABLE_MANUFACTURERS_INFO

Link to comment
Share on other sites

I just installed Header Tags, but am having a slight problem. When I am at the store's main page, I have the grid of my products. However, if I edit an existing product, or enter in a new product, the title/name of the product is not displayed. Can someone please help me with this?

 

Thanks.

Link to comment
Share on other sites

The products name is added by the code in admin/categories.php. It sounds like there may have been an error in the installation of the changes for that file. Try using the one from the contribution so see if the problem clears up. If it does, you will need to re-install fo rthat file or compare the two to find the problem. Or, if this is the only change you have made to that file, just use the one from the contribuiton.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I'm on a relatively new installation, so I just uploaded all the files in "catalog_for_new_shop_only" again. However, the problem still exists. So, I went into phpMyAdmin and made sure that all the fields that were supposed to be created in header.sql were done. I went through the install documentation and made sure that the file changes were made. However, still it doesn't display properly.

 

For giggles, I went intot he db. For any new product or product that I've edited since Headers installation, I noticed that products_description.products_name in blank. Does that help any?

Link to comment
Share on other sites

I have a problem with HTC.I have installed it and it all seems to be ok in the admin panel.The Fill tags works perfectly so all my products have a meta tag!!The page control and text control also are ok (except one thing) at the page control, at delete new page i have two same pages named 'www' both .I cannot delete it anyway!!!!

 

 

The main problem is that on my site the Meta tags aren't working!!!The only thing it works is the default title, the Default description and the Default Keyword(s) i have setup from the admin Header Tags - English panel!!Do you thing that the fault is on index.php and products_new.php...????I tried to make the changes (with a few knowledge of php) in index.php but i couldn't find exactly the code i had to change!!!!I have posted my index.php on page 106 .Do you believe that's the fault and my site cannot show meta tags!!!Can anyone help me fix my index.php??

 

Thanks in advance!!!

Edited by OratIos
Link to comment
Share on other sites

Another Hint is that my oscommerce website has a template as you have already noticed!!I tried to change the index.php and the product_infeo.php with the original ones that has the latest oscommerce release (Of course the look of my site destroyed, but it was working perfectly)So i made the changes to that files where the code was the same to change!!But unfortunately the meta tags didn't appeared!!So i think that the problem is something else and has no relation with the index.php and product_info.php!!!!The strange is that the whole code i changed it was very easy to be done because it was the same!!!

 

 

I thought also i could be the language, because i am using Greek and not english for default!!But But i changed from the admin the language and setup the English Default!Nothing again !!!I am waitng fr your help.....Thanks

Link to comment
Share on other sites

I'm on a relatively new installation, so I just uploaded all the files in "catalog_for_new_shop_only" again. However, the problem still exists. So, I went into phpMyAdmin and made sure that all the fields that were supposed to be created in header.sql were done. I went through the install documentation and made sure that the file changes were made. However, still it doesn't display properly.

 

For giggles, I went intot he db. For any new product or product that I've edited since Headers installation, I noticed that products_description.products_name in blank. Does that help any?

You could try adding the name while in the database. If it displays properly in the shop, then that will at least cut the possible causes of the problem in half. If it doesn't display properly, then there is a problem in your shop files (as opposed to the admin files). If it does display properly, then the problem is in the admin files. And that takes you back to the categories.php file since that is what controls updating the database. Try replacing the categories file with a stock one, or your original one if you have it. If that works, then you will need to continue working on it to isolate the problem.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I have a problem with HTC.I have installed it and it all seems to be ok in the admin panel.The Fill tags works perfectly so all my products have a meta tag!!The page control and text control also are ok (except one thing) at the page control, at delete new page i have two same pages named 'www' both .I cannot delete it anyway!!!!

The main problem is that on my site the Meta tags aren't working!!!The only thing it works is the default title, the Default description and the Default Keyword(s) i have setup from the admin Header Tags - English panel!!Do you thing that the fault is on index.php and products_new.php...????I tried to make the changes (with a few knowledge of php) in index.php but i couldn't find exactly the code i had to change!!!!I have posted my index.php on page 106 .Do you believe that's the fault and my site cannot show meta tags!!!Can anyone help me fix my index.php??

 

Thanks in advance!!!

Pages are not normally named www so I would suspect a problem there. If you don't have a page named www, then you need to edit the includes/header_tags.php and english/header_tags.php to remove those sections.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...