hi
on the 1.6.x the "alt" attributes of product images if not set, will display the product name.
Instead on the 1.7.x if the "caption" field is void the alt will be void, I think it is not a good news for the seo.
can you set again the same behavior of the 1.6.x?
thanks
Screenshots
Additional information
PrestaShop version: 1.7.6.2
PHP version: 7.2
Hi @maofree,
I have the same behavior as PS1.7.6.3 & PS1.7.5.2.
It is OK with PS1.6.1.24: the "alt" attributes of product images if not set, will display the product name.
I attached a screen record
https://drive.google.com/file/d/1MuX3hQXNQCbFnTj6ksx57AU1XwvSDxBR/view
Ping @PrestaShop/prestashop-product-team what do you think?
Thanks!
hi
this is a problem especially for all those sites that have been updated from versions lower than 1.7, because everyone knew that the name of the product would appear and many left it on purpose, now they are seen without texts in the alt of the images
Hi @khouloudbelguith, @maofree, I agree: if void, the caption should at least set the product name as the alt attribute of the image. Note that the caption may change in case of multiple languages, so might the alt attribute, depending on the browsing language. :-)
hi
to fix this problem, it is necessary only to edit the file product-cover-thumbnails.tpl
from
alt="{$product.cover.legend}
to
alt="{if $product.cover.legend}{$product.cover.legend}{else}{$product.name|truncate:40:''}{/if}"
and from
alt="{$image.legend}
to
alt="{if $image.legend}{$image.legend}{else}{$product.name|truncate:40:''}{/if}"
Hi @maofree,
If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
hi
can you do it for me?
please
yes I'm sure that it will fix the problem, it is the same solution used for product blocks in /miniatures/product.tpl
Most helpful comment
I did
https://github.com/PrestaShop/PrestaShop/pull/18068