Location: PHPKode > projects > HikaShop > front/views/checkout/tmpl/address_view.php
<?php
/**
 * @package		HikaShop for Joomla!
 * @version		1.4.3
 * @author		hikashop.com
 * @copyright	(C) 2010 HIKARI SOFTWARE. All rights reserved.
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<?php
if(!empty($this->addresses)){
?>
<table>
<?php
		$varname = $this->type.'_address';
		if(empty($this->$varname) || !isset($this->addresses[$this->$varname])){
			$first = reset($this->addresses);
			$this->$varname = $first->address_id;
		}
		$done = false;
		foreach($this->addresses as $address){
			$this->address =& $address;
			$checked = '';
			if(($this->$varname==$address->address_id)||(empty($address->address_id) && !$done)){
				$checked = 'CHECKED';
				$done = true;
			}
	?>
	<tr>
		<td>
			<input id="hikashop_checkout_<?php echo $this->type;?>_address_radio" class="hikashop_checkout_<?php echo $this->type;?>_address_radio" type="radio" name="hikashop_address_<?php echo $this->type;?>" value="<?php echo $address->address_id;?>" <?php echo $checked; ?> />
		</td>
		<td><label for="hikashop_checkout_<?php echo $this->type;?>_address_radio" style="cursor:pointer;">
			<span class="hikashop_checkout_<?php echo $this->type;?>_address_info">
	<?php
			$params = null;
			$js = '';
			$html = hikashop::getLayout('address','address_template',$params,$js);
			foreach($this->fields as $field){
				$fieldname = $field->field_namekey;
				$html=str_replace('{'.$fieldname.'}',$this->fieldsClass->show($field,$address->$fieldname),$html);
			}
			echo str_replace("\n","<br/>\n",str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)));
	?>
			</span>
			</label>
		</td>
		<td>
			<span class="hikashop_checkout_<?php echo $this->type;?>_address_buttons">
				<a class="hikashop_checkout_<?php echo $this->type;?>_address_delete" href="<?php echo hikashop::completeLink('checkout&step='.$this->step.'&redirect=checkout&task=deleteaddress&address_id='.$address->address_id.'&'.JUtility::getToken().'=1');?>"><img src="<?php echo HIKASHOP_IMAGES; ?>delete.png" border="0" /></a>
				<a class="modal hikashop_checkout_<?php echo $this->type;?>_address_edit" rel="{handler: 'iframe', size: {x: 450, y: 480}}" href="<?php echo hikashop::completeLink('address&task=edit&redirect=checkout&address_id='.$address->address_id.'&step='.$this->step,true);?>" onclick="SqueezeBox.fromElement(this,{parse: 'rel'});return false;"><img src="<?php echo HIKASHOP_IMAGES; ?>edit.png" border="0" /></a>
			</span>
		</td>
	</tr>
	<?php
		}
?>
</table>
<?php
}
?>
<span id="hikashop_checkout_<?php echo $this->type;?>_address_new" class="hikashop_checkout_<?php echo $this->type;?>_address_new">
	<a class="modal" id="hikashop_checkout_<?php echo $this->type;?>_address_new_link" rel="{handler: 'iframe', size: {x: 450, y: 480}}" href="<?php echo hikashop::completeLink('address&redirect=checkout&task=add&step='.$this->step,true);?>" onclick="SqueezeBox.fromElement(this,{parse: 'rel'});return false;">
		<?php echo $this->cart->displayButton(JText::_('NEW'),'new',$this->params,'','var link = document.getElementById(\'hikashop_checkout_'. $this->type.'_address_new_link\'); if(link) SqueezeBox.fromElement(link,{parse: \'rel\'});return false;'); ?>
	</a>
</span>
Return current item: HikaShop