Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

Looks ok but, as is, it cannot use HTC unless you edited one of the files it is including (like includes/header.php). Take a look at your source via your browser (or post a link to your page) and see where it is being included. It should be easy to see which file is calling HTC from there.

 

Jack

Share this post


Link to post
Share on other sites

Hi there - I just finished installing this contribution and am having the following problem. For some reason, the database isn't being updated with the Meta tags (even after manually entering the data in the database, the text is wiped out if I update the product through the admin page.)

 

Any ideas?

Share this post


Link to post
Share on other sites

I have installed header_tags controller and it all seems ok ,the page title changes, however it reads oscommerc, product name. how can i change the oscommerce part to read as my websites name.

Share this post


Link to post
Share on other sites
I have installed header_tags controller and it all seems ok ,the page title changes, however it reads oscommerc, product name. how can i change the oscommerce part to read as my websites name.

Dude I don't mean to be rude but you mgith want to read the previous page as somebody has already poste this. It has actually been asked several times in this thread.


Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

I have installed Header Tag Controller on a new version, now when I go in admin and open to edit or incert a product, the page only half open and this error come at the begning place where the contribution just starts:

 

Fatal error: Call to undefined function: tep_get_products_head_title_tag() in /home/shauryai/public_html/wholesalesilver/admin/categories.php on line 560

 

The Code near home/shauryai/public_html/wholesalesilver/admin/categories.php on line 560 is :

 

<tr>

            <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_PAGE_TITLE; ?></td>

            <td><table border="0" cellspacing="0" cellpadding="0">

              <tr>

                <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>

                <td class="main"><?php echo tep_draw_textarea_field('products_head_title_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_title_tag[$languages[$i]['id']]) ? $products_head_title_tag[$languages[$i]['id']] : tep_get_products_head_title_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

              </tr>

            </table></td>

          </tr>

<?php

    }

    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

          <tr>

            <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

          </tr>

 

The exact line 560 is:

 

  <td class="main"><?php echo tep_draw_textarea_field('products_head_title_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_title_tag[$languages[$i]['id']]) ? $products_head_title_tag[$languages[$i]['id']] : tep_get_products_head_title_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

           

 

Can any one please suggest what is wrong here and what shall be done to correct it?

 

Regards

 

Yogi

Share this post


Link to post
Share on other sites

I sorted it out... By mistake i incerted the functions in catalogue/includes... instead of catalogue/admin/includes...

 

Silly mistake.

Share this post


Link to post
Share on other sites

theres probably a ismple asnwer to this one..

 

anyway i installed the header tags controller along with the latest STS, and are getting the following when viewing the source of a loaded page..

 

 

<META NAME="Reply-to" CONTENT="MY EMAIL ADDRESS">

<META NAME="Description" Content="MY DESCRIPTION OF PRODUCT : What's New Here? - Hardware Software DVD Movies">

<META NAME="Keywords" CONTENT="MY DESCRIPTIONT TAGS !!PLUS!! Hardware Software DVD Movies What's New Here?">

 

i'm missing something somewhere arent i :D

Share this post


Link to post
Share on other sites

Hello,

I tried to install this mod but the admin/categories.php find/replace isn't correct (one function isn't in the file). I have a clean install of OSCommerce with onlt the sts template mod added.

 

Does anyone have a working admin/categories.php they can post for a clean install?

 

Also - will this mod make it possible to make/edit category meta tags?

 

Thank!

Edited by opensrc

Share this post


Link to post
Share on other sites

Hello! I'm using Header Tags Controller and everything is almost ok. But I have one small problem. example: http://www.lg.com.pl/gps-cf - the title is ONLY NAME OF PRODUCT's CATEGORY - the source of file is :

"

<?

chdir("../");

$HTTP_GET_VARS['products_id']=68;

include ("product_info.php");

?>

"

 

but when you type http://www.szpieg.com/product_info.php?cPa...&products_id=68 - it gives full title.

 

 

What should I put into http://www.lg.com.pl/gps-cf/index.php ?

Share this post


Link to post
Share on other sites

I have a major issue with Header Tags... I have had it installed for a while and just looked at my source and found all of the sudden I lost me product level tags:

 

<html>

<head>

 

<title></title>

<META NAME="Description" Content="">

<META NAME="Keywords" CONTENT="">

<!-- EOF: Generated Meta Tags -->

 

The tags are populated at the index and category level still and the database still has the info, but it just does not show up on the browser source. I have been reloading header tag controler to no avail... can someone help me. It may be that I have my header_tag.php wrong under languages/english:

 

<?php

// /catalog/includes/languages/english/header_tags.php

// WebMakers.com Added: Header Tags Generator v2.0

// Add META TAGS and Modify TITLE

//

// DEFINITIONS FOR /includes/languages/english/header_tags.php

 

// Define your email address to appear on all pages

define('HEAD_REPLY_TAG_ALL',STORE_OWNER_EMAIL_ADDRESS);

 

// 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 BEFORE the specific one for the page

define('HEAD_TITLE_TAG_ALL','');

define('HEAD_DESC_TAG_ALL','');

define('HEAD_KEY_TAG_ALL','');

 

// DEFINE TAGS FOR INDIVIDUAL PAGES

 

// default.php

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

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

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

define('HEAD_TITLE_TAG_DEFAULT','BARCODE Labels, Scanners ZEBRA Printers');

define('HEAD_DESC_TAG_DEFAULT','Purchase Barcode Printers, Barcode Labels, Thermal Transfer Labels, and Zebra Printers at AdaZon.');

define('HEAD_KEY_TAG_DEFAULT','barcode printers, barcode labels, zebra printers, thermal transfer labels, thermal transfer printers, barcode scanners, Sato printers, datamax printers, intermec scanners, symbol scanners, thermal transfer ribbons, barcode ribbons');

 

// 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','');

define('HEAD_DESC_TAG_PRODUCT_INFO','');

define('HEAD_KEY_TAG_PRODUCT_INFO','');

 

// products_new.php - whats_new

define('HTTA_WHATS_NEW_ON','1');

define('HTKA_WHATS_NEW_ON','1');

define('HTDA_WHATS_NEW_ON','1');

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','1');

define('HTKA_SPECIALS_ON','1');

define('HTDA_SPECIALS_ON','1');

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','');

 

?>

 

 

Can someone help?


Laser labels, barcode labels, custom labels

Share this post


Link to post
Share on other sites

John, unless you removed it, you are missing the <!-- BOF: Generated Meta Tags --> statement. This probably means something before this is not formatted correctly. Try posting your index.php file (up to and including the HTC part but not after it).

 

Jack

Share this post


Link to post
Share on other sites

Jack, here is the index.php:

 

<?php

/*

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

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 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>

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

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

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

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

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

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

<!-- header_eof //-->

 

 

I am looking in functions/general.php and see the code and version have changed since I last updated it. I had the HTC code in my general.php version 1.160 and now I see my version is 1.231 ?? How could that happen? I did have my service provider move my site to the root instead of www.xxxx.com/catalog. I wonder if that may have done something? Do you think the General.php would do that?


Laser labels, barcode labels, custom labels

Share this post


Link to post
Share on other sites

No, it is not the General.php. I was looking at the wrong one. Admin, vs Include.... I have been working on this way to long......:(


Laser labels, barcode labels, custom labels

Share this post


Link to post
Share on other sites
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

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

<html <?php echo HTML_PARAMS; ?>>

<head>

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

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

You don't have HTC installed in this file. It should look like the following (I just included the part dealing with the title). Did you edit all of the files in your root directory per the instructions?

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// 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 v1.0
?>

 

Jack

Share this post


Link to post
Share on other sites

I got it!!!!! Yeah! I changed the file name of product_info.php and did not change it in header_tag.php

 

All done...Thanks anyway.


Laser labels, barcode labels, custom labels

Share this post


Link to post
Share on other sites
In the html output does our email address really need to be shown?

Are you talking about in english/header_tags.php, where it has

define('HEAD_REPLY_TAG_ALL',STORE_OWNER_EMAIL_ADDRESS);

If so, no, you can comment that out. But if you do, you should also comment out the line that uses it in includes/header_tags.php else you will get an empty reply-to line inserted into your code.

 

Jack

Share this post


Link to post
Share on other sites

actually i'm talkint about how it says something like

 

<meta reply-to="root@localhost">

 

in the meta section of html outputs ontop of title, keywords, and desc.

 

thanks

Share this post


Link to post
Share on other sites

That's what I'm talking about. Look in includes/header_tags.php and you will see this near the top:

echo '  <META NAME="Reply-to" CONTENT="' . HEAD_REPLY_TAG_ALL . '">' . "\n";

Comment, or remove, that out if you don't want it.

 

Jack

Share this post


Link to post
Share on other sites

Hi All,

 

Im getting this error while trying to enter a new product in the admin:

 

? 1064 - You have an error in your SQL syntax near 'where products_id = '0' and language_id = '1'' at line 1

select products_head_title_tag fromproducts_description where products_id = '0' and language_id = '1'

[TEP STOP]

 

Directly after "Products Page Title:", Ive been stareing at it for a while now but I really dont see the problem, and im even using the categories.php from the admin part of the contribution and still the same error. And help would be appreciated.

 

Kenneth

ZDP Media Group.


Kenneth S

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

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

Everything is working ok, except for some reason, my breadcrumbs are showing the product/model number rather than the product name. Example:

 

Top ? Catalog ? Sanguinarius ? SNG-0001

 

Rather than:

 

Top ? Catalog ? Sanguinarius ? T-Shirt

 

Is this supposed to be this way? I don't recall it being this way before I installed the Header Tags Controller. What do I need to change to get the Product name to show there?

Edited by Sanguinarius

--Sanguinarius

 

If you're reading this, I'm probably pulling my hair out. ;>

 

*waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.)

Share this post


Link to post
Share on other sites
Everything is working ok, except for some reason, my breadcrumbs are showing the product/model number rather than the product name. Example:

 

Top ? Catalog ? Sanguinarius ? SNG-0001

 

Rather than:

 

Top ? Catalog ? Sanguinarius ? T-Shirt

 

Is this supposed to be this way? I don't recall it being this way before I installed the Header Tags Controller. What do I need to change to get the Product name to show there?

That comes normal with osC and doesn't have to do with HTC. But i haven't looked into fixing that yet.

Share this post


Link to post
Share on other sites
That's what I'm talking about. Look in includes/header_tags.php and you will see this near the top:
echo ' ?<META NAME="Reply-to" CONTENT="' . HEAD_REPLY_TAG_ALL . '">' . "\n";

Comment, or remove, that out if you don't want it.

 

Jack

Yeah thats the one, i'm wondering if search engines really use this or if it's even needed for seo before I and others decide to comment it out or remove it. Anyone have any insight to this?

Share this post


Link to post
Share on other sites
Yeah thats the one, i'm wondering if search engines really use this or if it's even needed for seo before I and others decide to comment it out or remove it. Anyone have any insight to this?

Ahh, I thought you were asking a question relating to HTC. The answer to your question is no, the SE's don't use the tag. It's only real purpose nowadays is to provide the spammers with a quick path to you. As such, it should be removed.

 

Jack

Share this post


Link to post
Share on other sites

Thanks Jack! The code is in HTC as well and sure does give spammers your email address. *lol*

Edited by talon177

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  

×