View Single Post
Old 03-31-2009, 11:53 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline

Join Date: Apr 2007
Posts: 14,040

Default Page Title in 4.2

4.2 came out with some new features including meta keywords, meta descriptions and clean url's, but QT left out something very important - PAGE TITLE. Page title is still "product name-category name-store name" or "store name-category name-product name" and there is no setting to change that. I wonder why they didn't include page title for products, categories, static pages....
Anyway here is how this can be added. Please note that this is for stores that do not have 3rd party SEO addons and is for 4.2. Please make backups to your DB and store files first

1. Add new field to xcart_products table. I called my
product_page_title and is varchar(255), latin1_swedish_ci

2. Add new language variable - lbl_product_page_title with value "Product Page Title"

3. Open include/product_modify.php and find
$query_data = array(
and add to the array
"product_page_title" => $product_page_title

4. Open skin1/main/product_details.tpl and add
<tr> {if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[product_page_title]" /></td>{/if} <td class="FormButton" nowrap="nowrap">{$lng.lbl_product_page_title}:</td> <td class="ProductDetails"><input type="text" name="product_page_title" class="InputWidth" value="{$product.product_page_title|escape:"html"}" /></td> </tr>
when you want it to appear when adding/modifying product in admin. I would add it after [keywords]

5. Open include/import_products.php and find
$import_specification["PRODUCTS"] = array(
and add to the array
"product_page_title"=> array()

6. Open skin1/customer/service_head.tpl and find
and replace with
{if $product.product_page_title ne ""} {$product.product_page_title} {else} {$html_page_title|escape} {/if}

Same logic can be applied to the categories changing the coresponding files
Steve Stoyanov
Web Development
Reply With Quote