Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I add meta tags?


amythepoet

Recommended Posts

Posted

Hi,

 

I'm trying in vain to add meta tags to my new oscommerce site. But I can't find the right file to update? I thought it was in headers, or the index.php, I can't find the right one.

 

I've looked inside the category folder, then insdie the includes f older.. please help!

 

Amy

Posted

Hi.

 

Since index.php and product_info.php are the most viewed pages, I added meta tags manually in those two pages. You can do so by opening both of these files, and find something similar to the following:

 

<!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>
<?php require(DIR_WS_INCLUDES . '/' . 'meta_tags.meta'); ?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

 

If you notice the line 6, I have included the meta-tags file - which is basically a text-file with all my meta information, and saved as meta_tags.meta so I don't confuse it with anything else. You can even replace that line by adding meta-tags directly there as well.

 

Hope this helps, good luck. :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...