News:

Looking for documentation? Take a look on our wiki

Main Menu

virtuemart shopping cart page help

Started by ninad_jad, December 09, 2011, 12:34:32 PM

Previous topic - Next topic

ninad_jad

hi all,

in virtuemart checkout page i want to show "use same address as billing" check box and when user click on this box i need to display bill to address in ship to section, i have worked it on and i was succeeded to display check box but how to display the billing address in ship to section only after check box checked.

The image below will help you to understand problem






 

ninad_jad

hi,
plz help me with this, i'm eagerly waiting for solution guys ..   :-[

Milbo

You dont need that. There is a message that the the BT and ST address is the same. When you process the order, you will see that the ST is prefilled automatically with the BT. So in the checkout, your users have the information that it is the same. Would be interesting for which country you are doing the shop. Atm virtuemart is legal for germany, which has incredible strict laws, so it is hard for me to imagine that there is a country with stricter rules (germans ^^).
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

maxispin

#3
Related to this, I think that the layout is a bit confusing because there is billing address and shipping address separated. In most cases, (99%) the shipping address is only needed when doing Consumer business. I am planning to hack the billing address away.

Removing this from: /components/com_virtuemart/views/cart/tmpl/default_pricelist.php
only BILL to button stays.

<div class="width50 floatleft">

<span><span class="vmicon vm2-shipto-icon"></span>
<?php echo JText::_('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL'); ?></span>
<?php // Output Bill To Address ?>
<div class="output-shipto">
<?php
if(empty($this->cart->STaddress['fields'])){
echo JText::sprintf('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_EXPLAIN',JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL') );
} else {
if(!class_exists('VmHtml'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'html.php');
echo JText::_('COM_VIRTUEMART_USER_FORM_ST_SAME_AS_BT'). VmHtml::checkbox('STsameAsBT',$this->cart->STsameAsBT).'<br />';
foreach($this->cart->STaddress['fields'] as $item){
if(!empty($item['value'])){ ?>

<!-- <span class="titles"><?php echo $item['title'?></span> -->
<?php
if ($item['name'] == 'first_name' || $item['name'] == 'middle_name' || $item['name'] == 'zip') { ?>

<span class="values<?php echo '-'.$item['name'?>" ><?php echo $this->escape($item['value']) ?></span>
<?php } else { ?>
<span class="values" ><?php echo $this->escape($item['value']) ?></span>
<br class="clear" />
<?php
}
}
}
}
 
?>

<div class="clear"></div>
</div>

<?php if(!isset($this->cart->lists['current_id'])) $this->cart->lists['current_id'] = 0?>
<a class="details" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&cid[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL?>">
<?php echo JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'); ?>
</a>
VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9