News:

Looking for documentation? Take a look on our wiki

Main Menu

ALT tag on product images to include Product title

Started by vladast, October 22, 2016, 14:13:40 PM

Previous topic - Next topic

vladast

I'm facing with an issue where I want to show product title on image (main/additional) under ALT tag.
I know that ALT tag can be defined under Product Image Alt-Text through control panel but I want to customize it through template change.

In my case Image Alt-Text is populated on certain image in form: Vendor + Product SKU, but I want to add in addition to that product title so it will look like this:
Quotealt="Image Alt-Text - Product title"
Example how I want to look like in browser source:
Vendor 12345 has been added under certain image through control panel
Quotealt="Vendor 12345 - Product title"

I've tried to play with two files below but without success. At the same time on VM update those two files will be overridden so changes will be lost. Is there any way that we could override template and implement this ALT change.
administrator\components\com_virtuemart\helpers\image.php
administrator\components\com_virtuemart\helpers\mediahandler.php

Joomla 3.6.3
VirtueMart 3.0.18
localhost, testing and development phase

Using template override.
Using SEF.