Editing Title for Category & Manufacturer Pages

Started by betterlead, December 03, 2016, 21:35:45 PM

Previous topic - Next topic

betterlead

I have set up to ways for the customer to brows around the products - one by manufacturer and one by category. Both are menu items in the main menu.

Since latest versions of VM, we are now able to to select manufacturers in the Category Layout and by this way, a menu item under we can have all the manufacturers in our shop and all the products listed on the manufacturer's page. That is great! Thanks Max.

So, what is my issue with this? Well, I want to edit the Manufacturer's and the Categories pages "Page Title" and "Meta Description". In the same way as under products details. (There are boxes to fill in for that)

We go on, I start editing a Menu Item for a Manufacturer, under the "Page Display" tab. I fill in the text in the box for "Browser Page Title", save, clear the cache and then reload the current page from front end. Nothing. Zero changes. Still the title displayed in the browser and in the source, the same of course.

Is it simply not working, or am I doing something wrong? 

Anyone, any ideas?

Live site runs on Joomla 3.9.24 & VM 3.8.6 10373

PHP: 7.3.26

GJC Web Design

There is a hierarchy of which set title is used

i.e. if title x is filled then it take precedence over others

check the code in components\com_virtuemart\views\category\view.html.php  from line ~ 340

search backwards from $document->setTitle( $title ); ~ 430

it is a hack but I regularly change this code to get the auto html titles I want  ( normally from concatenating cat names from the category structure and the set cat metas) 
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

betterlead

#2
Thanks GJC. That is something I probably won't be able to do by myself. Out of scope of my coding knowledge. :(

I think I need to wish it will become a feature in future VM versions.

@max - I might contribute with some € to the "Virtuemart club" to make this happen.

Cheers
/Dodo
Live site runs on Joomla 3.9.24 & VM 3.8.6 10373

PHP: 7.3.26

GJC Web Design

It's more just the sequence or hierarchy of which configured html Title takes precedence.
I guess every user will have their own ideas which it should be

I would tend to the menu metas being top dog but I know many VM builders don't use Joomla menus at all for cats etc
there is already category metas but then how do u differentiate between the manufacturer filtered cat and the full cat?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

YOu can always force the document title in the tmpl/default.php file
You can check and Copy the view.html code
the base
$title =$XXX;
$document = JFactory::getDocument();
$document->setTitle( $title );

$XXX is the value you want as title.

betterlead

Quote from: Studio 42 on December 04, 2016, 22:24:52 PM
YOu can always force the document title in the tmpl/default.php file
You can check and Copy the view.html code
the base
$title =$XXX;
$document = JFactory::getDocument();
$document->setTitle( $title );

$XXX is the value you want as title.

Hmm,
sorry Studio42, I don't quite get that. Could you please be a bit more specific? (It might be very specific, but I still don't get it ;) )
Though it looks very easy...

Cheers
Live site runs on Joomla 3.9.24 & VM 3.8.6 10373

PHP: 7.3.26

Studio 42

The title is set in view.html.php
For the category view for eg.
But the template file YOURSITE\components\com_virtuemart\views\category\tmpl\default.php
or YOURSITE\templates\YOURTEMPLATE\com_virtuemart\views\category\default.php is loaded after.
So you can change the title in this file to overide default one.
using
$title = vmText::_($this->category->category_name);
to set category name.
But this is only an exemple and you can add more text, as shop name vendor name ....

betterlead

Anyone that can help me achieve this? Physically introduce me how to do? I don't understand if this is some procedure I have to do on every manufacturer page or "central" in one file? (Override?)

Of course I have to pay something for your time.
P.M. me then, please.
Live site runs on Joomla 3.9.24 & VM 3.8.6 10373

PHP: 7.3.26