コード例 #1
0
<div class="order-details">
	<article class="column shipping">
		<h4><?php 
echo Yii::t('checkout', $cart->shipping->isStorePickup ? 'Shipping Details' : 'Shipping Address');
?>
</h4>
		<div class="address-block">
			<p class="webstore-label confirmation">
				<span>
					<?php 
if (!$cart->shipping->isStorePickup) {
    echo $cart->shipaddress->first_name . ' ' . $cart->shipaddress->last_name . '<br>' . _xls_html_shippingaddress($cart);
} else {
    $module = Modules::LoadByName('storepickup');
    $config = unserialize($module->configuration);
    echo $config['label'] . '<br>';
    echo _xls_html_storepickupdetails($cart) . '<br>';
}
?>
				</span>
				<span class="controls">
					<?php 
if ($isReceipt === false) {
    echo CHtml::link(Yii::t('checkout', 'Change'), Yii::app()->createUrl('/checkout/shipping'), array('class' => 'hasborder'));
}
?>
				</span>
			</p>
		</div>
	</article>
	<article class="column payment">
コード例 #2
0
ファイル: helpers.php プロジェクト: uiDeveloper116/webstore
function _xls_html_billingaddress($objCart)
{
    if ($objCart === null) {
        $objCart = Yii::app()->shoppingcart;
    }
    if ($objCart->billaddress_id === null) {
        return '';
    }
    if ($objCart->shipaddress_id == $objCart->billaddress_id) {
        return _xls_html_shippingaddress($objCart);
    }
    $str = '';
    $str .= $objCart->billaddress->address1 . '<br>';
    $str .= $objCart->billaddress->address2 ? $objCart->billaddress->address2 . '<br>' : '';
    $str .= $objCart->billaddress->city . ', ';
    $str .= $objCart->billaddress->state_id ? State::CodeById($objCart->billaddress->state_id) . ', ' : '';
    $str .= $objCart->billaddress->postal ? $objCart->billaddress->postal . '<br>' : '';
    if (_xls_get_conf('DEFAULT_COUNTRY') != $objCart->billaddress->country_id) {
        $str .= Country::CountryById($objCart->billaddress->country_id);
    }
    return $str;
}