VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: sonzin on February 17, 2014, 03:53:44 AM

Title: [Solved]Title Products
Post by: sonzin on February 17, 2014, 03:53:44 AM
Can I tell me how to change format title products in VM 2.0
Now: Formart title is "Category name - Product name"
But I want only "Product name", not include Category name
Thanks
Title: Re: Title Products
Post by: Jazajay on February 17, 2014, 07:26:38 AM
Hi Sonzin
I take it you are referring to the: Title Element in the browser.

If so I'm pretty sure that is the default option if you have not defined one your self.

You basically have 2 options:
1) In the product page in the administration area go to > the product description tab > scroll to the bottom and add a new title
2) Edit the else statement below:

if ($product->customtitle) {
    $document->setTitle(strip_tags($product->customtitle));
} else {
    $document->setTitle(strip_tags(($category->category_name ? ($category->category_name . ' : ') : '') . $product->product_name));
}

File:  com_virtuemart/views/productdetails/view.html.php
Line: 193

I would go with opton number 1. :)

Jaz
Title: Re: Title Products
Post by: sonzin on February 17, 2014, 08:59:32 AM
hi Jazajay

firstly, thank for your answer.

I had decided choose option 1 because I don't want to impact to code (because I am not coder). But so I'll edit every products, not for all.

have a nice day bud ;)
Title: Re: Title Products
Post by: Jazajay on February 17, 2014, 09:06:44 AM
Not a problem sonzin, glad I could help.

If its solves your problem if you mark your original post as: solved from the drop down when u edit it, that will help to show other users that this one has an answer :)