Author Topic: Remove Displayed Name / username field  (Read 24495 times)

LTCreations

  • Beginner
  • *
  • Posts: 37
  • Mr. Garrison
    • City Directory On Line
Re: Remove Displayed Name / username field
« Reply #15 on: November 29, 2013, 01:02:10 am »
Maxim - You are very learned with VM, so I'd like to ask you something related to this thread.

In the vendor information, when an invoice is sent to the user, all of my information looks good - "EXCEPT"....in the footer there is a phone number that has "nothing" to do with any information I have posted anywhere in the site - or in Joomla settings.

555-555-1212

That's a generic phone number from...??

I've been trying to chase that field/ini for days, but I can't figure out from where that phone number is being pulled.

It's a line that begins with the "Thank you..." for the order, followed by the link to the vm component to show the user the products, which is then followed by the name of the vendor, and then the "bogus" phone number. There is more in the line but that should provide you enough to know "where" this data is generated and where it appears.

The correct phone number appears in the Joomla contact page, VM vendor shopper information, and elsewhere in the site.

So, where else does VM pull the phone number that appears in the invoice sent to the customer?

I keep chasing my tail trying to think where that number exists. My next step is to search the db for the number to see where it lies. Any thoughts?

Thanks.

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Venta de naranjas online y mandarinas
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Remove Displayed Name / username field
« Reply #16 on: December 14, 2013, 12:44:02 pm »
Maxim - You are very learned with VM, so I'd like to ask you something related to this thread.

In the vendor information, when an invoice is sent to the user, all of my information looks good - "EXCEPT"....in the footer there is a phone number that has "nothing" to do with any information I have posted anywhere in the site - or in Joomla settings.

555-555-1212

That's a generic phone number from...??

I've been trying to chase that field/ini for days, but I can't figure out from where that phone number is being pulled.

It's a line that begins with the "Thank you..." for the order, followed by the link to the vm component to show the user the products, which is then followed by the name of the vendor, and then the "bogus" phone number. There is more in the line but that should provide you enough to know "where" this data is generated and where it appears.

The correct phone number appears in the Joomla contact page, VM vendor shopper information, and elsewhere in the site.

So, where else does VM pull the phone number that appears in the invoice sent to the customer?

I keep chasing my tail trying to think where that number exists. My next step is to search the db for the number to see where it lies. Any thoughts?

Thanks.

This happened to me due to a language issue, phone was stored in the english tables and remained there when I installed a different language pack in VM.

I had a quickstart package, therefore I had to manually change back to english in Joomla admin and remove all those details.
http://www.comenaranjas.com - Navel oranges and clementines from Spain

gripped

  • Beginner
  • *
  • Posts: 40
    • ecigsoulet
Re: Remove Displayed Name / username field
« Reply #17 on: April 29, 2014, 20:50:13 pm »
For version 2.0.22b, in order to remove both username and displayed name, make changes to edit_address_userfields.php using overrides as described above.

Change:

Code: [Select]
<tr>
<td class="key" title="<?php echo $field['description'?>" >
<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>

to:

Code: [Select]
<tr <?php if ($field['name']=="name" or $field['name']=="username") {echo 'style=display:none;';};?>">
<td class="key" title="<?php echo $field['description'?>" >
<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>

That will hide the username and name fields. Then add the following JavaScript to automatically copy the email into those now hidden fields.


Code: [Select]
<script type="text/javascript">
  document.getElementById("email_field").setAttribute("onchange", "mail_is_user()");
 
    function mail_is_user(){
var reg_email = document.getElementById("email_field").value
document.getElementById("name_field").value = (reg_email);
document.getElementById("username_field").value = (reg_email);
}

</script>






Building on this and the jquery script a few posts after here is a script that puts the email address in the username field and First name Last name in the display name field. And I've attached the whole modified file - VM 2.6.0
Code: [Select]
<script type="text/javascript">
var $j = jQuery.noConflict();

$j('#email_field').change(function () {             
var reg_email = $j('#email_field').val()
$j('#username_field').val(reg_email);
});

$j('#first_name_field').change(function () {             
var reg_name = $j('#first_name_field').val() + " " + $j('#last_name_field').val();
$j('#name_field').val(reg_name);
});

$j('#last_name_field').change(function () {             
var reg_name = $j('#first_name_field').val() + " " + $j('#last_name_field').val();
$j('#name_field').val(reg_name);
});
</script>


[attachment cleanup by admin]

kostianev

  • Jr. Member
  • **
  • Posts: 57
  • Web Developer
    • MOON.bg
  • Skype Name: moonbgltd
  • VirtueMart Version: 3.x
Re: Remove Displayed Name / username field
« Reply #18 on: February 26, 2015, 11:38:36 am »
How to remove this field in Virtuemart 3

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Remove Displayed Name / username field
« Reply #19 on: March 02, 2015, 14:29:23 pm »
You mean how to disable it? Come one read the manual, any view has an help option upper right (j2) or left (j3) corner. You should not remove it btw. Maybe unpublish
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

valerian

  • Beginner
  • *
  • Posts: 2
    • Интернет магазин Чикабум
  • Skype Name: restaross
  • VirtueMart Version: 3.0.7
Re: Remove Displayed Name / username field
« Reply #20 on: September 09, 2015, 19:06:38 pm »
Maybe unpublish
hm... if i unpublish field "Displayed Name" at registration error appears "Save failed with the following error: Please enter your name."

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Remove Displayed Name / username field
« Reply #21 on: September 23, 2015, 20:53:22 pm »
Of course, it is need for joomla, when you unpublish the fields, the checkout works only for guests.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Rune Rasmussen

  • Jr. Member
  • **
  • Posts: 157
  • Is the stable release stable?
    • SYNTAX ERROR
  • VirtueMart Version: Latest ;)
Re: Remove Displayed Name / username field
« Reply #22 on: September 24, 2015, 22:31:20 pm »
Those who want to remove those confusing fields making customers run away could look at t.ex. Rupostel's One Page Checkout ( http://www.rupostel.com/ ) or LunarHotel's EmailAsUsername ( http://www.lunarhotel.co.uk/ )...
Rune Rasmussen - http://www.syntaxerror.no
Norske nettløsninger og integrasjoner, CONSIGNOR EDI, Mamut ordreimport og produkteksport, kortbetaling og faktura m.m.

Norsk Joomla! - Norwegian Translation Team - http://www.norskjoomla.no

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Venta de naranjas online y mandarinas
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Remove Displayed Name / username field
« Reply #23 on: November 12, 2015, 14:35:23 pm »
First of all.

Users can use their email already in "username" field. Actually some of our customers do, and there is absolutely no core modification in vm or joomla.

For more impopular that this is, is perfectly logic that there is a username field.


What we really didnt like is "displayed name" but once again people don't understand that even this field makes logic.

If you use for example a module to display reviews, some users will may want to hide their username or real name therefore they use the "displayed name", same if you use alphauser points where you publish list of rewards etc etc with customer names.

Last post here recommends OPC or the email as username plugin.

So here our experience:

OPC by Stan includes an option indeed for email as username but this only applies to the checkout! As fan and customer of his OPC thats how it works, makes sense he cant alter joomla or VM pages.

And email as username plugin which we used in the past... very nice it sounds but this means modifying your login module, your vm account page and probably your joomla account page. Not to mention the issues with overrides from templates and the translations from changing all username terms to email, yeah we used it and was lots of fun!


I was very critic with the VM register till I actually read and tested what Milbers was trying to tell me and the rest of users that customers should fill in most details in checkout, and thats it! we changed the default register back to joomla's register.

6 fields to enter and thats it, they are registered and if they buy they will fill in the rest of details in most cases at checkout, except some that directly do it at vm account page.  Customers understand they have to fill in details for a delivery! not a drama and not one customer lost. Use default joomla register boys.
http://www.comenaranjas.com - Navel oranges and clementines from Spain

Thomas Kuschel

  • Jr. Member
  • **
  • Posts: 81
    • LOYTEC electronics GmbH
Re: Remove Displayed Name / username field
« Reply #24 on: January 13, 2016, 18:48:28 pm »
You're right, I'm also not so amused about this situation to fill in the username, the name, and if enabled, the first_name, middle_name, last_name.
But I wrote a plugin to get automatically the name from the first_name, middle_name, and last_name (without attaching the core). It's made with the plgVmOnBeforeUserFieldDataSave();
Now the user only enters the first and last name (I need these fields on the page too), the name field is not shown on the form, but filled-in automatically.
Thomas

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Remove Displayed Name / username field
« Reply #25 on: February 09, 2016, 09:54:04 am »
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Rune Rasmussen

  • Jr. Member
  • **
  • Posts: 157
  • Is the stable release stable?
    • SYNTAX ERROR
  • VirtueMart Version: Latest ;)
Re: Remove Displayed Name / username field
« Reply #26 on: February 09, 2016, 10:41:21 am »
This really looks promising Max, cool. :)
Rune Rasmussen - http://www.syntaxerror.no
Norske nettløsninger og integrasjoner, CONSIGNOR EDI, Mamut ordreimport og produkteksport, kortbetaling og faktura m.m.

Norsk Joomla! - Norwegian Translation Team - http://www.norskjoomla.no

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Remove Displayed Name / username field
« Reply #27 on: February 09, 2016, 12:16:47 pm »
Thank you.
I also want to add an option for possible overwrites. Atm the system only fills empty variables, because that is the main use case. As usual we are open to implement new features. The plugin works atm already for one customer.

But it works only for vm3.0.12 and higher. One of the reasons is the random char generator. I did not write any news about it yet, but actually the joomla generator is wrong implemented.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

logicb2b

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: Remove Displayed Name / username field
« Reply #28 on: March 11, 2016, 06:45:04 am »
i just buy the plugin, but is not working,
shown duplicate form on beckend adn sql error on store data:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`VNAME` (`VNAME`) AFTER `ctype`' at line 1 SQL=ALTER TABLE `defa_virtuemart_extended_plg_istraxx_anumbers` CHANGE COLUMN `vname` `vname` `VNAME` (`VNAME`) AFTER `ctype`

on vm 3.0.12
joomla 3.4.8

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26422
  • Always on vacation
    • Jenkin Hill Internet
Re: Remove Displayed Name / username field
« Reply #29 on: March 11, 2016, 09:56:42 am »
Support for the plugin is by ticket.  http://extensions.virtuemart.net/support-updates
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 VM3.2.8 on Joomla 3.8.2 PHP 7.0.25

Testing VM3.2.8 on J3.8.3RC