Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

Can someone help with this issue: I just moved my live site to another server and all works well except the headertag at the product level. My configure.php files are all updated to the new database but I cannot find out why the headertags work for the index and category pages, but not for my product level page anymore. Can someone point me in the right direction. I have been combing through files for 3 days now...


Laser labels, barcode labels, custom labels

Share this post


Link to post
Share on other sites
Hi,

 

I still can't get Fill Tags to work properly.. everything else seems to work. I suppose Fill Tags should be able to fill in meta tags from the product name and product description, but when I try with for example "Fill only empty tags" nothing happens. Fo fill the tags manually is not a problem, but I would really appreciate the auto fill.

The Fill Empty code for products only works if the products header tags title is blank. So oyu may want to check a product that you are trying to fill and be sure that field is blank.

 

 

Can someone help with this issue: I just moved my live site to another server and all works well except the headertag at the product level. My configure.php files are all updated to the new database but I cannot find out why the headertags work for the index and category pages, but not for my product level page anymore. Can someone point me in the right direction. I have been combing through files for 3 days now...
Did you copy the database or is it new. If it's new, then you will need to run file tags again.

 

Jack

Share this post


Link to post
Share on other sites
QUOTE(mrjkb @ Nov 5 2005, 12:11 PM)

 

Can someone help with this issue: I just moved my live site to another server and all works well except the headertag at the product level. My configure.php files are all updated to the new database but I cannot find out why the headertags work for the index and category pages, but not for my product level page anymore. Can someone point me in the right direction. I have been combing through files for 3 days now...

 

Did you copy the database or is it new. If it's new, then you will need to run file tags again.

 

Jack

 

I copied the database over. If I go into my item level in admin all of the information is there. It just does not show up on the title bar or source for the item level only. The category level and index page are good. If you would like to see what I mean click here and then go to a category and other areas to see that it works.


Laser labels, barcode labels, custom labels

Share this post


Link to post
Share on other sites

Hi,

 

first of all: this is a great contib! THX.

 

I think I found the reason for missing Tags in other languages than english. It seems to be a minor bug in the admin/header_tags_fill_tags.php especially in the language selector.

 

Because i am german, i used to have only german language (as standard). I copied the needed files from

admin/include/languages/english to admin/includes/languages/german/

and

includes/languages/english/ to includes/languages/german/

 

when i startet to fill the tags, nothing happend. The tags did not appear because they were not in the database. (language id = 2 = german)

 

Then i installed english as the second language with german still as standard.

I tried to fill the tags with selected language german ==> nothing happened.

 

I tried to fill the tags with selected language english ==> SUPRPRISE: the tags are filled! But have a look on the configuration in the database:

The language IDs are: english = 5 (due to several installs and deletes)

german = 2

 

Though i filled the tags with language selector on english, i got the german tags (language id = 2) filled.

The tags f?r language id=5 = english are still empty. changing language selector to german does not change anything!

 

For me it seems, as only the language with the lowest language id will be filled. This is on a vanilla install english. After deleting english, the second language will have the lowest language id.

 

Im not sure, but it seems, that english as selected language works in a muliple language store / other than english language store.

 

I double checked all changed an uploades files.

 

My test-store is in the root-directory. i use header tags controller version "corrections plus missing vital install instruction" by 241 from 16. october 2005 based von version 2.55 by Jack mcs 7. september 2005.

 

I use a vanilla installation with only on extra contrib: Ultimate SEO 2.1c (running correctly).

 

Maybe my hints are usefull, hopefully someone fixes the bug. i did not find the bug in the code nor i found any help in this forum topic. Maybe there isn't any ...

 

Thanks for helping me

erdm?nnchen

Share this post


Link to post
Share on other sites

Maybe i found another hint for the "language bug", if it is a bug and not my fault:

 

This is the code form the file header_tags_fill_tags.php

 

for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$languages_array[] = array('id' => $i + 1, //$languages[$i]['id'],
						   'text' => $languages[$i]['name']);

 

I wonder, why //$languages[$i]['id'] is commented out. Because the next parts of code say:

$langID = $languages_id;

 

...

 

$langID = $_POST['fill_language'];

 

...

$categories_tags_query = tep_db_query("select categories_name, categories_id, categories_htc_title_tag, categories_htc_desc_tag, categories_htc_keywords_tag, language_id from categories_description where language_id = '" . $langID . "'");
  while ($categories_tags = tep_db_fetch_array($categories_tags_query))

 

...

$products_tags_query = tep_db_query("select products_name, products_description, products_id, products_head_title_tag, products_head_desc_tag, products_head_keywords_tag, language_id from " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . $langID . "'");
  while ($products_tags = tep_db_fetch_array($products_tags_query))

 

Maybe this is the reason why fill tags works for me only with selected language "english" in ==> admin ==> header tags ==> fill tags.

 

See you

erdm?nnchen

Share this post


Link to post
Share on other sites
The Fill Empty code for products only works if the products header tags title is blank. So oyu may want to check a product that you are trying to fill and be sure that field is blank.

Did you copy the database or is it new. If it's new, then you will need to run file tags again.

 

Jack

 

All products tags are empty. I'm using swedish though.. is that a problem?

Share this post


Link to post
Share on other sites

Hello,

I have a quick question, is there a way to use the header tags controller variables outside of the <head> tags?

 

What I would like to do is make the h1 on the product_info.php page the product title, rather then the product name. The product title being the one defined by header tags controller within the admin. Any quick solutions I have thought of have either cause a error while reading the database or nothing appears at all.

 

Not an urgent problem, but would be curious to know because I think this would result in a more accurate h1.

 

Thanks.

Share this post


Link to post
Share on other sites
I copied the database over. If I go into my item level in admin all of the information is there. It just does not show up on the title bar or source for the item level only. The category level and index page are good. If you would like to see what I mean click here and then go to a category and other areas to see that it works.
It appears the title is not being read in. If it exists properly in the database, then the includes/header_tags.php or english/header_tags.php file are the most likely problems. Try temporairly replacing them with either the files from the archive or from your other shop.

 

Jack

 

 

Jochen & Fredrik - Are you changing the languages selector on the fill tags page before you run that option? It will only fill the tags for the language that is set regardless of what language your admin panel is set to.

 

Jack

 

 

Hello,

I have a quick question, is there a way to use the header tags controller variables outside of the <head> tags?

 

What I would like to do is make the h1 on the product_info.php page the product title, rather then the product name. The product title being the one defined by header tags controller within the admin. Any quick solutions I have thought of have either cause a error while reading the database or nothing appears at all.

 

Not an urgent problem, but would be curious to know because I think this would result in a more accurate h1.

 

Thanks.

They are one and the same, unless you have changed it in the admin->catalog section. But if you want to change the code, in product_info.php, change this

			<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

to this

			<td class="pageHeading" valign="top"><?php echo $tags_array['title']; ?></td>

 

Jack

Share this post


Link to post
Share on other sites
They are one and the same, unless you have changed it in the admin->catalog section. But if you want to change the code, in product_info.php, change this

			<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

to this

			<td class="pageHeading" valign="top"><?php echo $tags_array['title']; ?></td>

 

Jack

 

Cool, my code was a bit different for some reason.. but I changed

 

<?php echo $products_name; ?>

to

 

<?php echo $tags_array['title']; ?>

 

and it worked perfectly. I shoulda been able to figure that out im a bit dense and noobish. thanks for your help!

Share this post


Link to post
Share on other sites

I tried to install this contrib for the first time. I used the auto install script and believe that everything went ok. Now I have several errors.

 

Warning: main(DIR_WS_LANGUAGES/FILENAME_DEFAULT): failed to open stream: No such file or directory in /hsphere/local/home/steven/onlinetransmissionparts.com/catalog/index.php on line 33

 

Warning: main(DIR_WS_LANGUAGES/FILENAME_DEFAULT): failed to open stream: No such file or directory in /hsphere/local/home/steven/onlinetransmissionparts.com/catalog/index.php on line 33

 

Fatal error: main(): Failed opening required 'DIR_WS_LANGUAGES/FILENAME_DEFAULT' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/steven/onlinetransmissionparts.com/catalog/index.php on line 33

 

Does this look like a common problem? Is their any documentation that walks me through the install? Anything would help. Thank you

Share this post


Link to post
Share on other sites
It appears the title is not being read in. If it exists properly in the database, then the includes/header_tags.php or english/header_tags.php file are the most likely problems. Try temporairly replacing them with either the files from the archive or from your other shop.

 

Jack

Jochen & Fredrik - Are you changing the languages selector on the fill tags page before you run that option? It will only fill the tags for the language that is set regardless of what language your admin panel is set to.

 

 

 

Jack

They are one and the same, unless you have changed it in the admin->catalog section. But if you want to change the code, in product_info.php, change this

			<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

to this

			<td class="pageHeading" valign="top"><?php echo $tags_array['title']; ?></td>

 

Jack

 

 

Jochen: Yes, of course i changed the language selector. but it did not work. the change does not effect anything as you can read in my statements above. as a rough workaround i hardcoded the language i need, in my case id=2 (german). this is pretty rough, but i do not need multilingual support right now.

 

Though it would be quite elegant, to have a real multilingual support.

Greetz

Edited by erdm?nnchen

Share this post


Link to post
Share on other sites
I tried to install this contrib for the first time. I used the auto install script and believe that everything went ok. Now I have several errors.

 

Warning: main(DIR_WS_LANGUAGES/FILENAME_DEFAULT): failed to open stream: No such file or directory in /hsphere/local/home/steven/onlinetransmissionparts.com/catalog/index.php on line 33

 

Warning: main(DIR_WS_LANGUAGES/FILENAME_DEFAULT): failed to open stream: No such file or directory in /hsphere/local/home/steven/onlinetransmissionparts.com/catalog/index.php on line 33

 

Fatal error: main(): Failed opening required 'DIR_WS_LANGUAGES/FILENAME_DEFAULT' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/steven/onlinetransmissionparts.com/catalog/index.php on line 33

 

Does this look like a common problem? Is their any documentation that walks me through the install? Anything would help. Thank you

Was the shop working before you tried this. That might seem like an obvious question but the errors are indicating that the configure file is not set up. It could be that the application_top or index file was corrupted though. If you run autofill without the sed editor being present, it will generate empty files so you may want to check that.

 

As for instructions, they are in the contriubtion: Install_Catalog.txt and Install_Admin.txt.

 

Jack

 

 

Jochen: Yes, of course i changed the language selector. but it did not work. the change does not effect anything as you can read in my statements above. as a rough workaround i hardcoded the language i need, in my case id=2 (german). this is pretty rough, but i do not need multilingual support right now.

 

Though it would be quite elegant, to have a real multilingual support.

Greetz

I'm not sure what you mean by "real multilingual support" but it works fine for me and no one else has mentioned a problem so I have to assume your installation is at fault.

 

Jack

Share this post


Link to post
Share on other sites

Hello,

 

I have installed this contribution and everything seems to be fine apart from a couple of issues I am having problems with.

 

I have added a page for which I want to enter my header tags to however, once I have entered all the information and updated the tags the page is no longer working and gives me the following error.

 

Fatal error: Call to undefined function: tep_header_tag_page() in /home/gloveclu/public_html/includes/header_tags.php on line 353

 

If I delete the tags then the page works again, I cant figure out what is wrong with the code on that line number

 

// pdf.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_PDF) or strstr($PHP_SELF, FILENAME_PDF));
$tags_array = tep_header_tag_page(HTTA_PDF_ON, HEAD_TITLE_TAG_PDF, 
								  HTDA_PDF_ON, HEAD_DESC_TAG_PDF, 
								  HTKA_PDF_ON, HEAD_KEY_TAG_PDF );
  break;

 

Secondly I have read that the HTCA option only works for the index.php and that it adds the category name on the title. I cannot get this feature to work, I have tried ticking them all, just the HTCA and many other combinations.

 

I would be grateful for any assistance.

 

Regards

 

M Parmar

Share this post


Link to post
Share on other sites

I have managed to sort this out and now have my categories and then my shop name in the title bar :)

 

Secondly I have read that the HTCA option only works for the index.php and that it adds the category name on the title. I cannot get this feature to work, I have tried ticking them all, just the HTCA and many other combinations.

 

However, am still having problems with the following

 

I have added a page for which I want to enter my header tags to however, once I have entered all the information and updated the tags the page is no longer working and gives me the following error.

If I delete the tags then the page works again, I cant figure out what is wrong with the code on that line number

 

I did fill tags and now am receiving the following error when going into any product info page

 

Fatal error: Call to undefined function: clean_html_comments() in /home/gloveclu/public_html/includes/header_tags.php on line 187

 

Hope someone knows whats going on.

 

Regards

 

M Parmar

Share this post


Link to post
Share on other sites

The product page is used by all products so if you are getting an error on just one product, it must have to do with that products header tags entries. Try going to admin->catalog and editing that product. Change the title to something simple, like A, and remove the header tags description and keywords entries. Does it still fail?

 

Jack

Share this post


Link to post
Share on other sites

Thanks for the reply Jack_mcs, I have checked and it is all the products that show an error.

 

Do you know what the solution for this problem would be?

 

Regards

 

M PArmar

Share this post


Link to post
Share on other sites

That's different then. It most likely means you didn't install that file into the functions directory. You should verify that the files are there and that the code change is in includes/application_top.php.

 

Jack

Share this post


Link to post
Share on other sites

Hi. I've been following the posts over the past few days, and nothing that comes up seems to alleviate the problem of category and/or product names not showing in the title bar.

I have to be honest, I really don't know where to go from here. If anyone has some ideas, please let me know.

I've put some previous posts and responses on here to offer some background.

Thank you very much.

Bruce

 

Hi. I seem to be having a problem with the same issue as somebody who recently posted. No matter what I try, the category name never appears in the title bar, nor do the names for the products on their respective pages' title bars.

 

Anybody hae some ideas?

 

Some background: I've had a topic going on this on the installation forum (http://forums.oscommerce.com/index.php?showtopic=177874)

Early on, I needed to install the registe_globals patch.

 

Thank you very much.

Bruce

 

Jack,

I'm sorry. Yes, the fields are filled. I'll double check everything I did. I checked around on my site last night a bit and noticed that the shipping.php page comes with osCommerce in the title bar - and I changed that earlier in admin. So the contribution seems not to be working at all for me.

Now the title bar seems to be the least of my problems. This contributions is the last change I've made to the site, and last night was the first time I went to sign in on my shopping cart since the change, and I all I get now after signing in is a blank page.

I really need some help.

Thank you.

Bruce

 

Bhomis

Ok i think i got it working. It's all about how you are filling out the header tag page in includes/lang/english/header_tags

This is how i Have mine and seems to be working now; replace my website name/keywords with your own

// For all pages not defined or left blank, and for products not defined

// These are included unless you set the toggle switch in each section below to OFF ( '0' )

// The HEAD_TITLE_TAG_ALL is included BEFORE the specific one for the page

// The HEAD_DESC_TAG_ALL is included AFTER the specific one for the page

// The HEAD_KEY_TAG_ALL is included AFTER the specific one for the page

define('HEAD_TITLE_TAG_ALL','J.A.W. Products, Inc. : ');

define('HEAD_DESC_TAG_ALL',' J.A.W. Products, Inc. : Great prices on

blah blah blah blah blah blah');

define('HEAD_KEY_TAG_ALL','your default keywords');

 

// DEFINE TAGS FOR INDIVIDUAL PAGES

 

// index.php

define('HTTA_DEFAULT_ON','0'); // Include HEAD_TITLE_TAG_ALL in Title

define('HTKA_DEFAULT_ON','0'); // Include HEAD_KEY_TAG_ALL in Keywords

define('HTDA_DEFAULT_ON','0'); // Include HEAD_DESC_TAG_ALL in Description

define('HTTA_CAT_DEFAULT_ON', '1'); //Include HEADE_TITLE_DEFAULT in

 

CATEGORY DISPLAY

define('HEAD_TITLE_TAG_DEFAULT', 'J.A.W. Products, Inc.');

define('HEAD_DESC_TAG_DEFAULT','J.A.W. Products, Inc. :

blah blah blah blah description');

define('HEAD_KEY_TAG_DEFAULT','default keywords');

 

// product_info.php - if left blank in products_description table these values will be used

define('HTTA_PRODUCT_INFO_ON','0');

define('HTKA_PRODUCT_INFO_ON','0');

define('HTDA_PRODUCT_INFO_ON','0');

define('HEAD_TITLE_TAG_PRODUCT_INFO','0');

define('HEAD_DESC_TAG_PRODUCT_INFO','0');

define('HEAD_KEY_TAG_PRODUCT_INFO','0');

 

// products_new.php - whats_new

define('HTTA_WHATS_NEW_ON','0');

define('HTKA_WHATS_NEW_ON','0');

define('HTDA_WHATS_NEW_ON','0');

define('HEAD_TITLE_TAG_WHATS_NEW','New Products');

define('HEAD_DESC_TAG_WHATS_NEW','');

define('HEAD_KEY_TAG_WHATS_NEW','');

 

// specials.php

// If HEAD_KEY_TAG_SPECIALS is left blank, it will build the keywords from the

 

products_names of all products on special

define('HTTA_SPECIALS_ON','0');

define('HTKA_SPECIALS_ON','0');

define('HTDA_SPECIALS_ON','0');

define('HEAD_TITLE_TAG_SPECIALS','Specials');

define('HEAD_DESC_TAG_SPECIALS','');

define('HEAD_KEY_TAG_SPECIALS','');

 

// product_reviews_info.php and product_reviews.php - if left blank in

 

products_description table these values will be used

define('HTTA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTKA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTDA_PRODUCT_REVIEWS_INFO_ON','1');

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO','');

 

?>

I spoke too soon, it seems to be calling keywords and title AND description all as the same as the category title, wont show anything that i type in myself.

 

Try adding a keyword in the keyword box for a product in admin. After you save it, switch to some other part of the admin section and then go back to that product. Is your keyword still there? If not, then you have a problem in the categories.php file. If it is, then you have a problem in the product_info.php file. Let me know which it is and we can go from there.

 

Jack

 

Jack,

Hi there. Thanks for your help. I've been combing through everything step by step that I did and I found an error I made in application_top.php which corrected everything but the categories and the products showing up in the title bar. It seems as though everything else I did was correct though.

 

Okay, I did what you said and the keyword is still there. So it's product_info.php?

 

Thanks,

Bruce

 

CATEGORY DISPLAY? Where do I find that?

Thanks,

Bruce

 

The problem is in the product_info.php file, the includes/header_tags.php file or the includea/languages/english/header_tags.php file (most unlikely). The only problem it could be on the product_info.php file is if you didn't add the code to replace the title in the head section of the page. If that is OK, try replacing, temporairly, the includes/header_tags.php file. Does it work then?

 

Jack

 

Jack,

Hi. Thanks.

I'm okay with my product_info.php. What should I be looking for on either header_tags.php page?

Bruce

Share this post


Link to post
Share on other sites

Thanks Jack_mcs, I forgot to update the application_top.php now the site is working fine :)

 

Regards

 

M Parmar

Share this post


Link to post
Share on other sites
Was the shop working before you tried this. That might seem like an obvious question but the errors are indicating that the configure file is not set up. It could be that the application_top or index file was corrupted though. If you run autofill without the sed editor being present, it will generate empty files so you may want to check that.

 

As for instructions, they are in the contriubtion: Install_Catalog.txt and Install_Admin.txt.

 

Jack

I'm not sure what you mean by "real multilingual support" but it works fine for me and no one else has mentioned a problem so I have to assume your installation is at fault.

 

Jack

 

Sorry to say, but i checked the vanilla installation once again. erverything is how it should be and how it it written in the documentation.

 

The "language"-problem only occurs, when there is only one language left in the shop (not english) and the others are via admin deleted. This means english is no longer standard, the only left language is standard. in my case it is german.

 

It is logical, that the only shop language left is the only language you can select in header tags language selector. So the header tags language selector says "Deutsch". In this case, the header tags are definitly not written into the database.

 

If you have a vanilla installation and do not delete english as language - which means only english and/or english and additional languages - the header tags language selector does its job and everything works fine.

 

All in all, it is no big problem. As mentioned before, i hardcoded my language. For me, this is the only solution to work with a "one language - other than english - shop".

 

Thanks for your help!

 

YOUR CONTRIB IS STILL ONE OF THE BEST!

Share this post


Link to post
Share on other sites

I can't see anything in the code that would cause that but I believe that is happenning. I will put on the list to look into.

 

Jack

Share this post


Link to post
Share on other sites

I have just finished installing the HTC v.2.5.5 and have this error msg when I click on the "Head Tags" button in the admin panel:

 

Warning: file(../store/includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /home/httpd/vhosts/cpearl.com/httpdocs/store/admin/header_tags_controller.php on line 254

 

What really pazzles me is that I have the file (header_tags.php) setting perfectly right where it's suppose to be with propert permissions set (chmod 666). For some reason it seems that the controller's having problem accessing it.

 

Any advice on how I can fix this?

 

btw, same goes for the header_tags_english.php as well.

 

Much appreciated.

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
Permissions need to be set to 755 (777 on some hosts).

 

Jack

 

Thanks for the reply, Jack, but nope, didn't work... I've tried both 755 and 777 on both files... any other ideas?

Share this post


Link to post
Share on other sites

If you are using a different version than the last one I uploaded, 2.5.5, I can't really say. I see some changes were made that I don't support. If you are using my latest version and you are sure everything is where it should be and the permissions are correct, then your host is blocking it and there is nothing to be done. You will have to edit the files using and editor.

 

Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×