News:

Looking for documentation? Take a look on our wiki

Main Menu

Remove Phonenumber in Cart Billto

Started by whizzz, September 12, 2017, 11:23:22 AM

Previous topic - Next topic

whizzz

Dear Virtuemart-Community

I have some userfields like phone_1, phone_2 and fax. If the fields has values they appear in the Bill to in the Cartview.

What can I do when I just want to show the username, his adress, zip and country but not his phone- and fax-numbers?
VM 3.2.4
Joomla 3.7.5
PHP 7.0

jenkinhill

In the Shopper Field List  (Shopper fields in Configuration menu) you can select where the fields are to be shown.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

whizzz

Hey

Thank you!

Yes I know this possibility.

But if I uncheck show in cart then the phone numbers are shown in billto adress. If I check show in Cart then the phonenumbers are unshown in billto adress but appear at the end of pricelist as an empty field.

I don't understand the logic of this.

What I want is to disable showing phonenumbers in billto adress and also not appearing in the end of the pricelist.
VM 3.2.4
Joomla 3.7.5
PHP 7.0

whizzz

Hey

Here is a JPG of my problem for better understanding  :)
VM 3.2.4
Joomla 3.7.5
PHP 7.0

jenkinhill

I can't duplicate what you see. I am using VirtueMart 3.2.4 on Joomla 3.7.5 with Protostar and default VM templates.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

Jörgen

Looks like a template issue, try with protostar

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

whizzz

Thank you for your help

Unfortunately it is the same issue with protostar. And it concerns every other textfield  :-[

VM 3.2.4
Joomla 3.7.5
PHP 7.0

whizzz

It is strange. I tested it with Protostar Template, installed Virtuemart again (3.2.4) and I have still the same issue. It does not depend if checkbox "show in cart form" is set on yes or no. My first and last name is displayed anyway if I set checkbox on "No". If I set it on "Yes" it disappears in billto-adress but appears right after the "terms and conditions" again as an empty field.

Other way: Could you please tell me the php-code for showing every shopper field as it's own? So I could manage it manually which field I want to show and which not.
VM 3.2.4
Joomla 3.7.5
PHP 7.0

whizzz

Hey!

I just tested it in an other virtuemart site I own and there is the same issue. Version there is 3.2.2.

Same example: Phone number is in billadress and if I set checkbox "show in cart form" to "No". And if I set it to "Yes" the phone-number-field switches to the end with no entry.

It drives me nuts  :o  :)
VM 3.2.4
Joomla 3.7.5
PHP 7.0

jenkinhill

I just clearedall my overrides and tested this.  With Show in cart form selected the fields are rendered within the cart, as you say, at the end. The code for this is within the template components/com_virtuemart/views/cart/tmpl/default_cartfields.php

Having re-read what you want to do, which is to turn off display of phone fields on the bill-to address the simplest solution is to hide them with css.  Eg the following would work for the two phone fields.

span.vm2-phone_1  {
display:none;
}
span.vm2-phone_2  {
display:none;
}
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

whizzz

#10
Thank you for your answer! might this be a bug? because it is hidden by select "Yes" instead of "No"

Other question to this topic: How can I display the field "COM_VIRTUEMART_USER_DISPLAYED_NAME" (the Joomla register-name) in the bill to adress similar to the e-mailadress at the top? Because in my case the "name" is the company name and I don't want to have another custom field named "company name".
VM 3.2.4
Joomla 3.7.5
PHP 7.0

jenkinhill

No it is not a bug. There are times when a field placed in the cart fields would be useful, such as  "order number" for B2B sales.  You are setting it to be displayed as a field in the cart form, or not to appear.

In default VM the COM_VIRTUEMART_USER_DISPLAYED_NAME or Displayed Name is shown in billto.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

whizzz

#12
I have a default VM 3.2.4 installation and the joomla user name is not shown in the billto address and not shown in the page editaddresscartBT either.

could you give me a hint in which file this is defined which field of the joomla-registration (for example name, email or username) is shown in the cart-adresses? I mean for now there is only the emailaddress in my billto view.
VM 3.2.4
Joomla 3.7.5
PHP 7.0

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

whizzz

Hey Jenkin

Thank you for your kind answers!

I made a language override for the field "name":

COM_USERS_PROFILE_NAME_LABEL = company name

All I want to do is to display this field in the billto-address in the cart view.

The reason why I made an override is because I don't want that a new user needs to fill in 3 fields with his names: "username", "name", "company name". Because in my case it is always the company name for every field. With this override a new user just needs to fill in "username" and "name", which is actually his company name. With this "solution" I could renounce at least one field. For example the user could fill into field "username" *companyname* and into field "name" *companyname inc. & ltd. & co*.

Is this possible to do?

thank you!
VM 3.2.4
Joomla 3.7.5
PHP 7.0