News:

Support the VirtueMart project and become a member

Main Menu

Remove "eMail" from billing address

Started by MarcusT, October 31, 2012, 15:55:38 PM

Previous topic - Next topic

MarcusT

Hello together,

I use Joomla 2.5.7 and VirtueMart 2.0.10f.

How can I remove the "eMail address" from the customer billing address on shopping cart and order-eMail?

Is there anybody who can help me? I tried a lot but nothing functioned.

Thank you
Marcus

PRO

email is REQUIRED joomla field.

Do you mean NOT display it?

MarcusT

hello PRO,

thank you for answer.

Yes I won't display the eMail

Do you know how can I do that?

Marcus

PRO

marcus,

for the shopper email?

vies/invoice/tmpl/mail_html_shopperaddresses.php

after
foreach ($this->userfields['fields'] as $field) {
add
if ($field['name']==='email'){continue;}

You can do the same on cart page
default_pricelist.php

after this
foreach($this->cart->BTaddress['fields'] as $item){

for example I use this code to skip 3 userfields on the cart page
2 are custom fields, and the country id is not needed there since I only sell USA
if (($item['name']==='application' ) OR ($item['name']==='CommercialAddress') OR ($item['name']==='virtuemart_country_id')){continue;}


MarcusT

Hello PRO

I think I do soemething wrong. In default_pricelist.php I do that but nothing happened:

<div class="output-billto">
      <?php

      foreach($this->cart->BTaddress['fields'] as $item){
         if ($field['name']==='email'){continue;}
      if(!empty($item['value'])){
            if($item['name']==='agreed'){
               $item['value'] =  ($item['value']===0) ? JText::_('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_NO'):JText::_('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_YES');
            }
            ?><!-- span class="titles"><?php echo $item['title'] ?></span -->
               <span class="values vm2<?php echo '-'.$item['name'] ?>" ><?php echo $this->escape($item['value']) ?></span>
            <?php if ($item['name'] != 'title' and $item['name'] != 'first_name' and $item['name'] != 'middle_name' and $item['name'] != 'zip') { ?>
               <br class="clear" />
            <?php
            }
         }
      } ?>
      <div class="clear"></div>
      </div>

MarcusT

Hello PRO

sorry, it was my mistake.

In default_pricelist.php I change the word "$field" to "$item" and it works.

Yuhhhuhhh
Thank you so  much and sorry about my bad english.
You can't believe how happy you make me. I'm looking for a solve a long time.

best wishes
Marcus

creyl

working perfectly!!

if ($item['name']==='email'){continue;} 


Thanks!!