Home arrow PHP arrow Page 2 - Using PHP to Create Relevant Title Tags in osCommerce Websites

osCommerce Web Template Files and Page Title Naming - PHP

If you use osCommerce for your site's e-commerce, and you're not happy with the quality or quantity of visitors your site receives, keep reading. Though osCommerce provides some excellent features, its weaknesses could be getting in the way of giving you the number of visitors and conversions you expect. Fortunately, there's a solution, hidden in something as simple as a title tag.

TABLE OF CONTENTS:
  1. Using PHP to Create Relevant Title Tags in osCommerce Websites
  2. osCommerce Web Template Files and Page Title Naming
  3. Proper Page Title Naming for the Home Page and Categories
  4. Proper Page Title Naming for the Product Pages
By: Codex-M
Rating: starstarstarstarstar / 8
May 21, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

In order to successfully create appropriate names for the page title in an osCommerce website, you must edit two important files and the corresponding important pages of the website.

  1. Index.php- This is the most important template file in osCommerce. This template is responsible for generating titles for the home page and category pages. 

  2. Product_info.php - This template is responsible for naming the title tag for the product pages. This template can cause very serious problems. In a giant osCommerce site with thousands of products, using this template unmodified also means there are thousands of pages with the same titles.

Other pages are not as important as the two above, but it is very important that they also use unique and relevant page titles. The pages are found in the main site navigation menu. For example:

  • New Products page: products_new.php

  • Special offer page: specials.php

  • Contact us page: contact_us.php

  • Privacy Policy page: privacy.php

You should also modify other pages that are commonly found if you have them, such as the terms and conditions page, sitemap page and "About Us" page.

We'll start with the index.php since this is a very important file. By default, the title tag PHP script found in the index.php is:

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

This is not enough. It will produce a home page title equal to the store owners' name, or the name of the store, which will not help with search engine optimization efforts.

It gets worse. The page title on the categories pages will be the same as the one on the home page and even the product pages! 

This can confuse visitors shopping your online store powered by osCommerce; even search engine bots like Googlebot will have problems sorting things out. Your site will be very hard for them to understand, and in return, since you confused Googlebot, you will not be rewarded with great rankings and traffic.



 
 
>>> More PHP Articles          >>> More By Codex-M
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap

Dev Shed Tutorial Topics: