News:

Support the VirtueMart project and become a member

Main Menu

"Show in registration form" not work

Started by planticinal, May 12, 2015, 14:01:56 PM

Previous topic - Next topic

planticinal

Created new simple text field and even if "Show in registration form" is disabled (red) and "Show in account maintenance" is enabled (green) it still shows in registration form.
This is a bug or not?

Help me please, thanks

VM 2.6.10
Joomla 2.5.27


planticinal

#1
I think have the solution, at least to me it has worked and do not know if it can be modified for later versions

file:/administrator/components/com_virtuemart/models/userfields.php
line:493 to 506

Change this code

  //Here we get the fields
  if ($type == 'BT') {
      $userFields = $this->getUserFields(
      'account'
      , array() // Default toggles
      , $skips// Skips
      );
  } else {
   $userFields = $this->getUserFields(
     'shipment'
   , array() // Default toggles
   , $skips
   );
  }


For this code

  //Here we get the fields
  if ($type == 'BT') {
            if(!$register) {
                $userFields = $this->getUserFields(
                    'account'
                    , array() // Default toggles
                    , $skips// Skips
                );
            }
            else {
                $userFields = $this->getUserFields(
                    'registration'
                    , array() // Default toggles
                    , $skips// Skips
                );
            }
  } else {
   $userFields = $this->getUserFields(
     'shipment'
   , array() // Default toggles
   , $skips
   );
  }


What do you think the solution?