VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Captain Pervert on April 19, 2012, 20:52:47 PM

Title: How to get rid of the Displayed Name field?
Post by: Captain Pervert on April 19, 2012, 20:52:47 PM
I am an experienced user of VM 1.x and am building a new shop under 2.0.6.
Until know, it feels kinda dorky in a lot of ways.

1.
How to get rid of the displayed name?
Example here:
http://jdemo.mowebso.com/25_templates/ecommerce/index.php?option=com_virtuemart&view=user&task=editaddresscheckout&addrtype=BT

This feeld is needed when you just use Joomla and not Virtuemart. When you just use Joomla for Virtuemart, that field should go. Why? Because the customer has to enter his names THREE times now. A username, a displayed name and his full, middle and last name. That's stupid.
For correct billing information, it's acceptable that a user must enter a username (since the webshop an electronic system) and his first-middle-last name. That's it.
Unfortunately the Displayed Name field cannot be disabled unser Configuration > Shopper Field

2.
How to change the Login-module to a dedicated VM login module?

I have the login module at the right on my site. It shows the possibility to login, retrieve password and register. When I click register, it takes me to the default Joomla registration form, which asks for displayed name, email and password. Of course I want this topoint totheVM registration form like it did in VM1, there it had a dedicated module called mod_virtuemart_login. I can't seem to find this module in VM2?
Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on June 06, 2012, 18:52:31 PM
*bump the first one... need to get rid of that displayed name urgently.
Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on June 18, 2012, 17:31:01 PM
Any idea of how to get rid of displayed name?
Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on July 10, 2012, 11:00:36 AM
Mmm maybe 2.0.9?  ;D
Title: Re: How to get rid of the Displayed Name field?
Post by: ivus on July 18, 2012, 10:50:05 AM
Hi Captain Pervert and DaggaTora,

Perhaps now DaggaTora an stop bumping this post.

I just had a quick snoop at how all the fields are set up and it seems the following is happening:
You're right Captain Pervert, it shouldn't be setup this way. And unfortunately I couldn't find a way of not having it there in the registration/management pages. Without getting into it too much, the two tables are joined in some internal VM function, one doesn't work without the other.


As far as the Register link goes you can change the login link in the module:


FIND:


<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>"><?php echo JText::_('MOD_LOGIN_REGISTER'); ?></a>


CHANGE TO:


<a href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&layout=edit'); ?>"><?php echo JText::_('MOD_LOGIN_REGISTER'); ?></a>


I hope this helps.
Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on July 18, 2012, 11:40:12 AM
 :'( I only bump after 15-30 days...

A pity that displayed can't dissapear..
Title: Re: How to get rid of the Displayed Name field?
Post by: ivus on July 18, 2012, 12:04:19 PM
Don't worry DaggaTora, I was only playing around. I'm no administrator/moderator so don't take my comment too seriously.

Hey you never know... I might get banned for posing too many replies????
Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on July 18, 2012, 12:27:38 PM
lol... i was joking  ;)
Title: Re: How to get rid of the Displayed Name field?
Post by: jjk on July 18, 2012, 20:32:53 PM
Did you guys ever look at VM2 'Configuration' - 'Shopper Fields' and its settings?  :)
Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on July 18, 2012, 21:12:31 PM
lol... Yes, i even look the padlock!  ;D
Title: Re: How to get rid of the Displayed Name field?
Post by: jjk on July 18, 2012, 22:47:29 PM
Quote from: DaggaTora on July 18, 2012, 21:12:31 PM
lol... Yes, i even look the padlock!  ;D
Good point  ;)
However, for some reason this field doesn't show in my registration form. Are you by chance using Joomla 1.5.x?

But I might have a solution for you. Just go to your database table with phpMyadmin (I prefer HeidiSQL) into the table xxx_virtuemart_userfields and locate the line in the title column which says COM_VIRTUEMART_USER_DISPLAYED_NAME. Move to the right and edit the 'published' column to read 0. I suppose this will solve your problem.

In my shopper field list the six locked fields at the bottom are all green, except for the shipment form, which are all red.
Title: Re: How to get rid of the Displayed Name field?
Post by: Milbo on July 19, 2012, 03:06:58 AM
lol, even easier.

You have the option enabled "ask user for registration". And your userd dont need to fill them. They can do the anonymous checkout and then they dont need to enter the name. so this are the easy methods. just disable registration and all this fields are gone. Your users will still be able to track the orders and so on.

You could also write or even buy some joomla/virtuemart plugin, creating automatically login names for your customers, but if this is better, I dont know.

and another thing to Ivus, welcome here, but there is a small error in your explanation. The username and the name is only stored in the joomla tables,...dont mix it with the name of the address. There exists no pure vm user. When they are registered, then using joomla.
Title: Re: How to get rid of the Displayed Name field?
Post by: ivus on July 19, 2012, 08:23:21 AM
Hi Milbo,

good work spotting that. I've modified my original post so others too won't get confused.
Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on July 19, 2012, 09:57:17 AM
 :D

Well, we are getting to the point!

The thing is, tell me if I'm wrong, that we have two places where the name of the customer is used: the joomla/vm user and the shipping address. I've been thinking about it and i think that VM should use Displayed name as a the first option for shipping address but would still need the lastname so VM should ask for a lastname in the same group for displayed name.

Then, if the user wants to use another name for shipping he could insert it in "Add shippment address"

what do you think?
Title: Re: How to get rid of the Displayed Name field?
Post by: ivus on July 19, 2012, 10:54:53 AM
Hi DaggaTora,

You know what... I think I was right the first time around...

displayed name -> is used in Joomla Core user setup as NAME field,  and is also stored in VMUserInfos as NAME field.

The name you apply to each of the address entries you make (ie My Home Address or My Office) is stored in VMUserInfos as ADDRESS_TYPE_NAME field. Which means from what you said
Quotei think that VM should use Displayed name as a the first option for shipping address
wouldn't work because then you wouldn't be able to distinguish the differences between each one of your entry.

The reason VM asks for FNAME, MNAME, LNAME again for each of the shipping entries is so you can assign different people as the recipient. So as an example i have 2 shipping entries set up against my profile
I think it's done this way so that you can easily set a different SHIP TO address without having to re-enter all the data.


In any case the BILL TO address is usually the one most people would use as their SHIP TO address which means you wouldn't need to set up any items at all in the SHIP TO section.


The reason DISPLAY NAME is present in the SHOPPER DETAILS (from my best guess) is because VM is trying to circumvent the Joomla! USERS component/module all together. In doing so it still needs to following conventions set up in the core. This means that DISPLAY NAME (VM) is really NAME (J!) and therefore must exist in all user management pages. I've noticed that when you update your profile and change the DISPLAY NAME it reflects it in the core #__users table also.


I hope this clarifies thing.  ;D
Title: [SOLVED] Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on July 19, 2012, 22:04:59 PM
Mmmm... you are right, but users still see strange to put the name twice.

One thing... what is that about setting different adresses like My Home and My Office? I saw nothing about this in VM2, in fact i've disable adding diferent shipping adresses because i couldn't make it work that way.  :o
Title: Re: How to get rid of the Displayed Name field?
Post by: ivus on July 20, 2012, 05:33:43 AM
Hi GaggaTora,


Yeah VM allows you to store multiple shipping addresses against your profile. I'm pretty sure it's built in and active by default, however it is slightly confusing in how it works.


see this post [size=78%]http://forum.virtuemart.net/index.php?topic=102705.msg351002#msg351002 (http://forum.virtuemart.net/index.php?topic=102705.msg351002#msg351002)[/size]



Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on July 20, 2012, 09:16:06 AM
Yes, for me it worked 50%. YOu can add a new address but you can't store them in a select menu like My Home o r My Office.

There should be a menu like My Addresses, where you can select the one you desire.
Title: Re: How to get rid of the Displayed Name field?
Post by: ivus on July 20, 2012, 09:20:49 AM
 :o oh... you were referring to that part.

What I was saying was that it exists in the cart array, but it isn't used. I was wondering why? It would totally be a better option.
Title: Re: How to get rid of the Displayed Name field?
Post by: DaggaTora on July 20, 2012, 10:38:41 AM
That would be... incredible!
Title: Re: How to get rid of the Displayed Name field?
Post by: littlesnack on September 04, 2012, 17:44:37 PM
If anyone needs a solution for this, look at this http://forum.virtuemart.net/index.php?topic=107226.0 (http://forum.virtuemart.net/index.php?topic=107226.0)