Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

You wrote (6051) "I haven't tried CKEditor with 2.3 and Header tags but I can't see why it would be different than in a different version. A textarea can only use the editor if the code for that textarea has been changed and Header tags doesn't have that code in all of the boxes. So you've either made a mistake or this is something different about your version of CKeditor that is causing it. I suggest replacing your categories.php file with the included one, enabling the editor option and see if it works correctly. if it does, then the problem is in that file."

 

Using the included categories.php made no change in the behavior of the program . . but in checking further it seems as though the CKEditor implementation methodology changed with this version. In particular, in the <body> section of admin/includes/template_top.php (following the HT SEO code) the following code gets added:

 

<?php

if (!defined('USE_CKEDITOR_ADMIN_TEXTAREA')) {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) values ('', 'Use CKEditor', 'USE_CKEDITOR_ADMIN_TEXTAREA','true','Use CKEditor for WYSIWYG editing of textarea fields in admin',1,99,now(),'tep_cfg_select_option(array(\'true\', \'false\'),' )");

define ('USE_CKEDITOR_ADMIN_TEXTAREA','true');

}

if (USE_CKEDITOR_ADMIN_TEXTAREA == "true") {

?>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>

<script type="text/javascript">

$(function() {

var $editors = $('textarea');

if ($editors.length) {

$editors.each(function() {

var editorID = $(this).attr("id");

var instance = CKEDITOR.instances[editorID];

if (instance) { CKEDITOR.remove(instance); }

CKEDITOR.replace(editorID);

});

}

});

</script>

<?php

}

?>

 

Although I am by no means proficient in php, I believe this added section supersedes the configuration options defined in the HT SEO sections and forces the use of CKEditor if it is enabled in it's configuration option.

 

Having said that, I'm at a loss to determine how to proceed from here....

 

The actual problem I'm dealing with is that when CKEditor is allowed to manage the tags, it includes some HTML formatting codes in the tag, resulting in lines like:

 

<meta name="Description" content="Fantasy Outfits - - _p_Head Detective sexy cop costume_/p_" >

 

Any assistance you could offer would be appreciated.

 

Thanks, Ed

Link to comment
Share on other sites

Although I am by no means proficient in php, I believe this added section supersedes the configuration options defined in the HT SEO sections and forces the use of CKEditor if it is enabled in it's configuration option.

 

Having said that, I'm at a loss to determine how to proceed from here....

 

The actual problem I'm dealing with is that when CKEditor is allowed to manage the tags, it includes some HTML formatting codes in the tag, resulting in lines like:

 

<meta name="Description" content="Fantasy Outfits - - _p_Head Detective sexy cop costume_/p_" >

 

Any assistance you could offer would be appreciated.

I'm sorry but I don't offer support for addons like this. If I get a chance I will install the new version of the editor and try to get it to work but that would be way down on the list. Maybe someone else will post a solution. Otherwise you either need to change editors or you arr on you own.

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

Solved. As suspected, the added code to the /admin/includes/template_top.php from the newest CKEditor contribution forces ALL text areas to utilize the WYSIWYG editor, and overides the configuration options defined in the Header Tags SEO contribution.

 

The solution is to add only two lines from the CKEditor contribution to the template_top.php file just before the </head> tag:

 

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>

 

and NOT to add the function definition called for by the CKEditor install instructions.

 

 

The complete modified catalog/admin/includes/template_top.php file follows:

 

- Ed

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

MODIFIED FOR BOTH CKEditor AND Header Tags SEO contributions

*/

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html <?php echo HTML_PARAMS; ?>>

<head>

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

<meta name="robots" content="noindex,nofollow">

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

<base href="<?php echo HTTP_SERVER . DIR_WS_ADMIN; ?>" />

<!--[if IE]><script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/excanvas.min.js'); ?>"></script><![endif]-->

<link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/ui/redmond/jquery-ui-1.8.6.css'); ?>">

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery-1.4.2.min.js'); ?>"></script>

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/jquery-ui-1.8.6.min.js'); ?>"></script>

 

<?php

if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {

?>

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/i18n/jquery.ui.datepicker-' . JQUERY_DATEPICKER_I18N_CODE . '.js'); ?>"></script>

<script type="text/javascript">

$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);

</script>

<?php

}

?>

 

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.js'); ?>"></script>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script type="text/javascript" src="includes/general.js"></script>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>

</head>

<body>

 

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

 

<?php

if (tep_session_is_registered('admin')) {

include(DIR_WS_INCLUDES . 'column_left.php');

} else {

?>

 

<style>

#contentText {

margin-left: 0;

}

</style>

 

<?php

}

?>

 

<div id="contentText">

Link to comment
Share on other sites

Jack when I run an analyzer on BruceClay website I get these errors: Tag Word Count Stop Words Used Words Length Tag Contents Title 9 1 8 66 <title> was found multiple times. There should only be 1 <title> on the page

 

 

Discounted Name Brand Watches, Sunglasses, Electronics and Much More! Description 16 2 14 97 <meta name="description"> was found multiple times. There should only be 1 <meta name="description"> on the page

 

 

SavingsHUB.com - Saving Our Customers Money Since 2007 - All Orders Over $99.99 Receive Free Shipping! Keywords 35 0 35 238 <meta name="keywords"> was found multiple times. There should only be 1 <meta name="keywords"> on the page

 

 

tag heuer watches, discount tag heuer watch, sunglasses, roberto cavalli glasses, chanel, christian dior, apple, jvc, casio watch, omega watches, discount watch, swiss watch sale, authentic watches, genuine watch, bvlgari, gucci watch, gucci sunglass, mau

Why are their multiple Meta tags? Maybe I have something enabled where it shouldnt? Any clue on how to fix this?

Link to comment
Share on other sites

Jack when I run an analyzer on BruceClay website I get these errors: Tag Word Count Stop Words Used Words Length Tag Contents Title 9 1 8 66 <title> was found multiple times. There should only be 1 <title> on the page

 

Why are their multiple Meta tags? Maybe I have something enabled where it shouldnt? Any clue on how to fix this?

It would appear that something is wrong with your installation. My guess is that the code had been previously modified with some other meta tags contribution or the title and tags were manually added. The installation procedure assumes that is not the case so if it is, you have to remove that changed/extra code.

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

Jack,

 

First off great add ons!

 

I can get header tags seo to work to every page I add it to except the individual products.

There were a bunch of "replace" options that didn't even exist in my files so I didn't know where to put the code.

 

What files need to be fixed to get the products to work?

Where do I put the code if I have nowhere to replace anything?

 

Thanks

Link to comment
Share on other sites

Hi,

 

I installed the Header Tags SEO yesterday and it seems to be working perfectly. However, this morning I discovered our web host had suspended our account and taken our website offline. After contacting them, they said that they had detected malware and sent me this report (I've removed part of the file path and server name from it):

 

Nov 10 05:45:54 [server_name] maldet(3336): {hexstring} malware hit

{HEX}gzbase64.inject.unclassed.14 on

/home/[shop_path]/admin/includes/functions/header_tags.php

Nov 10 05:47:45 [server_name] maldet(3336): {quar} account [account_name] cpanel suspended

Nov 10 05:47:45 [server_name] maldet(3336): {quar} malware quarantined from

'/home/[shop_path]/admin/includes/functions/header_tags.php' to

'/usr/local/maldetect/quarantine/header_tags.php.16390'

Nov 10 05:47:50 [server_name] maldet(3336): {hexstring} malware hit

{HEX}gzbase64.inject.unclassed.14 on

/home/[shop_path]/includes/functions/header_tags.php

Nov 10 05:47:50 [server_name] maldet(3336): {quar} malware quarantined from

'/home/[shop_path]/includes/functions/header_tags.php' to

'/usr/local/maldetect/quarantine/header_tags.php.24402'

 

 

I'm using the latest version (20 June 2011) from http://addons.oscomm....com/info/5851/ on osCommerce 2.3 and I used the osCommerce_2.3_or_greater install.

 

 

Has anyone experienced this problem with includes/functions/header_tags.php and includes/admin/functions/header_tags.php before?

 

Do you have any thoughts as to why this could have been flagged and any way to prevent this?

 

 

I'm chasing this up with the web host, but I thought I'd check if anyone else had experienced a similar problem.

 

Thanks,

 

Robin

Edited by rob6566
Link to comment
Share on other sites

Hi,

 

I installed the Header Tags SEO yesterday and it seems to be working perfectly. However, this morning I discovered our web host had suspended our account and taken our website offline. After contacting them, they said that they had detected malware and sent me this report (I've removed part of the file path and server name from it):

 

Nov 10 05:45:54 [server_name] maldet(3336): {hexstring} malware hit

{HEX}gzbase64.inject.unclassed.14 on

/home/[shop_path]/admin/includes/functions/header_tags.php

Nov 10 05:47:45 [server_name] maldet(3336): {quar} account [account_name] cpanel suspended

Nov 10 05:47:45 [server_name] maldet(3336): {quar} malware quarantined from

'/home/[shop_path]/admin/includes/functions/header_tags.php' to

'/usr/local/maldetect/quarantine/header_tags.php.16390'

Nov 10 05:47:50 [server_name] maldet(3336): {hexstring} malware hit

{HEX}gzbase64.inject.unclassed.14 on

/home/[shop_path]/includes/functions/header_tags.php

Nov 10 05:47:50 [server_name] maldet(3336): {quar} malware quarantined from

'/home/[shop_path]/includes/functions/header_tags.php' to

'/usr/local/maldetect/quarantine/header_tags.php.24402'

 

 

I'm using the latest version (20 June 2011) from http://addons.oscomm....com/info/5851/ on osCommerce 2.3 and I used the osCommerce_2.3_or_greater install.

 

 

Has anyone experienced this problem with includes/functions/header_tags.php and includes/admin/functions/header_tags.php before?

 

Do you have any thoughts as to why this could have been flagged and any way to prevent this?

 

 

I'm chasing this up with the web host, but I thought I'd check if anyone else had experienced a similar problem.

 

Thanks,

 

Robin

wow this cannot be good.

no offence, im hoping its just your server and not the scripts.

 

Change your passwords.

scan all of your files for irregular date changes.

Link to comment
Share on other sites

Jack,

 

First off great add ons!

 

I can get header tags seo to work to every page I add it to except the individual products.

There were a bunch of "replace" options that didn't even exist in my files so I didn't know where to put the code.

 

What files need to be fixed to get the products to work?

Where do I put the code if I have nowhere to replace anything?

 

Thanks

All you really need to have the products work is the change to the <head> section, and only then if it is a standard oscommerce shop before 2.3. You could also compare yours to the included one.

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

Hi,

 

I installed the Header Tags SEO yesterday and it seems to be working perfectly. However, this morning I discovered our web host had suspended our account and taken our website offline. After contacting them, they said that they had detected malware and sent me this report (I've removed part of the file path and server name from it):

No ones ever reported having such a problem with this contribution so I doubt that the hacking is due to it. It might be that there is a virus on your computer that infected the files before uploading. You can compare them to the originals to be sure. But, most likely, your site just got hacked and the two are not related. Or perhaps the scanner your host is using is picking up something that really isn't a problem.

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

Hey Jack,

 

I just noticed that I still have the oscid extra stuff at the end of my url. And from what I understand Header Tags has a Canonical feature in it, right?

 

Is there a setting that I maybe missed that would be causing this?

Header Tags doesn't have anything to do with the url. The session ID showing usually means your configure file is not setup correctly. See this thread on how to set it up: http://www.oscommerce.com/forums/index.php?showtopic=193738&hl=

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

Header Tags doesn't have anything to do with the url. The session ID showing usually means your configure file is not setup correctly. See this thread on how to set it up: http://forums.oscomm...opic=193738&hl=

 

Thank you Jack,

 

But I just went over there and to me it seems like everything is setup correctly.

 

I only saw one post in regards to oscid (which was on page 3 post #56) but nobody replied to it.

Link to comment
Share on other sites

wow this cannot be good.

no offence, im hoping its just your server and not the scripts.

 

Change your passwords.

scan all of your files for irregular date changes.

 

I think it's probably their malware software misidentifying the scripts. I only installed them the day previously, from the most recent update from 20 June. Still no word from the webhost though.

Link to comment
Share on other sites

good morning

 

After replacing the code several times and revise, I get the error in admin:

 

Warning: call_user_func(header_tags_reset_cache): First argument is expected to be a valid callback in /var/www/vhost/cafesoboe.com/home/html/admin/includes/functions/general.php on line 1199

 

 

Any idea where I left some code or some sql instruction??

 

 

Thanks

Link to comment
Share on other sites

good morning

 

After replacing the code several times and revise, I get the error in admin:

 

Warning: call_user_func(header_tags_reset_cache): First argument is expected to be a valid callback in /var/www/vhost/cafesoboe.com/home/html/admin/includes/functions/general.php on line 1199

 

 

Any idea where I left some code or some sql instruction??

It usually the change to the admin/includes/functions/general.php file wasn't changed correctly or the header tags functions file wasn't uploaded.

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

Hi

I am creating a site using a template monster template and have just tried to install Header Tags SEO only to discover that my index.php or product_info.php files do not have the following code:

 

 

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

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

 

Where could it be?

 

This is the full coding for my index.php.

 

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');/*
 $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
 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 require(DIR_WS_INCLUDES . 'header_includes.php'); ?>
</head>
<body>
<?php
 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 . "'");
   $category = tep_db_fetch_array($category_query);
?>
<!-- header //-->
<?php $tab_sel = 2; ?>
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<?php
$sum2 = 0;
?>
<!-- body //-->
<table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0" align="center">
<tr>
   <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->


   <td class="<?php echo CONTENT_WIDTH_TD; ?>">

<?php echo tep_draw_top();?><?php include(DIR_WS_BOXES . 'panel_top.php');?>

   <?php new contentBoxHeading_ProdNew($info_box_contents);?><?php echo tep_draw3_top();?>

 <table border="0" width="100%" cellspacing="0" cellpadding="0" class="main sub_category">
		  <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']);

$p_pic_sub = '<a 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) . '</a>';$p_name_sub = '<b><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a></b>';

  $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
  echo '<td align="center" width="' . $width . '">'.tep_draw_prod2_top().'
   <table cellpadding="0" cellspacing="0" border="0" class="wrapper_box">
 <tr><td class="pic2_padd">'.tep_draw_prod_pic_top().''.$p_pic_sub.''.tep_draw_prod_pic_bottom().'</td></tr>
 <tr><td class="name name4_padd">'.$p_name_sub.'</td></tr>
   </table>'.tep_draw_prod2_bottom().'
  </td>'."\n";

   if ($col!=(MAX_DISPLAY_CATEGORIES_PER_ROW-1)){
   echo '
   <td class="prod_line_y padd_vv">'.tep_draw_separator('spacer.gif', '1', '1').'</td>	
   ';
   }else{

   if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
  echo '			 
 </tr><tr><td class="prod_line_x padd_gg" colspan="'.(MAX_DISPLAY_CATEGORIES_PER_ROW + MAX_DISPLAY_CATEGORIES_PER_ROW -1).'">'.tep_draw_separator('spacer.gif', '1', '1').'</td></tr>' . "\n";
  echo '<tr>' . "\n";
  }
}
if ($col==MAX_DISPLAY_CATEGORIES_PER_ROW-1){
$col=0;
}else{
$col++;
}
}
// needed for the new products module shown below
   $new_products_category_id = $current_category_id;
?>
		  </tr>
	    </table>  
<?php echo tep_draw3_bottom();?><?php /*echo tep_draw_bottom();*/?>
<?php /*echo tep_draw_top();*/?>    <?php new contentBoxHeading_WHATS_NEW($info_box_contents, true, false);?>
<br>  
<?php echo tep_draw3_top();?>

   <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>

<?php echo tep_draw3_bottom();?>
<?php echo tep_draw_bottom();?><?php include(DIR_WS_BOXES . 'panel_bottom.php');?></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 left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c 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 left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m 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 left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c 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 left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c 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);
  switch ($column_list[$sort_col-1]) {
    case 'PRODUCT_LIST_MODEL':
	  $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
    case 'PRODUCT_LIST_NAME':
	  $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
	  break;
    case 'PRODUCT_LIST_MANUFACTURER':
	  $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
    case 'PRODUCT_LIST_QUANTITY':
	  $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
    case 'PRODUCT_LIST_IMAGE':
	  $listing_sql .= " order by pd.products_name";
	  break;
    case 'PRODUCT_LIST_WEIGHT':
	  $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
    case 'PRODUCT_LIST_PRICE':
	  $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
	  break;
  }
   }
?>
<!-- header //-->
<?php $tab_sel = 2; ?>
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<?php
$sum2 = 0;
?>
<!-- body //-->
<table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0" align="center">
<tr>
   <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->    <td class="<?php echo CONTENT_WIDTH_TD; ?>">

<?php echo tep_draw_top();?><?php include(DIR_WS_BOXES . 'panel_top.php');?>
<?php
// optional Product List Filter
if (PRODUCT_LIST_FILTER > 0) {
  if (isset($HTTP_GET_VARS['manufacturers_id'])) {
    $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
  } else {
    $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
  }
  $filterlist_query = tep_db_query($filterlist_sql);
  if (tep_db_num_rows($filterlist_query) > 1) {
   echo tep_draw_side_top();
    echo '
 <table cellpadding="0" cellspacing="0" border="0" class="select2">
  <tr><td align="right" class="main">' . tep_draw_form('filter', tep_href_link( FILENAME_DEFAULT ), 'get') . '<b>'.TEXT_SHOW . '</b>';
    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
	  echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
	  $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
    } else {
	  echo tep_draw_hidden_field('cPath', $cPath);
	  $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
    }
    echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
    while ($filterlist = tep_db_fetch_array($filterlist_query)) {
	  $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
    }
    echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
    echo tep_hide_session_id() . '</form></td></tr>
 </table>' . "\n";
 echo tep_draw_side_bottom();
  }
   }

// 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'];
   }
?>
   <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?>

 <!--- BEGIN Header Tags SEO Social Bookmarks -->
  <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true')
   include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php');
  ?>
  <!--- END Header Tags SEO Social Bookmarks --> 


<?php echo tep_draw_bottom();?><?php include(DIR_WS_BOXES . 'panel_bottom.php');?>

</td>
<?php
 } else { // default page
?>
<!-- header //-->
<?php $tab_sel = 222; ?>
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<?php
$sum2 = 0;
?>
<!-- body //-->
<table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0" align="center">
<tr>
   <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->    <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo tep_draw_top();?><?php include(DIR_WS_BOXES . 'panel_top.php');?>

<!-- Welcome_box_start -->
<?php /*  tep_draw_heading_top();  */?>
<?php /*  tep_draw_heading_top_3();  */?>
<?php   /*  echo tep_draw_prod_top();  */  ?>
 <!--   <table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr><td class="main"><?php /*  echo tep_customer_greeting();  */    ?></td></tr>
	  <tr><td><?php    /*  echo tep_draw_separator('pixel_trans.gif', '100%', '10');  */   ?></td></tr>
	  <tr><td class="main"><?php    /*   echo TEXT_MAIN;  */    ?></td></tr>
    </table>  -->

<?php   /*  echo tep_draw_prod_bottom();  */   ?>
<?php /*  tep_draw_heading_bottom_3();  */?>
<?php  /*   echo tep_draw_separate();    */   ?><!-- Welcome_box_end -->

   <?php new contentBoxHeading_ProdNew($info_box_contents);?><?php echo tep_draw3_top();
$sum2 = 1;
?>

   <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>

   <!--- BEGIN Header Tags SEO Social Bookmarks -->
	  <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true')
	   include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php');
	  ?>
	  <!--- END Header Tags SEO Social Bookmarks --> 

<?php echo tep_draw3_bottom();?>

   <?php include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?>
		   <?php echo tep_draw_bottom();?><?php include(DIR_WS_BOXES . 'panel_bottom.php');?></td>
<?php
 }
?>
<!-- body_text_eof //-->
<td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0">
<!-- 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>
<?php require(DIR_WS_INCLUDES . 'footer_includes.php'); ?>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

I'm guessing several things: Template monster have:

  • have used alternative coding for the same outcome - in which case how/what do I change?
  • included that section of coding in an alternative file - in which case how do I find it?
  • for whaterever reason this code or an alternative is not part of the template - which I assume means I cannot use Header Tags SEO

I welcome your thoughts and hopefully tips on how to proceed.

 

Helen

Link to comment
Share on other sites

I am presently using an old version of Header Tags Controller and would like to upgrade to the current version of Header Tags SEO.

Is there a way to extract and backup my existing Title, Description and Keyword tags to a text, or table file?

I have seen scripts for extracting this from a home page, but not for the entire site.

Link to comment
Share on other sites

I am presently using an old version of Header Tags Controller and would like to upgrade to the current version of Header Tags SEO.

Is there a way to extract and backup my existing Title, Description and Keyword tags to a text, or table file?

I have seen scripts for extracting this from a home page, but not for the entire site.

The title and tags are stored in the products descriptions and categories descriptions tables, so you can store them by download those tables but it is not necessary. The easiest way to upgrade is to go trhough all of the update docs and apply the database changes in them. It may seem like a big job but it isn't. You can copy/paste the mysql changes into one file and then run that all at once. You should, of course, backup your database first. Then just run through the installation instructions for the one that matches your shops version.

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

In trying to upgrade my old version of Header Tags Controller to the Header Tags SEO current version, I have tried following the guidelines for a version less than 2.3.

I get the "Replace me in Page Control under index.php" message at the top of my browser when viewing the catalog, but I get a blank page for the admin.

 

I tried putting echo's into admin/application_top.php, admin/includes/functions/general.php, and admin/includes/functions/header_tags_general.php, as application_top requires general.php (near the end), and general.php requires header_tags_general.php (near the end), and the echo in the last one, header_tags_general.php is not being displayed.

 

Any ideas as to what I might check at this point?

 

Stanley

Link to comment
Share on other sites

In trying to upgrade my old version of Header Tags Controller to the Header Tags SEO current version, I have tried following the guidelines for a version less than 2.3.

I get the "Replace me in Page Control under index.php" message at the top of my browser when viewing the catalog, but I get a blank page for the admin.

 

I tried putting echo's into admin/application_top.php, admin/includes/functions/general.php, and admin/includes/functions/header_tags_general.php, as application_top requires general.php (near the end), and general.php requires header_tags_general.php (near the end), and the echo in the last one, header_tags_general.php is not being displayed.

 

Any ideas as to what I might check at this point?

 

Stanley

You could try using/comparing the included files.

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

Jack,

 

I'm trying the changes on my test site first. I've compared the changed files, and as far as I can tell, they follow the change instructions.

I am aware the the largest number of changes are to the admin/categories.php file. Is there an available tool for comparing the number of opening and closing braces in that file?

I think that I have seen the blank admin screen in the past, but it's difficult pinpointing it, because I have applied all changes at once, creating the new databases, uploading the new files, and editing the existing files - I have not deleted the obsolete files (includes/header_tags.php, includes/languages/english/header_tags.php) - because I did not think that this should be necessary, and I have not run the script to capture the existing header tag information.

 

Stanley

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...