Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

Hey, I am having problems locating a problem and would really appreciate some help.

 

I added this contribution the other day and when I try to edit or add products in the admin panel the names don't show up on the site or in the admin panel, yet when I go to edit the products the names show up and I can edit them, yet they never show up for some reason.

Share this post


Link to post
Share on other sites
Hey, I am having problems locating a problem and would really appreciate some help.

 

I added this contribution the other day and when I try to edit or add products in the admin panel the names don't show up on the site or in the admin panel, yet when I go to edit the products the names show up and I can edit them, yet they never show up for some reason.

Almost every problem in admin is caused by the categories.php file. Try using the one from the contribution to see if the problem goes away. If it does, then compare it to yours to find the problem.

 

Jack

Share this post


Link to post
Share on other sites

K, I dont think it has to do with HTC after all. It seems to be something that I did earlier that caused the problems and I never noticed.

I am going through and fixing up my shop with a combination of backups and updates. All seems good so far.

 

Thanks for the quick response.

Share this post


Link to post
Share on other sites
To get the shop side to work, you need to upload the files for the shop and make the changes to the files as described in the Install_Catalog.txt file. If it is not working, you will need to go over those few steps again. Also, if you are using STS, the steps are different.

 

Jack

Okay, I went over my changes with a fine toothed comb, and as far as I can tell, I followed the Install_Catalog.txt file to the letter--even the changes specific to sts. Nonetheless, I'm not getting the "Home Page" title tag. I must've done something right, because at one point, I restored my database to the last state before these changes, and the site gave me errors and wouldn't work. When I re-installed the database changes, it worked again, but still no title change. I even ported the changes from aplication_top.php to root.php (because I'm using seo-g), still nothing. Once again, I'm not getting any error messages as one might expect. Please help if you can. http://www.specterstore.com

Share this post


Link to post
Share on other sites
Okay, I went over my changes with a fine toothed comb, and as far as I can tell, I followed the Install_Catalog.txt file to the letter--even the changes specific to sts. Nonetheless, I'm not getting the "Home Page" title tag. I must've done something right, because at one point, I restored my database to the last state before these changes, and the site gave me errors and wouldn't work. When I re-installed the database changes, it worked again, but still no title change. I even ported the changes from aplication_top.php to root.php (because I'm using seo-g), still nothing. Once again, I'm not getting any error messages as one might expect. Please help if you can. http://www.specterstore.com

 

Joey, what version of STS are you using? If it is version 4 or higher, then you should not have installed the "catalog" side of the installation instructions to the letter.

 

How to install Header Tags Controller with the Simple Template System v4x:

 

Simple Instructions:

 

HTC installation:

Step 1: Make the necessary changes in the DB, like mentionned in the HTC instructions.

Step 2: Install the files on the admin side, like mentionned in the HTC instructions.

 

For the catalog side, do NOT follow the HTC instructions, but:

 

Step 3: From the HTC distribution, copy the following files to your store:

- catalog\includes\functions\clean_html_comments.php

- catalog\includes\functions\header_tags.php

- catalog\includes\header_tags.php

- catalog\includes\boxes\header_tags.php

- catalog\includes\languages\english\header_tags.php (for each language in your shop)

 

 

STS side installation:

Step 4: Download the headertags.php file located on the STS Power Pack site. You can find this file in the very first contribution (dated August 14, 2006). Here is the link: http://www.oscommerce.com/community/contributions,4456

 

Step 5: Copy the headertags.php module (from the download above) to the following folder in your store: - catalog/includes/modules/sts_inc/headertags.php

 

Step 6: Go to your admin panel, Modules, STS.

- For each module installed, add 'headertags.php' to the list of files to include.

For example:

- In the Default Module, you have a parameter named 'Files for normal template'. By default it contains only 'sts_user_code.php'. If you modify this parameter to 'sts_user_code.php;headertags.php' you will have Header Tags Controller working for all of the pages using the default template.

 

Do the same for the Index module and the Product_info Module.

- Index Module: the parameter is called 'Files for index.php template'.

- Product_info Module: there are 2 parameters: 'Files for normal template' and 'Files for content template.

 

Step 7: Be sure you have the following line of code at the beginning of your includes/header_tags.php file:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

- or -

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Step 8: Operate HTC as you normally would from the admin according to the HTC instructions.

 

--------------------------------

If all of the above is too daunting for you, I have bundled the two contributions together into one seamless install package located in the STS4 Power Pack site (http://www.oscommerce.com/community/contributions,4456).

 

Hope this has helped you out in getting STSv4.5.2 and HTCv2.6.3 installed and working well with each other,

Edited by bkellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Joey, what version of STS are you using? If it is version 4 or higher, then you should not have installed the "catalog" side of the installation instructions to the letter.

 

How to install Header Tags Controller with the Simple Template System v4x:

 

Simple Instructions:

 

HTC installation:

Step 1: Make the necessary changes in the DB, like mentionned in the HTC instructions.

Step 2: Install the files on the admin side, like mentionned in the HTC instructions.

 

For the catalog side, do NOT follow the HTC instructions, but:

 

Step 3: From the HTC distribution, copy the following files to your store:

- catalog\includes\functions\clean_html_comments.php

- catalog\includes\functions\header_tags.php

- catalog\includes\header_tags.php

- catalog\includes\boxes\header_tags.php

- catalog\includes\languages\english\header_tags.php (for each language in your shop)

 

 

Bill, thanks for the instructions - i'm having a very large issue on one of my sites, I did a FRESH install (several actually) of OSC and did the basic copy of files from your HTC 2.6.3 and STS 4.5.2 bundle and ran the DB update, I get sts working beautifully - the menus for HTC are in my admin control panel and I followed the operational instructions - of fill first

 

After all this, I go to customize the pages in the admin and the page names are RED - and as stated on screen:

"Note that is the title of a section appears in red, it means that file does not have the required Header Tags code installed and, as a result, will not display the title or meta tags defined here."

The code that shows up on my page is:

<!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">

<title>osCommerce</title>

<base href="http://store.sunglassparadiseonline.com/catalog/">

 

Please help - what could I be doing wrong?

more info: 2 installs were done on a freebsd box

The other 2 were on one of our new servers with the hsphere install of OSC - which is the format we are going live with

 

Thanks for your time,

 

Leo

Edited by pondster

Share this post


Link to post
Share on other sites
Step 6: Go to your admin panel, Modules, STS.

- For each module installed, add 'headertags.php' to the list of files to include.

For example:

- In the Default Module, you have a parameter named 'Files for normal template'. By default it contains only 'sts_user_code.php'. If you modify this parameter to 'sts_user_code.php;headertags.php' you will have Header Tags Controller working for all of the pages using the default template.

 

Joey, make sure you include "headertags.php" as Bill indicated and not "header_tags.php". I screwed that up once (at least) and it took me forever to find it. I was convinced I had a code problem and Bill was very convinced I was a complete idiot, which turned out to be the real problem.

Share this post


Link to post
Share on other sites
Joey, what version of STS are you using? If it is version 4 or higher, then you should not have installed the "catalog" side of the installation instructions to the letter.

 

How to install Header Tags Controller with the Simple Template System v4x:

 

Simple Instructions:

 

HTC installation:

Step 1: Make the necessary changes in the DB, like mentionned in the HTC instructions.

Step 2: Install the files on the admin side, like mentionned in the HTC instructions.

 

For the catalog side, do NOT follow the HTC instructions, but:

 

Step 3: From the HTC distribution, copy the following files to your store:

- catalog\includes\functions\clean_html_comments.php

- catalog\includes\functions\header_tags.php

- catalog\includes\header_tags.php

- catalog\includes\boxes\header_tags.php

- catalog\includes\languages\english\header_tags.php (for each language in your shop)

STS side installation:

Step 4: Download the headertags.php file located on the STS Power Pack site. You can find this file in the very first contribution (dated August 14, 2006). Here is the link: http://www.oscommerce.com/community/contributions,4456

 

Step 5: Copy the headertags.php module (from the download above) to the following folder in your store: - catalog/includes/modules/sts_inc/headertags.php

 

Step 6: Go to your admin panel, Modules, STS.

- For each module installed, add 'headertags.php' to the list of files to include.

For example:

- In the Default Module, you have a parameter named 'Files for normal template'. By default it contains only 'sts_user_code.php'. If you modify this parameter to 'sts_user_code.php;headertags.php' you will have Header Tags Controller working for all of the pages using the default template.

 

Do the same for the Index module and the Product_info Module.

- Index Module: the parameter is called 'Files for index.php template'.

- Product_info Module: there are 2 parameters: 'Files for normal template' and 'Files for content template.

 

Step 7: Be sure you have the following line of code at the beginning of your includes/header_tags.php file:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

- or -

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Step 8: Operate HTC as you normally would from the admin according to the HTC instructions.

 

--------------------------------

If all of the above is too daunting for you, I have bundled the two contributions together into one seamless install package located in the STS4 Power Pack site (http://www.oscommerce.com/community/contributions,4456).

 

Hope this has helped you out in getting STSv4.5.2 and HTCv2.6.3 installed and working well with each other,

Thank you for pointing me to this contribution. I installed it, but all I get now is a blank page for a store. I'll nitpick at it tomorrow to see where I might've gone wrong. If anyone might have any ideas, I'd love to hear them. http://www.specterstore.com

Share this post


Link to post
Share on other sites
Thank you for pointing me to this contribution. I installed it, but all I get now is a blank page for a store. I'll nitpick at it tomorrow to see where I might've gone wrong. If anyone might have any ideas, I'd love to hear them. http://www.specterstore.com

There are a couple of things that can cause the blank issue with STS. Post over on the STS forum and I'm sure someone will help you out.

Share this post


Link to post
Share on other sites
There are a couple of things that can cause the blank issue with STS. Post over on the STS forum and I'm sure someone will help you out.

I caught a second wind and got the store back up! It appears as though all of my mods are working on the store side including htc, but on the admin side, I get this message:

 

Fatal error: Call to undefined function: tep_href_link() in /home/content/s/p/e/specterstudios/html/store/catalog/admin/includes/boxes/header_tags_controller.php on line 21

 

The specific line referenced reads: 'link' => tep_href_link(FILENAME_HEADER_TAGS_CONTROLLER, 'selected_box=header tags'));

 

Thanks to all who have helped. I am so close. Any help to get me the rest of the way will be much appreciated.

Share this post


Link to post
Share on other sites
Bill, thanks for the instructions - i'm having a very large issue on one of my sites, I did a FRESH install (several actually) of OSC and did the basic copy of files from your HTC 2.6.3 and STS 4.5.2 bundle and ran the DB update, I get sts working beautifully - the menus for HTC are in my admin control panel and I followed the operational instructions - of fill first

 

After all this, I go to customize the pages in the admin and the page names are RED - and as stated on screen:

"Note that is the title of a section appears in red, it means that file does not have the required Header Tags code installed and, as a result, will not display the title or meta tags defined here."

The code that shows up on my page is:

<!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">

<title>osCommerce</title>

<base href="http://store.sunglassparadiseonline.com/catalog/">

 

Please help - what could I be doing wrong?

more info: 2 installs were done on a freebsd box

The other 2 were on one of our new servers with the hsphere install of OSC - which is the format we are going live with

 

Thanks for your time,

 

Leo

Leo, if you have

<!--$headcontent-->

in the <head> of your STS Template, then STS will automatically pull in the meta tags for the script that is being templated by STS so you should not add the HTC code to your individual script pages such as index.php.

To test if STS is doing it's job regarding the HTC meta tags, Be sure you have added

<!--$headcontent-->

to your STS Template, then view the page in your broswer. In the browser menu, select View Source (for IE) to view the actual code being used for that page. You should see all of your meta tags that you setup in HTC for that particular script.

Also be sure to add the headertags.php line to your "Files to include" in the STS Modules. You should have the following:

 

sts_user_code.php;headertags.php


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Leo, if you have
<!--$headcontent-->

in the <head> of your STS Template, then STS will automatically pull in the meta tags for the script that is being templated by STS so you should not add the HTC code to your individual script pages such as index.php.

To test if STS is doing it's job regarding the HTC meta tags, Be sure you have added

<!--$headcontent-->

to your STS Template, then view the page in your broswer. In the browser menu, select View Source (for IE) to view the actual code being used for that page. You should see all of your meta tags that you setup in HTC for that particular script.

Also be sure to add the headertags.php line to your "Files to include" in the STS Modules. You should have the following:

 

sts_user_code.php;headertags.php

 

I too have installed the STS Power Pack and seem to be having the same problem.

The STS templates seem to work fine but when I'm in admin and want to edit a product I get:

Fatal error: Call to undefined function: tep_get_products_head_title_tag() in c:\phpdev5\www\public\apha_sts\catalog\admin\categories.php on line 583

I have searched for this function and only find it in admin/includes/general.php. Is this right? Why does it think its undefined?

I have the files to include set as above and have executed "fill tags" from the admin menu.

Share this post


Link to post
Share on other sites

I have solved my problem - in admin/includes/application_top.php i changed

  require(DIR_WS_FUNCTIONS . 'general.php');

to

  require(DIR_WS_INCLUDES . 'general.php');

Hope that helps others too!

Share this post


Link to post
Share on other sites
Leo, if you have
<!--$headcontent-->

in the <head> of your STS Template, then STS will automatically pull in the meta tags for the script that is being templated by STS so you should not add the HTC code to your individual script pages such as index.php.

To test if STS is doing it's job regarding the HTC meta tags, Be sure you have added

<!--$headcontent-->

to your STS Template, then view the page in your broswer. In the browser menu, select View Source (for IE) to view the actual code being used for that page. You should see all of your meta tags that you setup in HTC for that particular script.

Also be sure to add the headertags.php line to your "Files to include" in the STS Modules. You should have the following:

 

sts_user_code.php;headertags.php

 

Bill thank you SO much for your help, my store is up with the HTC & STS module - your install directions are invaluable! I added them to my internal ticket system for my future installs of OSC. Your steps 6 on - were my issues - totally missed those steps and the info that came with the files I downloaded were not too helpful.

 

So again thank you very much for this incredible set of instructions

 

Leo Pond

Interbridge.net

Share this post


Link to post
Share on other sites

I'm sorry, but I can't seem to find what this header tags program is used for. Is it all aesthetics, or does it help search engines such as a meta tag would as well? Thanks for the help!

Share this post


Link to post
Share on other sites

It's for improving your sites position in the search engine listings. Typically, once installed and setup, a site can expect to see their products begin to show in top 20 positions in a matter of a month or two (varies with keyword competition, age of site and so on). Oscommerce doesn't come with any such code in it so it needs to be installed.

 

Jack

Share this post


Link to post
Share on other sites

Wow thank you very much bill for your help! I also spent many hours trying to get HTC to work with STS, took only a few minutes after following your instructions so THANKYOU!! Maybe you should include your instructions and headertags.php file as an additional contribution to htc?

 

Thanks again :)

Share this post


Link to post
Share on other sites
I caught a second wind and got the store back up! It appears as though all of my mods are working on the store side including htc, but on the admin side, I get this message:

 

Fatal error: Call to undefined function: tep_href_link() in /home/content/s/p/e/specterstudios/html/store/catalog/admin/includes/boxes/header_tags_controller.php on line 21

 

The specific line referenced reads: 'link' => tep_href_link(FILENAME_HEADER_TAGS_CONTROLLER, 'selected_box=header tags'));

 

Thanks to all who have helped. I am so close. Any help to get me the rest of the way will be much appreciated.

Is there any chance I'm going to get help with this?

Share this post


Link to post
Share on other sites
Is there any chance I'm going to get help with this?
Did you do as suggested:
There are a couple of things that can cause the blank issue with STS. Post over on the STS forum and I'm sure someone will help you out.
Besides that, when an error shows FILENAME_HEADER_TAGS_CONTROLLER (or any such capital letters), it usually means the definition has not been added. You should read back through the Install_Admin.txt file and look for where that is mentioned to be sure you performed that step.

 

Jack

Share this post


Link to post
Share on other sites

Hello,

 

I was trying to install this mod. And I'm at step #1 which install the database.

 

After I uploaded the database_setup.php file to my server, and then run this file in a browser url string, I get this error:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /hsphere/local/home/compdist/compdistributing.com/includes/header.php:134) in /hsphere/local/home/compdist/compdistributing.com/includes/boxes/categories.php on line 59

 

 

Any suggestions?

 

Thanks

Share this post


Link to post
Share on other sites

It is because of the template you are using. You can delete the code for the left column in that file or use the sql file in the contribution and phpmyadmin to load the changes.

 

Jack

Share this post


Link to post
Share on other sites

Thought I should ask here too, hopefully you might recognise these errors...

 

Fatal error: Call to undefined function tep_get_products_head_title_tag() in /home/*****/public_html/shop/admin/categories.php on line 583

[displays under] Meta Tag Information, Product Title Tag:

Im getting the above when in admin and trying to add new products, also:

 

Fatal error: Call to undefined function tep_get_category_htc_title() in /home/*****/public_html/shop/admin/categories.php on line 1016

when editing catagory info.

 

using sts 4.5.2 & htc bundel.

 

home develop comp has the same setup but in add new products under admin, i dont have the normal buttons for update and cancel (same too on remote server). also, after Product Title Tag: is blank, nothing there??? I have included:Files for normal template

sts_user_code.php;headertags.php under sts module. any ideas please?

Share this post


Link to post
Share on other sites

The error is saying the function is missing. Read through the Install_Admin.txt file to make sure youhave performed the needed changes.

 

Jack

Share this post


Link to post
Share on other sites

I have installed this contribution a few days ago and it all seems to be working well as far as how the contribution functions, except for a problem when I view the store. I am getting this error below

 

Warning: Invalid argument supplied for foreach() in catalog/includes/boxes/categories.php on line 46
.

 

The index page displays as normal but when I go to any of the categories or other pages such as "contact us, conditions, shipping etc, I get the above warning which repeats as many times as the number of categories I have in my store. This is the section of code that I assume the warning is referring to ,

 

Line 46 -> foreach ($parent_child as $index_of => $sub_parent_child) {

if ($counter == $sub_parent_child['parent_id']) {

// a category has this one as a parent, so parent has a subcategory

$categories_string .= '->';

break;

 

This also distorts the page in so far as the left hand column widens to accommodate the width of the above warning message. This problem only started after HTC was installed and I have been through the forum looking for a solution but haven't been able to find one.

 

Does anyone have any ideas about this ?

 

Andrew

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  

×