Author Topic: Shopper Field Title defaults to Mr instead of blank  (Read 1054 times)

mbarry

  • Beginner
  • *
  • Posts: 47
Shopper Field Title defaults to Mr instead of blank
« on: January 24, 2014, 06:21:41 am »
VM 2.0.26d
J2.5.17

The sql installation script (install_required_data.sql ) only installs two entries for Shopper Field 'title', these are "Mr" and "Mrs".
As this field in our VM1 site is not mandatory, many users opted not to fill it in. We also had many other 'title' possibilities other than the two mentioned above.     

My solution to the above problem was as follows:
      Edit Configuration -> Shopper Fields
      Field Name = 'title'
     
      Create empty first value leave both the value and title blank. This will trigger the drop down to display "Select an Option" instead of displaying "Mr"
      Create additional Values for 'title' Shopper Field as required

      In my case, when done it should look like this:
      Value     Title
       
      Mr.         Mr
      Mrs.       Mrs
      Miss.      Miss
      Ms.        Ms
      Dr.        Dr
      Prof.      Prof
     
      An interim solution would be to update file install_required_data.sql so that these fields are available from installation.
      A more permanent solution could be to make these language dependent rather than hard-coded.
     
     
Code: [Select]
     File: administrator/components/com_virtuemart/install/install_required_data.sql

      INSERT INTO `#__virtuemart_userfield_values` ( `virtuemart_userfield_id`, `fieldtitle`, `fieldvalue`, `sys`, `ordering`, `created_on`, `created_by`, `modified_on`, `modified_by`, `locked_on`, `locked_by`) VALUES
      ( 10, '', '', 0, 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0),
      ( 10, 'Mr', 'Mr.', 0, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0),
      ( 10, 'Mrs', 'Mrs.', 0, 2, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0),
      ( 10, 'Miss', 'Miss.', 0, 3, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0),
      ( 10, 'Ms', 'Ms.', 0, 4, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0),
      ( 10, 'Dr', 'Dr.', 0, 5, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0),
      ( 10, 'Prof', 'Prof.', 0, 6, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0);
     

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3035
  • VirtueMart Version: 3.6.3
Re: Shopper Field Title defaults to Mr instead of blank
« Reply #1 on: January 24, 2014, 09:22:16 am »
I invariably remove the title as it is never germane to the purchase and is just another field to complete.

For us, the less fields a user has to complete in order for us to manage their purchase, the better.

Same goes for middle name!
regards
A

Joomla 3.9.12
php 7.2

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27629
  • Always on vacation
    • Jenkin Hill Internet
Re: Shopper Field Title defaults to Mr instead of blank
« Reply #2 on: January 24, 2014, 10:15:29 am »
I agree, the title field is usually removed from the sites I build unless specially requested. In any case the shopper fields are easily edited for those who need different titles, such as Revd or Bishop
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.14 PHP 7.0.33

mbarry

  • Beginner
  • *
  • Posts: 47
Re: Shopper Field Title defaults to Mr instead of blank
« Reply #3 on: January 24, 2014, 15:57:04 pm »
No Problem, my partner wanted the field for her existing web site so I had to bring it across. I was going to turn it off originally however,  I saw a number of posts regarding this issue and anything that can help with a seamless migration from VM1 to VM2 is a good thing.

Ultimately, I agree that less is more when it comes to registration and have also disabled the "middle name" along with all the Joomla profile data.