VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: bardius on January 03, 2012, 11:17:02 AM

Title: How to alter the related products and / or related categories listing HTML
Post by: bardius on January 03, 2012, 11:17:02 AM
If you need to enhance the HTML generated for the related products or categories that appear on the product details page so you can easier integrate to you template and styling you can edit the file
administrator\components\com_virtuemart\models\customfields.php

find the line 675 and change the code  for return command to your liking.

(example)
return '<h3>'.JHTML::link ( JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $value . '&virtuemart_category_id=' . $related->virtuemart_category_id ), $related->product_name, array ('title' => $related->product_name ) ).'</h3>'.JHTML::link ( JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $value . '&virtuemart_category_id=' . $related->virtuemart_category_id ), $thumb, array ('title' => $related->product_name, 'class' =>  'productThumb') );

same goes for the related categories return command that exists some lines bellow.
Title: Re: How to alter the related products and / or related categories listing HTML
Post by: falcos on January 03, 2012, 17:32:34 PM
I just can't seem to find any type of "related item" or "related categories" anywhere in the backend of the site.

What am I overlooking or missing??  Where is this option?

Tx

Title: Re: How to alter the related products and / or related categories listing HTML
Post by: bardius on January 04, 2012, 12:34:56 PM
dude check the Custom Fields tab in the product edit page at the backend