Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags for novices


GemRock

Recommended Posts

This might be conflicting a little with Chemo's Ultimate SEO URLs contrib... I'm no longer getting any META descriptions and keywords for categories and even the home page -- but I am with product info pages. Or maybe that's designed, I forget now -- but do you think some logic could be added so that IF the description and keywords fields are blank THEN use some default description and keywords?

 

Thanks for any ideas!

 

JG

The short and absolute answer is NO, there is NO conflict with Chemo's USU, which is one of the things Im 100% sure about, albeit when I say Chemo's I mean Chemo's and Not under someone else name be it called upgraded or fix or whatever, since I do not have the time check them out one by one. In general, there is no competitivity issue with chemos USU, unless someone changed it and stepped into the meta tags area.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

You must view at least one product on the shop front before you can run the header_tags_edit.php at admin, as the instruction says. By doing that, the script will create new fields for you so that you dont need to create the new fields manually.

 

Ken

 

Hi Ken

 

Forgive me if this turns out to be my error but I am also getting:

 

1054 - Unknown column 'pd.title_tag' in 'field list'

 

select p.products_id, p.manufacturers_id, pd.products_name, pd.title_tag, pd.desc_tag, pd.keywords_tag, p.manufacturers_id from products p, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' limit 0, 20

 

[TEP STOP] upon entering edit header tags in the admin section

 

I have browsed and purchased from the shop front end then enter catalog/edit header tags in the admin section. I've tried updating, refresh etc but still get the above error. Any advice gratefully recieved

 

Regards

 

Rory

Link to comment
Share on other sites

Hi Rory

 

Check the file application_top.php for this code:

  if (!mysql_query("SELECT title_tag FROM " . TABLE_PRODUCTS_DESCRIPTION)){
  tep_db_query("ALTER TABLE " . TABLE_PRODUCTS_DESCRIPTION . " ADD COLUMN title_tag VARCHAR(255) NULL, ADD COLUMN desc_tag TEXT NULL, ADD COLUMN keywords_tag VARCHAR(255) NULL");
}

NOTE that the file is the one at the shop front, ie , under [catalog]/includes/, not the one under admin/includes/

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Hi Rory

 

Check the file application_top.php for this code:

  if (!mysql_query("SELECT title_tag FROM " . TABLE_PRODUCTS_DESCRIPTION)){
  tep_db_query("ALTER TABLE " . TABLE_PRODUCTS_DESCRIPTION . " ADD COLUMN title_tag VARCHAR(255) NULL, ADD COLUMN desc_tag TEXT NULL, ADD COLUMN keywords_tag VARCHAR(255) NULL");
}

NOTE that the file is the one at the shop front, ie , under [catalog]/includes/, not the one under admin/includes/

 

Ken

 

 

Hi Ken

 

Its not there where should it fit?

 

Regards

 

Rory

Link to comment
Share on other sites

Hi Ken

 

Its not there where should it fit?

 

Regards

 

Rory

 

follow the instructions from the download, whihch is also available from my website (address under profile on the left).

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

follow the instructions from the download, whihch is also available from my website (address under profile on the left).

Ken

 

Hi, Just installing this and I've come to the mods in index.php and product_info.php. I cannot find the code mentioned to add or amend eg this is my product_info.php file:

 

 

EDIT: I do have a file /catalog/templates/original/main_page.tpl.php that has my title and meta tags already detailed

 

<?php

/*

$Id: product_info.php,v 1.2 2003/09/24 14:33:16 wilt 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');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_check = tep_db_fetch_array($product_check_query);

 

$content = CONTENT_PRODUCT_INFO;

$javascript = 'popup_window.js';

 

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

 

Can anyone assist me?

Regards

David

Edited by rumbey
Link to comment
Share on other sites

Hi, Just installing this and I've come to the mods in index.php and product_info.php. I cannot find the code mentioned to add or amend eg this is my product_info.php file:

 

 

EDIT: I do have a file /catalog/templates/original/main_page.tpl.php that has my title and meta tags already detailed

 

<?php

/*

$Id: product_info.php,v 1.2 2003/09/24 14:33:16 wilt 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');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_check = tep_db_fetch_array($product_check_query);

 

$content = CONTENT_PRODUCT_INFO;

$javascript = 'popup_window.js';

 

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

this is my main_page.tpl.php file:

 

<!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 require(DIR_WS_INCLUDES . 'meta_tags.php'); ?>

<title>MICROS2U :: Laptops, Notebooks, Projectors, MP3, Camera, Camcorder TFT Flat Panel Monitors. Great Deals everytime</title>

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

<meta name="description" content="MICROS2U ::Laptops, Notebooks, Projectors, MP3, Camera, Camcorder TFT Flat Panel Monitors. Great Deals everytime" content="<?php echo META_TAG_DESCRIPTION; ?>" />

<meta name="keywords" content="Camcorder,Laptop,Laptops,MP3,MP4,notebook,notebooks,projector,projectors,uk cheap laptops,

Compaq Laptop,Compaq Notebook,Digital Camcorder,HP Laptop,HP notebook,JVC Camcorder,Mini DV,second user,laptops,Sony Laptop,Sony Notebook,Sony Vaio,Toshiba Laptop,Toshiba Notebook,ceiling mounted projectors,cheap laptop,cheap laptops,cheap projector,cheap projectors,cinema projectors,computer monitor,data projectors,discount laptops,discount monitors,discount notebooks,dlp projectors uk,home cinema projectors,lcd projectors,light projectors,movie projectors,multimedia projectors uk,overhead projectors uk,panasonic projectors,philips projectors,projectors home cinema,projectors online,projectors uk,refurb Flat Panel,refurb laptop,refurb laptops,refurb notebook,refurb notebooks,refurbished laptop,refurbished laptops,refurbished projectors,second user notebooks,sharp projectors,ony projectors,toshiba projectors,used LCD,used LCD monitor,used laptop,used laptop computers,used laptop sales,used laptop uk,used laptops,used notebook,used notebooks,vga projectors" content="<?php echo META_TAG_KEYWORDS; ?>" />

 

<link rel="stylesheet" type="text/css" href="<? echo TEMPLATE_STYLE;?>">

<?php if ($javascript) { require(DIR_WS_JAVASCRIPT . $javascript); } ?>

</head>

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

<!-- warnings //-->

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

<!-- warning_eof //-->

 

<!-- header //-->

<?php require(DIR_WS_TEMPLATES . TEMPLATE_NAME .'/header.php'); ?>

<!-- header_eof //-->

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="<?php echo CELLPADDING_MAIN; ?>" background="<?php echo DIR_WS_TEMPLATES . TEMPLATE_NAME;?>/images/bg_cat4.gif">

<tr>

<?php

if (DOWN_FOR_MAINTENANCE == 'true') {

$maintenance_on_at_time_raw = tep_db_query("select last_modified from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'DOWN_FOR_MAINTENANCE'");

$maintenance_on_at_time= tep_db_fetch_array($maintenance_on_at_time_raw);

define('TEXT_DATE_TIME', $maintenance_on_at_time['last_modified']);

}

?>

<?php

if (DISPLAY_COLUMN_LEFT == 'yes') {

// WebMakers.com Added: Down for Maintenance

// Hide column_left.php if not to show

if (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false') {

?>

<td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="<?php echo CELLPADDING_LEFT; ?>">

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->

</table></td>

<?php

}

}

?>

<!-- content //-->

<td width="100%" valign="top">

<?php

if (isset($content_template)) {

require(DIR_WS_CONTENT . $content_template);

} else {

require(DIR_WS_CONTENT . $content . '.tpl.php');

}

?>

</td>

<!-- content_eof //-->

<?php

// WebMakers.com Added: Down for Maintenance

// Hide column_right.php if not to show

 

 

if (DISPLAY_COLUMN_RIGHT == 'yes') {

if (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_RIGHT_OFF =='false') {

?>

<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="<?php echo CELLPADDING_RIGHT; ?>">

<!-- right_navigation //-->

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

<!-- right_navigation_eof //-->

</table></td>

<?php

}

}

?>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_TEMPLATES . TEMPLATE_NAME .'/footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

 

 

Can anyone assist me?

Regards

David

Link to comment
Share on other sites

Hi David

 

Can my contribution be installed on a template osc shop? the answer is Yes. How? the answer may vary depending on the template being used. Without seeing the full file set I am sorry I can not give you a step by step guidance.

 

There is however some posts under this thread (possibly first 10 pages or so) that show how to install the contribution on template systems. You may search for these posts to see if any of them helps.

 

Ken

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Hi Ken, I've look back at the begining of the thread and I don't have STS installed I do not have the following directory.. catalog/includes/modules/sts_inc/

 

Not sure where to go from here?

 

Dave

Link to comment
Share on other sites

Hi Dave

 

You are suing a template system altho it may not be STS. The fact that you have this file /catalog/templates/original/main_page.tpl.php suggests yours is not a stock osc. I guess it may be osMax but you should know where you got it from? tpl simply means template. and your site has a folder called template (DIR_WS_TEMPLATES):

<?php require(DIR_WS_TEMPLATES . TEMPLATE_NAME .'/header.php'); ?>

and your site seems to have some sort of meta tag module installed already:

 

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

 

That's all what I can see. if yours is osMax, then since I havent used osMax nor any other STS systems so I may not be able to help you much other than to say that I believe there should be a way to install the contribution on your shop.

Good Luck!

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Hi Dave

 

You are suing a template system altho it may not be STS. The fact that you have this file /catalog/templates/original/main_page.tpl.php suggests yours is not a stock osc. I guess it may be osMax but you should know where you got it from? tpl simply means template. and your site has a folder called template (DIR_WS_TEMPLATES):

<?php require(DIR_WS_TEMPLATES . TEMPLATE_NAME .'/header.php'); ?>

and your site seems to have some sort of meta tag module installed already:

 

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

 

That's all what I can see. if yours is osMax, then since I havent used osMax nor any other STS systems so I may not be able to help you much other than to say that I believe there should be a way to install the contribution on your shop.

Good Luck!

Ken

 

Dave, as Ken mentioned above, you have the BTS (Basic Template System) contribution installed.

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

HI John

 

1. double check your installation especially application_top.php;

2. post here the part between <head> and </head> of the product_info.php;

3. version of your oscommerce and whether you are using any template system.

 

This is the least likely problem.

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

got it working.. although the index page is unchanged .. meta wise

 

 

i made the changes to it

 

www.tinygiantclothing.com

 

any ideas?

Link to comment
Share on other sites

pretty much only the product pages are changed..

 

what needs to be changed on all the other pages to make it work too

 

index, checkout pages, privacy statement, terms, contact... there are a slew of pages i would love to get meta tagged up!

Link to comment
Share on other sites

this contribution is best used with chemo's ultimate seo urls and google sitemaps. google sitemaps (except the artical bit) is basically about the index pages and the product info pages, both of which is what this contribution covers.

 

google does not index SSL pages (checkout pages are supposed using SSL). I see no point in having meta tags on these pages. RE contact, ts&cs etc, these are not dynamic pages, so there is no problem with adding meta tags manually to them if you like, or write some simple php scripts to add select 'dynamic' meta tags text to them to cheat SEs if you wish, although i see no point of doing so.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

maybe i'll just change the title on those pages to like from Oscommerce to something else like welcome to Tiny Giant Clothing .. I just dont like seeing oscommerce at the top of all the pages

Link to comment
Share on other sites

maybe i'll just change the title on those pages to like from Oscommerce to something else like welcome to Tiny Giant Clothing .. I just dont like seeing oscommerce at the top of all the pages

the default shop title can be changed in [catalog]/includes/languages/english.php

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

I really love this great contribution but the only problem is that I would like to be able to edit my manufacturer and caregories as well.

 

Since I am no longer using STS system I have no control of each individual manufacturer and category pages.

I am currently using header tags for novice which limits me to header tags for products ONLY.

I was going to use another contribution to accomplish this but I already have this one installed and would like to keep using it since it works so great.

 

My site has over 20,000 products,so it automatically generates header tags from the products description but I want to manually edit categories and manufacturers.

 

There is no problem with this contribution at all, just wondering if there will be an update in the near future or maybe someone can help me get this done.

 

 

Help Please,

 

Sam

Link to comment
Share on other sites

thanks ! that changing the english.php did the trick thats all I wanted. i love the contribution you made up.. works great.. I just make my product names long .. like Short Sleeve Tiny Giant Clothing Logo

 

or something like that so i get all those things as keywords.

 

thanks a bunch!

Edited by markedfordeathpb
Link to comment
Share on other sites

is it possible to make a template of keywords, Descriptions and insert it into every product without adding it manually?

or change default description, keywords to my template?

Edited by trembita
Link to comment
Share on other sites

I have implemented (the extended version) this great contribution but I do not see the header tags in my source of the webpage.

 

I am using oscommerce-2.2rc2a with STSv4.5.8. I have read in this thread that I should change the code in generel.php. Probably the meta tag was also not filled before I installed this contribution.

 

It seems that the data for the headertags is not passed from general.php to sts.php. If I replace $this->template['headertags'] . "\n"; by a hardcode text in sts.php I find it also in the source of the webpages. If I replace "<title>" . TITLE ."</title>"; by a hardcode text in general.php I do not see the text in the source of the webpage.

The output of the lines before and after the header tag (meta http-equiv and <base href) are in the source of the webpage.

 

I am not very familiar with PHP so who can help me solving this problem. If you need more information, please let me know.

 

Thanks in advance.

 

The part of the general.php is:

$sts->template['urlcheckout'] = tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL');

$sts->template['headertags']= "<title>" . TITLE ."</title>";

 

The part of sts.php is:

function replace (){

global $messageStack, $request_type;

 

if (!$this->display_template_output) return; // Go out if we don't use template

if (defined("STS_END_CHAR") == false) define ('STS_END_CHAR', ''); // An end char must be defined, even if empty.

 

// Load up the <head> content that we need to link up everything correctly. Append to anything that may have been set in sts_user_code.php

// Note that since v3.0, stylesheet is not defined here but in the template file, allowing different stylesheet for different template.

$this->template['headcontent'] = $this->template['headcontent'].'';

$this->template['headcontent'] = $this->template['headcontent'].'<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">' . "\n";

$this->template['headcontent'] = $this->template['headcontent'].$this->template['headertags'] . "\n";

$this->template['headcontent'] = $this->template['headcontent'].'<base href="' . (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . '">' . "\n";

$this->template['headcontent'] = $this->template['headcontent'].get_javascript($this->template['applicationtop2header'],'get_javascript(applicationtop2header)');

Edited by aneco
Link to comment
Share on other sites

Hi aneco,

I have implemented (the extended version) this great contribution but I do not see the header tags in my source of the webpage...

 

I am not familiar with sts since I havent used any of them myself so I dont know what the difference would be between different types of sts and their versions.

 

At one time I was asked to install my contribution to an osc shop that uses sts, and what I did was a bit like 'reversed-engineering'. as you said in your post that the header tags did not appear on the page source despite the fact that you had added them there. That would suggest the <head> </head> section was somehow bypassed or ignore by sts - exactly the same I saw when I did that installation last time. you would need to look at the application_top.php because that is the only code run before the head section.

 

When I looked at the file, I saw

require(STS_START_CAPTURE);
which captures text between application_top.php and header.php. By commenting out that line of code, the header tags showed up. But this may break a few things on the site, which is not difficult to fix - you just need to trace them. I did not made any changes in the general.php RE header tags (my contribution).

 

Sorry I could only give you a hint how to hunt down the problem, not a complete step by step guide as your version of sts may be different.

 

Good Luck,

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

is it possible to make a template of keywords, Descriptions and insert it into every product without adding it manually?

or change default description, keywords to my template?

sorry trembia, I dont really know what you meant.

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

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