<dl class="hika_options large">
<dt><label for="hikashop_default_shipping_address_selector"><?php echo JText::_('HIKASHOP_SELECT_DEFAULT_SHIPPING_ADDRESS'); ?></label></dt>
<dd><?php
$current = 0;
$values = array();
if(!empty($this->addresses)) {
if(empty($this->addressClass))
$this->addressClass = hikashop_get('class.address');
foreach($this->addresses as $k => $address) {
if(!in_array($address->address_type, array('shipping', 'both', '')))
continue;
$addr = $this->addressClass->miniFormat($address);
$values[] = JHTML::_('select.option', $k, $addr);
if(!empty($address->address_default))
$current = $address->address_id;
}
}
if(empty($values))
$values = array(JHTML::_('select.option', '', JText::_('HIKA_NO_ADDRESS')));
echo JHTML::_('select.genericlist', $values, 'data[user][default_shipping]', 'class="hikashop_default_address_dropdown" onchange="window.addressMgr.setDefault(this, \'shipping\');"', 'value', 'text', $current, 'hikashop_default_shipping_address_selector');
?></dd>
</dl>
<div class="hkc-md-6 hikashop_shipping_addresses">
<h3><?php echo JText::_('HIKASHOP_SHIPPING_ADDRESSES'); ?></h3>
<?php
foreach($this->addresses as $address) {
if($address->address_type != 'shipping')
continue;
?>
<div class="hikashop_user_address address_selection" id="hikashop_user_address_<?php echo $address->address_id; ?>">
<?php
$this->address_id = (int)$address->address_id;
$this->address = $address;
$this->setLayout('show');
echo $this->loadTemplate();
?>
</div>
<?php
}
?>
<div class="" style="margin-top:6px;">
<a class="hikabtn hikabtn-success" href="#newAddress" onclick="return window.addressMgr.new('shipping');"><i class="fa fa-plus"></i> <?php echo JText::_('HIKASHOP_NEW_SHIPPING_ADDRESS'); ?></a>
</div>
</div>