#*
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*#
#parse("view/velocity/IncludeTop.vm")
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td valign="top" width="20%" align="left">
<table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
<tr><td bgcolor="#FFFF88">
<a href="index.do"><b><font color="BLACK" size="2">&lt;&lt; Main Menu</font></b></a>
</td></tr>
</table>
</td><td valign="top" align="center">
<h2 align="center">$label</h2>
<form action="updateCartQuantities.do" method="post" >
<table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="5">
  <tr bgcolor="#cccccc">
  <td><b>Item ID</b></td>  <td><b>Product ID</b></td>  <td><b>Description</b></td>  <td><b>Quantity</b></td>  <td><b>List Price</b></td>  <td><b>Total Cost</b></td>
#if ($label == 'Shopping Cart')
<td> </td>
#end
  </tr>

#if ($cartForm.cart.numberOfItems.intValue() == 0)
<tr bgcolor="#FFFF88"><td colspan="6"><b>Your cart is empty.</b></td></tr>
#end

#foreach ($cartItem in $cartForm.cart.cartItems)
  <tr bgcolor="#FFFF88">
  <td><b>
 $cartItem.item.itemId
 <a href="viewItem.do?cartItem=$cartItem.item.itemId">
</a></b></td>
  <td>$cartItem.item.productId</td>
  <td>
     $!cartItem.item.attr1
     $!cartItem.item.attr2
     $!cartItem.item.attr3
     $!cartItem.item.attr4
     $!cartItem.item.attr5
     $cartItem.item.product.name
   </td>
  <td align="center">
  #if ($label == 'Shopping Cart')
  <input type="text" size="3" name="$cartItem.item.itemId" value="$cartItem.quantity.intValue()" />
  #end
  #if ($label == 'Checkout Summary')
    $cartItem.quantity.intValue()
  #end
  </td>
  <td align="right">$fmt.formatNumber($cartItem.item.listPrice, '$#,##0.00')</td>
  <td align="right">$fmt.formatNumber($cartItem.total, '$#,##0.00')</td>
  #if ($label == 'Shopping Cart')
  <td><a href="removeItemFromCart.do?workingItemId=$cartItem.item.itemId">
  <img border="0" src="images/button_remove.gif" /></a></td>
  #end
  </tr>
#end
<tr bgcolor="#FFFF88">
<td colspan="6" align="right">

<b>Sub Total: $fmt.formatNumber($cartForm.cart.subTotal, '$#,##0.00')</b><br />
#if ($label == 'Shopping Cart')
<input type="image" border="0" src="images/button_update_cart.gif" name="update" />
#end
</td>
#if ($label == 'Shopping Cart')
  <td> </td>
#end


</tr>
</table>
</form>

#if ($cartForm.cart.numberOfItems.intValue() > 0)

  #if ($label == 'Shopping Cart')
<br /><center><a href="checkout.do"><img border="0" src="images/button_checkout.gif" /></a></center>
#end

  #if ($label == 'Checkout Summary')
    <br /><center><a href="${continuation.id}.kont"><img border="0" src="images/button_continue.gif" /></a></center>
  #end

#end

</td>


<td valign="top" width="20%" align="right">
#if ($accountForm)
 #if ($accountForm.account)
  #if ($accountForm.account.username)
    #if ($accountForm.account.listOption)
      #parse("view/velocity/IncludeMyList.vm")
    #end
  #end
#end
#end
</td>

</tr>
</table>

#parse("view/velocity/IncludeBottom.vm")


