HTML cleanup - patch from Sumit Pandit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@813831 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -28,21 +28,19 @@ under the License.
|
||||
<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 @@ under the License.
|
||||
<#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="<@ofbizContentUrl>${requestAttributes.contentPathPrefix?if_exists}${smallImageUrl}</@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="<@ofbizContentUrl>${requestAttributes.contentPathPrefix?if_exists}${smallImageUrl}</@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 @@ under the License.
|
||||
<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 @@ under the License.
|
||||
</#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="<@ofbizContentUrl>/ecommerce/images/remove.png</@ofbizContentUrl>" alt="Remove Item Image" /></a></td>
|
||||
<td><a href="javascript:void(0);"><img id="remove_${cartLine_index}" src="<@ofbizContentUrl>/ecommerce/images/remove.png</@ofbizContentUrl>" alt="Remove Item Image" /></a></td>
|
||||
</#if>
|
||||
</tr>
|
||||
<#assign itemCount = itemCount + 1 />
|
||||
</#list>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user