Jump to content

Alt tags on thumbnails for bestsellers and viewed blocks


Recommended Posts

Hello,

 

I'm working on PS 1.5 and i'm looking for a solution to get alt tags filled for my thumbnails on the left and right blocks, especially for "viewed products" and "best sellers".

For best sellers, i have this on my .tpl file :

<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small_default')}" height="{$smallSize.height}" width="{$smallSize.width}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" />

 

But on the browser, the alt tags are empty.

I read that this is because there is no legend on admin for PS 1.5. So "product.legend" is probably the issue. But i don't know what to put at this place.

If it can help, the website is www.busteshop.com.

 

Anybody could help me on this matter ?

Thanks

Chris

 

Link to comment
Share on other sites

The easiest solution would be to change $product.legend in your code above to $product.name. If you want the product legend to be different to the product name, you'll have to do more work.

 

If the "Legend" field is missing from the Images tab of the product editor and you can't upgrade to PrestaShop v1.6, I guess you'll have add them manually to your database. Log in to phpMyAdmin and then open the ps_image_lang table, then edit the legend for each image and language ID.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

It works on my test site. Make sure that you edited modules/blockbestsellers/blockbestsellers.tpl inside your theme's directory, not the root directory. Also, if you have caching enabled, try clicking the "Clear cache" button on the Performance tab or disable caching.

  • Like 1
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...