0
X-Cart 4.2 Product Title Only as HTML Title
I just wanted to show the product title as the html title for product detail pages in x-cart 4.2. There is an option for this under general settings, seo options but it is broken.
To fix I needed to look for the variable being set: $html_page_title in /include/func/func.core.php and add an extra foreach loop to only add the first location element to the title. Otherwise the only options for automated titles are reversing the order of all the elements.
if ($config['SEO']['page_title_format'] == 'P') {
foreach ($location as $k => $v) {
if($k == 0)
$tmp[] = strip_tags($v[0]);
}
}
else {
foreach ($location as $v) {
$tmp[] = strip_tags($v[0]);
}
}