Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags for novices


GemRock

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.

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 1 month later...

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

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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