VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: ash on July 20, 2012, 11:06:34 AM

Title: Shopper Fields Description not showing
Post by: ash on July 20, 2012, 11:06:34 AM
I need to add a shopper field description to one of the fields but it does not show. It strips the html so I added it manually to the database but it still does not show. Is there a setting to show the shopper fields  descriptions, or does it simply not work.
Title: Re: Shopper Fields Description not showing
Post by: DaggaTora on July 22, 2012, 11:25:14 AM
I've tried everything i know (what is not much) and can't make it work neither.

help will be apreciated!!
Title: Re: Shopper Fields Description not showing
Post by: nicole2292 on July 31, 2012, 15:25:46 PM
I have this problem too... it would appear that like many things virtuemart and especially shopper fields that it simply just does not work :(
Title: Re: Shopper Fields Description not showing
Post by: nicole2292 on July 31, 2012, 15:36:25 PM
I have fixed this in my files to make the description show.

First go to on administrator\components\com_virtuemart\models\userfields.php

change
$_return['fields'][$_fld->name] = array(

     'name' => $_prefix . $_fld->name

,'value' => (($_userData == null || !array_key_exists($_fld->name, $_userData))

? $_fld->default

: @$_userData[$_fld->name])

,'title' => JText::_($_fld->title)

,'type' => $_fld->type

,'required' => $_fld->required

,'hidden' => false

,'formcode' => ''


);


to

$_return['fields'][$_fld->name] = array(

     'name' => $_prefix . $_fld->name

,'value' => (($_userData == null || !array_key_exists($_fld->name, $_userData))

? $_fld->default

: @$_userData[$_fld->name])

,'title' => JText::_($_fld->title)

,'type' => $_fld->type

,'required' => $_fld->required

,'hidden' => false

,'formcode' => ''

,'description' => $_fld->description

);



Then go to on  components\com_virtuemart\views\user\tmpl\edit_address_userfields.php

and add $_field['description'] wherever you want it to appear in the view. I have it just after $_field['formcode']
Title: Re: Shopper Fields Description not showing
Post by: ash on August 03, 2012, 09:55:52 AM
Wow that's amazing I was just working on this this morning and just found the same solution, hey great minds think a like, you beat me to it. still well done, a simple solution and must have been an over site of the developers, perhaps the phone rang when they were doing this page and forgot were they were up to  :P