I did 5 searches and this one kept coming up and the others are just crap.
I have set a default country 223 so that users don't have to scroll through the massive list. However now the country is showing the bt address already as it is the default. Is there a way to now show that until all details are submitted. I modified my template to show the bt as the st unless a st has been provided code.
WHAT?
Sorry I read what I wrote and it is confusing.
I set default country in vm backend to 223 (USA) Now when someone goes to the cart there is, in the bt and st, the default country showing but the bt and st are not complete and I would like to not show the country until all the details have been submitted. I added text to make it more apparent. www.pollenranch.com/store/cart
you can just NOT show it at all.
IF you look at the code below
this line
if (($item['name']==='application' ) OR ($item['name']==='agreed') OR ($item['name']==='CommercialAddress') OR ($item['name']==='virtuemart_country_id')){continue;}
I skip application,agreed,CommercialAddress, and virtuemart_country_id
<?php
foreach($this->cart->BTaddress['fields'] as $item){
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');
}
if (($item['name']==='application' ) OR ($item['name']==='agreed') OR ($item['name']==='CommercialAddress') OR ($item['name']==='virtuemart_country_id')){continue;}
?><?php //if (($item['name']==='phone_1' ) OR ($item['name']==='fax') OR ($item['name']==='virtuemart_country_id')) echo $item['title'] ?>
<span class="values vm2<?php echo '-'.$item['name'] ?>" ><?php echo $this->escape($item['value']) ?></span>
<?php //if ($item['name'] == 'address_1' and $item['name'] != 'middle_name' and $item['name'] != 'zip') { ?>
<?php if ($item['name'] == 'address_1' OR $item['name'] == 'address_2' OR $item['name'] == 'phone_1' OR $item['name'] == 'last_name' OR $item['name'] == 'email' OR $item['name'] == 'company') { ?>
<br class="clear" />
<?php
}
if ($item['name'] == 'city') { ?>
,
<?php
}
}
} ?>