<%@page language="java" contentType="text/html; charset=Windows-31J"%>
<%@page import="jp.ossc.petstore.OpenstandiaConst"%>
<%@page import="jp.ossc.petstore.common.Cart"%>
<%@page import="jp.ossc.petstore.common.CartItem"%>
<%@taglib uri="/tags/struts-bean" prefix="bean" %>
<%@taglib uri="/tags/struts-html" prefix="html" %>
<%@taglib uri="/tags/struts-logic" prefix="logic" %>

<h1>商品情報</h1>
<table id="cartTable">
	<tr>
		<th width="250">商品名</th>
		<th width="100">金額</th>
		<th width="70">注文数</th>
		<th width="150">合計金額</th>
	</tr>
	<logic:iterate id="item" name="<%=OpenstandiaConst.ENV_SES_ATRBT_CART%>" property="itemList" type="CartItem">
		<tr>
			<td><bean:write name="item" property="name"/></td>
			<td align="right"><bean:write name="item" property="price" format="###,###,###,###"/>円</td>
			<td align="right"><bean:write name="item" property="quantity"/></td>
			<td align="right"><bean:write name="item" property="totalPrice" format="###,###,###,###"/>円</td>
		</tr>
	</logic:iterate>
	<tr>
		<th colspan="2" align="right">合計</th>
		<td colspan="2" align="right">
			<bean:write name="<%=OpenstandiaConst.ENV_SES_ATRBT_CART%>" property="totalPrice" format="###,###,###,###"/>円
		</td>
	</tr>
</table>
<br /><br />
<h1>商品送付先情報</h1>
<table id="cartTable">
	<tr>
		<th width="100">氏名</th>
		<td width="470"><bean:write name="<%=OpenstandiaConst.ENV_SES_ATRBT_CUSTOMER%>" property="lastName"/>　<bean:write name="<%=OpenstandiaConst.ENV_SES_ATRBT_CUSTOMER%>" property="firstName"/></td>
	</tr>
	<tr>
		<th rowspan="4">住所</th>
		<td><bean:write name="<%=OpenstandiaConst.ENV_SES_ATRBT_CUSTOMER%>" property="address1"/></td>
	</tr>
	<tr>
		<td><bean:write name="<%=OpenstandiaConst.ENV_SES_ATRBT_CUSTOMER%>" property="address2"/></td>
	</tr>
	<tr>
		<td><bean:write name="<%=OpenstandiaConst.ENV_SES_ATRBT_CUSTOMER%>" property="address3"/></td>
	</tr>
	<tr>
		<td><bean:write name="<%=OpenstandiaConst.ENV_SES_ATRBT_CUSTOMER%>" property="address4"/></td>
	</tr>
	<tr>
		<th>電話番号</th>
		<td><bean:write name="<%=OpenstandiaConst.ENV_SES_ATRBT_CUSTOMER%>" property="phone"/></td>
	</tr>
</table>
<br />
<center>
<table>
	<tr>
		<html:form action="Order" method="post">
			<td>
				<html:submit value="　注文　"/>
			</td>
		</html:form>
			<td width="20">
			</td>
		<html:form action="ShowCart" method="post">
			<td>
				<html:submit value="キャンセル"/>
			</td>
		</html:form>
	</tr>
</table>
</center>
