News:

Support the VirtueMart project and become a member

Main Menu

How to get rid of the Displayed Name field?

Started by Captain Pervert, April 19, 2012, 20:52:47 PM

Previous topic - Next topic

Captain Pervert

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?

DaggaTora

*bump the first one... need to get rid of that displayed name urgently.
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

DaggaTora

Any idea of how to get rid of displayed name?
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

DaggaTora

Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

ivus

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

       
  • username -> is used in Joomla Core user setup as USERNAME field, it is not stored in VMUserInfos
  • displayed name -> is used in Joomla Core user setup as NAME field, and is also stored in VMUserInfos
  • displayed name -> is used in Joomla Core user setup as NAME field
  • first, middle and last name  -> is only stored in VMUserInfos as NAME field
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.

DaggaTora

 :'( I only bump after 15-30 days...

A pity that displayed can't dissapear..
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

ivus

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

DaggaTora

Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

jjk

Did you guys ever look at VM2 'Configuration' - 'Shopper Fields' and its settings?  :)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

DaggaTora

Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

jjk

#10
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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ivus

Hi Milbo,

good work spotting that. I've modified my original post so others too won't get confused.

DaggaTora

 :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?
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

ivus

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

       
  • My Home - John James Doe, 123 Street St, Town A, Country 1234
  • My Daughter's Home - Jane Doe, 123 Road Rd, Town B, Country 1234
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