|
Overview We believe we have most angles covered when it comes
to offering search engine friendly shopping cart software.
Ecommerce templates offers the ability to use static
pages which are easy to spider by visiting search engines
as well as unique titles and meta tags for category,
product and product detail pages and ALT information
for all the product images. To fully benefit from all
our search engine features, you will need a minimum
version of 4.1.1 and the updater is available here if
necessary.
» Dynamic title
and meta description tags
» Static URLs
» ALT information
» Further reading
Dynamic title and meta description tags
From version 4.1.1 it is possible to dynamically generate
the title and meta description tags for your categories,
product and product detail pages. Not only are they
dynamically generated but you can also add you own unique
information such as company name to the title tag. The
set up details are outlined below:
The pages you are going to want to
change are...
categories.php
products.php
proddetail.php
Open each of these in turn and go to HTML view. About
halfway down the page you should see a bunch of "include"
files, something like this...
<?php include "vsadmin/db_conn_open.php"?>
<?php include "vsadmin/includes.php"?>
<?php include "vsadmin/inc/languagefile.php"?>
<?php include "vsadmin/inc/incfunctions.php"?>
<?php include "vsadmin/inc/incproducts.php"?>
You will want to delete the first one, the db_conn_open.php
line.
If your template uses a DHTML pop-out menu or Mini
Cart there is no need to delete the line
<?php include "vsadmin/db_conn_open.php"?>
You can now follow the instructions below as normal
Then, at the very top of the file before the first <html>
tag you should already have a couple of lines of code.
Now add the db_conn_open line along with the metainfo.php
include line like this...
<?php
session_cache_limiter('none');
session_start();
include "vsadmin/db_conn_open.php";
include "vsadmin/inc/metainfo.php";?><html>
Now repeat this with each of the 3 files categories.php,
products.php and proddetail.php
Now, on your categories.php AND the products.php pages
you can change the page title tag to something like
this...
<title>Bob's widget store: <?php
if($topsection != "") print $topsection .
", ";
print $sectionname?></title>
Also on the categories page, if you use a category
description you might want to set the meta description
tag to this...
<META NAME="Description" CONTENT="<?php
print tr_replace('"','"',$sectiondescription)?>">
The information available to the proddetail.php page
is slightly different. On that page you can change your
page title to...
<title>Bob's widget store: <?php
print $productname . ", " . $sectionname .
", " . $productid;
?></title>
You might not want to include the product ID, in which
case you can use...
<title>Bob's widget store: <?php
print $productname . ", " . $sectionname;
?></title>
For the meta description on the proddetail.php page
you can use...
<META NAME="Description" CONTENT="<?php
print str_replace('"','"',$productdescription)?>">
Converting dynamic to static URLs
The default URL for a products page would be something
like www.yoursite.com/products.php?id=2 but it is possible
to change this to something even more search engine
friendly like www.yoursite.com/productname.php. You
can also do the same for the category pages and the
product detail, the information is outlined below.
Make a copy of products.php and call it say bobswidgets.php
Now, open this page in notepad or your web editor and
go to HTML view. Now, you should see a set of include
files like this:
<?php include "vsadmin/db_conn_open.php"?>
<?php include "vsadmin/includes.php"?>
<?php include "vsadmin/inc/languagefile.php"?>
<?php include "vsadmin/inc/incfunctions.php"?>
<?php include "vsadmin/inc/incproducts.php"?>
Now just add the variable to specify the category
before the incproducts include like this for PHP
<?php include "vsadmin/db_conn_open.php"?>
<?php include "vsadmin/includes.php"?>
<?php include "vsadmin/inc/languagefile.php"?>
<?php include "vsadmin/inc/incfunctions.php"?>
<?php
$explicitid=2;
?>
<?php include "vsadmin/inc/incproducts.php"?>
If your template uses a DHTML pop-out menu or Mini
Cart then you will only find one of the PHP includes
in the main body of your site. The explicitid will still
need to precede the include line eg.
<?php
$explicitid=8;
?>
<?php include "vsadmin/inc/incproducts.php"?>
You can now do the same for categories.php and proddetail.php
by adding the explicitid before:
<?php include "vsadmin/inc/inccategories.php"?>
and
<?php include "vsadmin/inc/incproddetail.php"?>
As the explicit id for a product detail page is a product
reference, you have to enclose this in quotes like this:
$explicitid="yourprodref";
You can get the variable you need by browsing your
site and checking the particular page URL.
For example if your URL for a widget looks like this:
www.yoursite.com/products.php?id=14
...then you would want to set
<?php
$explicitid=14;
?>
If you don't want to change all your pages to static
URLs then the URL can be in the form of http://www.yoursite.com/products.php?cat=14
due to the fact that Google may not give as much weight
to links which contain this generic "id" parameter.
ALT Information
By default all the product pictures and product detail
pictures will have the ALT information dynamically generated
by the value you have added for the product name. So
if your product name is "Blue Widget" then
when your mouse passes over the picture the name "Blue
Widget" will appear.
Further reading
We also have some tips about search
engine optimization (SEO) and an overview on how
the search
engines work. This is only very general information
and we do recommend reading up on the subject. A great
place to start would be on Webmaster
World. |