VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: balai on January 26, 2015, 12:25:38 PM

Title: Empty divs whith empty custom fields - Patch
Post by: balai on January 26, 2015, 12:25:38 PM
Hi

I noticed that even when there are custom field records which are empty, a wrapper div is generated. That creates a big empty space in the custom fields area.
(http://snag.gy/3r5rP.jpg)

The solution resides in the file: components/com_virtuemart/sublayouts/customfields.php
replace the line 38
if ( $field->is_hidden)continue;
with:
if ( $field->is_hidden || empty($field->display))continue;

If this file is overriden or another file is used by your template  to generate the custom fields, check for that file into your template:
templates/YOUR TEMPLATE/html/com_virtuemart/sublayouts/customfields.php
or whatever file used in the template for the custom fields display