Author Topic: Remove Phonenumber in Cart Billto  (Read 358 times)

whizzz

  • Beginner
  • *
  • Posts: 10
  • A beginner
Remove Phonenumber in Cart Billto
« on: September 12, 2017, 11:23:22 am »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26206
  • Always on vacation
    • Jenkin Hill Internet
Re: Remove Phonenumber in Cart Billto
« Reply #1 on: September 12, 2017, 12:07:58 pm »
In the Shopper Field List  (Shopper fields in Configuration menu) you can select where the fields are to be shown.
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

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.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5 on J!3.8

whizzz

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: Remove Phonenumber in Cart Billto
« Reply #2 on: September 12, 2017, 12:38:15 pm »
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

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: Remove Phonenumber in Cart Billto
« Reply #3 on: September 12, 2017, 14:26:44 pm »
Hey

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

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26206
  • Always on vacation
    • Jenkin Hill Internet
Re: Remove Phonenumber in Cart Billto
« Reply #4 on: September 12, 2017, 16:13:43 pm »
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

Jenkin Hill Internet,
Keswick, Lake District

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.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5 on J!3.8

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1022
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.9
Re: Remove Phonenumber in Cart Billto
« Reply #5 on: September 13, 2017, 00:09:46 am »
Looks like a template issue, try with protostar

regards

Jörgen @ Kreativ Fotografi
Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

whizzz

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: Remove Phonenumber in Cart Billto
« Reply #6 on: September 14, 2017, 09:11:41 am »
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

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: Remove Phonenumber in Cart Billto
« Reply #7 on: September 14, 2017, 14:33:21 pm »
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

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: Remove Phonenumber in Cart Billto
« Reply #8 on: September 14, 2017, 15:03:28 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26206
  • Always on vacation
    • Jenkin Hill Internet
Re: Remove Phonenumber in Cart Billto
« Reply #9 on: September 14, 2017, 16:28:56 pm »
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

Jenkin Hill Internet,
Keswick, Lake District

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.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5 on J!3.8

whizzz

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: Remove Phonenumber in Cart Billto
« Reply #10 on: September 14, 2017, 16:45:34 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26206
  • Always on vacation
    • Jenkin Hill Internet
Re: Remove Phonenumber in Cart Billto
« Reply #11 on: September 14, 2017, 18:44:25 pm »
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

Jenkin Hill Internet,
Keswick, Lake District

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.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5 on J!3.8

whizzz

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: Remove Phonenumber in Cart Billto
« Reply #12 on: September 14, 2017, 18:57:38 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26206
  • Always on vacation
    • Jenkin Hill Internet
Re: Remove Phonenumber in Cart Billto
« Reply #13 on: September 14, 2017, 23:33:17 pm »
These may help:


Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

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.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5 on J!3.8

whizzz

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: Remove Phonenumber in Cart Billto
« Reply #14 on: September 15, 2017, 11:32:20 am »
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