VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: v0dk4 on August 01, 2013, 11:19:10 AM

Title: [SOLVED] Title tag for product details
Post by: v0dk4 on August 01, 2013, 11:19:10 AM
Hi,
due to SEO optimization and look, I need to change title tag templates for product details.
Currently, by default, each product detail page has the following template:

"Category name : Product Name"

- Is it possible to change the template in "Product Name" without showing the category title in product detail page?
- Is it possible to switch positions by showing first the product name and then the category name?
- Is it possible to change the separator? For example I'd prefer to use "-" instead of ":"

Which files I should modify to obtain some of those changes?
I use SEO plugin but can't get to modify this, unless I do it manually for all products.

Thanks in advance for your help,

cheers
Title: Re: Title tag for product details
Post by: Maxim Pishnyak on August 01, 2013, 13:58:59 PM
https://forum.virtuemart.net/index.php?topic=109695.msg368179#new

ALSO

you could directly write your own Title
a) either in product edit form (for each product one by one)
b) or with the help of CSVI Improved (product titles mass change)
Title: Re: Title tag for product details
Post by: v0dk4 on August 04, 2013, 11:22:39 AM
Quote from: Maxim Pishnyak on August 01, 2013, 13:58:59 PM
https://forum.virtuemart.net/index.php?topic=109695.msg368179#new

ALSO

you could directly write your own Title
a) either in product edit form (for each product one by one)
b) or with the help of CSVI Improved (product titles mass change)

Hi,
thank you very much,
I changed some line in this file:  /components/com_virtuemart/views/productdetails/view.html.php

$document->setTitle(strip_tags(($category->category_name ? ($category->category_name . ' : ') : '') . $product->product_name));

now is

$document->setTitle(strip_tags($product->product_name));

so I'm not showing anymore category name and separator.

cheers!
Title: Re: [SOLVED] Title tag for product details
Post by: d0ublezer0 on December 03, 2013, 07:14:01 AM
Custom product title resolves your problems without a hack..