You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2009/09/11 15:51:05 UTC
svn commit: r813831 -
/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
Author: ashish
Date: Fri Sep 11 13:51:05 2009
New Revision: 813831
URL: http://svn.apache.org/viewvc?rev=813831&view=rev
Log:
HTML cleanup - patch from Sumit Pandit.
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=813831&r1=813830&r2=813831&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Fri Sep 11 13:51:05 2009
@@ -28,21 +28,19 @@
<h3>${uiLabelMap.EcommerceStep} 1: ${uiLabelMap.PageTitleShoppingCart}</h3>
<div id="cartSummaryPanel" style="display: none;">
<a href="javascript:void(0);" id="openCartPanel" class="buttons">${uiLabelMap.EcommerceClickHereToEdit}</a>
- <table id="cartSummaryPanel_cartItems">
+ <table id="cartSummaryPanel_cartItems" summary="This table displays the list of item added into Shopping Cart.">
<thead>
<tr>
- <th>${uiLabelMap.OrderItem}</th>
- <th>${uiLabelMap.CommonDescription}</th>
- <th>${uiLabelMap.EcommerceUnitPrice}</th>
- <th>${uiLabelMap.OrderQuantity}</th>
- <th>${uiLabelMap.EcommerceAdjustments}</th>
- <th>${uiLabelMap.EcommerceItemTotal}</th>
+ <th id="orderItem">${uiLabelMap.OrderItem}</th>
+ <th id="description">${uiLabelMap.CommonDescription}</th>
+ <th id="unitPrice">${uiLabelMap.EcommerceUnitPrice}</th>
+ <th id="quantity">${uiLabelMap.OrderQuantity}</th>
+ <th id="adjustment">${uiLabelMap.EcommerceAdjustments}</th>
+ <th id="itemTotal">${uiLabelMap.EcommerceItemTotal}</th>
</tr>
</thead>
<tbody>
- <#assign itemCount = 0 />
<#list shoppingCart.items() as cartLine>
- <#assign cartLineIndex = itemCount />
<#if cartLine.getProductId()?exists>
<#if cartLine.getParentProductId()?exists>
<#assign parentProductId = cartLine.getParentProductId() />
@@ -52,43 +50,42 @@
<#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)?if_exists />
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = ""></#if>
</#if>
- <tr id="cartItemDisplayRow_${cartLineIndex}">
- <td><img src="<@o...@ofbizContentUrl>" alt = "Product Image" /></td>
- <td>${cartLine.getName()?if_exists}</td>
- <td>${cartLine.getDisplayPrice()}</td>
- <td><span id="completedCartItemQty_${cartLineIndex}">${cartLine.getQuantity()?string.number}</span></td>
- <td><span id="completedCartItemAdjustment_${cartLineIndex}"><@ofbizCurrency amount=cartLine.getOtherAdjustments() isoCode=shoppingCart.getCurrency() /></span></td>
- <td><span id="completedCartItemSubTotal_${cartLineIndex}"><@ofbizCurrency amount=cartLine.getDisplayItemSubTotal() isoCode=shoppingCart.getCurrency() /></span></td>
+ <tr id="cartItemDisplayRow_${cartLine_index}">
+ <td headers="orderItem"><img src="<@o...@ofbizContentUrl>" alt = "Product Image" /></td>
+ <td headers="description">${cartLine.getName()?if_exists}</td>
+ <td headers="unitPrice">${cartLine.getDisplayPrice()}</td>
+ <td headers="quantity"><span id="completedCartItemQty_${cartLine_index}">${cartLine.getQuantity()?string.number}</span></td>
+ <td headers="adjustment"><span id="completedCartItemAdjustment_${cartLine_index}"><@ofbizCurrency amount=cartLine.getOtherAdjustments() isoCode=shoppingCart.getCurrency() /></span></td>
+ <td headers="itemTotal" align="right"><span id="completedCartItemSubTotal_${cartLine_index}"><@ofbizCurrency amount=cartLine.getDisplayItemSubTotal() isoCode=shoppingCart.getCurrency() /></span></td>
</tr>
- <#assign itemCount = itemCount + 1 />
</#list>
</tbody>
</table>
<table id="cartSummaryPanel_cartTotals">
<tbody>
<tr id="completedCartSubtotalRow">
- <th scope="row">${uiLabelMap.CommonSubtotal}</th>
- <td id="completedCartSubTotal"><@ofbizCurrency amount=shoppingCart.getSubTotal() isoCode=shoppingCart.getCurrency() /></td>
+ <th id="subTotal" scope="row">${uiLabelMap.CommonSubtotal}</th>
+ <td headers="subTotal" id="completedCartSubTotal"><@ofbizCurrency amount=shoppingCart.getSubTotal() isoCode=shoppingCart.getCurrency() /></td>
</tr>
<#assign orderAdjustmentsTotal = 0 />
<#list shoppingCart.getAdjustments() as cartAdjustment>
<#assign orderAdjustmentsTotal = orderAdjustmentsTotal + Static["org.ofbiz.order.order.OrderReadHelper"].calcOrderAdjustment(cartAdjustment, shoppingCart.getSubTotal())>
</#list>
<tr id="completedCartDiscountRow">
- <th scope="row">${uiLabelMap.ProductDiscount}</th>
- <td id="completedCartDiscount"><input type="hidden" value="${orderAdjustmentsTotal}" id="initializedCompletedCartDiscount" /><@ofbizCurrency amount=orderAdjustmentsTotal isoCode=shoppingCart.getCurrency() /></td>
+ <th id="productDiscount" scope="row">${uiLabelMap.ProductDiscount}</th>
+ <td headers="productDiscount" id="completedCartDiscount"><input type="hidden" value="${orderAdjustmentsTotal}" id="initializedCompletedCartDiscount" /><@ofbizCurrency amount=orderAdjustmentsTotal isoCode=shoppingCart.getCurrency() /></td>
</tr>
<tr>
- <th scope="row">${uiLabelMap.OrderShippingAndHandling}</th>
- <td id="completedCartTotalShipping"><@ofbizCurrency amount=shoppingCart.getTotalShipping() isoCode=shoppingCart.getCurrency() /></td>
+ <th id="shippingAndHandling" scope="row">${uiLabelMap.OrderShippingAndHandling}</th>
+ <td headers="shippingAndHandling" id="completedCartTotalShipping"><@ofbizCurrency amount=shoppingCart.getTotalShipping() isoCode=shoppingCart.getCurrency() /></td>
</tr>
<tr>
- <th scope="row">${uiLabelMap.OrderSalesTax}</th>
- <td id="completedCartTotalSalesTax"><@ofbizCurrency amount=shoppingCart.getTotalSalesTax() isoCode=shoppingCart.getCurrency() /></td>
+ <th id="salesTax" scope="row">${uiLabelMap.OrderSalesTax}</th>
+ <td headers="salesTax" id="completedCartTotalSalesTax"><@ofbizCurrency amount=shoppingCart.getTotalSalesTax() isoCode=shoppingCart.getCurrency() /></td>
</tr>
<tr>
- <th scope="row">${uiLabelMap.OrderGrandTotal}</th>
- <td id="completedCartDisplayGrandTotal"><@ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency() /></td>
+ <th id="grandTotal" scope="row">${uiLabelMap.OrderGrandTotal}</th>
+ <td headers="grandTotal" id="completedCartDisplayGrandTotal"><@ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency() /></td>
</tr>
</tbody>
</table>
@@ -103,22 +100,19 @@
<table id="editCartPanel_cartItems">
<thead>
<tr>
- <th>${uiLabelMap.OrderItem}</th>
- <th>${uiLabelMap.CommonDescription}</th>
- <th>${uiLabelMap.EcommerceUnitPrice}</th>
- <th>${uiLabelMap.OrderQuantity}</th>
- <th>${uiLabelMap.EcommerceAdjustments}</th>
- <th>${uiLabelMap.EcommerceItemTotal}</th>
- <th>${uiLabelMap.FormFieldTitle_removeButton}</th>
+ <th id="editOrderItem">${uiLabelMap.OrderItem}</th>
+ <th id="editDescription">${uiLabelMap.CommonDescription}</th>
+ <th id="editUnitPrice">${uiLabelMap.EcommerceUnitPrice}</th>
+ <th id="editQuantity">${uiLabelMap.OrderQuantity}</th>
+ <th id="editAdjustment">${uiLabelMap.EcommerceAdjustments}</th>
+ <th id="editItemTotal">${uiLabelMap.EcommerceItemTotal}</th>
+ <th id="removeItem">${uiLabelMap.FormFieldTitle_removeButton}</th>
</tr>
</thead>
<tbody id="updateBody">
- <#assign itemCount = 0 />
<#list shoppingCart.items() as cartLine>
- <#assign cartLineIndex = itemCount />
- <#assign productId = cartLineIndex />
- <tr id="cartItemRow_${cartLineIndex}">
- <td>
+ <tr id="cartItemRow_${cartLine_index}">
+ <td headers="editOrderItem">
<#if cartLine.getProductId()?exists>
<#if cartLine.getParentProductId()?exists>
<#assign parentProductId = cartLine.getParentProductId() />
@@ -132,28 +126,27 @@
</#if>
</#if>
</td>
- <td>${cartLine.getName()?if_exists}</td>
- <td id="itemUnitPrice_${cartLineIndex}"><@ofbizCurrency amount=cartLine.getDisplayPrice() isoCode=shoppingCart.getCurrency() /></td>
- <td>
+ <td headers="editDescription">${cartLine.getName()?if_exists}</td>
+ <td headers="editUnitPrice" id="itemUnitPrice_${cartLine_index}"><@ofbizCurrency amount=cartLine.getDisplayPrice() isoCode=shoppingCart.getCurrency() /></td>
+ <td headers="editQuantity">
<#if cartLine.getIsPromo()>
${cartLine.getQuantity()?string.number}
<#else>
- <input type="hidden" name="cartLineProductId" id="cartLineProductId_${cartLineIndex}" value="${cartLine.getProductId()}" />
- <input type="text" name="update${cartLineIndex}" id="qty_${cartLineIndex}" value="${cartLine.getQuantity()?string.number}" class="required validate-number" />
- <span id="advice-required-qty_${cartLineIndex}" style="display:none;" class="errorMessage"> (required)</span>
+ <input type="hidden" name="cartLineProductId" id="cartLineProductId_${cartLine_index}" value="${cartLine.getProductId()}" />
+ <input type="text" name="update${cartLine_index}" id="qty_${cartLine_index}" value="${cartLine.getQuantity()?string.number}" class="required validate-number" />
+ <span id="advice-required-qty_${cartLine_index}" style="display:none;" class="errorMessage"> (required)</span>
</#if>
</td>
<#if !cartLine.getIsPromo()>
- <td id="addPromoCode_${cartLineIndex}"><@ofbizCurrency amount=cartLine.getOtherAdjustments() isoCode=shoppingCart.getCurrency() /></td>
+ <td headers="editAdjustment" id="addPromoCode_${cartLine_index}"><@ofbizCurrency amount=cartLine.getOtherAdjustments() isoCode=shoppingCart.getCurrency() /></td>
<#else>
- <td><@ofbizCurrency amount=cartLine.getOtherAdjustments() isoCode=shoppingCart.getCurrency() /></td>
+ <td headers="editAdjustment"><@ofbizCurrency amount=cartLine.getOtherAdjustments() isoCode=shoppingCart.getCurrency() /></td>
</#if>
- <td id="displayItem_${cartLineIndex}"><@ofbizCurrency amount=cartLine.getDisplayItemSubTotal() isoCode=shoppingCart.getCurrency() /></td>
+ <td headers="editItemTotal" id="displayItem_${cartLine_index}"><@ofbizCurrency amount=cartLine.getDisplayItemSubTotal() isoCode=shoppingCart.getCurrency() /></td>
<#if !cartLine.getIsPromo()>
- <td><a href="javascript:void(0);"><img id="remove_${cartLineIndex?if_exists}" src="<@o...@ofbizContentUrl>" alt="Remove Item Image" /></a></td>
+ <td><a href="javascript:void(0);"><img id="remove_${cartLine_index}" src="<@o...@ofbizContentUrl>" alt="Remove Item Image" /></a></td>
</#if>
</tr>
- <#assign itemCount = itemCount + 1 />
</#list>
</tbody>
</table>