News:

Support the VirtueMart project and become a member

Main Menu

Set up a Plugin

Started by hk, April 27, 2014, 12:31:24 PM

Previous topic - Next topic

hk

Hi,

The ALT tags in the image is blank. For better SEO of site, I need to hack the core file to customize function displayMediaThumb:
administrator/components/com_virtuemart/helpers/image.php

Can you let me know how can I write a plugin to hack the core file, so that it doesn't affect when I upgrade the VM version. I never developed a Plugin/Module/Component for Joomla/Virtuemart. Please guide me what the files to be used for plugin and naming convention (if any).

Using VM 2.0.26d

Thanks.

JoomTut

- Upgrade your VM to latest version.
- Enter your text in Product Images -> Image Alt-Text
http://www.joomtut.com - How to Joomla!
Joomla! & VirtueMart Pro Support.
http://www.joomtut.com/joomla-clip.html - 14 steps to creating a Joomla! website with video clip tutorials

hk

I'm using 2.0.26d
As I have 1000s of products uploaded, its time consuming to update Alt for all products. Instead, I would edit image.php to have product name as ALT.

AH

Yep I would go for using the product name as the ALT tag and not use the data on the product page, makes it much easier to add a product and not worry about alt text being nonsense

Setup an vm - images.php override in your template file
Regards
A

Joomla 3.10.11
php 8.0

hk

Thanks!
Can you provide me the path where should I put the images.php in the template.
Also let me know whether the override file should contain only the function which I need to edit OR it should contain the entire code.

hk

Any suggestions how to show Alt tag for all products.

JoomTut

Do you want ALT tag as image file name or Product name?
ALT tag only or with TITLE tag?
Work on category page or (and) Product Detail page?
http://www.joomtut.com - How to Joomla!
Joomla! & VirtueMart Pro Support.
http://www.joomtut.com/joomla-clip.html - 14 steps to creating a Joomla! website with video clip tutorials

hk

Quote from: JoomTut on May 18, 2014, 09:08:43 AM
Do you want ALT tag as image file name or Product name?
ALT tag only or with TITLE tag?
Work on category page or (and) Product Detail page?
I need both TITLE tag and ALT tag as Product name in Category as well as Product Detail page.