Modified: 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/ChooseCatalog.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/catalog/ChooseCatalog.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/template/catalog/ChooseCatalog.ftl 
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/template/catalog/ChooseCatalog.ftl Sat 
Sep 17 07:17:15 2016
@@ -18,28 +18,30 @@ under the License.
 -->
 <#assign catalogCol = 
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getCatalogIdsAvailable(request)!>
 <#assign currentCatalogId = 
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getCurrentCatalogId(request)!>
-<#assign currentCatalogName = 
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getCatalogName(request,
 currentCatalogId)!>
+<#assign currentCatalogName =
+    
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getCatalogName(request,
 currentCatalogId)!>
 
 <#-- Only show if there is more than 1 (one) catalog, no sense selecting when 
there is only one option... -->
 <#if (catalogCol?size > 1)>
-<div id ="choosecatalog" class="screenlet">
-  <div class="screenlet-title-bar">
-    <ul>
-      <li class="h3">${uiLabelMap.ProductChooseCatalog}</li>
-    </ul>
-    <br class="clear"/>
+  <div id="choosecatalog" class="screenlet">
+    <div class="screenlet-title-bar">
+      <ul>
+        <li class="h3">${uiLabelMap.ProductChooseCatalog}</li>
+      </ul>
+      <br class="clear"/>
+    </div>
+    <div class="screenlet-body">
+      <form name="choosecatalogform" method="post" 
action="<@ofbizUrl>main</@ofbizUrl>">
+        <select name='CURRENT_CATALOG_ID' class='selectBox' 
onchange="submit()">
+          <option value='${currentCatalogId}'>${currentCatalogName}</option>
+          <option value='${currentCatalogId}'></option>
+          <#list catalogCol as catalogId>
+            <#assign thisCatalogName =
+                
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getCatalogName(request,
 catalogId)>
+            <option value='${catalogId}'>${thisCatalogName}</option>
+          </#list>
+        </select>
+      </form>
+    </div>
   </div>
-  <div class="screenlet-body">
-    <form name="choosecatalogform" method="post" 
action="<@ofbizUrl>main</@ofbizUrl>">
-      <select name='CURRENT_CATALOG_ID' class='selectBox' onchange="submit()">
-        <option value='${currentCatalogId}'>${currentCatalogName}</option>
-        <option value='${currentCatalogId}'></option>
-        <#list catalogCol as catalogId>
-          <#assign thisCatalogName = 
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getCatalogName(request,
 catalogId)>
-          <option value='${catalogId}'>${thisCatalogName}</option>
-        </#list>
-      </select>
-    </form>
-  </div>
-</div>
 </#if>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/ConfigProductDetail.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/catalog/ConfigProductDetail.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/ConfigProductDetail.ftl 
(original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/ConfigProductDetail.ftl 
Sat Sep 17 07:17:15 2016
@@ -24,341 +24,380 @@ under the License.
 <#-- virtual product javascript -->
 ${virtualJavaScript!}
 <script language="JavaScript" type="text/javascript">
-<!--
-    var detailImageUrl = null;
-     function setAddProductId(name) {
-        document.addform.add_product_id.value = name;
-        if (document.addform.quantity == null) return;
-        if (name == 'NULL' || isVirtual(name) == true) {
-            document.addform.quantity.disabled = true;
-        } else {
-            document.addform.quantity.disabled = false;
-        }
-     }
-     function isVirtual(product) {
-        var isVirtual = false;
-        <#if virtualJavaScript??>
-        for (i = 0; i < VIR.length; i++) {
-            if (VIR[i] == product) {
-                isVirtual = true;
-            }
-        }
-        </#if>
-        return isVirtual;
-     }
-
-    function addItem() {
-        document.configform.action = document.addform.action;
-        document.configform.quantity.value = document.addform.quantity.value;
-        document.configform.submit();
+  <!--
+  var detailImageUrl = null;
+  function setAddProductId(name) {
+    document.addform.add_product_id.value = name;
+    if (document.addform.quantity == null) return;
+    if (name == 'NULL' || isVirtual(name) == true) {
+      document.addform.quantity.disabled = true;
+    } else {
+      document.addform.quantity.disabled = false;
     }
-    function verifyConfig() {
-        document.configform.submit();
+  }
+  function isVirtual(product) {
+    var isVirtual = false;
+  <#if virtualJavaScript??>
+    for (i = 0; i < VIR.length; i++) {
+      if (VIR[i] == product) {
+        isVirtual = true;
+      }
     }
+  </#if>
+    return isVirtual;
+  }
 
-    function popupDetail() {
-        var defaultDetailImage = 
"${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}";
-        if (defaultDetailImage == null || defaultDetailImage == "null" || 
defaultDetailImage == "") {
-            defaultDetailImage = "_NONE_";
-        }
-
-        if (detailImageUrl == null || detailImageUrl == "null") {
-            detailImageUrl = defaultDetailImage;
-        }
-
-        if (detailImageUrl == "_NONE_") {
-            hack = document.createElement('span');
-            
hack.innerHTML="${uiLabelMap.CommonNoDetailImageAvailableToDisplay}";
-            
showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonNoDetailImageAvailableToDisplay}");
-            return;
-        }
-        detailImageUrl = detailImageUrl.replace(/\&\#47;/g, "/");
-        popUp("<@ofbizUrl>detailImage?detail=" + detailImageUrl + 
"</@ofbizUrl>", 'detailImage', '400', '550');
+  function addItem() {
+    document.configform.action = document.addform.action;
+    document.configform.quantity.value = document.addform.quantity.value;
+    document.configform.submit();
+  }
+  function verifyConfig() {
+    document.configform.submit();
+  }
+
+  function popupDetail() {
+    var defaultDetailImage = 
"${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}";
+    if (defaultDetailImage == null || defaultDetailImage == "null" || 
defaultDetailImage == "") {
+      defaultDetailImage = "_NONE_";
     }
 
-    function toggleAmt(toggle) {
-        if (toggle == 'Y') {
-            changeObjectVisibility("add_amount", "visible");
-        }
+    if (detailImageUrl == null || detailImageUrl == "null") {
+      detailImageUrl = defaultDetailImage;
+    }
 
-        if (toggle == 'N') {
-            changeObjectVisibility("add_amount", "hidden");
-        }
+    if (detailImageUrl == "_NONE_") {
+      hack = document.createElement('span');
+      hack.innerHTML = "${uiLabelMap.CommonNoDetailImageAvailableToDisplay}";
+      showErrorAlert("${uiLabelMap.CommonErrorMessage2}", 
"${uiLabelMap.CommonNoDetailImageAvailableToDisplay}");
+      return;
+    }
+    detailImageUrl = detailImageUrl.replace(/\&\#47;/g, "/");
+    popUp("<@ofbizUrl>detailImage?detail=" + detailImageUrl + "</@ofbizUrl>", 
'detailImage', '400', '550');
+  }
+
+  function toggleAmt(toggle) {
+    if (toggle == 'Y') {
+      changeObjectVisibility("add_amount", "visible");
     }
 
-    function findIndex(name) {
-        for (i = 0; i < OPT.length; i++) {
-            if (OPT[i] == name) {
-                return i;
-            }
-        }
-        return -1;
+    if (toggle == 'N') {
+      changeObjectVisibility("add_amount", "hidden");
     }
+  }
 
-    function getList(name, index, src) {
-        currentFeatureIndex = findIndex(name);
+  function findIndex(name) {
+    for (i = 0; i < OPT.length; i++) {
+      if (OPT[i] == name) {
+        return i;
+      }
+    }
+    return -1;
+  }
 
-        if (currentFeatureIndex == 0) {
-            // set the images for the first selection
-            if (IMG[index] != null) {
-                if (document.images['mainImage'] != null) {
-                    document.images['mainImage'].src = IMG[index];
-                    detailImageUrl = DET[index];
-                }
-            }
+  function getList(name, index, src) {
+    currentFeatureIndex = findIndex(name);
 
-            // set the drop down index for swatch selection
-            document.forms["addform"].elements[name].selectedIndex = 
(index*1)+1;
+    if (currentFeatureIndex == 0) {
+      // set the images for the first selection
+      if (IMG[index] != null) {
+        if (document.images['mainImage'] != null) {
+          document.images['mainImage'].src = IMG[index];
+          detailImageUrl = DET[index];
         }
+      }
+
+      // set the drop down index for swatch selection
+      document.forms["addform"].elements[name].selectedIndex = (index * 1) + 1;
+    }
 
-        if (currentFeatureIndex < (OPT.length-1)) {
-            // eval the next list if there are more
-            var selectedValue = 
document.forms["addform"].elements[name].options[(index*1)+1].value;
-            eval("list" + OPT[(currentFeatureIndex+1)] + selectedValue + "()");
-
-            // set the product ID to NULL to trigger the alerts
-            setAddProductId('NULL');
-        } else {
-            // this is the final selection -- locate the selected index of the 
last selection
-            var indexSelected = 
document.forms["addform"].elements[name].selectedIndex;
+    if (currentFeatureIndex < (OPT.length - 1)) {
+      // eval the next list if there are more
+      var selectedValue = 
document.forms["addform"].elements[name].options[(index * 1) + 1].value;
+      eval("list" + OPT[(currentFeatureIndex + 1)] + selectedValue + "()");
+
+      // set the product ID to NULL to trigger the alerts
+      setAddProductId('NULL');
+    } else {
+      // this is the final selection -- locate the selected index of the last 
selection
+      var indexSelected = 
document.forms["addform"].elements[name].selectedIndex;
 
-            // using the selected index locate the sku
-            var sku = 
document.forms["addform"].elements[name].options[indexSelected].value;
+      // using the selected index locate the sku
+      var sku = 
document.forms["addform"].elements[name].options[indexSelected].value;
 
-            // set the product ID
-            setAddProductId(sku);
+      // set the product ID
+      setAddProductId(sku);
 
-            // check for amount box
-            toggleAmt(checkAmtReq(sku));
-        }
+      // check for amount box
+      toggleAmt(checkAmtReq(sku));
     }
- //-->
- </script>
+  }
+  //-->
+</script>
 
 <script language="JavaScript" type="text/javascript">
-<!--
+  <!--
 
-jQuery(document).ready(function () {
+  jQuery(document).ready(function () {
     jQuery('#configFormId').change(getConfigDetails)
-});
+  });
 
-function getConfigDetails(event) {
-        jQuery.ajax({
-            url: '<@ofbizUrl>getConfigDetailsEvent</@ofbizUrl>',
-            type: 'POST',
-            data: jQuery('#configFormId').serialize(),
-            success: function(data) {
-                  var totalPrice = data.totalPrice;
-                  var configId = data.configId;
-                  document.getElementById('totalPrice').innerHTML = totalPrice;
-                  document.addToShoppingList.configId.value = configId;
-                  event.stop();
-            }
-        });
-}
+  function getConfigDetails(event) {
+    jQuery.ajax({
+      url: '<@ofbizUrl>getConfigDetailsEvent</@ofbizUrl>',
+      type: 'POST',
+      data: jQuery('#configFormId').serialize(),
+      success: function (data) {
+        var totalPrice = data.totalPrice;
+        var configId = data.configId;
+        document.getElementById('totalPrice').innerHTML = totalPrice;
+        document.addToShoppingList.configId.value = configId;
+        event.stop();
+      }
+    });
+  }
 
--->
+  -->
 </script>
 
 <div id="productdetail">
-
 <table>
-
-  <#-- Category next/previous -->
-  <#if category??>
-    <tr>
-      <td colspan="2" align="right">
-        <#if previousProductId??>
-          <a 
href='<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${previousProductId!}</@ofbizUrl>'
 class="buttontext">${uiLabelMap.CommonPrevious}</a>&nbsp;|&nbsp;
-        </#if>
-        <a href="<@ofbizUrl>category/~category_id=${categoryId!}</@ofbizUrl>" 
class="buttontext">${(category.categoryName)?default(category.description)!}</a>
-        <#if nextProductId??>
-          &nbsp;|&nbsp;<a 
href='<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${nextProductId!}</@ofbizUrl>'
 class="buttontext">${uiLabelMap.CommonNext}</a>
-        </#if>
-      </td>
-    </tr>
-  </#if>
-
-  <tr><td colspan="2"></td></tr>
-
-  <#-- Product image/name/price -->
+<#-- Category next/previous -->
+<#if category??>
   <tr>
-    <td valign="top" width="0">
-      <#assign productLargeImageUrl = 
productContentWrapper.get("LARGE_IMAGE_URL", "url")!>
-      <#-- remove the next two lines to always display the virtual image first 
(virtual images must exist) -->
-      <#if firstLargeImage?has_content>
-        <#assign productLargeImageUrl = firstLargeImage>
-      </#if>
-      <#if productLargeImageUrl?string?has_content>
-        <a href="javascript:popupDetail();"><img 
src='<@ofbizContentUrl>${contentPathPrefix!}${productLargeImageUrl!}</@ofbizContentUrl>'
 name='mainImage' vspace='5' hspace='5' class='cssImgXLarge' align='left' 
alt="" /></a>
+    <td colspan="2" align="right">
+      <#if previousProductId??>
+        <a 
href='<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${previousProductId!}</@ofbizUrl>'
+           class="buttontext">${uiLabelMap.CommonPrevious}</a>&nbsp;|&nbsp;
+      </#if>
+      <a href="<@ofbizUrl>category/~category_id=${categoryId!}</@ofbizUrl>" 
class="buttontext">
+      ${(category.categoryName)?default(category.description)!}
+      </a>
+      <#if nextProductId??>&nbsp;|&nbsp;
+        <a 
href='<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${nextProductId!}</@ofbizUrl>'
+           class="buttontext">${uiLabelMap.CommonNext}</a>
       </#if>
     </td>
+  </tr>
+</#if>
+  <tr>
+    <td colspan="2"></td>
+  </tr>
+<#-- Product image/name/price -->
+  <tr>
+    <td valign="top" width="0">
+    <#assign productLargeImageUrl = 
productContentWrapper.get("LARGE_IMAGE_URL", "url")!>
+    <#-- remove the next two lines to always display the virtual image first 
(virtual images must exist) -->
+    <#if firstLargeImage?has_content>
+      <#assign productLargeImageUrl = firstLargeImage>
+    </#if>
+    <#if productLargeImageUrl?string?has_content>
+      <a href="javascript:popupDetail();">
+        <img 
src='<@ofbizContentUrl>${contentPathPrefix!}${productLargeImageUrl!}</@ofbizContentUrl>'
+             name='mainImage' vspace='5' hspace='5' class='cssImgXLarge' 
align='left' alt=""/>
+      </a>
+    </#if>
+    </td>
     <td align="right" valign="top">
       <h2>${productContentWrapper.get("PRODUCT_NAME", "html")!}</h2>
       <div>${productContentWrapper.get("DESCRIPTION", "html")!}</div>
       <div><b>${product.productId!}</b></div>
-      <#-- example of showing a certain type of feature with the product -->
-      <#if sizeProductFeatureAndAppls?has_content>
-        <div>
-          <#if (sizeProductFeatureAndAppls?size == 1)>
-            <#-- TODO : i18n -->
-            Size:
-          <#else>
-            Sizes Available:
-          </#if>
-          <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl>
-            
${sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.productFeatureId))}<#if
 sizeProductFeatureAndAppl_has_next>,</#if>
-          </#list>
-        </div>
-      </#if>
-
-      <#-- for prices:
-              - if totalPrice is present, use it (totalPrice is the price 
calculated from the parts)
-              - if price < competitivePrice, show competitive or "Compare At" 
price
-              - if price < listPrice, show list price
-              - if price < defaultPrice and defaultPrice < listPrice, show 
default
-              - if isSale show price with salePrice style and print "On Sale!"
-      -->
-      <#if totalPrice??>
-        <div>${uiLabelMap.ProductAggregatedPrice}: <span id='totalPrice' 
class='basePrice'><@ofbizCurrency amount=totalPrice 
isoCode=totalPrice.currencyUsed/></span></div>
-      <#else>
+    <#-- example of showing a certain type of feature with the product -->
+    <#if sizeProductFeatureAndAppls?has_content>
+      <div>
+        <#if (sizeProductFeatureAndAppls?size == 1)>
+        <#-- TODO : i18n -->
+          Size:
+        <#else>
+          Sizes Available:
+        </#if>
+        <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl>
+        
${sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.abbrev?default(
+        sizeProductFeatureAndAppl.productFeatureId))}
+          <#if sizeProductFeatureAndAppl_has_next>,</#if>
+        </#list>
+      </div>
+    </#if>
+    <#-- for prices:
+            - if totalPrice is present, use it (totalPrice is the price 
calculated from the parts)
+            - if price < competitivePrice, show competitive or "Compare At" 
price
+            - if price < listPrice, show list price
+            - if price < defaultPrice and defaultPrice < listPrice, show 
default
+            - if isSale show price with salePrice style and print "On Sale!"
+    -->
+    <#if totalPrice??>
+      <div>${uiLabelMap.ProductAggregatedPrice}:
+        <span id='totalPrice' class='basePrice'>
+          <@ofbizCurrency amount=totalPrice isoCode=totalPrice.currencyUsed/>
+        </span>
+      </div>
+    <#else>
       <#if price.competitivePrice?? && price.price?? && price.price < 
price.competitivePrice>
-        <div>${uiLabelMap.ProductCompareAtPrice}: <span 
class='basePrice'><@ofbizCurrency amount=price.competitivePrice 
isoCode=price.currencyUsed/></span></div>
+        <div>${uiLabelMap.ProductCompareAtPrice}:
+          <span class='basePrice'>
+            <@ofbizCurrency amount=price.competitivePrice 
isoCode=price.currencyUsed/>
+          </span>
+        </div>
       </#if>
       <#if price.listPrice?? && price.price?? && price.price < price.listPrice>
-        <div>${uiLabelMap.ProductListPrice}: <span 
class='basePrice'><@ofbizCurrency amount=price.listPrice 
isoCode=price.currencyUsed/></span></div>
+        <div>${uiLabelMap.ProductListPrice}:
+          <span class='basePrice'>
+            <@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed/>
+          </span>
+        </div>
       </#if>
-      <#if price.listPrice?? && price.defaultPrice?? && price.price?? && 
price.price < price.defaultPrice && price.defaultPrice < price.listPrice>
-        <div>${uiLabelMap.ProductRegularPrice}: <span 
class='basePrice'><@ofbizCurrency amount=price.defaultPrice 
isoCode=price.currencyUsed/></span></div>
+      <#if price.listPrice?? && price.defaultPrice?? && price.price?? &&
+      price.price < price.defaultPrice && price.defaultPrice < price.listPrice>
+        <div>${uiLabelMap.ProductRegularPrice}:
+          <span class='basePrice'>
+            <@ofbizCurrency amount=price.defaultPrice 
isoCode=price.currencyUsed/>
+          </span>
+        </div>
       </#if>
       <div>
-
-          <#if price.isSale?? && price.isSale>
-            <span class='salePrice'>${uiLabelMap.OrderOnSale}!</span>
-            <#assign priceStyle = "salePrice">
-          <#else>
-            <#assign priceStyle = "regularPrice">
-          </#if>
-            ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual!> from 
</#if><span class='${priceStyle}'><@ofbizCurrency amount=price.price 
isoCode=price.currencyUsed/></span>
-
+        <#if price.isSale?? && price.isSale>
+          <span class='salePrice'>${uiLabelMap.OrderOnSale}!</span>
+          <#assign priceStyle = "salePrice">
+        <#else>
+          <#assign priceStyle = "regularPrice">
+        </#if>
+      ${uiLabelMap.OrderYourPrice}:
+        <#if "Y" = product.isVirtual!> from </#if>
+          <span class='${priceStyle}'>
+            <@ofbizCurrency amount=price.price isoCode=price.currencyUsed/>
+          </span>
       </div>
       <#if price.listPrice?? && price.price?? && price.price < price.listPrice>
         <#assign priceSaved = price.listPrice - price.price>
         <#assign percentSaved = (priceSaved / price.listPrice) * 100>
-        <div>${uiLabelMap.OrderSave}: <span class="basePrice"><@ofbizCurrency 
amount=priceSaved isoCode=price.currencyUsed/> 
(${percentSaved?int}%)</span></div>
-      </#if>
-      </#if>
-
-      <#-- Included quantities/pieces -->
-      <#if product.quantityIncluded?? && product.quantityIncluded != 0>
-        <div>${uiLabelMap.OrderIncludes}:
-          ${product.quantityIncluded!}
-          ${product.quantityUomId!}
+        <div>${uiLabelMap.OrderSave}:
+          <span class="basePrice">
+            <@ofbizCurrency amount=priceSaved isoCode=price.currencyUsed/> 
(${percentSaved?int}%)
+          </span>
         </div>
       </#if>
-      <#if product.piecesIncluded?? && product.piecesIncluded?long != 0>
-        <div>${uiLabelMap.OrderPieces}:
-          ${product.piecesIncluded}
-        </div>
-      </#if>
-      <#if daysToShip??>
-        <div>${uiLabelMap.ProductUsuallyShipsIn} ${daysToShip} 
${uiLabelMap.CommonDays}</div>
-      </#if>
+    </#if>
+    <#-- Included quantities/pieces -->
+    <#if product.quantityIncluded?? && product.quantityIncluded != 0>
+      <div>
+        
${uiLabelMap.OrderIncludes}:${product.quantityIncluded!}${product.quantityUomId!}
+      </div>
+    </#if>
+    <#if product.piecesIncluded?? && product.piecesIncluded?long != 0>
+      <div>
+        ${uiLabelMap.OrderPieces}:${product.piecesIncluded}
+      </div>
+    </#if>
+    <#if daysToShip??>
+      <div>
+        ${uiLabelMap.ProductUsuallyShipsIn} ${daysToShip} 
${uiLabelMap.CommonDays}
+      </div>
+    </#if>
 
-      <#-- show tell a friend details only in ecommerce application -->
+    <#-- show tell a friend details only in ecommerce application -->
       <div>&nbsp;</div>
       <div>
-        <a 
href="javascript:popUpSmall('<@ofbizUrl>tellafriend?productId=${product.productId}</@ofbizUrl>','tellafriend');"
 class="buttontext">${uiLabelMap.CommonTellAFriend}</a>
+        <a 
href="javascript:popUpSmall('<@ofbizUrl>tellafriend?productId=${product.productId}</@ofbizUrl>','tellafriend');"
+            class="buttontext">${uiLabelMap.CommonTellAFriend}</a>
       </div>
 
-      <#if disFeatureList?? && 0 < disFeatureList.size()>
-        <p>&nbsp;</p>
-        <#list disFeatureList as currentFeature>
+    <#if disFeatureList?? && 0 < disFeatureList.size()>
+      <p>&nbsp;</p>
+      <#list disFeatureList as currentFeature>
+        <div>
+        
${currentFeature.productFeatureTypeId}:&nbsp;${currentFeature.description}
+        </div>
+      </#list>
+      <div>&nbsp;</div>
+    </#if>
+
+      <form method="post"
+          action="<@ofbizUrl>additem<#if 
requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>"
+          name="addform" style='margin: 0;'>
+      <#assign inStock = true>
+      <#-- Variant Selection -->
+      <#if product.isVirtual?? && product.isVirtual?upper_case == "Y">
+        <#if variantTree?? && 0 < variantTree.size()>
+          <#list featureSet as currentType>
             <div>
-                
${currentFeature.productFeatureTypeId}:&nbsp;${currentFeature.description}
+              <select name="FT${currentType}" 
onchange="javascript:getList(this.name, (this.selectedIndex-1), 1);">
+                <option>${featureTypes.get(currentType)}</option>
+              </select>
             </div>
-        </#list>
-            <div>&nbsp;</div>
-      </#if>
-
-      <form method="post" action="<@ofbizUrl>additem<#if 
requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>"
 name="addform" style='margin: 0;'>
-        <#assign inStock = true>
-        <#-- Variant Selection -->
-        <#if product.isVirtual?? && product.isVirtual?upper_case == "Y">
-          <#if variantTree?? && 0 < variantTree.size()>
-            <#list featureSet as currentType>
-              <div>
-                <select name="FT${currentType}" 
onchange="javascript:getList(this.name, (this.selectedIndex-1), 1);">
-                  <option>${featureTypes.get(currentType)}</option>
-                </select>
-              </div>
-            </#list>
-            <input type='hidden' name="product_id" 
value='${product.productId}' />
-            <input type='hidden' name="add_product_id" value='NULL' />
-          <#else>
-            <input type='hidden' name="product_id" 
value='${product.productId}' />
-            <input type='hidden' name="add_product_id" value='NULL' />
+          </#list>
+          <input type='hidden' name="product_id" value='${product.productId}'/>
+          <input type='hidden' name="add_product_id" value='NULL'/>
+        <#else>
+          <input type='hidden' name="product_id" value='${product.productId}'/>
+          <input type='hidden' name="add_product_id" value='NULL'/>
+          <div 
class='tabletext'><b>${uiLabelMap.ProductItemOutOfStock}.</b></div>
+          <#assign inStock = false>
+        </#if>
+      <#else>
+        <input type='hidden' name="product_id" value='${product.productId}'/>
+        <input type='hidden' name="add_product_id" 
value='${product.productId}'/>
+        <#if productNotAvailable??>
+          <#assign isStoreInventoryRequired =
+          Static["org.apache.ofbiz.product.store.ProductStoreWorker"]
+          .isStoreInventoryRequired(request, product)>
+          <#if isStoreInventoryRequired>
             <div 
class='tabletext'><b>${uiLabelMap.ProductItemOutOfStock}.</b></div>
             <#assign inStock = false>
+          <#else>
+            <div class='tabletext'><b>${product.inventoryMessage!}</b></div>
           </#if>
+        </#if>
+      </#if>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" align="right">
+    <#-- check to see if introductionDate hasn't passed yet -->
+    <#if product.introductionDate?? && 
nowTimestamp.before(product.introductionDate)>
+      <p>&nbsp;</p>
+      <div class='tabletext' style='color: 
red;'>${uiLabelMap.ProductProductNotYetMadeAvailable}.</div>
+    <#-- check to see if salesDiscontinuationDate has passed -->
+    <#elseif product.salesDiscontinuationDate?? && 
nowTimestamp.after(product.salesDiscontinuationDate)>
+      <div class='tabletext' style='color: 
red;'>${uiLabelMap.ProductProductNoLongerAvailable}.</div>
+    <#-- check to see if the product requires inventory check and has 
inventory -->
+    <#else>
+      <#if inStock>
+        <#if product.requireAmount?default("N") == "Y">
+          <#assign hiddenStyle = "visible">
         <#else>
-          <input type='hidden' name="product_id" value='${product.productId}' 
/>
-          <input type='hidden' name="add_product_id" 
value='${product.productId}' />
-          <#if productNotAvailable??>
-            <#assign isStoreInventoryRequired = 
Static["org.apache.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryRequired(request,
 product)>
-            <#if isStoreInventoryRequired>
-              <div 
class='tabletext'><b>${uiLabelMap.ProductItemOutOfStock}.</b></div>
-              <#assign inStock = false>
-            <#else>
-              <div class='tabletext'><b>${product.inventoryMessage!}</b></div>
-            </#if>
-          </#if>
+          <#assign hiddenStyle = "hidden">
         </#if>
-
-        </td></tr><tr><td colspan="2" align="right">
-
-        <#-- check to see if introductionDate hasn't passed yet -->
-        <#if product.introductionDate?? && 
nowTimestamp.before(product.introductionDate)>
-          <p>&nbsp;</p>
-          <div class='tabletext' style='color: 
red;'>${uiLabelMap.ProductProductNotYetMadeAvailable}.</div>
-        <#-- check to see if salesDiscontinuationDate has passed -->
-        <#elseif product.salesDiscontinuationDate?? && 
nowTimestamp.after(product.salesDiscontinuationDate)>
-          <div class='tabletext' style='color: 
red;'>${uiLabelMap.ProductProductNoLongerAvailable}.</div>
-        <#-- check to see if the product requires inventory check and has 
inventory -->
+        <div id="add_amount" class="${hiddenStyle}">
+          <span style="white-space: nowrap;"><b>Amount:</b></span>&nbsp;
+          <input type="text" size="5" name="add_amount" value=""/>
+        </div>
+        <#if !configwrapper.isCompleted()>
+          <div>[${uiLabelMap.EcommerceProductNotConfigured}]&nbsp;
+            <input type="text" size="5" name="quantity" value="0" 
disabled="disabled"/></div>
         <#else>
-          <#if inStock>
-            <#if product.requireAmount?default("N") == "Y">
-              <#assign hiddenStyle = "visible">
-            <#else>
-              <#assign hiddenStyle = "hidden">
-            </#if>
-            <div id="add_amount" class="${hiddenStyle}">
-              <span style="white-space: nowrap;"><b>Amount:</b></span>&nbsp;
-              <input type="text" size="5" name="add_amount" value="" />
-            </div>
-            <#if !configwrapper.isCompleted()>
-              <div>[${uiLabelMap.EcommerceProductNotConfigured}]&nbsp;
-              <input type="text" size="5" name="quantity" value="0" 
disabled="disabled" /></div>
-            <#else>
-              <a href="javascript:addItem()" class="buttontext"><span 
style="white-space: nowrap;">${uiLabelMap.OrderAddToCart}</span></a>&nbsp;
-              <input type="text" size="5" name="quantity" value="1" />
-                <#if minimumQuantity?? &&  minimumQuantity &gt; 0>
-                  Minimum order quantity is ${minimumQuantity}.
-               </#if>
-            </#if>
-          </#if>
-          <#if requestParameters.category_id??>
-            <input type='hidden' name='category_id' 
value='${requestParameters.category_id}' />
+          <a href="javascript:addItem()" class="buttontext">
+                <span style="white-space: nowrap;">
+                ${uiLabelMap.OrderAddToCart}
+                </span>
+          </a>&nbsp;
+          <input type="text" size="5" name="quantity" value="1"/>
+          <#if minimumQuantity?? &&  minimumQuantity &gt; 0>
+            Minimum order quantity is ${minimumQuantity}.
           </#if>
         </#if>
+      </#if>
+      <#if requestParameters.category_id??>
+        <input type='hidden' name='category_id' 
value='${requestParameters.category_id}'/>
+      </#if>
+    </#if>
       </form>
-    <div>
+      <div>
       <#if sessionAttributes.userLogin?has_content && 
sessionAttributes.userLogin.userLoginId != "anonymous">
-
-        <form name="addToShoppingList" method="post" 
action="<@ofbizUrl>addItemToShoppingList<#if 
requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>">
-          <input type="hidden" name="productId" value="${product.productId}" />
-          <input type="hidden" name="product_id" value="${product.productId}" 
/>
-          <input type="hidden" name="configId" value="${configId!}" />
+        <form name="addToShoppingList" method="post"
+              action="<@ofbizUrl>addItemToShoppingList<#if 
requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>">
+          <input type="hidden" name="productId" value="${product.productId}"/>
+          <input type="hidden" name="product_id" value="${product.productId}"/>
+          <input type="hidden" name="configId" value="${configId!}"/>
           <select name="shoppingListId">
             <#if shoppingLists?has_content>
               <#list shoppingLists as shoppingList>
@@ -369,88 +408,98 @@ function getConfigDetails(event) {
             <option value="">${uiLabelMap.OrderNewShoppingList}</option>
           </select>
           &nbsp;&nbsp;
-          <input type="text" size="5" name="quantity" value="1" />
-          <a href="javascript:document.addToShoppingList.submit();" 
class="buttontext">[${uiLabelMap.OrderAddToShoppingList}]</a>
+          <input type="text" size="5" name="quantity" value="1"/>
+          <a href="javascript:document.addToShoppingList.submit();" 
class="buttontext">
+            [${uiLabelMap.OrderAddToShoppingList}]
+          </a>
         </form>
-      <#else> <br />
-        ${uiLabelMap.OrderYouMust} <a 
href="<@ofbizUrl>checkLogin/showcart</@ofbizUrl>" 
class="buttontext">${uiLabelMap.CommonBeLogged}</a>
-        ${uiLabelMap.OrderToAddSelectedItemsToShoppingList}.&nbsp;
+      <#else> <br/>
+      ${uiLabelMap.OrderYouMust}
+        <a href="<@ofbizUrl>checkLogin/showcart</@ofbizUrl>" 
class="buttontext">${uiLabelMap.CommonBeLogged}</a>
+      ${uiLabelMap.OrderToAddSelectedItemsToShoppingList}.&nbsp;
       </#if>
       </div>
-      <#-- Prefill first select box (virtual products only) -->
-      <#if variantTree?? && 0 < variantTree.size()>
-        <script language="JavaScript" type="text/javascript">eval("list" + 
"${featureOrderFirst}" + "()");</script>
-      </#if>
+    <#-- Prefill first select box (virtual products only) -->
+    <#if variantTree?? && 0 < variantTree.size()>
+      <script language="JavaScript" type="text/javascript">eval("list" + 
"${featureOrderFirst}" + "()");</script>
+    </#if>
 
-      <#-- Swatches (virtual products only) -->
-      <#if variantSample?? && 0 < variantSample.size()>
-        <#assign imageKeys = variantSample.keySet()>
-        <#assign imageMap = variantSample>
-        <p>&nbsp;</p>
-        <table cellspacing="0" cellpadding="0">
-          <tr>
-            <#assign maxIndex = 7>
-            <#assign indexer = 0>
-            <#list imageKeys as key>
-              <#assign swatchProduct = imageMap.get(key)>
-              <#if swatchProduct?has_content && indexer < maxIndex>
-                <#assign imageUrl = 
Static["org.apache.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct,
 "SMALL_IMAGE_URL", request, "url")!>
-                <#if !imageUrl?string?has_content>
-                  <#assign imageUrl = 
productContentWrapper.get("SMALL_IMAGE_URL", "url")!>
-                </#if>
-                <#if !imageUrl?string?has_content>
-                  <#assign imageUrl = "/images/defaultImage.jpg">
-                </#if>
-                <td align="center" valign="bottom">
-                  <a 
href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);"><img 
src="<@ofbizContentUrl>${contentPathPrefix!}${imageUrl}</@ofbizContentUrl>" 
class='cssImgSmall' alt="" /></a>
-                  <br />
-                  <a 
href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);" 
class="buttontext">${key}</a>
-                </td>
+    <#-- Swatches (virtual products only) -->
+    <#if variantSample?? && 0 < variantSample.size()>
+      <#assign imageKeys = variantSample.keySet()>
+      <#assign imageMap = variantSample>
+      <p>&nbsp;</p>
+      <table cellspacing="0" cellpadding="0">
+        <tr>
+          <#assign maxIndex = 7>
+          <#assign indexer = 0>
+          <#list imageKeys as key>
+            <#assign swatchProduct = imageMap.get(key)>
+            <#if swatchProduct?has_content && indexer < maxIndex>
+              <#assign imageUrl =
+              Static["org.apache.ofbiz.product.product.ProductContentWrapper"]
+              .getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", 
request, "url")!>
+              <#if !imageUrl?string?has_content>
+                <#assign imageUrl = 
productContentWrapper.get("SMALL_IMAGE_URL", "url")!>
+              </#if>
+              <#if !imageUrl?string?has_content>
+                <#assign imageUrl = "/images/defaultImage.jpg">
               </#if>
-              <#assign indexer = indexer + 1>
-            </#list>
-            <#if (indexer > maxIndex)>
-              <div><b>${uiLabelMap.OrderMoreOptionsAvailable}.</b></div>
+              <td align="center" valign="bottom">
+                <a 
href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);">
+                  <img 
src="<@ofbizContentUrl>${contentPathPrefix!}${imageUrl}</@ofbizContentUrl>"
+                       class='cssImgSmall' alt=""/>
+                </a>
+                <br/>
+                <a 
href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);" 
class="buttontext">
+                ${key}
+                </a>
+              </td>
             </#if>
-          </tr>
-        </table>
-      </#if>
+            <#assign indexer = indexer + 1>
+          </#list>
+          <#if (indexer > maxIndex)>
+            <div><b>${uiLabelMap.OrderMoreOptionsAvailable}.</b></div>
+          </#if>
+        </tr>
+      </table>
+    </#if>
     </td>
   </tr>
-
-
-
-  <#-- Long description of product -->
+<#-- Long description of product -->
   <tr>
     <td colspan="2">
       <div>${productContentWrapper.get("LONG_DESCRIPTION", "html")!}</div>
     </td>
   </tr>
-
-  <tr><td colspan="2"><hr class='sepbar'/></td></tr>
-
-  <#-- Any attributes/etc may go here -->
-  <#-- Product Configurator -->
   <tr>
     <td colspan="2">
-      <form name="configform" id="configFormId" method="post" 
action="<@ofbizUrl>product<#if 
requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>">
-        <input type='hidden' name='add_product_id' 
value='${product.productId}' />
-        <input type='hidden' name='add_category_id' value='' />
-        <input type='hidden' name='quantity' value='1' />
+      <hr class='sepbar'/>
+    </td>
+  </tr>
+<#-- Any attributes/etc may go here -->
+<#-- Product Configurator -->
+  <tr>
+    <td colspan="2">
+      <form name="configform" id="configFormId" method="post"
+            action="<@ofbizUrl>product<#if 
requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>">
+        <input type='hidden' name='add_product_id' 
value='${product.productId}'/>
+        <input type='hidden' name='add_category_id' value=''/>
+        <input type='hidden' name='quantity' value='1'/>
 
-        <input type='hidden' name='product_id' value='${product.productId}' />
-        <table >
+        <input type='hidden' name='product_id' value='${product.productId}'/>
+        <table>
           <tr>
             <td>
-                <div>
-                    <a href="javascript:verifyConfig();" 
class="buttontext">${uiLabelMap.OrderVerifyConfiguration}</a>
-                </div>
+              <div>
+                <a href="javascript:verifyConfig();" 
class="buttontext">${uiLabelMap.OrderVerifyConfiguration}</a>
+              </div>
             </td>
           </tr>
 
-          <#assign counter = 0>
-          <#assign questions = configwrapper.questions>
-          <#list questions as question>
+        <#assign counter = 0>
+        <#assign questions = configwrapper.questions>
+        <#list questions as question>
           <tr>
             <td>
               <div>${question.question}</div>
@@ -459,259 +508,300 @@ function getConfigDetails(event) {
                 <div>${StringUtil.wrapString(question.description!)}</div>
                 <#assign instructions = question.content.get("INSTRUCTIONS", 
"html")!>
                 <#if instructions?has_content>
-                  <a 
href="javascript:showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${instructions}");"
 class="buttontext">Instructions</a>
+                  <a 
href="javascript:showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${instructions}");"
+                  class="buttontext">Instructions</a>
                 </#if>
                 <#assign image = question.content.get("IMAGE_URL", "url")!>
                 <#if image?string?has_content>
-                  <img 
src='<@ofbizContentUrl>${contentPathPrefix!}${image!}</@ofbizContentUrl>' 
vspace='5' hspace='5' class='cssImgXLarge' align='left' alt="" />
+                  <img 
src='<@ofbizContentUrl>${contentPathPrefix!}${image!}</@ofbizContentUrl>'
+                       vspace='5' hspace='5' class='cssImgXLarge' align='left' 
alt=""/>
                 </#if>
               <#else>
-                <div><a 
href='#${question.getConfigItem().getString("configItemId")}' 
class="buttontext">Details</a></div>
+                <div>
+                  <a 
href='#${question.getConfigItem().getString("configItemId")}' 
class="buttontext">Details</a>
+                </div>
               </#if>
             </td>
           </tr>
           <tr>
             <td>
-            <#if question.isStandard()>
+              <#if question.isStandard()>
               <#-- Standard item: all the options are always included -->
-              <#assign options = question.options>
-              <#list options as option>
-                <div>${option.description} <#if !option.isAvailable()> 
(*)</#if></div>
-              </#list>
-            <#else>
-              <#if question.isSingleChoice()>
-                <#-- Single choice question -->
                 <#assign options = question.options>
-                <#assign selectedOption = question.getSelected()!>
-                <#assign selectedPrice = 0.0>
-                <#if selectedOption?has_content>
-                  <#assign selectedPrice = selectedOption.getPrice()>
-                </#if>
-                <#-- The single choice input can be implemented with radio 
buttons or a select field -->
-                <#if renderSingleChoiceWithRadioButtons?? && "Y" == 
renderSingleChoiceWithRadioButtons>
-                <#-- This is the radio button implementation -->
-                <#if !question.isMandatory()>
-                  <div><input type="radio" name='${counter}' value='<#if 
!question.isSelected()>checked</#if>' /> No option</div>
-                </#if>
-                <#assign optionCounter = 0>
                 <#list options as option>
-                  <#assign componentCounter = 0>
-                  <#if showOffsetPrice?? && "Y" == showOffsetPrice>
-                    <#assign shownPrice = option.price - selectedPrice>
-                  <#else>
-                    <#assign shownPrice = option.price>
+                  <div>${option.description} <#if !option.isAvailable()> 
(*)</#if></div>
+                </#list>
+              <#else>
+                <#if question.isSingleChoice()>
+                <#-- Single choice question -->
+                  <#assign options = question.options>
+                  <#assign selectedOption = question.getSelected()!>
+                  <#assign selectedPrice = 0.0>
+                  <#if selectedOption?has_content>
+                    <#assign selectedPrice = selectedOption.getPrice()>
                   </#if>
+                <#-- The single choice input can be implemented with radio 
buttons or a select field -->
+                  <#if renderSingleChoiceWithRadioButtons?? && "Y" == 
renderSingleChoiceWithRadioButtons>
+                  <#-- This is the radio button implementation -->
+                    <#if !question.isMandatory()>
+                      <div>
+                        <input type="radio" name='${counter}' value='<#if 
!question.isSelected()>checked</#if>'/>
+                        No option
+                      </div>
+                    </#if>
+                    <#assign optionCounter = 0>
+                    <#list options as option>
+                      <#assign componentCounter = 0>
+                      <#if showOffsetPrice?? && "Y" == showOffsetPrice>
+                        <#assign shownPrice = option.price - selectedPrice>
+                      <#else>
+                        <#assign shownPrice = option.price>
+                      </#if>
                     <#-- Render virtual compoennts -->
-                    <#if option.hasVirtualComponent()>
-                      <div >
-                        <input type='radio' name='${counter}' 
id="${counter}_${optionCounter}" value='${optionCounter}' 
onclick="javascript:checkOptionVariants('${counter}_${optionCounter}');" />
+                      <#if option.hasVirtualComponent()>
+                        <div>
+                          <input type='radio' name='${counter}' 
id="${counter}_${optionCounter}"
+                                 value='${optionCounter}'
+                                 
onclick="javascript:checkOptionVariants('${counter}_${optionCounter}');"/>
                         ${option.description} <#if !option.isAvailable()> 
(*)</#if>
-                        <#assign components = option.getComponents()>
-                        <#list components as component>
-                          <#if (option.isVirtualComponent(component))>
+                          <#assign components = option.getComponents()>
+                          <#list components as component>
+                            <#if (option.isVirtualComponent(component))>
                             ${setRequestAttribute("inlineProductId", 
component.productId)}
                             ${setRequestAttribute("inlineCounter", counter+ 
"_" +optionCounter + "_"+componentCounter)}
                             ${setRequestAttribute("addJavaScript", 
componentCounter)}
                             ${screens.render(inlineProductDetailScreen)}
-                            <#assign componentCounter = componentCounter + 1>
-                          </#if>
-                        </#list>
-                      </div>
-                    <#else>
-                      <div>
-                        <input type="radio" name='${counter}' 
value='${optionCounter}' <#if option.isSelected() || (!question.isSelected() && 
optionCounter == 0 && question.isMandatory())>checked="checked"</#if> />
+                              <#assign componentCounter = componentCounter + 1>
+                            </#if>
+                          </#list>
+                        </div>
+                      <#else>
+                        <div>
+                          <input type="radio" name='${counter}' 
value='${optionCounter}'
+                                 <#if option.isSelected() || 
(!question.isSelected() && optionCounter == 0 && 
question.isMandatory())>checked="checked"</#if>/>
                         ${option.description}&nbsp;
-                        <#if (shownPrice > 0)>+<@ofbizCurrency 
amount=shownPrice isoCode=price.currencyUsed/>&nbsp;</#if>
-                        <#if (shownPrice < 0)>-<@ofbizCurrency 
amount=(-1*shownPrice) isoCode=price.currencyUsed/>&nbsp;</#if>
-                        <#if !option.isAvailable()>(*)</#if>
-                      </div>
-                    </#if>
-                  <#assign optionCounter = optionCounter + 1>
-                </#list>
-                <#else>
-                <#-- And this is the select box implementation -->
-                <select name='${counter}'>
-                <#if !question.isMandatory()>
-                  <option value=''>---</option>
-                </#if>
-                <#assign options = question.options>
-                <#assign optionCounter = 0>
-                <#list options as option>
-                  <#if showOffsetPrice?? && "Y" == showOffsetPrice>
-                    <#assign shownPrice = option.price - selectedPrice>
+                          <#if (shownPrice > 0)>+<@ofbizCurrency 
amount=shownPrice isoCode=price.currencyUsed/>
+                            &nbsp;</#if>
+                          <#if (shownPrice < 0)>-<@ofbizCurrency 
amount=(-1*shownPrice) isoCode=price.currencyUsed/>
+                            &nbsp;</#if>
+                          <#if !option.isAvailable()>(*)</#if>
+                        </div>
+                      </#if>
+                      <#assign optionCounter = optionCounter + 1>
+                    </#list>
                   <#else>
-                    <#assign shownPrice = option.price>
-                  </#if>
-                  <#if option.isSelected()>
-                    <#assign optionCounter = optionCounter + 1>
+                  <#-- And this is the select box implementation -->
+                    <select name='${counter}'>
+                      <#if !question.isMandatory()>
+                        <option value=''>---</option>
+                      </#if>
+                      <#assign options = question.options>
+                      <#assign optionCounter = 0>
+                      <#list options as option>
+                        <#if showOffsetPrice?? && "Y" == showOffsetPrice>
+                          <#assign shownPrice = option.price - selectedPrice>
+                        <#else>
+                          <#assign shownPrice = option.price>
+                        </#if>
+                        <#if option.isSelected()>
+                          <#assign optionCounter = optionCounter + 1>
+                        </#if>
+                        <option value='${optionCounter}' <#if 
option.isSelected()>selected="selected"</#if>>
+                        ${option.description}&nbsp;
+                          <#if (shownPrice > 0)>+<@ofbizCurrency 
amount=shownPrice isoCode=price.currencyUsed/>
+                            &nbsp;</#if>
+                          <#if (shownPrice < 0)>-<@ofbizCurrency 
amount=(-1*shownPrice) isoCode=price.currencyUsed/>
+                            &nbsp;</#if>
+                          <#if !option.isAvailable()> (*)</#if>
+                        </option>
+                        <#assign optionCounter = optionCounter + 1>
+                      </#list>
+                    </select>
                   </#if>
-                  <option value='${optionCounter}' <#if 
option.isSelected()>selected="selected"</#if>>
-                    ${option.description}&nbsp;
-                    <#if (shownPrice > 0)>+<@ofbizCurrency amount=shownPrice 
isoCode=price.currencyUsed/>&nbsp;</#if>
-                    <#if (shownPrice < 0)>-<@ofbizCurrency 
amount=(-1*shownPrice) isoCode=price.currencyUsed/>&nbsp;</#if>
-                    <#if !option.isAvailable()> (*)</#if>
-                  </option>
-                  <#assign optionCounter = optionCounter + 1>
-                </#list>
-                </select>
-                </#if>
-              <#else>
+                <#else>
                 <#-- Multi choice question -->
-                <#assign options = question.options>
-                <#assign optionCounter = 0>
-                <#list options as option>
+                  <#assign options = question.options>
+                  <#assign optionCounter = 0>
+                  <#list options as option>
                     <#assign componentCounter = 0>
-                    <#-- Render virtual compoennts -->
+                  <#-- Render virtual compoennts -->
                     <#if option.hasVirtualComponent()>
-                      <div >
-                        <input type='CHECKBOX' name='${counter}' 
id="${counter}_${optionCounter}" value='${optionCounter}' 
onclick="javascript:checkOptionVariants('${counter}_${optionCounter}');" />
-                        ${option.description} <#if !option.isAvailable()> 
(*)</#if>
+                      <div>
+                        <input type='CHECKBOX' name='${counter}' 
id="${counter}_${optionCounter}"
+                               value='${optionCounter}'
+                               
onclick="javascript:checkOptionVariants('${counter}_${optionCounter}');"/>
+                      ${option.description} <#if !option.isAvailable()> 
(*)</#if>
                         <#assign components = option.getComponents()>
                         <#list components as component>
                           <#if (option.isVirtualComponent(component))>
-                            ${setRequestAttribute("inlineProductId", 
component.productId)}
-                            ${setRequestAttribute("inlineCounter", counter+ 
"_" +optionCounter + "_"+componentCounter)}
-                            ${setRequestAttribute("addJavaScript", 
componentCounter)}
-                            ${screens.render(inlineProductDetailScreen)}
+                          ${setRequestAttribute("inlineProductId", 
component.productId)}
+                          ${setRequestAttribute("inlineCounter", counter+ "_" 
+optionCounter + "_"+componentCounter)}
+                          ${setRequestAttribute("addJavaScript", 
componentCounter)}
+                          ${screens.render(inlineProductDetailScreen)}
                             <#assign componentCounter = componentCounter + 1>
                           </#if>
                         </#list>
                       </div>
                     <#else>
-                    <div>
-                      <input type='CHECKBOX' name='${counter}' 
value='${optionCounter}' <#if option.isSelected()>checked="checked"</#if> />
-                      ${option.description} +<@ofbizCurrency 
amount=option.price isoCode=price.currencyUsed/><#if !option.isAvailable()> 
(*)</#if>
-                    </div>
+                      <div>
+                        <input type='CHECKBOX' name='${counter}'
+                               value='${optionCounter}' <#if 
option.isSelected()>checked="checked"</#if>/>
+                      ${option.description} +<@ofbizCurrency 
amount=option.price isoCode=price.currencyUsed/>
+                        <#if !option.isAvailable()> (*)</#if>
+                      </div>
                     </#if>
-                  <#assign optionCounter = optionCounter + 1>
-                </#list>
+                    <#assign optionCounter = optionCounter + 1>
+                  </#list>
+                </#if>
               </#if>
-            </#if>
             </td>
           </tr>
-
           <#assign counter = counter + 1>
         </#list>
         </table>
       </form>
     </td>
   </tr>
-
-
-  <#-- Product Reviews -->
+<#-- Product Reviews -->
   <tr>
     <td colspan="2">
       <div>${uiLabelMap.OrderCustomerReviews}:</div>
-      <#if averageRating?? && (averageRating > 0) && numRatings?? && 
(numRatings > 1)>
-          <div>${uiLabelMap.OrderAverageRating}: ${averageRating} <#if 
numRatings??>(${uiLabelMap.CommonFrom} ${numRatings} 
${uiLabelMap.OrderRatings})</#if></div>
-      </#if>
+    <#if averageRating?? && (averageRating > 0) && numRatings?? && (numRatings 
> 1)>
+      <div>${uiLabelMap.OrderAverageRating}: ${averageRating}
+        <#if numRatings??>(${uiLabelMap.CommonFrom} ${numRatings} 
${uiLabelMap.OrderRatings})</#if>
+      </div>
+    </#if>
     </td>
   </tr>
-  <tr><td colspan="2"><hr class='sepbar'/></td></tr>
-  <#if productReviews?has_content>
-    <#list productReviews as productReview>
-      <#assign postedUserLogin = productReview.getRelatedOne("UserLogin", 
false)>
-      <#assign postedPerson = postedUserLogin.getRelatedOne("Person", false)!>
-      <tr>
-        <td colspan="2">
-          <table border="0" cellpadding="0" cellspacing='0'>
-            <tr>
-              <td>
-                <div>${uiLabelMap.CommonBy}: <#if 
productReview.postedAnonymous?default("N") == 
"Y">${uiLabelMap.OrderAnonymous}<#else>${postedPerson.firstName} 
${postedPerson.lastName}</#if></div>
-              </td>
-              <td>
-                <div>${uiLabelMap.CommonOn}: 
${productReview.postedDateTime!}</div>
-              </td>
-              <td>
-                <div>${uiLabelMap.OrderRanking}: 
${productReview.productRating!?string}</div>
-              </td>
-            </tr>
-            <tr>
-              <td colspan="3">
-                <div>&nbsp;</div>
-              </td>
-            </tr>
-            <tr>
-              <td colspan="3">
-                <div>${productReview.productReview!}</div>
-              </td>
-            </tr>
-
-          </table>
-        </td>
-      </tr>
-    </#list>
-    <tr>
-      <td colspan="2">
-        <a 
href="<@ofbizUrl>reviewProduct?category_id=${categoryId!}&amp;product_id=${product.productId}</@ofbizUrl>"
 class="buttontext">${uiLabelMap.ProductReviewThisProduct}!</a>
-      </td>
-    </tr>
-  <#else>
-    <tr>
-      <td colspan="2">
-        <div>${uiLabelMap.ProductProductNotReviewedYet}.</div>
-      </td>
-    </tr>
+  <tr>
+    <td colspan="2">
+      <hr class='sepbar'/>
+    </td>
+  </tr>
+<#if productReviews?has_content>
+  <#list productReviews as productReview>
+    <#assign postedUserLogin = productReview.getRelatedOne("UserLogin", false)>
+    <#assign postedPerson = postedUserLogin.getRelatedOne("Person", false)!>
     <tr>
       <td colspan="2">
-        <a 
href="<@ofbizUrl>reviewProduct?category_id=${categoryId!}&amp;product_id=${product.productId}</@ofbizUrl>"
 class="buttontext">${uiLabelMap.ProductBeTheFirstToReviewThisProduct}</a>
+        <table border="0" cellpadding="0" cellspacing='0'>
+          <tr>
+            <td>
+              <div>${uiLabelMap.CommonBy}:
+                <#if productReview.postedAnonymous?default("N") == "Y">
+                ${uiLabelMap.OrderAnonymous}
+                <#else>
+                ${postedPerson.firstName} ${postedPerson.lastName}
+                </#if>
+              </div>
+            </td>
+            <td>
+              <div>${uiLabelMap.CommonOn}: 
${productReview.postedDateTime!}</div>
+            </td>
+            <td>
+              <div>${uiLabelMap.OrderRanking}: 
${productReview.productRating!?string}</div>
+            </td>
+          </tr>
+          <tr>
+            <td colspan="3">
+              <div>&nbsp;</div>
+            </td>
+          </tr>
+          <tr>
+            <td colspan="3">
+              <div>${productReview.productReview!}</div>
+            </td>
+          </tr>
+        </table>
       </td>
     </tr>
+  </#list>
+  <tr>
+    <td colspan="2">
+      <a 
href="<@ofbizUrl>reviewProduct?category_id=${categoryId!}&amp;product_id=${product.productId}</@ofbizUrl>"
+         class="buttontext">${uiLabelMap.ProductReviewThisProduct}!</a>
+    </td>
+  </tr>
+<#else>
+  <tr>
+    <td colspan="2">
+      <div>${uiLabelMap.ProductProductNotReviewedYet}.</div>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2">
+      <a 
href="<@ofbizUrl>reviewProduct?category_id=${categoryId!}&amp;product_id=${product.productId}</@ofbizUrl>"
+         
class="buttontext">${uiLabelMap.ProductBeTheFirstToReviewThisProduct}</a>
+    </td>
+  </tr>
 </table>
 </#if>
 
 <#-- Upgrades/Up-Sell/Cross-Sell -->
-  <#macro associated assocProducts beforeName showName afterName 
formNamePrefix targetRequestName>
+<#macro associated assocProducts beforeName showName afterName formNamePrefix 
targetRequestName>
   <#assign targetRequest = "product">
   <#if targetRequestName?has_content>
     <#assign targetRequest = targetRequestName>
   </#if>
   <#if assocProducts?has_content>
-    <tr><td>&nbsp;</td></tr>
-    <tr><td colspan="2"><h2>${beforeName!}<#if showName == 
"Y">${productContentWrapper.get("PRODUCT_NAME", 
"html")!}</#if>${afterName!}</h2></td></tr>
+    <tr>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td colspan="2">
+        <h2>${beforeName!}<#if showName == 
"Y">${productContentWrapper.get("PRODUCT_NAME", 
"html")!}</#if>${afterName!}</h2>
+      </td>
+    </tr>
 
     <#list assocProducts as productAssoc>
-      <tr><td>
-        <div>
-          <a href='<@ofbizUrl>${targetRequest}/<#if 
categoryId??>~category_id=${categoryId}/</#if>~product_id=${productAssoc.productIdTo!}</@ofbizUrl>'
 class="buttontext">
+      <tr>
+        <td>
+          <div>
+            <a href='<@ofbizUrl>${targetRequest}/<#if 
categoryId??>~category_id=${categoryId}/</#if>~product_id=${productAssoc.productIdTo!}</@ofbizUrl>'
+               class="buttontext">
             ${productAssoc.productIdTo!}
-          </a>
-          - ${productAssoc.reason!}
-        </div>
-      </td></tr>
-      ${setRequestAttribute("optProductId", productAssoc.productIdTo)}
-      ${setRequestAttribute("listIndex", listIndex)}
-      ${setRequestAttribute("formNamePrefix", formNamePrefix)}
+            </a>
+            - ${productAssoc.reason!}
+          </div>
+        </td>
+      </tr>
+    ${setRequestAttribute("optProductId", productAssoc.productIdTo)}
+    ${setRequestAttribute("listIndex", listIndex)}
+    ${setRequestAttribute("formNamePrefix", formNamePrefix)}
       <#if targetRequestName?has_content>
-        ${setRequestAttribute("targetRequestName", targetRequestName)}
+      ${setRequestAttribute("targetRequestName", targetRequestName)}
       </#if>
       <tr>
         <td>
-          ${screens.render(productsummaryScreen)}
+        ${screens.render(productsummaryScreen)}
         </td>
       </tr>
       <#local listIndex = listIndex + 1>
 
     </#list>
-    ${setRequestAttribute("optProductId", "")}
-    ${setRequestAttribute("formNamePrefix", "")}
-    ${setRequestAttribute("targetRequestName", "")}
+  ${setRequestAttribute("optProductId", "")}
+  ${setRequestAttribute("formNamePrefix", "")}
+  ${setRequestAttribute("targetRequestName", "")}
   </#if>
 </#macro>
 <#assign productValue = product>
 <#assign listIndex = 1>
 ${setRequestAttribute("productValue", productValue)}
 
-<table >
+  <table>
   <#-- obsolete -->
-  <@associated assocProducts=obsoleteProducts beforeName="" showName="Y" 
afterName=" is made obsolete by these products:" formNamePrefix="obs" 
targetRequestName=""/>
+  <@associated assocProducts=obsoleteProducts beforeName="" showName="Y"
+      afterName=" is made obsolete by these products:" formNamePrefix="obs" 
targetRequestName=""/>
   <#-- cross sell -->
-  <@associated assocProducts=crossSellProducts beforeName="" showName="N" 
afterName="You might be interested in these as well:" formNamePrefix="cssl" 
targetRequestName="crosssell"/>
+  <@associated assocProducts=crossSellProducts beforeName="" showName="N"
+      afterName="You might be interested in these as well:" 
formNamePrefix="cssl" targetRequestName="crosssell"/>
   <#-- up sell -->
-  <@associated assocProducts=upSellProducts beforeName="Try these instead of " 
showName="Y" afterName=":" formNamePrefix="upsl" targetRequestName="upsell"/>
+  <@associated assocProducts=upSellProducts beforeName="Try these instead of " 
showName="Y" afterName=":"
+      formNamePrefix="upsl" targetRequestName="upsell"/>
   <#-- obsolescence -->
-  <@associated assocProducts=obsolenscenseProducts beforeName="" showName="Y" 
afterName=" makes these products obsolete:" formNamePrefix="obce" 
targetRequestName=""/>
-</table>
+  <@associated assocProducts=obsolenscenseProducts beforeName="" showName="Y"
+      afterName=" makes these products obsolete:" formNamePrefix="obce" 
targetRequestName=""/>
+  </table>
 
 <#-- special cross/up-sell area using commonFeatureResultIds (from common 
feature product search) -->
 <#if commonFeatureResultIds?has_content>
@@ -720,14 +810,14 @@ ${setRequestAttribute("productValue", pr
 
   <#list commonFeatureResultIds as commonFeatureResultId>
     <div>
-      ${setRequestAttribute("optProductId", commonFeatureResultId)}
+    ${setRequestAttribute("optProductId", commonFeatureResultId)}
       ${setRequestAttribute("listIndex", commonFeatureResultId_index)}
       ${setRequestAttribute("formNamePrefix", "cfeatcssl")}
       <#-- ${setRequestAttribute("targetRequestName", targetRequestName)} -->
       ${screens.render(productsummaryScreen)}
     </div>
     <#if commonFeatureResultId_has_next>
-      <hr />
+      <hr/>
     </#if>
   </#list>
 </#if>

Modified: ofbiz/trunk/specialpurpose/ecommerce/template/catalog/DetailImage.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/catalog/DetailImage.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/template/catalog/DetailImage.ftl 
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/template/catalog/DetailImage.ftl Sat 
Sep 17 07:17:15 2016
@@ -18,15 +18,15 @@ under the License.
 -->
 <html>
   <body>
-      <#if requestParameters.detail?has_content>
-        <#--assign detailImage = 
Static["org.apache.ofbiz.base.util.Base64"].base64Decode(requestParameters.detail)-->
-        <img src="${requestParameters.detail}" alt="" />
-      <#else>
-        <script language="JavaScript" type="text/javascript">
+    <#if requestParameters.detail?has_content>
+      <#--assign detailImage = 
Static["org.apache.ofbiz.base.util.Base64"].base64Decode(requestParameters.detail)-->
+      <img src="${requestParameters.detail}" alt=""/>
+    <#else>
+    <script language="JavaScript" type="text/javascript">
         <!-- //
             window.close();
         // -->
-        </script>
-      </#if>
+    </script>
+    </#if>
   </body>
 </html>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LastViewedProducts.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LastViewedProducts.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LastViewedProducts.ftl 
(original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LastViewedProducts.ftl 
Sat Sep 17 07:17:15 2016
@@ -20,14 +20,13 @@ under the License.
   <tr>
     <td colspan="2">
       <h1>
-       ${uiLabelMap.ProductProductsLastViewed}
+        ${uiLabelMap.ProductProductsLastViewed}
       </h1>
     </td>
   </tr>
 </table>
 
 <#if sessionAttributes.lastViewedProducts?? && 
sessionAttributes.lastViewedProducts?has_content>
-
   <table>
     <#list sessionAttributes.lastViewedProducts as productId>
       <tr>
@@ -39,13 +38,12 @@ under the License.
       </tr>
     </#list>
   </table>
-
 <#else>
-<table>
-  <tr>
-    <td>
-      <div class='tabletext'>${uiLabelMap.ProductNotViewedAnyProducts}.</div>
-    </td>
-  </tr>
-</table>
+  <table>
+    <tr>
+      <td>
+        <div class='tabletext'>${uiLabelMap.ProductNotViewedAnyProducts}.</div>
+      </td>
+    </tr>
+  </table>
 </#if>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LayeredCategoryDetail.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LayeredCategoryDetail.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LayeredCategoryDetail.ftl 
(original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LayeredCategoryDetail.ftl 
Sat Sep 17 07:17:15 2016
@@ -18,90 +18,99 @@ under the License.
 -->
 
 <#macro paginationControls>
-    <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 
1)?double / viewSize?double)>
-      <#if (viewIndexMax?int > 0)>
-        <div class="product-prevnext">
-            <#-- Start Page Select Drop-Down -->
-            <select name="pageSelect" 
onchange="window.location=this[this.selectedIndex].value;">
-                <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int + 
1} ${uiLabelMap.CommonOf} ${viewIndexMax + 1}</option>
-                <#list 0..viewIndexMax as curViewNum>
-                     <option 
value="<@ofbizUrl>category/~category_id=${productCategoryId}/~searchCategoryId=${currentSearchCategory.productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${curViewNum?int}/~clearSearch=N</@ofbizUrl>">${uiLabelMap.CommonGotoPage}
 ${curViewNum + 1}</option>
-                </#list>
-            </select>
-            <#-- End Page Select Drop-Down -->
-            <#if (0 < viewIndex?int)>
-                <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}/~searchCategoryId=${currentSearchCategory.productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int
 - 1}/~clearSearch=N</@ofbizUrl>" 
class="buttontext">${uiLabelMap.CommonPrevious}</a> |
-            </#if>
-            <#if ((listSize?int - viewSize?int) > 0)>
-                <span>${lowIndex + 1} - ${highIndex} ${uiLabelMap.CommonOf} 
${listSize}</span>
-            </#if>
-            <#if highIndex?int < listSize?int>
-             | <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}/~searchCategoryId=${currentSearchCategory.productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int
 + 1}/~clearSearch=N</@ofbizUrl>" 
class="buttontext">${uiLabelMap.CommonNext}</a>
-            </#if>
-        </div>
-    </#if>
+  <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 1)?double 
/ viewSize?double)>
+  <#if (viewIndexMax?int > 0)>
+    <div class="product-prevnext">
+      <#-- Start Page Select Drop-Down -->
+      <select name="pageSelect" 
onchange="window.location=this[this.selectedIndex].value;">
+        <option value="#">
+          ${uiLabelMap.CommonPage} ${viewIndex?int + 1} ${uiLabelMap.CommonOf} 
${viewIndexMax + 1}
+        </option>
+        <#list 0..viewIndexMax as curViewNum>
+          <option
+              
value="<@ofbizUrl>category/~category_id=${productCategoryId}/~searchCategoryId=${currentSearchCategory.productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${curViewNum?int}/~clearSearch=N</@ofbizUrl>">
+            ${uiLabelMap.CommonGotoPage} ${curViewNum + 1}
+          </option>
+        </#list>
+      </select>
+      <#-- End Page Select Drop-Down -->
+      <#if (0 < viewIndex?int)>
+        <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}/~searchCategoryId=${currentSearchCategory.productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int
 - 1}/~clearSearch=N</@ofbizUrl>"
+            class="buttontext">${uiLabelMap.CommonPrevious}</a> |
+      </#if>
+      <#if ((listSize?int - viewSize?int) > 0)>
+        <span>${lowIndex + 1} - ${highIndex} ${uiLabelMap.CommonOf} 
${listSize}</span>
+      </#if>
+      <#if highIndex?int < listSize?int>
+        | <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}/~searchCategoryId=${currentSearchCategory.productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int
 + 1}/~clearSearch=N</@ofbizUrl>"
+              class="buttontext">
+            ${uiLabelMap.CommonNext}
+          </a>
+      </#if>
+    </div>
+  </#if>
 </#macro>
 
 
 <#if productCategory??>
-    <#assign categoryName = categoryContentWrapper.get("CATEGORY_NAME", 
"html")!/>
-    <#assign categoryDescription = categoryContentWrapper.get("DESCRIPTION", 
"html")!/>
-    <#if categoryName?has_content>
-        <h1>${categoryName}</h1>
-    </#if>
-    <#if categoryDescription?has_content>
-        <h1>${categoryDescription}</h1>
-    </#if>
-    <#assign longDescription = categoryContentWrapper.get("LONG_DESCRIPTION", 
"html")!/>
-    <#assign categoryImageUrl = 
categoryContentWrapper.get("CATEGORY_IMAGE_URL", "url")!/>
-    <#if categoryImageUrl?string?has_content || longDescription?has_content>
-      <div>
-        <#if categoryImageUrl?string?has_content>
-          <#assign height=100/>
-          <img src='<@ofbizContentUrl>${categoryImageUrl}</@ofbizContentUrl>' 
vspace='5' hspace='5' border='1' height='${height}' align='left' alt="" />
-        </#if>
-        <#if longDescription?has_content>
-          ${longDescription}
-        </#if>
-      </div>
+  <#assign categoryName = categoryContentWrapper.get("CATEGORY_NAME", 
"html")!/>
+  <#assign categoryDescription = categoryContentWrapper.get("DESCRIPTION", 
"html")!/>
+  <#if categoryName?has_content>
+    <h1>${categoryName}</h1>
+  </#if>
+  <#if categoryDescription?has_content>
+    <h1>${categoryDescription}</h1>
+  </#if>
+  <#assign longDescription = categoryContentWrapper.get("LONG_DESCRIPTION", 
"html")!/>
+  <#assign categoryImageUrl = categoryContentWrapper.get("CATEGORY_IMAGE_URL", 
"url")!/>
+  <#if categoryImageUrl?string?has_content || longDescription?has_content>
+    <div>
+      <#if categoryImageUrl?string?has_content>
+        <#assign height=100/>
+        <img src='<@ofbizContentUrl>${categoryImageUrl}</@ofbizContentUrl>' 
vspace='5' hspace='5'
+            border='1' height='${height}' align='left' alt="" />
+      </#if>
+      <#if longDescription?has_content>
+        ${longDescription}
+      </#if>
+    </div>
   </#if>
 </#if>
 
 <#if productIds?has_content>
-    <@paginationControls/>
-      <#assign numCol = numCol?default(1)>
-      <#assign numCol = numCol?number>
-      <#assign tabCol = 1>
-      <div
-      <#if categoryImageUrl?string?has_content>
-        style="position: relative; margin-top: ${height}px;"
-      </#if>
-      class="productsummary-container<#if (numCol?int > 1)> matrix</#if>">
+  <@paginationControls/>
+    <#assign numCol = numCol?default(1)>
+    <#assign numCol = numCol?number>
+    <#assign tabCol = 1>
+    <div
+        <#if categoryImageUrl?string?has_content>
+        style="position: relative; margin-top: ${height}px;"</#if>
+        class="productsummary-container<#if (numCol?int > 1)> matrix</#if>">
       <#if (numCol?int > 1)>
         <table>
       </#if>
-        <#list productIds as productId>
-          <#if (numCol?int == 1)>
-            ${setRequestAttribute("optProductId", productId)}
-            ${setRequestAttribute("listIndex", productId_index)}
-            ${screens.render(productsummaryScreen)}
-          <#else>
-              <#if (tabCol?int = 1)><tr></#if>
-                  <td>
-                      ${setRequestAttribute("optProductId", productId)}
-                      ${setRequestAttribute("listIndex", productId_index)}
-                      ${screens.render(productsummaryScreen)}
-                  </td>
-              <#if (tabCol?int = numCol)></tr></#if>
-              <#assign tabCol = tabCol+1><#if (tabCol?int > numCol)><#assign 
tabCol = 1></#if>
-           </#if>
-        </#list>
+      <#list productIds as productId>
+        <#if (numCol?int == 1)>
+          ${setRequestAttribute("optProductId", productId)}
+          ${setRequestAttribute("listIndex", productId_index)}
+          ${screens.render(productsummaryScreen)}
+        <#else>
+          <#if (tabCol?int = 1)><tr></#if>
+            <td>
+              ${setRequestAttribute("optProductId", productId)}
+              ${setRequestAttribute("listIndex", productId_index)}
+              ${screens.render(productsummaryScreen)}
+            </td>
+          <#if (tabCol?int = numCol)></tr></#if>
+          <#assign tabCol = tabCol+1><#if (tabCol?int > numCol)><#assign 
tabCol = 1></#if>
+        </#if>
+      </#list>
       <#if (numCol?int > 1)>
         </table>
       </#if>
-      </div>
-    <@paginationControls/>
+    </div>
+  <@paginationControls/>
 <#else>
-    <hr />
-    <div>${uiLabelMap.ProductNoProductsInThisCategory}</div>
+  <hr />
+  <div>${uiLabelMap.ProductNoProductsInThisCategory}</div>
 </#if>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LayeredNavBar.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LayeredNavBar.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LayeredNavBar.ftl 
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/template/catalog/LayeredNavBar.ftl Sat 
Sep 17 07:17:15 2016
@@ -29,14 +29,24 @@ under the License.
         <#assign currentSearchCategoryName = 
categoryContentWrapper.get("CATEGORY_NAME", "html")?string />
         <#list searchConstraintStrings as searchConstraintString>
           <#if searchConstraintString.indexOf(currentSearchCategoryName) != -1>
-            <div id="searchConstraints">&nbsp;<a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?removeConstraint=${searchConstraintString_index}&amp;clearSearch=N<#if
 
previousCategoryId??>&amp;searchCategoryId=${previousCategoryId}</#if></@ofbizUrl>"
 
class="buttontext">X</a><#noescape>&nbsp;${searchConstraintString}</#noescape></div>
+            <div id="searchConstraints">&nbsp;
+              <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?removeConstraint=${searchConstraintString_index}&amp;clearSearch=N<#if
 
previousCategoryId??>&amp;searchCategoryId=${previousCategoryId}</#if></@ofbizUrl>"
+                  class="buttontext">X</a>
+                <#noescape>&nbsp;${searchConstraintString}</#noescape>
+            </div>
           </#if>
         </#list>
       </#if>
     </#escape>
     <#list searchConstraintStrings as searchConstraintString>
       <#if searchConstraintString.indexOf("Category: ") = -1 && 
searchConstraintString != "Exclude Variants">
-        <div id="searchConstraints">&nbsp;<a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?removeConstraint=${searchConstraintString_index}&amp;clearSearch=N<#if
 
currentSearchCategory??>&amp;searchCategoryId=${currentSearchCategory.productCategoryId}</#if></@ofbizUrl>"
 class="buttontext">X</a>&nbsp;${searchConstraintString}</div>
+        <div id="searchConstraints">&nbsp;
+          <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?removeConstraint=${searchConstraintString_index}&amp;clearSearch=N<#if
 
currentSearchCategory??>&amp;searchCategoryId=${currentSearchCategory.productCategoryId}</#if></@ofbizUrl>"
+              class="buttontext">
+            X
+          </a>&nbsp;
+          ${searchConstraintString}
+        </div>
       </#if>
     </#list>
     <#if showSubCats>
@@ -46,7 +56,11 @@ under the License.
           <#list subCategoryList as category>
             <#assign subCategoryContentWrapper = 
category.categoryContentWrapper />
             <#assign categoryName = 
subCategoryContentWrapper.get("CATEGORY_NAME", "html")!?string />
-            <li><a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?SEARCH_CATEGORY_ID${index}=${category.productCategoryId}&amp;searchCategoryId=${category.productCategoryId}&amp;clearSearch=N</@ofbizUrl>">${categoryName!}
 (${category.count})</a></li>
+            <li>
+              <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?SEARCH_CATEGORY_ID${index}=${category.productCategoryId}&amp;searchCategoryId=${category.productCategoryId}&amp;clearSearch=N</@ofbizUrl>">
+                ${categoryName!} (${category.count})
+              </a>
+            </li>
           </#list>
         </ul>
       </div>
@@ -56,7 +70,11 @@ under the License.
         <strong>${colorFeatureType.description}</strong>
         <ul>
           <#list colors as color>
-            <li><a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?pft_${color.productFeatureTypeId}=${color.productFeatureId}&amp;clearSearch=N<#if
 
currentSearchCategory??>&amp;searchCategoryId=${currentSearchCategory.productCategoryId}</#if></@ofbizUrl>">${color.description}
 (${color.featureCount})</a></li>
+            <li>
+              <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?pft_${color.productFeatureTypeId}=${color.productFeatureId}&amp;clearSearch=N<#if
 
currentSearchCategory??>&amp;searchCategoryId=${currentSearchCategory.productCategoryId}</#if></@ofbizUrl>">
+                ${color.description} (${color.featureCount})
+              </a>
+            </li>
           </#list>
         </ul>
       </div>
@@ -66,7 +84,11 @@ under the License.
         <strong>${uiLabelMap.EcommercePriceRange}</strong>
         <ul>
           <#list priceRangeList as priceRange>
-            <li><a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?LIST_PRICE_LOW=${priceRange.low}&amp;LIST_PRICE_HIGH=${priceRange.high}&amp;clearSearch=N<#if
 
currentSearchCategory??>&amp;searchCategoryId=${currentSearchCategory.productCategoryId}</#if></@ofbizUrl>"><@ofbizCurrency
 amount=priceRange.low /> - <@ofbizCurrency amount=priceRange.high /> 
(${priceRange.count})</a><li>
+            <li>
+              <a 
href="<@ofbizUrl>category/~category_id=${productCategoryId}?LIST_PRICE_LOW=${priceRange.low}&amp;LIST_PRICE_HIGH=${priceRange.high}&amp;clearSearch=N<#if
 
currentSearchCategory??>&amp;searchCategoryId=${currentSearchCategory.productCategoryId}</#if></@ofbizUrl>">
+                <@ofbizCurrency amount=priceRange.low /> - <@ofbizCurrency 
amount=priceRange.high /> (${priceRange.count})
+              </a>
+            <li>
           </#list>
         </ul>
       </div>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/MiniAssocProds.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/catalog/MiniAssocProds.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/template/catalog/MiniAssocProds.ftl 
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/template/catalog/MiniAssocProds.ftl 
Sat Sep 17 07:17:15 2016
@@ -17,22 +17,23 @@ specific language governing permissions
 under the License.
 -->
 
-<#assign associatedProducts = 
Static["org.apache.ofbiz.order.shoppingcart.product.ProductDisplayWorker"].getRandomCartProductAssoc(request,
 true)!>
+<#assign associatedProducts = 
Static["org.apache.ofbiz.order.shoppingcart.product.ProductDisplayWorker"]
+    .getRandomCartProductAssoc(request, true)!>
 <#if associatedProducts?has_content>
-<div id="miniassocproducts" class="screenlet">
+  <div id="miniassocproducts" class="screenlet">
     <h3>${uiLabelMap.EcommerceYouMightLike}...</h3>
     <div class="screenlet-body">
-        <#-- random complementary products -->
-        <ul class="browsecategorylist">
+    <#-- random complementary products -->
+      <ul class="browsecategorylist">
         <#list associatedProducts as miniProduct>
-            <li class="browsecategorytext">
-                ${setRequestAttribute("miniProdQuantity", 1)}
-                ${setRequestAttribute("miniProdFormName", "theminiassocprod" + 
miniProduct_index + "form")}
-                ${setRequestAttribute("optProductId", miniProduct.productId)}
-                
${screens.render("component://ecommerce/widget/CatalogScreens.xml#miniproductsummary")}
-            </li>
+          <li class="browsecategorytext">
+            ${setRequestAttribute("miniProdQuantity", 1)}
+            ${setRequestAttribute("miniProdFormName", "theminiassocprod" + 
miniProduct_index + "form")}
+            ${setRequestAttribute("optProductId", miniProduct.productId)}
+            
${screens.render("component://ecommerce/widget/CatalogScreens.xml#miniproductsummary")}
+          </li>
         </#list>
-        </ul>
+      </ul>
     </div>
-</div>
+  </div>
 </#if>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/MiniLastProductSearches.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/catalog/MiniLastProductSearches.ftl?rev=1761135&r1=1761134&r2=1761135&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/MiniLastProductSearches.ftl
 (original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/template/catalog/MiniLastProductSearches.ftl
 Sat Sep 17 07:17:15 2016
@@ -18,34 +18,45 @@ under the License.
 -->
 
 <#assign maxToShow = 4/>
-<#assign searchOptionsHistoryList = 
Static["org.apache.ofbiz.product.product.ProductSearchSession"].getSearchOptionsHistoryList(session)!/>
+<#assign searchOptionsHistoryList = 
Static["org.apache.ofbiz.product.product.ProductSearchSession"]
+    .getSearchOptionsHistoryList(session)!/>
 <#if searchOptionsHistoryList?has_content>
-    <#if (searchOptionsHistoryList?size > maxToShow)><#assign 
limit=maxToShow/><#else><#assign limit=(searchOptionsHistoryList?size-1)/></#if>
-    <div id="minilastproductsearches" class="screenlet">
-      <div class="boxlink">
-        <a href="<@ofbizUrl>clearLastViewed</@ofbizUrl>" 
class="lightbuttontextsmall">[${uiLabelMap.CommonClear}]</a>
-        <#if (searchOptionsHistoryList?size > maxToShow)>
-          <a href="<@ofbizUrl>advancedsearch</@ofbizUrl>" 
class="lightbuttontextsmall">[${uiLabelMap.CommonMore}]</a>
-        </#if>
-      </div>
-      <h3>${uiLabelMap.OrderLastSearches}...</h3>
-      <ul>
-        <#list searchOptionsHistoryList[0..limit] as searchOptions>
-          <#-- searchOptions type is ProductSearchSession.ProductSearchOptions 
-->
-          <li>
-          ${uiLabelMap.EcommerceSearchNumber} ${searchOptions_index + 1}
-            <ul>
-              <li>
-                <a 
href="<@ofbizUrl>setCurrentSearchFromHistoryAndSearch?searchHistoryIndex=${searchOptions_index}&amp;clearSearch=N</@ofbizUrl>"
 class="button">${uiLabelMap.CommonSearch}</a>
-                <a 
href="<@ofbizUrl>setCurrentSearchFromHistory?searchHistoryIndex=${searchOptions_index}</@ofbizUrl>"
 class="button">${uiLabelMap.CommonRefine}</a>
-              </li>
-              <#assign constraintStrings = 
searchOptions.searchGetConstraintStrings(false, delegator, locale)>
-              <#list constraintStrings as constraintString>
-                <li>${constraintString}</li>
-                </#list>
-            </ul>
-          </li>
-        </#list>
-      </ul>
+  <#if (searchOptionsHistoryList?size > maxToShow)>
+    <#assign limit=maxToShow/>
+  <#else>
+    <#assign limit=(searchOptionsHistoryList?size-1)/>
+  </#if>
+  <div id="minilastproductsearches" class="screenlet">
+    <div class="boxlink">
+      <a href="<@ofbizUrl>clearLastViewed</@ofbizUrl>" 
class="lightbuttontextsmall">
+        [${uiLabelMap.CommonClear}]
+      </a>
+      <#if (searchOptionsHistoryList?size > maxToShow)>
+        <a href="<@ofbizUrl>advancedsearch</@ofbizUrl>" 
class="lightbuttontextsmall">
+          [${uiLabelMap.CommonMore}]
+        </a>
+      </#if>
     </div>
+    <h3>${uiLabelMap.OrderLastSearches}...</h3>
+    <ul>
+      <#list searchOptionsHistoryList[0..limit] as searchOptions>
+        <#-- searchOptions type is ProductSearchSession.ProductSearchOptions 
-->
+        <li>
+          ${uiLabelMap.EcommerceSearchNumber} ${searchOptions_index + 1}
+          <ul>
+            <li>
+              <a 
href="<@ofbizUrl>setCurrentSearchFromHistoryAndSearch?searchHistoryIndex=${searchOptions_index}&amp;clearSearch=N</@ofbizUrl>"
+                  class="button">${uiLabelMap.CommonSearch}</a>
+              <a 
href="<@ofbizUrl>setCurrentSearchFromHistory?searchHistoryIndex=${searchOptions_index}</@ofbizUrl>"
+                  class="button">${uiLabelMap.CommonRefine}</a>
+            </li>
+            <#assign constraintStrings = 
searchOptions.searchGetConstraintStrings(false, delegator, locale)>
+            <#list constraintStrings as constraintString>
+              <li>${constraintString}</li>
+            </#list>
+          </ul>
+        </li>
+      </#list>
+    </ul>
+  </div>
 </#if>


Reply via email to