Jump to content
Latest News: (loading..)
Sign in to follow this  
GemRock

Header Tags for novices

Recommended Posts

i think i have missed afew posts (no email notification sent to me).

 

for osc 2.3.1, you add this code to template__top.php between

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

and the 'base href' bit. changes to the application_top.php is the same as in osc 2.2. the results can be seen in my demo osc231 shop (accessed from my profile).

<?php
if (stristr($_SERVER['PHP_SELF'],'index.php')) {
?>
<title><?php echo (strlen($title_tag) > 1) ? $title_tag . ' - ' . TITLE : $title_home_default . ' - ' . TITLE; ?></title>
<meta name="description" content="<?php echo (strlen(strip_tags($desc_tag)) < 5)? $desc_home_default : strip_tags($desc_tag); ?>">
<meta name="keywords" content="<?php echo (strlen(strip_tags($keywords_tag)) < 5) ? $kws_home_default : strip_tags($keywords_tag); ?>">
<?php
}else if(stristr($_SERVER['PHP_SELF'],'product_info.php')){
?>
<title><?php echo ((strlen($categories['categories_name']) > 1) || (strlen($manufacturers['manufacturers_name']) > 1)) ? $header_tags['products_name'] . ' -' . $breadcrumb_tags->trail_tags(' ') . ' ' . TITLE : TITLE; ?>
</title>
<meta name="description" content="<?php echo $header_tags['desc_tag']; ?>">
<meta name="keywords" content="<?php echo $header_tags[keywords_tag]; ?>">
<link rel="canonical" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id='. (int)$HTTP_GET_VARS['products_id']); ?>" />
<?php
}else{
?>
<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>
<?php
}
?>

 

for websites using sts, refer to the above.

 

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.

Share this post


Link to post
Share on other sites

for the admin side of osc2.3.1, just comment out the column_left so that it looks like this:

<!-- left_navigation //-->
<?php // require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->

in the two files: header_tags_edit.php and header_tags_category_edit.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.

Share this post


Link to post
Share on other sites

Hi, Ken

 

Many thanks for excellent contrib.

Installation on OSC 2.3.1 and runs well

 

How can I remove shop name from the title tag, even from the category title tag?

 

greeting

 

Marcus

Share this post


Link to post
Share on other sites

Hello, i've installed contribution in oscommerce 2.3.1, and make modification in template_top.php. This don't work for me.

The code i get in my web page is:

<html dir="LTR" lang="es"><head>

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

<title> - Solotextilhogar</title>

<meta name="description" content="">

<meta name="keywords" content="">

<base href="http://www.solotextilhogar.com/" />

 

There is the meta tag description and keywords, but there isn't any description or keywords.

 

¿can someone help me?

 

¿can somebody write this wonderful contribution for oscommerce 2.3.1?

 

Thans to everybody

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  

×