Author Topic: Manufacturer Details - Not Mobile Friendly  (Read 409 times)

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 290
    • Audio Store
Manufacturer Details - Not Mobile Friendly
« on: July 29, 2019, 13:47:41 pm »
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:
Code: [Select]
$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

  • Global Moderator
  • Jr. Member
  • *
  • Posts: 457
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Manufacturer Details - Not Mobile Friendly
« Reply #1 on: July 29, 2019, 15:21:14 pm »
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

  • Jr. Member
  • **
  • Posts: 290
    • Audio Store
Re: Manufacturer Details - Not Mobile Friendly
« Reply #2 on: July 29, 2019, 16:00:42 pm »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4018
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Manufacturer Details - Not Mobile Friendly
« Reply #3 on: July 29, 2019, 17:06:39 pm »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10363
  • VirtueMart Version: 3+
Re: Manufacturer Details - Not Mobile Friendly
« Reply #4 on: July 29, 2019, 19:54:50 pm »
Your tmpl=component   should ALWAYS be noindex


your template/component.php


$doc =JFactory::getDocument();
$doc->setMetaData( 'robots', 'noindex' );
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 290
    • Audio Store
Re: Manufacturer Details - Not Mobile Friendly
« Reply #5 on: July 30, 2019, 06:48:27 am »
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