home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / Cart.vm < prev    next >
Encoding:
Text File  |  2004-07-12  |  3.5 KB  |  120 lines

  1. #*
  2.   Copyright 1999-2004 The Apache Software Foundation
  3.  
  4.   Licensed under the Apache License, Version 2.0 (the "License");
  5.   you may not use this file except in compliance with the License.
  6.   You may obtain a copy of the License at
  7.  
  8.       http://www.apache.org/licenses/LICENSE-2.0
  9.  
  10.   Unless required by applicable law or agreed to in writing, software
  11.   distributed under the License is distributed on an "AS IS" BASIS,
  12.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.   See the License for the specific language governing permissions and
  14.   limitations under the License.
  15. *#
  16. #parse("view/velocity/IncludeTop.vm")
  17. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  18. <tr><td valign="top" width="20%" align="left">
  19. <table align="left" bgcolor="#008800" border="0" cellspacing="2" cellpadding="2">
  20. <tr><td bgcolor="#FFFF88">
  21. <a href="index.do"><b><font color="BLACK" size="2"><< Main Menu</font></b></a>
  22. </td></tr>
  23. </table>
  24. </td><td valign="top" align="center">
  25. <h2 align="center">$label</h2>
  26. <form action="updateCartQuantities.do" method="post" >
  27. <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="5">
  28.   <tr bgcolor="#cccccc">
  29.   <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>
  30. #if ($label == 'Shopping Cart')
  31. <td> </td>
  32. #end
  33.   </tr>
  34.  
  35. #if ($cartForm.cart.numberOfItems.intValue() == 0)
  36. <tr bgcolor="#FFFF88"><td colspan="6"><b>Your cart is empty.</b></td></tr>
  37. #end
  38.  
  39. #foreach ($cartItem in $cartForm.cart.cartItems)
  40.   <tr bgcolor="#FFFF88">
  41.   <td><b>
  42.  $cartItem.item.itemId
  43.  <a href="viewItem.do?cartItem=$cartItem.item.itemId">
  44. </a></b></td>
  45.   <td>$cartItem.item.productId</td>
  46.   <td>
  47.      $!cartItem.item.attr1
  48.      $!cartItem.item.attr2
  49.      $!cartItem.item.attr3
  50.      $!cartItem.item.attr4
  51.      $!cartItem.item.attr5
  52.      $cartItem.item.product.name
  53.    </td>
  54.   <td align="center">
  55.   #if ($label == 'Shopping Cart')
  56.   <input type="text" size="3" name="$cartItem.item.itemId" value="$cartItem.quantity.intValue()" />
  57.   #end
  58.   #if ($label == 'Checkout Summary')
  59.     $cartItem.quantity.intValue()
  60.   #end
  61.   </td>
  62.   <td align="right">$fmt.formatNumber($cartItem.item.listPrice, '$#,##0.00')</td>
  63.   <td align="right">$fmt.formatNumber($cartItem.total, '$#,##0.00')</td>
  64.   #if ($label == 'Shopping Cart')
  65.   <td><a href="removeItemFromCart.do?workingItemId=$cartItem.item.itemId">
  66.   <img border="0" src="images/button_remove.gif" /></a></td>
  67.   #end
  68.   </tr>
  69. #end
  70. <tr bgcolor="#FFFF88">
  71. <td colspan="6" align="right">
  72.  
  73. <b>Sub Total: $fmt.formatNumber($cartForm.cart.subTotal, '$#,##0.00')</b><br />
  74. #if ($label == 'Shopping Cart')
  75. <input type="image" border="0" src="images/button_update_cart.gif" name="update" />
  76. #end
  77. </td>
  78. #if ($label == 'Shopping Cart')
  79.   <td> </td>
  80. #end
  81.  
  82.  
  83. </tr>
  84. </table>
  85. </form>
  86.  
  87. #if ($cartForm.cart.numberOfItems.intValue() > 0)
  88.  
  89.   #if ($label == 'Shopping Cart')
  90. <br /><center><a href="checkout.do"><img border="0" src="images/button_checkout.gif" /></a></center>
  91. #end
  92.  
  93.   #if ($label == 'Checkout Summary')
  94.     <br /><center><a href="${continuation.id}.kont"><img border="0" src="images/button_continue.gif" /></a></center>
  95.   #end
  96.  
  97. #end
  98.  
  99. </td>
  100.  
  101.  
  102. <td valign="top" width="20%" align="right">
  103. #if ($accountForm)
  104.  #if ($accountForm.account)
  105.   #if ($accountForm.account.username)
  106.     #if ($accountForm.account.listOption)
  107.       #parse("view/velocity/IncludeMyList.vm")
  108.     #end
  109.   #end
  110. #end
  111. #end
  112. </td>
  113.  
  114. </tr>
  115. </table>
  116.  
  117. #parse("view/velocity/IncludeBottom.vm")
  118.  
  119.  
  120.