Ecommerce Templates > Search engine friendly > Product name features - PHP Version

Product name in product detail dynamic pages - PHP Version

If you are not using static pages and want to include the product name in the URL of the detail page such as

/proddetail.php?prod=My-Product-Name

rather than

/proddetail.php?prod=prodid

add the following to vsadmin/includes.php

$usepnamefordetaillinks=TRUE;

When using this parameter you can set an optional replacement character for spaces. For instance if you set...

$detlinkspacechar="-";

Then the product name "My Test Product" would result in "My-Test-Product"

You will need to move the PHP include lines to the top of the code before the opening HTML tag like this in your proddetail.php file

<?php
session_cache_limiter('none');
session_start();
ob_start();
include "vsadmin/db_conn_open.php";
include "vsadmin/inc/languagefile.php";
include "vsadmin/includes.php";
include "vsadmin/inc/metainfo.php";?>

... and make sure they are not duplicated later in the code.

Important Note: When using this system, all product names must be unique or it will be impossible to view some of your products. Also, when using the optional space replacement character, you cannot then use that character in product names as again it will make it impossible to find those products in the database - eg you cannot have hyphens in your product names if you choose to use detlinkspacechar="-"
Version 6.2.4 minimum required.

Top of page

Category identifiers

In Version 5.7.0 it is possible to change the category identifier from a number to text, for example from products.php?cat=29 to products.php?cat=Laser+Printers

To add this feature you will need the following in vsadmin/includes.php

$usecategoryname=TRUE;

If you are using the dynamic title and meta tags feature you will need to make sure that the includes.php line comes before the metainfo.php line at the top of the code, like this

<?php
session_cache_limiter('none');
session_start();
ob_start();
include "vsadmin/db_conn_open.php";
include "vsadmin/includes.php";
include "vsadmin/inc/metainfo.php";?><html>

...and then make sure you have removed the includes line from further down the code.

Top of page

Product name in <h1> tags

From Version 6.3 you can choose to have the product name on the detail pages in <h1> tags. To do this add the following to vsadmin/includes.php

$detailnameh1=TRUE;

You will then probably want to format the name through the css file with something like this

.detailname h1 {
font-style: bold;
font-size: 18px;
}

Top of page

More search engine friendly features from Ecommerce Templates

Top of page