VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: panosrekou on February 02, 2017, 02:13:09 AM

Title: I want to change the way related categories displayed
Post by: panosrekou on February 02, 2017, 02:13:09 AM
When i use custom field related categories the result is to have the related category image and title. I want to change the title position.
I found the code in customfields.php

<div class="product-field-display"><?php echo $field->display; ?></div><?php

How i can change the $field->display content, where it is populated?

url of site: http://fruitsandfleurs.gr/fnf/en/products/phytoactive-br-aqua-care-face-cream-50ml-detail.html

virtuemart version 3.0.16
Title: Re: I want to change the way related categories displayed
Post by: Milbo on February 03, 2017, 14:02:09 PM
sublayout customfield.php, but nasty to override that. you should avoid it, if possible. The related products use an own sublayout, but not the categories
Title: Re: I want to change the way related categories displayed
Post by: panosrekou on February 07, 2017, 16:02:32 PM
i want to change the $field->display content. Where is this populated?
Title: Re: I want to change the way related categories displayed
Post by: Milbo on February 09, 2017, 09:33:39 AM
components/com_virtuemart/sublayouts customfield.php

You may consider to buy a membership http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail and I can add that the related categories use an own sublayout. As I said, it is nasty to override the customfield.php, because this file is modified almost any release. So you would have to implement your fix for any update, this often leads to the problem that people do not update and get other problems.

But when the related categories have their own sublayout,.... you will be able to use this override for a long time