VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: borro on August 21, 2013, 11:31:52 AM

Title: How to change page titles for product view?
Post by: borro on August 21, 2013, 11:31:52 AM
Hello, friends

Now titles in store look like "Category_name: Product name"

Where can I change them to make them look like "Buy а category_name: product_name"

In some cases there are exclusions, and I have to edit titles manually (for 4-5 categories).

How can I do all this?
Title: Re: How to change page titles for product view?
Post by: borro on August 22, 2013, 13:33:11 PM
Thanks to Maxim Pishnyak.

You can do it in product card editing. But there is a bug i think.

If there is a " symbol(double quotes) in the page title VM system will leave only the first part of title that stays before the first " mark. Despite this in frontend page title will be shown with all written words and " signs. But it will so be until you don't save product card again. VM 2.0.18a
Title: Re: How to change page titles for product view?
Post by: Maxim Pishnyak on August 22, 2013, 18:14:02 PM
/" ?
Title: Re: How to change page titles for product view?
Post by: Maxim Pishnyak on August 24, 2013, 14:55:02 PM
We don't need " to use for having double quotes in Title nomore:

administrator\components\com_virtuemart\views\product\tmpl\product_edit_description.php
near row 39
<input type="text" class="inputbox" size="70" name="customtitle" value="<?php echo htmlentities($this->product->customtitleENT_QUOTES"UTF-8");?>" />


Contributed by Borro
Title: Re: How to change page titles for product view?
Post by: Milbo on September 01, 2013, 11:05:11 AM
This a wors case prevention, but.... I got an other idea by it. Atm only added to vm2.1. Please test this:

Go to BE/helpers/vmtable.php around line 803 and line 825,... search for

$langData[$name] = $data->$name;


and replace it by


$langData[$name] = htmlentities($data->$name, ENT_QUOTES, "UTF-8");


The idea is that we store directly all language fields encoded.