News:

Support the VirtueMart project and become a member

Main Menu

Manufacturer Details - Not Mobile Friendly

Started by Ventsi Genchev, July 29, 2019, 13:47:41 PM

Previous topic - Next topic

Ventsi Genchev

I received a notice from Google that pages with details of manufacturers are not mobile friendly.
After I checked, I found that Google was referring to the pages that ended with "?tmpl=component". For example:
https://demo.virtuemart.net/manufacturers/istraxx?tmpl=component

These pages open independently and not according to the site's design.

Where the problem comes from:
Normally these pages are opened by popup. But Google indexes them and it's not a good idea to stop indexing.
The problem is that these pages do not contain meta id "viewport".

To solve the described problem, I added to:
/templates/theme_name/html/com_virtuemart/manufacturer/details.php
The following:
$document = JFactory::getDocument();
$document->addCustomTag('<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">');


Please share if someone has a better idea.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

StefanSTS

Hi,

the popup is normally opened in your templates component.php which shows no modules and other unwanted stuff in a popup.
You might want to add these things to your component.php itself, it should be already there in a good template.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Ventsi Genchev

Hi Stefan,

Thank you for your advice.
You are absolutely right. It must be there, but it is not.

I do not want to tell which company the template is, but I had to rewrite it all to work properly. This one with a component.php I obviously missed it.
Now everything is OK.

Thank you and best regards,
Ventsi
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

Studio 42

Because it's a modal, add a robots.txt rule to prevent google to index and verify this files.
or modify the link(use nofollow,noindex ... for eg.)

PRO

Your tmpl=component   should ALWAYS be noindex


your template/component.php


$doc =JFactory::getDocument();
$doc->setMetaData( 'robots', 'noindex' );

Ventsi Genchev

Thanks everyone for the tips.

I added the following:
$doc->setMetaData('robots', 'noindex, nofollow, noarchive, nosnippet');
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English