Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

If you are referring to the check boxes in Text Control, they are not recorded by Fill Tags. They are recorded from Text Control and are written to the includes/languages/english/header_tags.php file.

 

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

After completing all the instruction the store ran fine.

 

I was able to see the addin for the admin side also, but when I entered in Default Title my index page went blank. This is as far as the code gets.

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

 

FYI: The admin side seems to do what its suppose to do. ie the Fill Tag did update the tables.

 

pinch.gif PLZ HELP!

Link to comment
Share on other sites

I think this is the problem, by my test installation (whit english) and my home page he not change the file, ever the same date. He change the file only by Text Control then he make a update.

 

By my test installation whit english (standart lang.) he write in the german folder.

 

I look in the filenames.php and I see header_tags_includes.php I have not the file, is this okay?

Link to comment
Share on other sites

After completing all the instruction the store ran fine.

 

I was able to see the addin for the admin side also, but when I entered in Default Title my index page went blank. This is as far as the code gets.

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

 

FYI: The admin side seems to do what its suppose to do. ie the Fill Tag did update the tables.

 

pinch.gif PLZ HELP!

Try replacing these files on your site from the ones in the package:

 

includes/languages/english/header_tags.php

includes/header_tags.php

 

When saving the defaults avoid using a single quote for now.

Link to comment
Share on other sites

I think this is the problem, by my test installation (whit english) and my home page he not change the file, ever the same date. He change the file only by Text Control then he make a update.

 

By my test installation whit english (standart lang.) he write in the german folder.

 

I look in the filenames.php and I see header_tags_includes.php I have not the file, is this okay?

Yes, that file does not exist. Not sure why it is defined in filenames.php.

Jack... another correction for the new version :)

three places:

Install_Admin.TXT

catalog_for_new_shop_only\admin\includes\filenames.php

Update_Docs\Update_HeaderTags_Admin_Controller.txt

Link to comment
Share on other sites

If you are referring to the check boxes in Text Control, they are not recorded by Fill Tags. They are recorded from Text Control and are written to the includes/languages/english/header_tags.php file.

 

Jack

 

Oh I missunderstand sorry, I search the store position from the Fill Tags Site (skip all tags, Fill only empty tags...).

 

Sorry my english is not the best

Link to comment
Share on other sites

Try replacing these files on your site from the ones in the package:

 

includes/languages/english/header_tags.php

includes/header_tags.php

 

When saving the defaults avoid using a single quote for now.

 

I replaced them.

 

Result

 

Index.php Good :thumbsup: (Tag = Home page) Gets the default tag, perfect!

index.php?cPath=1 Good :thumbsup: (Tag = Printers) Gets the assigned tag, again perfect!

I can continue to drill down, the tags working perfect, but when I get to product_info.php I get a

blank page.

 

ref:

 

http://www.feedroller.com/Store

Link to comment
Share on other sites

Yes, that file does not exist. Not sure why it is defined in filenames.php.

Jack... another correction for the new version :)

three places:

Install_Admin.TXT

catalog_for_new_shop_only\admin\includes\filenames.php

Update_Docs\Update_HeaderTags_Admin_Controller.txt

Hmm, I thought I removed those many versions ago. I have just made that change in the new version. Thanks for the mention.

 

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

 

Result

 

Index.php Good :thumbsup: (Tag = Home page) Gets the default tag, perfect!

index.php?cPath=1 Good :thumbsup: (Tag = Printers) Gets the assigned tag, again perfect!

I can continue to drill down, the tags working perfect, but when I get to product_info.php I get a

blank page.

 

ref:

 

http://www.feedroller.com/Store

 

 

Had to turn of the tags. Lossing business.

Link to comment
Share on other sites

hey jack , can you please help me with this problem.

 

on the product_info page , like when i go to

 

admin> header tags > text control

 

and for product info page

i fill the

title: test1

Description: test1

Keyword(s): test1

 

what ever i fill in these box, it wont show up on the product info page

 

/test1/product_info.php?cPath=2_19&products_id=22

 

 

on the above page, only the product title (name) comes up, but not the "test1" title that i entered in admin text contorl page.

 

what i am trying to get is to show the products name + "test1" in the title.

 

so for all the products the title will be their name and test1 will appear with every product.

---

 

One more thing. Could you please tell me if there is a way to get custom titles for manufacturers page.

 

 

thankx for such a great contribution :)

Link to comment
Share on other sites

1 - If Categories Description is installed correctly (not changed when Header Tags was installed), then it will work fine...

I wasn't able to get both to work, so I went back to an old version of admin/categories.php that didn't have the categories descriptions modifications and installed header tags controller.

 

Now, I do see the meta tag info fields for my categories. I also noticed that their is a field now that says "Header Tags Categories Description". Can you tell me what that field is for?

2 - It's been a while since I messed with STS but I think you still need to edit the individual files to include the Header Tags code. Try it and see what happens. It only takes a few minutes.

When you say include the Header Tags code, do you mean replacing

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

with

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>

Thanks again!!!

Link to comment
Share on other sites

hey jack , can you please help me with this problem.

 

on the product_info page , like when i go to

 

admin> header tags > text control

 

and for product info page

i fill the

title: test1

Description: test1

Keyword(s): test1

 

what ever i fill in these box, it wont show up on the product info page

 

/test1/product_info.php?cPath=2_19&products_id=22

on the above page, only the product title (name) comes up, but not the "test1" title that i entered in admin text contorl page.

 

what i am trying to get is to show the products name + "test1" in the title.

 

so for all the products the title will be their name and test1 will appear with every product.

---

 

One more thing. Could you please tell me if there is a way to get custom titles for manufacturers page.

thankx for such a great contribution :)

The code isn't setup to use the text in the product_info section in Text Control. This should be changed in the next version. In the meantime, find this line in includes/header_tags.php

		$tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']) . ' ' . HEAD_TITLE_TAG_ALL;

and change it to something like

		$tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']) . ' ' . 'Some Text';

where Some Text is what you want to display. You could, of course just change the default title to that and it will work without the code cahange but I am assuming you don't want that.

 

Title for manufactuers will be in the next version.

 

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 wasn't able to get both to work, so I went back to an old version of admin/categories.php that didn't have the categories descriptions modifications and installed header tags controller.

 

Now, I do see the meta tag info fields for my categories. I also noticed that their is a field now that says "Header Tags Categories Description". Can you tell me what that field is for?

 

When you say include the Header Tags code, do you mean replacing

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

with

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>

Thanks again!!!

When you tried it, did you remember to turn the Categories Description option off in admin->Configuration? You shouldn't go back to an earlier version since you may be introducing bugs. Plus, what happens when it is updated - the problem will only get worse. The Header Tags Categories Description field is for the Categories Description that Header Tags adds. If you are using the Categories Description contribution instead, then that field is not needed, although the code will still look for it so it should be present. As for he code change, yes, that is what I meant.

 

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

The code isn't setup to use the text in the product_info section in Text Control. This should be changed in the next version. In the meantime, find this line in includes/header_tags.php

		$tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']) . ' ' . HEAD_TITLE_TAG_ALL;

and change it to something like

		$tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']) . ' ' . 'Some Text';

where Some Text is what you want to display. You could, of course just change the default title to that and it will work without the code cahange but I am assuming you don't want that.

 

Title for manufactuers will be in the next version.

 

Jack

 

 

hey bro, this is exactly what i wanted :) , the code change worked nicely.

 

 

Looking forward to the next version :)

Link to comment
Share on other sites

hey bro,

i am installing HTC in my cousins site but got stuck on index.php page, Its totally different from stock oscommerce and i have no idea what to do :(

 

here is the index.php file

 

<?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: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- <?php echo BOX_WIDTH; ?> -->


<!-- SECTION TITLE BANNER -->
<?if ($category_depth == "products") {
$parentCategory = substr($cPath, 0, strpos($cPath, "_"));
if ($parentCategory == "39") {
?>
<table cellpadding="0" cellspacing="0" border="0" align="center" width="780" height="81" bgcolor="white">
<tr>
<td>
<img src="images/new/section-title-men.gif" width="780" height="81" alt="" border="0"></td>
</tr>
</table>
<?
} else if ($parentCategory == "5") {
?>
<table cellpadding="0" cellspacing="0" border="0" align="center" width="780" height="81" bgcolor="white">
<tr>
<td>
<img src="images/new/section-title-women.gif" width="780" height="82" alt="" border="0"></td>
</tr>
</table>
<?
}}?>

<!-- CONTENT -->
<table cellpadding="0" cellspacing="0" border="0" align="center" width="780" height="300" bgcolor="white">
<tr>
<!-- LEFT COLUMN -->
<td width="180" bgcolor="#F5F5F5" valign="top">
<div style="margin-left:5px;">
<?

if ($category_depth == "products" || isset($HTTP_GET_VARS['manufacturers_id'])) {
//coloana asta e doar de forma, trebuie facuta alta
require(DIR_WS_INCLUDES . 'column_left_main_category.php');
} else if ($category_depth == "nested") {
require(DIR_WS_INCLUDES . 'column_left_main_category.php');
} else {
require(DIR_WS_INCLUDES . 'column_left.php');
}

?>
</div>
</td>
<!-- MAIN COLUMN -->
<td width="600" bgcolor="white" valign="top">

<?php
if ($category_depth == "products" || isset($HTTP_GET_VARS['manufacturers_id'])) {
require(DIR_WS_INCLUDES . '/content/subcategory.php');
} else if ($category_depth == "nested") {
require(DIR_WS_INCLUDES . '/content/main_category.php');
} else {
require(DIR_WS_INCLUDES . '/content/mainpage.php');
}
?>

</td>
</tr>

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

All the other files were not heavily modified so i managed to add the HTC code in them.

 

Could you please help me with this file

 

thankx

Link to comment
Share on other sites

When you tried it, did you remember to turn the Categories Description option off in admin->Configuration?

Thanks, Jack! Talk about making something harder than it had to be. I has misunderstood before and thought I needed to remove all the code from the Categories Description mod! I turned it off in the admin and everything is working perfectly now!

 

One last thing, do you know how I would go about limiting the category description display to only the first page of the category's product listings? Let's say I have a category with 100 products. When the visitor first enters that category, I'd like to have summary text about the category, before the product list begins on that page. However, when the visitor goes to page 2, 3, 4 etc. of the category's product listing, they wouldn't want or need to see that text again. Any suggestions??

Link to comment
Share on other sites

hey bro,

i am installing HTC in my cousins site but got stuck on index.php page, Its totally different from stock oscommerce and i have no idea what to do :(

 

here is the index.php file

 

All the other files were not heavily modified so i managed to add the HTC code in them.

 

Could you please help me with this file

 

thankx

No, I won't be able to help you. The code you need to change is still there, just moved. You will need to find it and change it per the instructions.

 

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

You would have to add code to test for which page is being shown. Something like if (page == 1) show_category description). This isn't real code since I don't know what variable your code uses but the idea is there.

 

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

After completing all the instruction the store ran fine.

 

I was able to see the addin for the admin side also, but when I entered in Default Title my index page went blank. This is as far as the code runs.

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

 

 

If I leave the default values in the admin page, the tags for the catagories works great, but when you get to the product it returns a blank page.

 

This is the code that does run

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 

 

 

FYI: The admin side seems to do what its suppose to do. ie the Fill Tag did update the tables.

 

PLZ HELP!

 

http:\\www.feedroller.com\Store

Edited by robguay
Link to comment
Share on other sites

After completing all the instruction the store ran fine.

 

I was able to see the addin for the admin side also, but when I entered in Default Title my index page went blank. This is as far as the code runs.

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

If I leave the default values in the admin page, the tags for the catagories works great, but when you get to the product it returns a blank page.

 

This is the code that does run

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

FYI: The admin side seems to do what its suppose to do. ie the Fill Tag did update the tables.

 

PLZ HELP!

 

http:\\www.feedroller.com\Store

your probem is related to the database in some way. The last time I looked at it the product_info.php page would show the default tags if I removed the product number from the url (&products_id=xxx). That is all I can tell you. I can't come up with anything that would cause that.

 

did you check your store before running the Fill Tags utility?

 

Maybe try to change the error reporting in your application_top.php from:

error_reporting(E_ALL & ~E_NOTICE);

to:

error_reporting(E_ALL);

temprarily to see if any odd notices get reported.

Link to comment
Share on other sites

your probem is related to the database in some way. The last time I looked at it the product_info.php page would show the default tags if I removed the product number from the url (&products_id=xxx). That is all I can tell you. I can't come up with anything that would cause that.

 

did you check your store before running the Fill Tags utility?

 

Maybe try to change the error reporting in your application_top.php from:

error_reporting(E_ALL & ~E_NOTICE);

to:

error_reporting(E_ALL);

temprarily to see if any odd notices get reported.

 

 

I do not understand, but changing that code fix the issue! :thumbsup: :thumbsup:

 

THANKS

Link to comment
Share on other sites

i installed heade tag and it is working but

the second part of the header tag contripution is (update categories description) under update_doc in the package:

 

the changing about line 865 in the instruction, when i change it , i got the following error:

 

 

 

Categories / Products Status Action

1054 - Unknown column 'c.category_head_title_tag' in 'field list'

 

select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.category_head_title_tag, c.category_head_desc_tag, c.category_head_keywords_tag, c.category_head_description from categories c, categories_description cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.sort_order, cd.categories_name

 

[TEP STOP]

 

i made all changes in the instruction and i did not get any error and the source of this error at line 865

- how can i run sqlscript (Update_header_categories_description) and be sure he made the update in the database.

please advice

thx for ur help

Link to comment
Share on other sites

The category_head_title_tag field is outdated. What version did you install?

 

Jack

 

thank you Mr Jack for ur help

 

i installed latest contripution HeaderTags_V_2.5.6 on latest oscommerce (oscommerce-2.2ms2-051113)

i used the instruction under it (Update_Categories_Descriptions)

 

 

 

i did not fill any products till now just i custmheader tag working gooodized the sit (colors & layout)

 

header tag apear in my admin and working well

 

wait ur kind reply

Link to comment
Share on other sites

i installed latest contripution HeaderTags_V_2.5.6 on latest oscommerce (oscommerce-2.2ms2-051113)

i used the instruction under it (Update_Categories_Descriptions)

I don't believe the files in the Update_Docs folder are current, as they still use the category_head_title_tag field. Instead, I used the instructions in the Install_Admin doc, and it worked fine.

 

- Dani

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