Hi. for SEO i need update my template. I have problem. How I add manufacturer inot this code?
I need the manufacturer's name before the product name in the h1 tag.
I've tried many variations, but none worked.
<?php // Product Title ?>
<h1 class="FlexibleProductDetailProductName"><?php echo $this->product->product_name ?></h1>
<?php // Product Title END ?>
And maybe even add product_mpn.
So the resulting shape would be "manufacturer product name product_mpn"
Can anybody help me, please?
<?php echo $this->product->mf_name . ' ' . $this->product->product_name . ' ' . $this->product->product_mpn; ?>
Thx very much.
I need to edit the <title> tag to make the work perfect. To make the product detail the same.
Normally you should use plugins to set things like metadata. But for your own purposes you can add this to the template override:
JFactory::getDocument()->setTitle('Your Title Here');
Or you can set custom title when editing the product.
Know you any good plugins? I need change it for all product page automatically. I only use sh404sef and there is very limited SEO.
Ok. Found it.
// Set the titles
// $document->setTitle should be after the additem pathway
if ($product->customtitle) {
$document->setTitle(strip_tags(html_entity_decode($product->customtitle,ENT_QUOTES)));
} else {
$catName = '';
if($category->published and !empty($category->category_name)){
$catName = $category->category_name.': ';
}
$document->setTitle(strip_tags(html_entity_decode($catName . $product->product_name,ENT_QUOTES)));
}