VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Coding Central => Topic started by: littlesnack on September 04, 2012, 17:39:13 PM

Title: Remove Displayed Name / username field
Post by: littlesnack on September 04, 2012, 17:39:13 PM
I made this tweak to remove the displayed name (COM_VIRTUEMART_USER_DISPLAYED_NAME) and the username field.
There should be an option to use email as username, and simply save mail as user in joomla too.

Anyway, copy components\com_virtuemart\views\user\tmpl\edit_address_userfields.php inside /templates/[yourtemplate]/html/com_virtuemart/user/ (create folders if they don't exist) , add the code below and it'll work.
Download the attachment to get the complete file for virtuemart 2.0.10


        echo ' <table  class="adminForm user-details">' . "\n";
$_table = true;
    }
    echo ' <tr>' . "\n";
    echo ' <td class="key" title="'.$_field['description'].'" >' . "\n";
    echo ' <label class="' . $_field['name'] . '" for="' . $_field['name'] . '_field">' . "\n";
    echo ' ' . $_field['title'] . ($_field['required'] ? ' *' : '') . "\n";




and replace echo ' <tr>' . "\n";
with

if($_field['name'] == "name" or $_field['name'] == "username"){
echo ' <tr style="display:none;">' . "\n";
}
else{
echo ' <tr>' . "\n";
}

What does it do: makes the tables row for the field user and username invisible

Then add this in the bottom of the script

?>
<script type="text/javascript">
if (document.getElementById('email_field')) {
document.getElementById("email_field").setAttribute("onchange", "utente_uguale_email()");
}

    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>

<?php

What does it do: adds a javascript function. When the user writes something in the email field, we'll copy that inside our invisible user and username fields


[attachment cleanup by admin]
Title: Re: Remove Displayed Name / username field
Post by: ivus on September 05, 2012, 00:59:53 AM
@littlesnack,

QuoteWarning: always back up your file before editing it

NOTICE: You should never hack the core template (or the core files in general). Use template overrides, that's what they're there for.

http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core (http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core)
http://docs.joomla.org/Understanding_Output_Overrides (http://docs.joomla.org/Understanding_Output_Overrides)

But otherwise, a nice solution.
Title: Re: Remove Displayed Name / username field
Post by: DaggaTora on September 05, 2012, 09:14:26 AM
Mmmm... very very interesting....

Thx snack!!


Quote from: ivus on September 05, 2012, 00:59:53 AM

QuoteWarning: always back up your file before editing it

[

After a year tunning everything... ;D I have 2 pages list of hackings for every update!
Title: Re: Remove Displayed Name / username field
Post by: littlesnack on September 05, 2012, 15:42:14 PM
Quote from: ivus on September 05, 2012, 00:59:53 AM
@littlesnack,

NOTICE: You should never hack the core template (or the core files in general). Use template overrides, that's what they're there for.

You're right, i will update the post with template overrides. And update my site too. Thanks.
Title: Re: Remove Displayed Name / username field
Post by: littlesnack on September 05, 2012, 17:11:54 PM
And if i had to override components\com_virtuemart\controllers\cart.php   ????
I tried with templates/[mytemplate]/html/com_virtuemart/cart.php and templates\[mytemplate]\html\com_virtuemart\controllers\cart.php

Title: Re: Remove Displayed Name / username field
Post by: ivus on September 06, 2012, 03:33:45 AM
That's a controller. They're protected.

You can only override templates and module layouts.
Title: Re: Remove Displayed Name / username field
Post by: ovcharoff on February 22, 2013, 11:17:21 AM
Thank you, thank you, thank you !

Edit for Virtuemart 2.0.18a

I only added this to the bottom of edit_address_userfields.php in my html template folder:

<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>


Then in my template css I added the following:

label.name, input#name_field, label.username, input#username_field {
display: none;
}


And it works !

Thank you very much for your simple and genius solution to two of my problems !

Best Regards,

Teodor Ovcharov
Title: Re: Remove Displayed Name / username field
Post by: naoko15 on March 27, 2013, 10:02:52 AM
This doesn't work for me. How can i make it work for VM 2.0.2b?

Thanks.
Title: Re: Remove Displayed Name / username field
Post by: webmaxter on April 04, 2013, 15:01:53 PM
Yes, this doesn't work for VM 2.20b  :(

I have the same problem. Looks like there are  a lot of changes since 2.18 version. Looking for the solution for 2.20b ... ...

Anybody knows?
Title: Re: Remove Displayed Name / username field
Post by: glenns on July 09, 2013, 03:58:24 AM
Quote from: webmaxter on April 04, 2013, 15:01:53 PM
Yes, this doesn't work for VM 2.20b  :(

I have the same problem. Looks like there are  a lot of changes since 2.18 version. Looking for the solution for 2.20b ... ...

Anybody knows?

I too have this problem...the code is totally different in the 2.20 of virtuemart. Can anyone shed some light on how we hide/autofill this ridiculous field "displayed name" on the registration form.

the code is like this now:

<table  class="adminForm user-details">

      <?php
      }

      // Output: Userfields
      ?>
            <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>
Title: Re: Remove Displayed Name / username field
Post by: glenns on July 22, 2013, 07:22:48 AM
Ok I think I have found the solution for v2.02 users....you just use the script and css as supplied previously. I only wanted to hide the Displayed Name but leave the Username there....i pasted the below onto line 89 after the </fieldset> in the edit_address_userfields.php file

<script type="text/javascript">
document.getElementById("username_field").setAttribute("onchange", "username_is_user()");

    function username_is_user(){
var reg_username = document.getElementById("username_field").value
document.getElementById("name_field").value = (reg_username);
}

</script>


In my instance the label was not it's own css class, it sat amongst a bunch of other css and for whatever reason the label.name override wouldn't work for me, so I had to create a new label class (and delete label from where it previously sat) and then add the subsequent label.name class.

I created the below to suit my situation:

label {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

label.name, input#name_field {
  display: none;
}


Displayed name is now hidden and automatically fills out with the username
Title: Re: Remove Displayed Name / username field
Post by: Osearcaigh on September 03, 2013, 15:33:58 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:


<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:


<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.



<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>




Title: Re: Remove Displayed Name / username field
Post by: tremer on September 14, 2013, 19:48:34 PM
Hi all,

VM 2.0.22c
I am using also Onepage Checkout.
No one of the samples above work for me. 

Do you have any idea?
Title: Re: Remove Displayed Name / username field
Post by: Maxim Pishnyak on September 16, 2013, 05:26:04 AM
You need to contact developer of OPC. It has slightly different structure then VM.
Title: Re: Remove Displayed Name / username field
Post by: Marttyn on September 18, 2013, 00:54:02 AM
I was having the same problem.
Your solution is GRATE! But the problem is that you javascript IS NOT cross browser, so in some browsers the code will not work, and the user will get stuck, as the JS will not "copy" the content from email_field and "paste" it on the other two (name and user_name), as the form validator is expecting the user to complete every field, but we hide and left empty some textbox.

To fix this we can use jquery that solve this for us, with only this code instead:
<script type="text/javascript">
var $j = jQuery.noConflict(); //avoid conflict with other libraries

$j('#username_field').change(function () {             
var reg_user = $j('#username_field').val(); //set username value inside variable
    $j('#name_field').val(reg_user); //assign variable value to name
});
</script>


Note that im leaving user_name visible, and making name = user_name. Make necessary changes to fit your needs.
Also, this code should be AFTER the html table, otherwise it will not work.
Title: Re: Remove Displayed Name / username field
Post by: T.A. Garrison, LLC 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.
Title: Re: Remove Displayed Name / username field
Post by: lindapowers on December 14, 2013, 12:44:02 PM
Quote from: LTCreations 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.

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.
Title: Re: Remove Displayed Name / username field
Post by: gripped on April 29, 2014, 20:50:13 PM
Quote from: Frank Carroll on September 03, 2013, 15:33:58 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:


<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:


<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.



<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
<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]
Title: Re: Remove Displayed Name / username field
Post by: kostianev on February 26, 2015, 11:38:36 AM
How to remove this field in Virtuemart 3
Title: Re: Remove Displayed Name / username field
Post by: Milbo 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
Title: Re: Remove Displayed Name / username field
Post by: valerian on September 09, 2015, 19:06:38 PM
Quote from: Milbo on March 02, 2015, 14:29:23 PM
Maybe unpublish
hm... if i unpublish field "Displayed Name" at registration error appears "Save failed with the following error: Please enter your name."
Title: Re: Remove Displayed Name / username field
Post by: Milbo 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.
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen 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/ )...
Title: Re: Remove Displayed Name / username field
Post by: lindapowers 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.
Title: Re: Remove Displayed Name / username field
Post by: Thomas Kuschel 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
Title: Re: Remove Displayed Name / username field
Post by: Milbo on February 09, 2016, 09:54:04 AM
This new extension solves it for you

http://extensions.virtuemart.net/vm-orders/automated-numbers-detail
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on February 09, 2016, 10:41:21 AM
This really looks promising Max, cool. :)
Title: Re: Remove Displayed Name / username field
Post by: Milbo 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.
Title: Re: Remove Displayed Name / username field
Post by: logicb2b 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
Title: Re: Remove Displayed Name / username field
Post by: jenkinhill on March 11, 2016, 09:56:42 AM
Support for the plugin is by ticket.  http://extensions.virtuemart.net/support-updates
Title: Re: Remove Displayed Name / username field
Post by: logicb2b on March 11, 2016, 10:12:31 AM
just do it
Title: Re: Remove Displayed Name / username field
Post by: Milbo on March 11, 2016, 10:43:48 AM
Please write a ticket here http://extensions.virtuemart.net/ticket

It is maybe a core problem and solved in vm3.0.13
Title: Re: Remove Displayed Name / username field !!!URGENT!!!
Post by: ifs-net on September 09, 2016, 20:32:33 PM
I bought the plugin, installed and still same, I am having the same error about missing user name field...

- option 1: the plıgin is not working
- option 2 : I could not set it

there is no documentation about the plugin how do we set this ?
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on September 09, 2016, 20:45:07 PM
Look at the attached image.
And if you bought it you have access to support for it in the help desk: http://extensions.virtuemart.net/ticket
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 10, 2016, 19:09:40 PM
Milbo,

I need support now !


I bought the plugin, installed and still same, I am having the same error about missing user name field...

- option 1: the plıgin is not working
- option 2 : I could not set it

there is no documentation about the plugin how do we set this ?
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on September 10, 2016, 19:12:21 PM
Look at the image, click the highlighted menu item in your own admin!
Create a support ticket if you don't find it!
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 10, 2016, 23:28:33 PM
What is your problem Rune Rasmussen
I am not idiot I can see that

that is not working
my question is how we set the plugin

stop replying me ! you have no idea about the plugin
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 10, 2016, 23:30:08 PM
Milbo I am waiting reliable support now !
Title: Re: Remove Displayed Name / username field
Post by: GJC Web Design on September 11, 2016, 01:03:41 AM
@ifs-net

you are mistaken as to what this forum is for..  you have been told multiple times to direct your support requests to http://extensions.virtuemart.net/ticket

This forum is NOT for http://extensions.virtuemart.net extensions support - this is a community forum for the VM core component
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on September 11, 2016, 09:44:19 AM
You click on that menu link to set the plugin, of course. In there is some docs on how to set it too.

There is nothing in your posts telling us you can see anything, so how should anyone know. And I use this plugin yes, so it's both working, and I surely have some ideas about it. Anyhow, use the extension support, and someone surely will respond to you, and tell you to go to the settings for it. :)
Title: Re: Remove Displayed Name / username field
Post by: Milbo on September 12, 2016, 15:27:54 PM
Sometimes I wonder if this people just not know the option that only guest can checkout in vm.

It is a bit strange, on one hand, you want that the people register, on the other hand you dont want that they can change or enter their loginname.
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 13, 2016, 01:02:45 AM
Milbo,

There is "username" "name" and "displayed name" which is confusing the clients mind...
Of course there is guest check out.

No body understands what is displayed name and nobody enters that field. Instead of filling that field they are leaving the register area...
That is the problem


Rune,

Stop replying me. You are writing meanless replies.
If you know how set, write it. If not stop wasting my time.


Milbo,
I do not know how to set the plugin, there is no example or manual.
How do I write a format ? Give me some examples for "Username format"...



Sometimes I wonder how people can code such kind of unlogical registration form...
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on September 13, 2016, 09:05:51 AM
Quote from: ifs-net on September 10, 2016, 23:28:33 PM
I am not idiot

You have convinced me now for sure ...



Title: Re: Remove Displayed Name / username field
Post by: Milbo on September 13, 2016, 12:49:52 PM
Quote from: ifs-net on September 13, 2016, 01:02:45 AM
There is "username" "name" and "displayed name" which is confusing the clients mind...
Depends, usually it does not confuse people who are used to computer. You can rename it, to loginname, for example. You should also know that the loginname is part of the password is part of security.

Quote from: ifs-net on September 13, 2016, 01:02:45 AM
Of course there is guest check out.
Why do you want then, that the people register? If people do not understand what a loginname is, they dont need to be registered, they wont use the account again, they cant login!

Quote from: ifs-net on September 13, 2016, 01:02:45 AM
No body understands what is displayed name and nobody enters that field. Instead of filling that field they are leaving the register area...
That is the problem
uhm, you ever used Facebook? Or something similar?

Quote from: ifs-net on September 13, 2016, 01:02:45 AM
Milbo,
I do not know how to set the plugin, there is no example or manual.
There is an explantion how to use it within the plugin, when you use it. But as I told already per ticket, you use this plugin as workaround!

Because you want that people register, without showing the input fields for registration. A kind of silent registration. So the plugin fills fields automatically by given format.

Quote from: ifs-net on September 13, 2016, 01:02:45 AM
How do I write a format ? Give me some examples for "Username format"...

http://extensions.virtuemart.net/account-tutorials/19-shopper-fields-plugins/29-automated-numbers

Quote from: ifs-net on September 13, 2016, 01:02:45 AM
Sometimes I wonder how people can code such kind of unlogical registration form...

When it is illogical, just disable the registration. The world is quite simple, the more features you want, the more complex it is.
Title: Re: Remove Displayed Name / username field
Post by: Milbo on September 13, 2016, 12:50:48 PM
Quote from: Rune Rasmussen on September 13, 2016, 09:05:51 AM
Quote from: ifs-net on September 10, 2016, 23:28:33 PM
I am not idiot

You have convinced me now for sure ...





You convinced me, TOP! Also nice idea, just to take the email :-)
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 18:15:16 PM
As usual you have convinced me too the most smart guys of the world
You know what... I am not surprised..
this is your quality!! what you understand from support
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 18:20:08 PM
I really regret that I am using virtuemart
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 18:26:08 PM
Your buggy plugin is not working...
as expected

Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on September 18, 2016, 18:30:57 PM
I don't know your problem, but surely you should not have usernames with comma and space (ifs, n)... I think the bug is elsewhere, sorry ... lol ...  :-X

Btw! Are you even using VirtueMart checkout, or a third party checkout ...?
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 18:36:31 PM
This is what you understand from solution NOT IDIOT BUT VERY SMART GUYS

I am sure that it is like facebook as your big virtuemart company is as big as facebook and you are as clever as zukerberg...
You have right it is very very uncofusing and I am dumb

Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 18:40:56 PM
Yes yes sure it is working without dash
there is no bug  I m dumb

you are as smart as zukerberg and as big as facebook

Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on September 18, 2016, 18:43:51 PM
Tell me, why do you display and ask people to fill the username field if you want to have it auto generated?

Don't know what you are etc. but surely you don't act much rationally, and you surely doesn't encourage anyone to even want to consider helping you. Think!


QuoteBtw! Are you even using VirtueMart checkout, or a third party checkout ...?
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 18:51:14 PM
It is funny that you are not understanding the problem!!!!

the problem is not with you Rune Rasmussen, the problem is virtuemart support people.
since 6 weeks they are not solving that simple issue...
And they are sending different kind underestimating emails, instead of fixments...

Now they have to solve it!!!

It is not logical to have "name", "surname", "username", "displayed name"  at the same time.
I do not want to have displayed name.

It is very simple, I do not want it...
I do not care how to solve

Simply I do not want a displayed name field thats all...
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 18:55:33 PM
and yes I am using virtuemart checkout
this is only a 3rd party template staff VMUIKIT
Title: Re: Remove Displayed Name / username field
Post by: GJC Web Design on September 18, 2016, 19:16:47 PM
All I do is with a little bit of JS fill the username and name with the email and hide the name

then the email is the username

https://www.suzistore.com.au/my-account/editaddresscartBT.html
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 20:44:10 PM
Milbo,

You have guaranteed that this plugin will fix the issue..
You wasted my 6 weeks for nothing !

Now fix your plugin or if you are not able to fix, pay my money back !
I will pay a real smart developer for a real fix !

And you can continue playing your  WE ARE BIG COMPANY game without me !
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on September 18, 2016, 21:13:22 PM
Nobody can understand your problem if you're just shouting, without explaining anything.

http://vmuikit.com/ (http://vmuikit.com/) modifies the checkout I'm quite sure off, and it might not work well together with the plugin. I have not tested, and don't intend to. But if the problem is the plugin not working with VMuikit, you need to get some custom work for it, and can't claim a plugin made for core checkout to be broken when you don't use the core checkout.

But try to hide (unpublish) the shopper fields you override with this plugin, it's a simple core config and has nothing to do with the plugin working or not: http://docs.virtuemart.net/manual/configuration-menu/edit-shopper-field.html (http://docs.virtuemart.net/manual/configuration-menu/edit-shopper-field.html)
Title: Re: Remove Displayed Name / username field
Post by: ifs-net on September 18, 2016, 22:02:26 PM
Dear Rune Rasmussen,

Pls do not reply my posts...
You have no idea what I am talking about..

This field is not removable, even if you unpublish it it still needed...
Pls do not reply my posts you do not have enough experience on the issue..

I tried with VMUIKIT unpublished too. The issue continues

Again pls stop replying my posts..
The responsable part is VM support team, THEY HAVE TO FIX THAT as they are big company, they have to take the responsibility of their plugins.
I did mine, I bough the plugin !

NOW IT IS YOUR TURN MILBO !
FIX THE ISSUE OR ACCEPT YOU ARE NOT ABLE TO DO IT
Title: Re: Remove Displayed Name / username field
Post by: Milbo on September 18, 2016, 22:23:12 PM
Quote from: Rune Rasmussen on September 18, 2016, 18:30:57 PM
I don't know your problem, but surely you should not have usernames with comma and space (ifs, n)... I think the bug is elsewhere, sorry ... lol ...  :-X

Btw! Are you even using VirtueMart checkout, or a third party checkout ...?

He meant your format of the username. It is non of the formats which we said you should try, instead you use the Name and a comma. A name with comma is just not permitted.
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on September 19, 2016, 08:08:06 AM
Dear ifs-net,


Nobody can understand your issue(s), when you obviously doesn't yourself.


Anyhow this is a public forum, a community forum. Not the right place for your personal conversation with Milbo or anybody else, nor is it a support channel for commercial extensions. If you don't want input from others, just stop posting here ...
Title: Re: Remove Displayed Name / username field
Post by: Milbo on September 21, 2016, 12:10:17 PM
https://hueniverse.com/2016/01/26/how-to-use-open-source-and-shut-the-gentle-up-at-the-same-time/

Btw you told something about 6 weeks, that is wrong. It is not our fault, that paypal does not work in turkey
Title: Re: Remove Displayed Name / username field
Post by: thepet on November 09, 2016, 20:35:01 PM
Hi there,

I'm sorry to say, but I've the same problem with all this "names"

It really doesn't make sense that a normal user MUST enter his name (or any other "Displayed Name"), just because he wants to register.

Username, Password, and Emailaddress, that's it...  ;)

Why don't you guys not just give your customers the freedom to choose whether they want to require this or not.

And it's not true that Joomla requires this strongly, You can disable this in Joomla by editing an .xml and Joomla still works...

As a workaround it would be very nice if you just publish the code location and lines, which need to be changed and let us know, how.

Please consider... :)
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on November 09, 2016, 20:43:17 PM
Quote from: thepet on November 09, 2016, 20:35:01 PM
Why don't you guys not just give your customers the freedom to choose whether they want to require this or not.

Max did: http://forum.virtuemart.net/index.php?topic=107226.msg461051#msg461051
Title: Re: Remove Displayed Name / username field
Post by: thepet on November 09, 2016, 21:30:17 PM
Hi Rune Rasmussen,

this was actually not the answer I expected  ;)

Or should I...?

I cannot see to purchase an extension, which may does not do what it should, just because of removal of a feature that nobody wants :-)

Any other idea?

Best Regards

Hartmut
Title: Re: Remove Displayed Name / username field
Post by: Rune Rasmussen on November 09, 2016, 21:56:28 PM
Then you are free to modify the VirtueMart etc. as you like as it's open source with GPL license.
I have no idea what you expect, or why ...

The extension works perfectly fine for those being able to install and configure things correctly. Those who can't should maybe consider buying a ready to go system, VirtueMart doesn't fit for all. Sometimes I hate it myself ... ;)
Title: Re: Remove Displayed Name / username field
Post by: GJC Web Design on November 09, 2016, 22:14:12 PM
it's just some simple js replacement and hide the field

any google will show u how to fill one field with another

templates\xxxxxxxxx\html\com_virtuemart\user\edit_address_userfields.php

I unpub the "name" in the DB (or hide with css and fill by js) and use the email as username

<?php
if ($addrtype != 'ST') {
?>
<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("username_field").value = (reg_email);
      document.getElementById("name_field").value = (reg_email);
   }
</script>
<?php  } ?>


http://www.greenpackshop.com.au/my-account/editaddresscartBT
Title: Re: Remove Displayed Name / username field
Post by: luke67 on February 22, 2017, 16:07:00 PM
Hi all,

Same issue here.
I use Joomla! 3.6.5 with VirtueMart 3.0.18.

When a customer register with username, password, company name and address thats enough for my site.
Unfortunately when in the backend I disable the field 'name' (COM_VIRTUEMART_USER_DISPLAYED_NAME) (the field for the displayed name) it's no longer possible for a customer to register.

How to handle this issue?

Luke
Title: Re: Remove Displayed Name / username field
Post by: Milbo on February 22, 2017, 21:52:14 PM
Quote from: Rune Rasmussen on November 09, 2016, 20:43:17 PM
Quote from: thepet on November 09, 2016, 20:35:01 PM
Why don't you guys not just give your customers the freedom to choose whether they want to require this or not.

Max did: http://forum.virtuemart.net/index.php?topic=107226.msg461051#msg461051
Title: Re: Remove Displayed Name / username field
Post by: thefbi on April 02, 2018, 10:34:03 AM
Quote from: GJC Web Design on November 09, 2016, 22:14:12 PM
it's just some simple js replacement and hide the field

any google will show u how to fill one field with another

templates\xxxxxxxxx\html\com_virtuemart\user\edit_address_userfields.php

I unpub the "name" in the DB (or hide with css and fill by js) and use the email as username

<?php
if ($addrtype != 'ST') {
?>
<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("username_field").value = (reg_email);
      document.getElementById("name_field").value = (reg_email);
   }
</script>
<?php  } ?>


http://www.greenpackshop.com.au/my-account/editaddresscartBT

Hello and thank you GJC Web Design.

I have used your trick, but only for fill the name field and use the username normally (i dont use the email address but username).

What i have made :

I have modify your file like this :
<?php
if ($addrtype != 'ST') {
?>

<script type="text/javascript">
    document.getElementById("username_field").setAttribute("onchange", "username_is_name_field()");
   
    function username_is_name_field(){
      var reg_fill_name_field = document.getElementById("username_field").value
      document.getElementById("name_field").value = (reg_fill_name_field);
   }
</script>
<?php  ?>


I have put in my template css override :
/* For hide name_field in VM */
input[id="name_field"] {
    display: none;
   
}

/* For hide name label in VM */
.name {
    display: none;
   
}


So i have hided the name and label filed in the form, but not unpunished by VM config (it dosent work).

So now, when user register directly to the "my account" menu, the name field is hided but filled with the username field.

I use VP One page Checkout for the checkout, so if user place an order and register by VP it is Ok because i can hide the name field in the config of VP.
The problem I had was if users wanted to register directly before placing an order.

I hope that help someone :)

Title: Re: Remove Displayed Name / username field
Post by: scottt on April 21, 2018, 11:14:40 AM
Quote from: thefbi on April 02, 2018, 10:34:03 AM
I hope that help someone :)
@ GJC & fbi
Just the solution I was looking for! Thanks a million!
Title: Re: Remove Displayed Name / username field
Post by: NoOneLt on March 23, 2020, 09:42:25 AM
Hello,

Is thera any updates to the problem in VM+Joomla standard?

Or fix is only by code as explained here?

THanks!
Title: Re: Remove Displayed Name / username field
Post by: GJC Web Design on March 23, 2020, 10:14:40 AM
Quotefix is only by code as explained here
Title: Re: Remove Displayed Name / username field
Post by: NoOneLt on March 26, 2020, 08:55:23 AM
GJC i have implemented your recommended setup where Login = email, name and username is hidden by CSS but i have one problem here that in account maintenance email field is visible and editable and i can change it (and afraid that users will do by mistake), of course it does not change login name but changes name and email for user.

Have you solved this somehow?

Thanks
Title: Re: Remove Displayed Name / username field
Post by: GJC Web Design on March 26, 2020, 10:51:34 AM
make it readonly with an over ride