VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: mhshakouri on January 15, 2015, 23:12:28 PM

Title: Disable main Name field (shopper fields)
Post by: mhshakouri on January 15, 2015, 23:12:28 PM
VM 3.0.3

I need to kinda disable the Name Shopper fields which is included from base joomla user component, from shopper fields. if anyone could help I'd be thankful.
Title: Re: Disable main Name field (shopper fields)
Post by: jenkinhill on January 15, 2015, 23:20:44 PM
See http://forum.virtuemart.net/index.php?topic=123539.msg421677#msg421677  - the reference is for VM2 but maybe the same idea would work with VM3
Title: Re: Disable main Name field (shopper fields)
Post by: mhshakouri on January 15, 2015, 23:42:13 PM
Thanks to you! I found it. I created an override on the admin Template, I'm explaining this for others to use in the future.

As you told I took a look at the link you gave me, the steps was to create an override on the userfields view on the admin, means
Quoteadministrator/components/com_virtuemart/views/userfields/tmpl/default.php
after creating the override, I located the
$coreField = (in_array($row->name, $this->lists['coreFields']));
since the $coreField is used below line 88, I thought it's a good idea to make an empty string for it,
so you have to comment the $coreField, as you mentioned with " // " in the beginning of the line and add a new line with empty value

//$coreField = (in_array($row->name, $this->lists['coreFields']));
$coreField = ''; 


That's it, then you can have control over the default items.