Hey Guys,
I wanted to see if there was a way for me to change how the products currently display on the SERPs... Right now it displays = product category :: product name :: call for price
Is there a way for me to switch this to= product name :: category :: call for price?
Please see attachment, I'd like this to display "Graco Therm-O-Flow 200 : Hot Melt Units - Call for price"
Or when I update the custom title on the product is there a way for me to make this display to overwrite how it displays currently?
Thanks!
Ryan
This require a core change or some plugin development
administrator/components/com_virtuemart/views/product/view.html.php
// 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 {
//QUORVIA adjusted
//$document->setTitle(strip_tags(html_entity_decode(($category->category_name ? (vmText::_($category->category_name) . ' : ') : '') . $product->product_name,ENT_QUOTES)));
$document->setTitle(strip_tags(html_entity_decode($product->product_name . ' : ' . ($category->category_name ? (vmText::_($category->category_name)) : '') ,ENT_QUOTES)));
}
Note : If you don't want modify virtuemart core, you can add this code in the tmpl files overides, so it's not removed on VM updates.
@studio 42
Thanks for the additional information - Clearly setting this as an override in the product template is preferable!!
$document->setTitle(strip_tags(html_entity_decode($this->product->product_name . ' : ' . ($this->category->category_name ? (vmText::_($this->category->category_name)) : '') ,ENT_QUOTES)));
yes- all the document set stuff cascades its effect so any of this can be done at tmpl or even in modules