News:

Looking for documentation? Take a look on our wiki

Main Menu

Add class to $thumb img in related.php file <<--SOLVED-->>

Started by dav3sh, October 04, 2015, 21:51:18 PM

Previous topic - Next topic

dav3sh

Hi,
How can I add a class to the $thumb variable directly to the img tag?
For what I had understood the piece of code that generates the img tag of the related products is located in related.php file.
Exactly this:

echo JHtml::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id), $thumb   . $related->product_name, array('title' => $related->product_name,'target'=>'_blank'));

Now I would like to know how can I add a img-responsive class just to the img tag and not to the whole content of the link (img and title).
I am very grateful for this wonderful component to the developers and to the community of VM.
Thank you for any help.

GJC Web Design

the image html is rendered right back in function  displayIt() in administrator\components\com_virtuemart\helpers\mediahandler.php

you can pass arguments to it so u need to trace back where you can add the class, view maybe?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

PRO

Quote from: dav3sh on October 04, 2015, 21:51:18 PM
I would like to know how can I add a img-responsive class just to the img tag



#DIV-NAME img{}

dav3sh

Thank you for the answers..i am using the second one. I was hoping that I could have done it from the related.php file, because I already created an override of that.
In any case thank you again