VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: Frankp on January 18, 2015, 00:08:06 AM

Title: Shopper field title and tip swapped?
Post by: Frankp on January 18, 2015, 00:08:06 AM
VM3.0.2, J3.3

When looking at My account. The field tip and the field title are swapped. If I interchange this in the shopper field then all shows as it must, but that is a work around. Every template I tried gives the same result. Is this a bug?
Title: Re: Shopper field title and tip swapped?
Post by: PRO on January 18, 2015, 17:03:10 PM
do you have a link and better description?
Title: Re: Shopper field title and tip swapped?
Post by: GJC Web Design on January 18, 2015, 22:54:23 PM
yep - can confirm this in 3.0.3/J3.3.6 - they display the wrong way around

the code should be in components\com_virtuemart\views\user\tmpl\edit_address_userfields.php ~ line 69

$descr = empty($field['description'])? $field['title']:strip_tags($field['description']);
// Output: Userfields
?>
<tr>
<td class="key" title="<?php echo $descr  ?>" >
<label class="<?php echo $field['name'?>" for="<?php echo $field['name'?>_field">
<?php echo $field['title'] . ($field['required'] ? ' *' ''?>
</label>
</td>
<td>
<?php echo $field['formcode'?>
</td>
</tr>


not

$descr = empty($field['description'])? $field['title']:$field['description'];
// Output: Userfields
?>
<tr>
<td class="key" title="<?php echo $field['title']  ?>" >
<label class="<?php echo $field['name'?>" for="<?php echo $field['name'?>_field">
<?php echo $descr . ($field['required'] ? ' *' ''?>
</label>
</td>
<td>
<?php echo $field['formcode'?>
</td>
</tr>