<?php include_once( "../../../../spider.inc.php" ); ?>{charset:UTF-8}{module:system.login.Check}{module:shopping.category.LoadList}{module:shopping.order.CartAdmin}{module:shopping.order.Optimize}
	{if:IS_ERROR}
	<ul class="error">
		{foreach:errors error}
			<li style="color:#ff0000;">{write:error}</li>
		{/foreach}
	</ul>
	<p>
		<input type="button" value="カート再表示" onclick="shoppingOrderViewCart()" />
	</p>
	{else-if:shopping.order.orderObject->getAllItemCount(request)>0}
		{set:selectedAddressOrder get.addord}
		{if:strlen(selectedAddressOrder)==0 || selectedAddressOrder<0}{set:selectedAddressOrder '0'}{/if}
		{set:selectedAddressObject shopping.order.orderObject->'shoppingOrderAddressObjectArray'[selectedAddressOrder]}
		{if:shopping.order.orderObject->canAddAddress(request)}
		<div style="width:1em;float:right;"><a href="javascript:shoppingCartDropAddress()"
			title="現在選択されている宛先を削除します">×</a></div>
		<ul id="address-select">
			{if:count(shopping.order.orderObject->'shoppingOrderAddressObjectArray')>1}
			{foreach:shopping.order.orderObject::shoppingOrderAddressObjectArray addressOrder addressObject}
			<li>{if:selectedAddressOrder==addressOrder}<div{else}<a
			href="javascript:shoppingCartChangeAddress({write:addressOrder})"{/if}
				>宛先{write:(addressOrder+1)}{if:selectedAddressOrder==addressOrder}</div>{else}</a>{/if}</li>
			{/foreach}
			{/if}
			{if:count(shopping.order.orderObject->'shoppingOrderAddressObjectArray')<10}
			<li style="width:1em;"><a href="javascript:shoppingCartAddAddress()" title="宛先を追加します">+</a></li>
			{/if}
		</ul>
		{/if}
		<table style="width:100%;">
		<tbody>
		{foreach:selectedAddressObject::shoppingOrderItemObjectArray itemOrder itemObject}
		{set:unitObject itemObject->'shoppingProductUnitObject'}
		{set:productObject unitObject->'shoppingProductObject'}
		<tr>
			<td>
			{set:fileIdArray productObject::fileIdArray}
			{if:strlen(fileIdArray[0])>0}
				<a href="/<?php echo SYSTEM_DIR_NAME_ADMIN_PANEL; ?>/shopping/product/unit/detail.php?shpdi={write:unitObject->'unit_id'}" target="_blank"
				><img src="/file/download.php?fi={write:fileIdArray[0]}&amp;w=45&amp;h=45" /></a><br />
			{else}
				<table style="width:45px;height:45px;margin:0 auto;">
				<tbody>
				<tr>
					<td style="vertical-align:middle;text-align:center;font-size:9px;"
						><a href="/<?php echo SYSTEM_DIR_NAME_ADMIN_PANEL; ?>/shopping/product/unit/detail.php?shpdi={write:unitObject->'unit_id'}" target="_blank"
						>画像<br />なし</a></td>
				</tr>
				</tbody>
				</table>
			{/if}
			</td>
			<td style="font-size:11px;">
				{write:productObject->'product_name'} {write:unitObject->'unit_name'}
				<div style="font-size:11px;text-align:right;">
					{if:900==unitObject->'delivery_type'}
						チェックイン:{write:date('Y年m月d日',strtotime(itemObject->'svc_start_date'))}<br />
						チェックアウト:{write:date('Y年m月d日',strtotime(itemObject->'svc_limit_date'))}<br />
						&yen;{write:number_format(itemObject->'price_unit')}×{write:ceil((strtotime(itemObject->'svc_limit_date')-strtotime(itemObject->'svc_start_date'))/(60*60*24))}泊
						<a href="javascript:shoppingCartDrop({write:itemOrder},{write:selectedAddressOrder})">削</a>
					{else-if:200<=unitObject->'delivery_type'}
						{write:date('Y年m月d日',strtotime(itemObject->'svc_start_date'))} 単価&yen;{write:number_format(itemObject->'price_unit')}<br />
						{write:date('H:i',strtotime(itemObject->'svc_start_date'))}～{write:date('H:i',strtotime(itemObject->'svc_limit_date'))}
						<br />
						<a href="javascript:shoppingCartDrop({write:itemOrder},{write:selectedAddressOrder})">削</a>
					{else}
						&yen;{write:number_format(itemObject->'price_unit')} x {write:itemObject->'order_count'}個
						<a href="javascript:shoppingCartCountDown({write:itemOrder},{write:selectedAddressOrder})">－</a>
						/
						<a href="javascript:shoppingCartCountUp({write:itemOrder},{write:selectedAddressOrder})">＋</a>
						/
						<a href="javascript:shoppingCartDrop({write:itemOrder},{write:selectedAddressOrder})">削</a>
					{/if}
				</div>
			</td>
			<td style="width:3em;white-space:nowrap;text-align:right;">&yen;{write:number_format(itemObject->getTotalPaymentPrice( request ))}</td>
		</tr>
		{/foreach}
		<tr>
			<th colspan="2" style="text-align:left;">小計(税込)</th>
			<td style="text-align:right;border:solid 1px #999;padding:3px;font-weight:bold;background-color:#eee;">
				&yen;{write:number_format(selectedAddressObject->getTotalPaymentPrice(request))}
			</td>
		</tr>
		</tbody>
		</table>
		
		<div style="padding:5px;text-align:right;">
			全選択{write:SHOPPING_LABEL_PRODUCT}数:{write:shopping.order.orderObject->getAllItemCount(request)}個<br />
			合計{write:SHOPPING_LABEL_PRODUCT}金額:&yen;{write:number_format(shopping.order.orderObject->'price_total')}<br />
			{if:shopping.order.orderObject->'wrapping_price'>0}
				包装代:&yen;{write:number_format(shopping.order.orderObject->'wrapping_price')}<br />
			{/if}
			{if:shopping.order.orderObject->'delivery_price'>0}
				配送料:&yen;{write:number_format(shopping.order.orderObject->'delivery_price')}<br />
			{/if}
			{if:shopping.order.orderObject->'point_use'>0}
				利用ポイント:{write:number_format(shopping.order.orderObject->'point_use')}<br />
			{/if}
			{if:shopping.order.orderObject->'point_total'>0}
				今回発生ポイント:+{write:number_format(shopping.order.orderObject->'point_total')}<br />
			{/if}
			{if:shopping.order.orderObject->'discount_price'>0}
				{if:strlen(shopping.order.promotionInformation->'promotion_name')>0}{write:shopping.order.promotionInformation->'promotion_name'}様からの{/if}ご紹介割引:
				-&yen;{write:number_format(shopping.order.orderObject->'discount_price')}<br />
			{/if}
			合計支払金額:&yen;{write:number_format(shopping.order.orderObject->'payment_total')}<br />
			<input type="button" value="全選択解除" onclick="shoppingCartClear()" />
		</div>
	{else}
		<p>
			{write:SHOPPING_LABEL_ORDER}{write:SHOPPING_LABEL_PRODUCT}を選択してください。
		</p>
	{/if}
	<img src="/js/images/loading_s_01.gif" style="width:0px;height:0px;" onload="shoppingCartChangeAddressMax({write:count(shopping.order.orderObject->'shoppingOrderAddressObjectArray')})" />
	