Jump to content

jqZoom use of ALT tag to hold the name of the image causing problems in Google


skinnybloke

Recommended Posts

Hi - using Prestashop v1.5.5

 

jqZoom appears to use the ALT tag to hold the name of the image to be zoomed in, as opposed to proper descriptive text of what the image is:

<img id="bigpic" alt="http://www.corido.co.uk/843-thickbox_default/ascot-curved-back-teak-garden-bench-1-5m-5ft.jpg" class="jqzoom" src="http://www.corido.co.uk/843-large_default/ascot-curved-back-teak-garden-bench-1-5m-5ft.jpg" style="display: inline;">

This is causing me two issues:

1. It has an adverse affect on my SEO rankings.

2. Google sometimes displays the contents of the ALT tag in its listings

 

Is there anyway around this?

Link to comment
Share on other sites

Hi - using Prestashop v1.5.5

 

jqZoom appears to use the ALT tag to hold the name of the image to be zoomed in, as opposed to proper descriptive text of what the image is:

<img id="bigpic" alt="http://www.corido.co.uk/843-thickbox_default/ascot-curved-back-teak-garden-bench-1-5m-5ft.jpg" class="jqzoom" src="http://www.corido.co.uk/843-large_default/ascot-curved-back-teak-garden-bench-1-5m-5ft.jpg" style="display: inline;">

This is causing me two issues:

1. It has an adverse affect on my SEO rankings.

2. Google sometimes displays the contents of the ALT tag in its listings

 

Is there anyway around this?

 

Try with this file, i'm not modify the alt tag ;)

http://www.prestashop.com/forums/topic/348834-probleme-zoom-jqzoom/?do=findComment&comment=1853226

Link to comment
Share on other sites

Hi Eolia - I've tried that but it has not made a difference

yes the problem come from your product.js

replace line 461:

$(this).attr('alt', domAAroundImgThumb.attr('href'));

by:

$(this).attr('alt', domAAroundImgThumb.prop('title'));
Link to comment
Share on other sites

The ALT tag in product.tpl contained this code:

{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')}

I have replaced it with

{$product->name|escape:'htmlall':'UTF-8'}. {$category->name|escape:'htmlall':'UTF-8'}

and commented out these lines in product.js so as not to overwrite the ALT tag for the other images

if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
$(this).attr('alt', domAAroundImgThumb.attr('href'));

It all seems to be working ok.

 

Thank you for your help.

Link to comment
Share on other sites

  • 3 months later...
  • 5 months later...

Hi all,

this solution isn't working : the ALT tag in the source code is still not the product name but the image URL. Therefore bad for SEO.

 

Is anyone having another solution that allows both the jquery zoom, and the ALT tag of the main image to be properly set in the source code ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...