Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl Sat Aug 16 11:34:57 2014 @@ -67,31 +67,31 @@ under the License. </#macro> -<#if productCategory?exists> - <#assign categoryName = categoryContentWrapper.get("CATEGORY_NAME")?if_exists/> - <#assign categoryDescription = categoryContentWrapper.get("DESCRIPTION")?if_exists/> +<#if productCategory??> + <#assign categoryName = categoryContentWrapper.get("CATEGORY_NAME")!/> + <#assign categoryDescription = categoryContentWrapper.get("DESCRIPTION")!/> <#if categoryName?has_content> <h1>${categoryName}</h1> </#if> <#if categoryDescription?has_content> <h1>${categoryDescription}</h1> </#if> - <#if hasQuantities?exists> - <form method="post" action="<@ofbizUrl>addCategoryDefaults<#if requestAttributes._CURRENT_VIEW_?exists>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>" name="thecategoryform" style='margin: 0;'> + <#if hasQuantities??> + <form method="post" action="<@ofbizUrl>addCategoryDefaults<#if requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>" name="thecategoryform" style='margin: 0;'> <input type='hidden' name='add_category_id' value='${productCategory.productCategoryId}'/> - <#if requestParameters.product_id?exists><input type='hidden' name='product_id' value='${requestParameters.product_id}'/></#if> - <#if requestParameters.category_id?exists><input type='hidden' name='category_id' value='${requestParameters.category_id}'/></#if> - <#if requestParameters.VIEW_INDEX?exists><input type='hidden' name='VIEW_INDEX' value='${requestParameters.VIEW_INDEX}'/></#if> - <#if requestParameters.SEARCH_STRING?exists><input type='hidden' name='SEARCH_STRING' value='${requestParameters.SEARCH_STRING}'/></#if> - <#if requestParameters.SEARCH_CATEGORY_ID?exists><input type='hidden' name='SEARCH_CATEGORY_ID' value='${requestParameters.SEARCH_CATEGORY_ID}'/></#if> + <#if requestParameters.product_id??><input type='hidden' name='product_id' value='${requestParameters.product_id}'/></#if> + <#if requestParameters.category_id??><input type='hidden' name='category_id' value='${requestParameters.category_id}'/></#if> + <#if requestParameters.VIEW_INDEX??><input type='hidden' name='VIEW_INDEX' value='${requestParameters.VIEW_INDEX}'/></#if> + <#if requestParameters.SEARCH_STRING??><input type='hidden' name='SEARCH_STRING' value='${requestParameters.SEARCH_STRING}'/></#if> + <#if requestParameters.SEARCH_CATEGORY_ID??><input type='hidden' name='SEARCH_CATEGORY_ID' value='${requestParameters.SEARCH_CATEGORY_ID}'/></#if> <a href="javascript:document.thecategoryform.submit()" class="buttontext"><span style="white-space: nowrap;">${uiLabelMap.ProductAddProductsUsingDefaultQuantities}</span></a> </form> </#if> <#if searchInCategory?default("Y") == "Y"> <a href="<@ofbizUrl>advancedsearch?SEARCH_CATEGORY_ID=${productCategory.productCategoryId}</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductSearchInCategory}</a> </#if> - <#assign longDescription = categoryContentWrapper.get("LONG_DESCRIPTION")?if_exists/> - <#assign categoryImageUrl = categoryContentWrapper.get("CATEGORY_IMAGE_URL")?if_exists/> + <#assign longDescription = categoryContentWrapper.get("LONG_DESCRIPTION")!/> + <#assign categoryImageUrl = categoryContentWrapper.get("CATEGORY_IMAGE_URL")!/> <#if categoryImageUrl?string?has_content || longDescription?has_content> <div> <#if categoryImageUrl?string?has_content> @@ -116,11 +116,11 @@ under the License. <#if productCategoryMembers?has_content> <#-- Pagination --> - <#if paginateEcommerceStyle?exists> + <#if paginateEcommerceStyle??> <@paginationControls/> <#else> <#include "component://common/webcommon/includes/htmlTemplate.ftl"/> - <#assign commonUrl = "category?category_id="+ parameters.category_id?if_exists + "&"/> + <#assign commonUrl = "category?category_id="+ parameters.category_id! + "&"/> <#--assign viewIndex = viewIndex - 1/--> <#assign viewIndexFirst = 0/> <#assign viewIndexPrevious = viewIndex - 1/> @@ -163,7 +163,7 @@ under the License. </table> </#if> </div> - <#if paginateEcommerceStyle?exists> + <#if paginateEcommerceStyle??> <@paginationControls/> </#if> <#else> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl Sat Aug 16 11:34:57 2014 @@ -31,41 +31,41 @@ under the License. <#assign smallImageUrl = "/images/defaultImage.jpg"/> </#if> <td style="width:${tdWidth?c}%;"> - <img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${smallImageUrl}</@ofbizContentUrl>" alt="Small Image"/><br /> + <img src="<@ofbizContentUrl>${contentPathPrefix!}${smallImageUrl}</@ofbizContentUrl>" alt="Small Image"/><br /> ${productContentWrapper.get("PRODUCT_NAME")}<br /> - <#if totalPrice?exists> + <#if totalPrice??> <div>${uiLabelMap.ProductAggregatedPrice}: <span class='basePrice'><@ofbizCurrency amount=totalPrice isoCode=totalPrice.currencyUsed/></span></div> <#else> - <#if price.isSale?exists && price.isSale> + <#if price.isSale?? && price.isSale> <#assign priceStyle = "salePrice"> <#else> <#assign priceStyle = "regularPrice"> </#if> <#if (price.price?default(0) > 0 && product.requireAmount?default("N") == "N")> - <#if "Y" = product.isVirtual?if_exists> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> + <#if "Y" = product.isVirtual!> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> </#if> </#if> <div class="productbuy"> <#-- check to see if introductionDate hasn't passed yet --> - <#if product.introductionDate?exists && nowTimestamp.before(product.introductionDate)> + <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)> <div style="color: red;">${uiLabelMap.ProductNotYetAvailable}</div> <#-- check to see if salesDiscontinuationDate has passed --> - <#elseif product.salesDiscontinuationDate?exists && nowTimestamp.after(product.salesDiscontinuationDate)/> + <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)/> <div style="color: red;">${uiLabelMap.ProductNoLongerAvailable}</div> <#-- check to see if it is a rental item; will enter parameters on the detail screen--> - <#elseif product.productTypeId?if_exists == "ASSET_USAGE"/> + <#elseif product.productTypeId! == "ASSET_USAGE"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a> - <#elseif product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"/> + <#elseif product.productTypeId! == "ASSET_USAGE_OUT_IN"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderRent}...</a> <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> - <#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE"/> + <#elseif product.productTypeId! == "AGGREGATED" || product.productTypeId! == "AGGREGATED_SERVICE"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderConfigure}...</a> <#-- check to see if the product is a virtual product --> - <#elseif product.isVirtual?exists && product.isVirtual == "Y"/> + <#elseif product.isVirtual?? && product.isVirtual == "Y"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderChooseVariations}...</a> <#-- check to see if the product requires an amount --> - <#elseif product.requireAmount?exists && product.requireAmount == "Y"/> + <#elseif product.requireAmount?? && product.requireAmount == "Y"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderChooseAmount}...</a> <#else/> <form method="post" action="<@ofbizUrl secure="${request.isSecure()?string}">additem</@ofbizUrl>" name="compareFormAdd${product_index}"> @@ -75,10 +75,10 @@ under the License. </form> <a href="javascript:doPostViaParent('compareFormAdd${product_index}');" class="buttontext">${uiLabelMap.OrderAddToCart}</a> - <#if prodCatMem?exists && prodCatMem.quantity?exists && 0.00 < prodCatMem.quantity?double> + <#if prodCatMem?? && prodCatMem.quantity?? && 0.00 < prodCatMem.quantity?double> <form method="post" action="<@ofbizUrl secure="${request.isSecure()?string}">additem</@ofbizUrl>" name="compareFormAddDefault${product_index}" style="margin: 0;"> - <input type="hidden" name="add_product_id" value="${prodCatMem.productId?if_exists}"/> - <input type="hidden" name="quantity" value="${prodCatMem.quantity?if_exists}"/> + <input type="hidden" name="add_product_id" value="${prodCatMem.productId!}"/> + <input type="hidden" name="quantity" value="${prodCatMem.quantity!}"/> <input type="hidden" name="clearSearch" value="N"/> </form> <a href="javascript:doPostViaParent('compareFormAddDefault${product_index}');" class="buttontext">${uiLabelMap.CommonAddDefault}(${prodCatMem.quantity?string.number}) ${uiLabelMap.OrderToCart}</a> @@ -119,7 +119,7 @@ under the License. <td>${productFeatureType.get("description", locale)}</td> <#list compareList as product> <#assign productData = productDataMap[product.productId]/> - <#assign applMap = productData[productFeatureTypeId]?if_exists/> + <#assign applMap = productData[productFeatureTypeId]!/> <td> <#if applMap.STANDARD_FEATURE?has_content> <#assign features = applMap.STANDARD_FEATURE/> @@ -152,24 +152,24 @@ under the License. <td> <div class="productbuy"> <#-- check to see if introductionDate hasn't passed yet --> - <#if product.introductionDate?exists && nowTimestamp.before(product.introductionDate)> + <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)> <div style="color: red;">${uiLabelMap.ProductNotYetAvailable}</div> <#-- check to see if salesDiscontinuationDate has passed --> - <#elseif product.salesDiscontinuationDate?exists && nowTimestamp.after(product.salesDiscontinuationDate)/> + <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)/> <div style="color: red;">${uiLabelMap.ProductNoLongerAvailable}</div> <#-- check to see if it is a rental item; will enter parameters on the detail screen--> - <#elseif product.productTypeId?if_exists == "ASSET_USAGE"/> + <#elseif product.productTypeId! == "ASSET_USAGE"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a> - <#elseif product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"/> + <#elseif product.productTypeId! == "ASSET_USAGE_OUT_IN"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderRent}...</a> <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> - <#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE"/> + <#elseif product.productTypeId! == "AGGREGATED" || product.productTypeId! == "AGGREGATED_SERVICE"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderConfigure}...</a> <#-- check to see if the product is a virtual product --> - <#elseif product.isVirtual?exists && product.isVirtual == "Y"/> + <#elseif product.isVirtual?? && product.isVirtual == "Y"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderChooseVariations}...</a> <#-- check to see if the product requires an amount --> - <#elseif product.requireAmount?exists && product.requireAmount == "Y"/> + <#elseif product.requireAmount?? && product.requireAmount == "Y"/> <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderChooseAmount}...</a> <#else/> <form method="post" action="<@ofbizUrl secure="${request.isSecure()?string}">additem</@ofbizUrl>" name="compare2FormAdd${product_index}"> @@ -178,7 +178,7 @@ under the License. <input type="hidden" name="clearSearch" value="N"/> </form> <a href="javascript:doPostViaParent('compare2FormAdd${product_index}');" class="buttontext">${uiLabelMap.OrderAddToCart}</a> - <#if prodCatMem?exists && prodCatMem.quantity?exists && 0.00 < prodCatMem.quantity?double> + <#if prodCatMem?? && prodCatMem.quantity?? && 0.00 < prodCatMem.quantity?double> <a href="javascript:doPostViaParent('compareFormAddDefault${product_index}');" class="buttontext">${uiLabelMap.CommonAddDefault}(${prodCatMem.quantity?string.number}) ${uiLabelMap.OrderToCart}</a> </#if> </#if> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl Sat Aug 16 11:34:57 2014 @@ -17,12 +17,12 @@ specific language governing permissions under the License. --> <#-- variable setup --> -<#assign productContentWrapper = productContentWrapper?if_exists> -<#assign price = priceMap?if_exists> +<#assign productContentWrapper = productContentWrapper!> +<#assign price = priceMap!> <#-- end variable setup --> <#-- virtual product javascript --> -${virtualJavaScript?if_exists} +${virtualJavaScript!} <script language="JavaScript" type="text/javascript"> <!-- var detailImageUrl = null; @@ -37,7 +37,7 @@ ${virtualJavaScript?if_exists} } function isVirtual(product) { var isVirtual = false; - <#if virtualJavaScript?exists> + <#if virtualJavaScript??> for (i = 0; i < VIR.length; i++) { if (VIR[i] == product) { isVirtual = true; @@ -174,15 +174,15 @@ function getConfigDetails() { <table border="0" cellpadding="2" cellspacing="0" width="100%"> <#-- Category next/previous --> - <#if category?exists> + <#if category??> <tr> <td colspan="2" align="right"> - <#if previousProductId?exists> - <a href='<@ofbizUrl>product/~category_id=${categoryId?if_exists}/~product_id=${previousProductId?if_exists}</@ofbizUrl>' class="buttontext">${uiLabelMap.CommonPrevious}</a> | + <#if previousProductId??> + <a href='<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${previousProductId!}</@ofbizUrl>' class="buttontext">${uiLabelMap.CommonPrevious}</a> | </#if> - <a href="<@ofbizUrl>category/~category_id=${categoryId?if_exists}</@ofbizUrl>" class="buttontext">${(category.categoryName)?default(category.description)?if_exists}</a> - <#if nextProductId?exists> - | <a href='<@ofbizUrl>product/~category_id=${categoryId?if_exists}/~product_id=${nextProductId?if_exists}</@ofbizUrl>' class="buttontext">${uiLabelMap.CommonNext}</a> + <a href="<@ofbizUrl>category/~category_id=${categoryId!}</@ofbizUrl>" class="buttontext">${(category.categoryName)?default(category.description)!}</a> + <#if nextProductId??> + | <a href='<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${nextProductId!}</@ofbizUrl>' class="buttontext">${uiLabelMap.CommonNext}</a> </#if> </td> </tr> @@ -193,19 +193,19 @@ function getConfigDetails() { <#-- Product image/name/price --> <tr> <td valign="top" width="0"> - <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL")?if_exists> + <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_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?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>' name='mainImage' vspace='5' hspace='5' class='cssImgLarge' align='left' alt="" /></a> + <a href="javascript:popupDetail();"><img src='<@ofbizContentUrl>${contentPathPrefix!}${productLargeImageUrl!}</@ofbizContentUrl>' name='mainImage' vspace='5' hspace='5' class='cssImgLarge' align='left' alt="" /></a> </#if> </td> <td align="right" valign="top"> - <h2>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</h2> - <div>${productContentWrapper.get("DESCRIPTION")?if_exists}</div> - <div><b>${product.productId?if_exists}</b></div> + <h2>${productContentWrapper.get("PRODUCT_NAME")!}</h2> + <div>${productContentWrapper.get("DESCRIPTION")!}</div> + <div><b>${product.productId!}</b></div> <#-- example of showing a certain type of feature with the product --> <#if sizeProductFeatureAndAppls?has_content> <div> @@ -228,30 +228,30 @@ function getConfigDetails() { - if price < defaultPrice and defaultPrice < listPrice, show default - if isSale show price with salePrice style and print "On Sale!" --> - <#if totalPrice?exists> + <#if totalPrice??> <div>${uiLabelMap.ProductAggregatedPrice}: <span id='totalPrice' class='basePrice'><@ofbizCurrency amount=totalPrice isoCode=totalPrice.currencyUsed/></span></div> <#else> - <#if price.competitivePrice?exists && price.price?exists && price.price?double < price.competitivePrice?double> + <#if price.competitivePrice?? && price.price?? && price.price?double < price.competitivePrice?double> <div>${uiLabelMap.ProductCompareAtPrice}: <span class='basePrice'><@ofbizCurrency amount=price.competitivePrice isoCode=price.currencyUsed/></span></div> </#if> - <#if price.listPrice?exists && price.price?exists && price.price?double < price.listPrice?double> + <#if price.listPrice?? && price.price?? && price.price?double < price.listPrice?double> <div>${uiLabelMap.ProductListPrice}: <span class='basePrice'><@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed/></span></div> </#if> - <#if price.listPrice?exists && price.defaultPrice?exists && price.price?exists && price.price?double < price.defaultPrice?double && price.defaultPrice?double < price.listPrice?double> + <#if price.listPrice?? && price.defaultPrice?? && price.price?? && price.price?double < price.defaultPrice?double && price.defaultPrice?double < price.listPrice?double> <div>${uiLabelMap.ProductRegularPrice}: <span class='basePrice'><@ofbizCurrency amount=price.defaultPrice isoCode=price.currencyUsed/></span></div> </#if> <div> <b> - <#if price.isSale?exists && price.isSale> + <#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?if_exists> from </#if><span class='${priceStyle}'><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> + ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual!> from </#if><span class='${priceStyle}'><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> </b> </div> - <#if price.listPrice?exists && price.price?exists && price.price?double < price.listPrice?double> + <#if price.listPrice?? && price.price?? && price.price?double < price.listPrice?double> <#assign priceSaved = price.listPrice?double - price.price?double> <#assign percentSaved = (priceSaved?double / price.listPrice?double) * 100> <div>${uiLabelMap.OrderSave}: <span class="basePrice"><@ofbizCurrency amount=priceSaved isoCode=price.currencyUsed/> (${percentSaved?int}%)</span></div> @@ -259,22 +259,22 @@ function getConfigDetails() { </#if> <#-- Included quantities/pieces --> - <#if product.quantityIncluded?exists && product.quantityIncluded?double != 0> + <#if product.quantityIncluded?? && product.quantityIncluded?double != 0> <div>${uiLabelMap.OrderIncludes}: - ${product.quantityIncluded?if_exists} - ${product.quantityUomId?if_exists} + ${product.quantityIncluded!} + ${product.quantityUomId!} </div> </#if> - <#if product.piecesIncluded?exists && product.piecesIncluded?long != 0> + <#if product.piecesIncluded?? && product.piecesIncluded?long != 0> <div>${uiLabelMap.OrderPieces}: ${product.piecesIncluded} </div> </#if> - <#if daysToShip?exists> + <#if daysToShip??> <div><b>${uiLabelMap.ProductUsuallyShipsIn} <font color='red'>${daysToShip}</font> ${uiLabelMap.CommonDays}!<b></div> </#if> - <#if disFeatureList?exists && 0 < disFeatureList.size()> + <#if disFeatureList?? && 0 < disFeatureList.size()> <p> </p> <#list disFeatureList as currentFeature> <div> @@ -284,11 +284,11 @@ function getConfigDetails() { <div> </div> </#if> - <form method="post" action="<@ofbizUrl>additem<#if requestAttributes._CURRENT_VIEW_?exists>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>" name="addform" style='margin: 0;'> + <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?exists && product.isVirtual?upper_case == "Y"> - <#if variantTree?exists && 0 < variantTree.size()> + <#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);"> @@ -307,13 +307,13 @@ function getConfigDetails() { <#else> <input type='hidden' name="product_id" value='${product.productId}' /> <input type='hidden' name="add_product_id" value='${product.productId}' /> - <#if productNotAvailable?exists> + <#if productNotAvailable??> <#assign isStoreInventoryRequired = Static["org.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?if_exists}</b></div> + <div class='tabletext'><b>${product.inventoryMessage!}</b></div> </#if> </#if> </#if> @@ -321,11 +321,11 @@ function getConfigDetails() { </td></tr><tr><td colspan="2" align="right"> <#-- check to see if introductionDate hasn't passed yet --> - <#if product.introductionDate?exists && nowTimestamp.before(product.introductionDate)> + <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)> <p> </p> <div class='tabletext' style='color: red;'>${uiLabelMap.ProductProductNotYetMadeAvailable}.</div> <#-- check to see if salesDiscontinuationDate has passed --> - <#elseif product.salesDiscontinuationDate?exists && nowTimestamp.after(product.salesDiscontinuationDate)> + <#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> @@ -347,7 +347,7 @@ function getConfigDetails() { <input type="text" size="5" name="quantity" value="1" /> </#if> </#if> - <#if requestParameters.category_id?exists> + <#if requestParameters.category_id??> <input type='hidden' name='category_id' value='${requestParameters.category_id}' /> </#if> </#if> @@ -355,10 +355,10 @@ function getConfigDetails() { <div> <#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous"> <hr /> - <form name="addToShoppingList" method="post" action="<@ofbizUrl>addItemToShoppingList<#if requestAttributes._CURRENT_VIEW_?exists>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>"> + <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?if_exists}" /> + <input type="hidden" name="configId" value="${configId!}" /> <select name="shoppingListId"> <#if shoppingLists?has_content> <#list shoppingLists as shoppingList> @@ -378,12 +378,12 @@ function getConfigDetails() { </#if> </div> <#-- Prefill first select box (virtual products only) --> - <#if variantTree?exists && 0 < variantTree.size()> + <#if variantTree?? && 0 < variantTree.size()> <script language="JavaScript" type="text/javascript">eval("list" + "${featureOrderFirst}" + "()");</script> </#if> <#-- Swatches (virtual products only) --> - <#if variantSample?exists && 0 < variantSample.size()> + <#if variantSample?? && 0 < variantSample.size()> <#assign imageKeys = variantSample.keySet()> <#assign imageMap = variantSample> <p> </p> @@ -394,15 +394,15 @@ function getConfigDetails() { <#list imageKeys as key> <#assign swatchProduct = imageMap.get(key)> <#if swatchProduct?has_content && indexer < maxIndex> - <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request)?if_exists> + <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request)!> <#if !imageUrl?string?has_content> - <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_URL")?if_exists> + <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_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?if_exists}${imageUrl}</@ofbizContentUrl>" class='cssImgStandard' alt="" /></a> + <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix!}${imageUrl}</@ofbizContentUrl>" class='cssImgStandard' alt="" /></a> <br /> <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);" class="buttontext">${key}</a> </td> @@ -423,7 +423,7 @@ function getConfigDetails() { <#-- Long description of product --> <tr> <td colspan="2"> - <div>${productContentWrapper.get("LONG_DESCRIPTION")?if_exists}</div> + <div>${productContentWrapper.get("LONG_DESCRIPTION")!}</div> </td> </tr> @@ -433,7 +433,7 @@ function getConfigDetails() { <#-- Product Configurator --> <tr> <td colspan="2"> - <form name="configform" id="configFormId" method="post" action="<@ofbizUrl>product<#if requestAttributes._CURRENT_VIEW_?exists>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>"> + <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' /> @@ -456,14 +456,14 @@ function getConfigDetails() { <div>${question.question}</div> <#if question.isFirst()> <a name='#${question.getConfigItem().getString("configItemId")}'></a> - <div>${question.description?if_exists}</div> - <#assign instructions = question.content.get("INSTRUCTIONS")?if_exists> + <div>${question.description!}</div> + <#assign instructions = question.content.get("INSTRUCTIONS")!> <#if instructions?has_content> <a href="javascript:showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${instructions}");" class="buttontext">Instructions</a> </#if> - <#assign image = question.content.get("IMAGE_URL")?if_exists> + <#assign image = question.content.get("IMAGE_URL")!> <#if image?has_content> - <img src='<@ofbizContentUrl>${contentPathPrefix?if_exists}${image?if_exists}</@ofbizContentUrl>' vspace='5' hspace='5' class='cssImgSmall' align='left' alt="" /> + <img src='<@ofbizContentUrl>${contentPathPrefix!}${image!}</@ofbizContentUrl>' vspace='5' hspace='5' class='cssImgSmall' align='left' alt="" /> </#if> <#else> <div><a href='#${question.getConfigItem().getString("configItemId")}' class="buttontext">Details</a></div> @@ -478,20 +478,20 @@ function getConfigDetails() { <#assign optionCounter = 0> <#list options as option> <div>${option.description} <#if !option.isAvailable()> (*)</#if></div> - <div>${uiLabelMap.CommonComments}: <input type='text' name='comments_${counter}_${optionCounter}' id='comments_${counter}_${optionCounter}' value='${option.comments?if_exists}' /></div> + <div>${uiLabelMap.CommonComments}: <input type='text' name='comments_${counter}_${optionCounter}' id='comments_${counter}_${optionCounter}' value='${option.comments!}' /></div> <#assign optionCounter = optionCounter + 1> </#list> <#else> <#if question.isSingleChoice()> <#-- Single choice question --> <#assign options = question.options> - <#assign selectedOption = question.getSelected()?if_exists> + <#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?exists && "Y" == renderSingleChoiceWithRadioButtons> + <#if renderSingleChoiceWithRadioButtons?? && "Y" == renderSingleChoiceWithRadioButtons> <#-- This is the radio button implementation --> <#if !question.isMandatory()> <div><input type="radio" name='${counter}' value='<#if !question.isSelected()>checked="checked"</#if>' /> No option</div> @@ -500,13 +500,13 @@ function getConfigDetails() { <#assign optionCounter = 0> <#list options as option> <#assign componentCounter = 0> - <#if showOffsetPrice?exists && "Y" == showOffsetPrice> + <#if showOffsetPrice?? && "Y" == showOffsetPrice> <#assign shownPrice = option.price - selectedPrice> <#else> <#assign shownPrice = option.price> </#if> <#if option.isSelected()> - <#assign optionComment = option.getComments()?if_exists> + <#assign optionComment = option.getComments()!> </#if> <#-- Render virtual compoennts --> <#if option.hasVirtualComponent()> @@ -535,7 +535,7 @@ function getConfigDetails() { </#if> <#assign optionCounter = optionCounter + 1> </#list> - <div>${uiLabelMap.CommonComments}: <input type="text" name='comments_${counter}_0' id='comments_${counter}_0' value='${optionComment?if_exists}' /></div> + <div>${uiLabelMap.CommonComments}: <input type="text" name='comments_${counter}_0' id='comments_${counter}_0' value='${optionComment!}' /></div> <#else> <#-- And this is the select box implementation --> <select name='${counter}'> @@ -546,7 +546,7 @@ function getConfigDetails() { <#assign optionCounter = 0> <#assign optionComment = ""> <#list options as option> - <#if showOffsetPrice?exists && "Y" == showOffsetPrice> + <#if showOffsetPrice?? && "Y" == showOffsetPrice> <#assign shownPrice = option.price - selectedPrice> <#else> <#assign shownPrice = option.price> @@ -564,7 +564,7 @@ function getConfigDetails() { <#assign optionCounter = optionCounter + 1> </#list> </select> - <div>${uiLabelMap.CommonComments}: <input type="text" name='comments_${counter}_0' id='comments_${counter}_0' value='${optionComment?if_exists}' /></div> + <div>${uiLabelMap.CommonComments}: <input type="text" name='comments_${counter}_0' id='comments_${counter}_0' value='${optionComment!}' /></div> </#if> <#else> <#-- Multi choice question --> @@ -594,7 +594,7 @@ function getConfigDetails() { ${option.description} +<@ofbizCurrency amount=option.price isoCode=price.currencyUsed/><#if !option.isAvailable()> (*)</#if> </div> </#if> - <div>${uiLabelMap.CommonComments}: <input type="text" name='comments_${counter}_${optionCounter}' id='comments_${counter}_${optionCounter}' value='${option.comments?if_exists}' /></div> + <div>${uiLabelMap.CommonComments}: <input type="text" name='comments_${counter}_${optionCounter}' id='comments_${counter}_${optionCounter}' value='${option.comments!}' /></div> <#assign optionCounter = optionCounter + 1> </#list> </#if> @@ -620,15 +620,15 @@ function getConfigDetails() { </#if> <#if assocProducts?has_content> <tr><td> </td></tr> - <tr><td colspan="2"><h2>${beforeName?if_exists}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME")?if_exists}</#if>${afterName?if_exists}</h2></td></tr> + <tr><td colspan="2"><h2>${beforeName!}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME")!}</#if>${afterName!}</h2></td></tr> <tr><td><hr /></td></tr> <#list assocProducts as productAssoc> <tr><td> <div> - <a href='<@ofbizUrl>${targetRequest}/<#if categoryId?exists>~category_id=${categoryId}/</#if>~product_id=${productAssoc.productIdTo?if_exists}</@ofbizUrl>' class="buttontext"> - ${productAssoc.productIdTo?if_exists} + <a href='<@ofbizUrl>${targetRequest}/<#if categoryId??>~category_id=${categoryId}/</#if>~product_id=${productAssoc.productIdTo!}</@ofbizUrl>' class="buttontext"> + ${productAssoc.productIdTo!} </a> - - <b>${productAssoc.reason?if_exists}</b> + - <b>${productAssoc.reason!}</b> </div> </td></tr> ${setRequestAttribute("optProductId", productAssoc.productIdTo)} Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/editProduct.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/editProduct.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/editProduct.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/editProduct.ftl Sat Aug 16 11:34:57 2014 @@ -19,6 +19,6 @@ under the License. <#if security.hasEntityPermission("CATALOG", "_CREATE", session)> <div> -<a href="/catalog/control/EditProduct?productId=${productId}${externalKeyParam?if_exists}" target="catalog" class="buttontext">${uiLabelMap.ProductEditProduct}</a> +<a href="/catalog/control/EditProduct?productId=${productId}${externalKeyParam!}" target="catalog" class="buttontext">${uiLabelMap.ProductEditProduct}</a> </div> </#if> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl Sat Aug 16 11:34:57 2014 @@ -17,7 +17,7 @@ specific language governing permissions under the License. --> -${virtualJavaScript?if_exists} +${virtualJavaScript!} <#assign addedJavaScript = requestAttributes.addedJavaScript?default("N")/> <#if ("N" == addedJavaScript)> ${setRequestAttribute("addedJavaScript", "Y")} @@ -104,7 +104,7 @@ ${virtualJavaScript?if_exists} function isVirtualInline(inlineCounter, product) { var isVirtual = false; var fieldName = 'VIR' + inlineCounter; - <#if virtualJavaScript?exists> + <#if virtualJavaScript??> for (i = 0; i < window[fieldName].length; i++) { if (window[fieldName][i] == product) { isVirtual = true; @@ -230,7 +230,7 @@ ${virtualJavaScript?if_exists} </script> </#if> -<#if product.virtualVariantMethodEnum?if_exists == "VV_FEATURETREE" && featureLists?has_content> +<#if product.virtualVariantMethodEnum! == "VV_FEATURETREE" && featureLists?has_content> <script language="JavaScript" type="text/javascript"> function checkRadioButtoninline${inlineCounter}(inlineCounter, productId) { var add_product_id = 'add_product_id' + inlineCounter; @@ -253,32 +253,32 @@ ${virtualJavaScript?if_exists} </#if> -<#assign price = priceMap?if_exists/> +<#assign price = priceMap!/> <div id="inlineproductdetail${inlineCounter}"> <table border="0" cellpadding="2" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="0"> - <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL")?if_exists> + <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL")!> <#if firstLargeImage?has_content> <#assign productLargeImageUrl = firstLargeImage> </#if> <#if productLargeImageUrl?string?has_content> <input type="hidden" name="detailImage${inlineCounter}" value="${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}"/> - <a href="javascript:popupDetailInline('${inlineCounter}');"><img src='<@ofbizContentUrl>${contentPathPrefix?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>' name='mainImage${inlineCounter}' vspace='5' hspace='5' class='cssImgLarge' align='left' alt="" /></a> + <a href="javascript:popupDetailInline('${inlineCounter}');"><img src='<@ofbizContentUrl>${contentPathPrefix!}${productLargeImageUrl!}</@ofbizContentUrl>' name='mainImage${inlineCounter}' vspace='5' hspace='5' class='cssImgLarge' align='left' alt="" /></a> </#if> </td> <td align="right" valign="top" width="100%"> - <#-- <h2>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</h2> --> + <#-- <h2>${productContentWrapper.get("PRODUCT_NAME")!}</h2> --> <#assign inStock = true> - <#if product.isVirtual?if_exists?upper_case == "Y"> - <#if product.virtualVariantMethodEnum?if_exists == "VV_FEATURETREE" && featureLists?has_content> + <#if product.isVirtual!?upper_case == "Y"> + <#if product.virtualVariantMethodEnum! == "VV_FEATURETREE" && featureLists?has_content> <#list featureLists as featureList> <#list featureList as feature> <#if feature_index == 0> <div>${feature.description}: <select id="FT${inlineCounter}${feature.productFeatureTypeId}" name="FT${inlineCounter}${feature.productFeatureTypeId}" onchange="javascript:checkRadioButtoninline${inlineCounter}('${inlineCounter}', '${product.productId}');"> <option value="select" selected="selected"> select option </option> <#else> - <option value="${feature.productFeatureId}">${feature.description} <#if feature.price?exists>(+ <@ofbizCurrency amount=feature.price?string isoCode=feature.currencyUomId/>)</#if></option> + <option value="${feature.productFeatureId}">${feature.description} <#if feature.price??>(+ <@ofbizCurrency amount=feature.price?string isoCode=feature.currencyUomId/>)</#if></option> </#if> </#list> </select> @@ -287,8 +287,8 @@ ${virtualJavaScript?if_exists} <input type="hidden" name="product_id${inlineCounter}" value="${product.productId}"/> <input type="hidden" name="add_product_id${inlineCounter}" value="NULL"/> </#if> - <#if !product.virtualVariantMethodEnum?exists || product.virtualVariantMethodEnum == "VV_VARIANTTREE"> - <#if variantTree?exists && (variantTree.size() > 0)> + <#if !product.virtualVariantMethodEnum?? || product.virtualVariantMethodEnum == "VV_VARIANTTREE"> + <#if variantTree?? && (variantTree.size() > 0)> <#list featureSet as currentType> <div> <select name="FT${inlineCounter}${currentType}" onchange="javascript:getListInline('${inlineCounter}', this.name, (this.selectedIndex-1), 1);"> @@ -319,21 +319,21 @@ ${virtualJavaScript?if_exists} <div><b>${uiLabelMap.ProductItemOutOfStock}.</b></div> <#assign inStock = false> <#else> - <div><b>${product.inventoryMessage?if_exists}</b></div> + <div><b>${product.inventoryMessage!}</b></div> </#if> </#if> </#if> </td></tr> <tr><td COLSPAN="2" align="right"> <#-- check to see if introductionDate hasnt passed yet --> - <#if product.introductionDate?exists && nowTimestamp.before(product.introductionDate)> + <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)> <p> </p> <div style="color: red;">${uiLabelMap.ProductProductNotYetMadeAvailable}.</div> <#-- check to see if salesDiscontinuationDate has passed --> - <#elseif product.salesDiscontinuationDate?exists && nowTimestamp.after(product.salesDiscontinuationDate)> + <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)> <div style="color: red;">${uiLabelMap.ProductProductNoLongerAvailable}.</div> <#-- check to see if the product requires inventory check and has inventory --> - <#elseif product.virtualVariantMethodEnum?if_exists != "VV_FEATURETREE"> + <#elseif product.virtualVariantMethodEnum! != "VV_FEATURETREE"> <#if inStock> <#if product.requireAmount?default("N") == "Y"> <#assign hiddenStyle = "visible"> @@ -349,12 +349,12 @@ ${virtualJavaScript?if_exists} </td></tr> <tr><td COLSPAN="2" align="right"> - <#if variantTree?exists && 0 < variantTree.size()> + <#if variantTree?? && 0 < variantTree.size()> <script language="JavaScript" type="text/javascript">eval("list"+ "${inlineCounter}" + "${featureOrderFirst}" + "()");</script> </#if> <#-- Swatches (virtual products only) . For now commented out, before fixing a bug - <#if variantSample?exists && 0 < variantSample.size()> + <#if variantSample?? && 0 < variantSample.size()> <#assign imageKeys = variantSample.keySet()> <#assign imageMap = variantSample> <p> </p> @@ -365,15 +365,15 @@ ${virtualJavaScript?if_exists} <#list imageKeys as key> <#assign swatchProduct = imageMap.get(key)> <#if swatchProduct?has_content && indexer < maxIndex> - <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request)?if_exists> + <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request)!> <#if !imageUrl?string?has_content> - <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_URL")?if_exists> + <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_URL")!> </#if> <#if !imageUrl?string?has_content> <#assign imageUrl = "/images/defaultImage.jpg"> </#if> <td align="center" valign="bottom"> - <a href="javascript:getListInline('${inlineCounter}', 'FT${inlineCounter}${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${imageUrl}</@ofbizContentUrl>" border="0" width="60" height="60" alt="" /></a> + <a href="javascript:getListInline('${inlineCounter}', 'FT${inlineCounter}${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix!}${imageUrl}</@ofbizContentUrl>" border="0" width="60" height="60" alt="" /></a> <br /> <a href="javascript:getListInline('${inlineCounter}', 'FT${inlineCounter}${featureOrderFirst}','${indexer}',1);" class="linktext">${key}</a> </td> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearch.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearch.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearch.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearch.ftl Sat Aug 16 11:34:57 2014 @@ -27,7 +27,7 @@ under the License. <br /> <div>${uiLabelMap.CommonSortedBy}: ${searchSortOrderString}</div> <br /> -<div><a href="<@ofbizUrl>advancedsearch?SEARCH_CATEGORY_ID=${(requestParameters.SEARCH_CATEGORY_ID)?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRefineSearch}</a></div> +<div><a href="<@ofbizUrl>advancedsearch?SEARCH_CATEGORY_ID=${(requestParameters.SEARCH_CATEGORY_ID)!}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRefineSearch}</a></div> <#if !productIds?has_content> <h2> ${uiLabelMap.ProductNoResultsFound}.</h2> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl Sat Aug 16 11:34:57 2014 @@ -30,22 +30,22 @@ under the License. <input type="hidden" name="VIEW_SIZE" value="10" /> <input type="hidden" name="PAGING" value="Y" /> <div> - <input type="text" name="SEARCH_STRING" size="14" maxlength="50" value="${requestParameters.SEARCH_STRING?if_exists}" /> + <input type="text" name="SEARCH_STRING" size="14" maxlength="50" value="${requestParameters.SEARCH_STRING!}" /> </div> <#if 0 < otherSearchProdCatalogCategories?size> <div> <select name="SEARCH_CATEGORY_ID" size="1"> - <option value="${searchCategoryId?if_exists}">${uiLabelMap.ProductEntireCatalog}</option> + <option value="${searchCategoryId!}">${uiLabelMap.ProductEntireCatalog}</option> <#list otherSearchProdCatalogCategories as otherSearchProdCatalogCategory> <#assign searchProductCategory = otherSearchProdCatalogCategory.getRelatedOne("ProductCategory", true)> - <#if searchProductCategory?exists> + <#if searchProductCategory??> <option value="${searchProductCategory.productCategoryId}">${searchProductCategory.description?default("No Description " + searchProductCategory.productCategoryId)}</option> </#if> </#list> </select> </div> <#else> - <input type="hidden" name="SEARCH_CATEGORY_ID" value="${searchCategoryId?if_exists}" /> + <input type="hidden" name="SEARCH_CATEGORY_ID" value="${searchCategoryId!}" /> </#if> <div> <input type="radio" name="SEARCH_OPERATOR" id="SEARCH_OPERATOR_OR" value="OR" <#if searchOperator == "OR">checked="checked"</#if> /><label for="SEARCH_OPERATOR_OR">${uiLabelMap.CommonAny}</label> @@ -59,16 +59,16 @@ under the License. <#if 0 < otherSearchProdCatalogCategories?size> <label for="SEARCH_CATEGORY_ID">${uiLabelMap.ProductAdvancedSearchIn}: </label> <select name="SEARCH_CATEGORY_ID" id="SEARCH_CATEGORY_ID" size="1"> - <option value="${searchCategoryId?if_exists}">${uiLabelMap.ProductEntireCatalog}</option> + <option value="${searchCategoryId!}">${uiLabelMap.ProductEntireCatalog}</option> <#list otherSearchProdCatalogCategories as otherSearchProdCatalogCategory> <#assign searchProductCategory = otherSearchProdCatalogCategory.getRelatedOne("ProductCategory", true)> - <#if searchProductCategory?exists> + <#if searchProductCategory??> <option value="${searchProductCategory.productCategoryId}">${searchProductCategory.description?default("No Description " + searchProductCategory.productCategoryId)}</option> </#if> </#list> </select> <#else> - <input type="hidden" name="SEARCH_CATEGORY_ID" value="${searchCategoryId?if_exists}" /> + <input type="hidden" name="SEARCH_CATEGORY_ID" value="${searchCategoryId!}" /> </#if> <input type="submit" value="${uiLabelMap.ProductAdvancedSearch}" class="button" /> </fieldset> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/product.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/product.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/product.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/product.ftl Sat Aug 16 11:34:57 2014 @@ -20,6 +20,6 @@ ${pages.get("/entry/OrderEntryTabBar.ftl <#if requestAttributes.product?has_content> ${pages.get(requestAttributes.detailTemplate)} <#else> - <#assign productId = requestAttributes.productId?if_exists> - <center><h2>${uiLabelMap.ProductProductNotFound} ${productId?if_exists}!</h2></center> + <#assign productId = requestAttributes.productId!> + <center><h2>${uiLabelMap.ProductProductNotFound} ${productId!}!</h2></center> </#if> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl?rev=1618336&r1=1618335&r2=1618336&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl Sat Aug 16 11:34:57 2014 @@ -17,11 +17,11 @@ specific language governing permissions under the License. --> <#-- variable setup --> -<#assign price = priceMap?if_exists/> +<#assign price = priceMap!/> <#-- end variable setup --> <#-- virtual product javascript --> -${virtualJavaScript?if_exists} +${virtualJavaScript!} <script language="JavaScript" type="text/javascript"> <!-- var detailImageUrl = null; @@ -71,7 +71,7 @@ ${virtualJavaScript?if_exists} } function isVirtual(product) { var isVirtual = false; - <#if virtualJavaScript?exists> + <#if virtualJavaScript??> for (i = 0; i < VIR.length; i++) { if (VIR[i] == product) { isVirtual = true; @@ -86,7 +86,7 @@ ${virtualJavaScript?if_exists} return; } else { if (isVirtual(document.addform.add_product_id.value)) { - document.location = '<@ofbizUrl>product?category_id=${categoryId?if_exists}&product_id=</@ofbizUrl>' + document.addform.add_product_id.value; + document.location = '<@ofbizUrl>product?category_id=${categoryId!}&product_id=</@ofbizUrl>' + document.addform.add_product_id.value; return; } else { document.addform.submit(); @@ -153,7 +153,7 @@ ${virtualJavaScript?if_exists} // eval the next list if there are more var selectedValue = document.forms["addform"].elements[name].options[(index*1)+1].value; if (index == -1) { - <#if featureOrderFirst?exists> + <#if featureOrderFirst??> var Variable1 = eval("list" + "${featureOrderFirst}" + "()"); </#if> } else { @@ -212,7 +212,7 @@ ${virtualJavaScript?if_exists} } function additemSubmit(){ - <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> newdatevalue = validate(document.addform.reservStart.value); if (newdatevalue == false) { document.addform.reservStart.focus(); @@ -226,7 +226,7 @@ ${virtualJavaScript?if_exists} } function addShoplistSubmit(){ - <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> if (document.addToShoppingList.reservStartStr.value == "") { document.addToShoppingList.submit(); } else { @@ -245,7 +245,7 @@ ${virtualJavaScript?if_exists} </#if> } - <#if product.virtualVariantMethodEnum?if_exists == "VV_FEATURETREE" && featureLists?has_content> + <#if product.virtualVariantMethodEnum! == "VV_FEATURETREE" && featureLists?has_content> function checkRadioButton() { var block1 = document.getElementById("addCart1"); var block2 = document.getElementById("addCart2"); @@ -285,15 +285,15 @@ ${virtualJavaScript?if_exists} <table border="0" cellpadding="2" cellspacing="0" width="100%"> <#-- Category next/previous --> - <#if category?exists> + <#if category??> <tr> <td colspan="2" align="right"> - <#if previousProductId?exists> - <a href="<@ofbizUrl>product/~category_id=${categoryId?if_exists}/~product_id=${previousProductId?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> | + <#if previousProductId??> + <a href="<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${previousProductId!}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> | </#if> - <a href="<@ofbizUrl>category/~category_id=${categoryId?if_exists}</@ofbizUrl>" class="linktext">${(category.categoryName)?default(category.description)?if_exists}</a> - <#if nextProductId?exists> - | <a href="<@ofbizUrl>product/~category_id=${categoryId?if_exists}/~product_id=${nextProductId?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a> + <a href="<@ofbizUrl>category/~category_id=${categoryId!}</@ofbizUrl>" class="linktext">${(category.categoryName)?default(category.description)!}</a> + <#if nextProductId??> + | <a href="<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${nextProductId!}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a> </#if> </td> </tr> @@ -304,19 +304,19 @@ ${virtualJavaScript?if_exists} <#-- Product image/name/price --> <tr> <td valign="top" width="0"> - <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL")?if_exists> + <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_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?if_exists}${productLargeImageUrl?if_exists}</@ofbizContentUrl>" name="mainImage" vspace="5" hspace="5" class='cssImgLarge' alt="" /></a> + <a href="javascript:popupDetail();"><img src="<@ofbizContentUrl>${contentPathPrefix!}${productLargeImageUrl!}</@ofbizContentUrl>" name="mainImage" vspace="5" hspace="5" class='cssImgLarge' alt="" /></a> </#if> </td> <td align="right" valign="top"> - <h2>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</h2> - <div>${productContentWrapper.get("DESCRIPTION")?if_exists}</div> - <div><b>${product.productId?if_exists}</b></div> + <h2>${productContentWrapper.get("PRODUCT_NAME")!}</h2> + <div>${productContentWrapper.get("DESCRIPTION")!}</div> + <div><b>${product.productId!}</b></div> <#-- example of showing a certain type of feature with the product --> <#if sizeProductFeatureAndAppls?has_content> <div> @@ -337,119 +337,119 @@ ${virtualJavaScript?if_exists} - if price < defaultPrice and defaultPrice < listPrice, show default - if isSale show price with salePrice style and print "On Sale!" --> - <#if price.competitivePrice?exists && price.price?exists && price.price?double < price.competitivePrice?double> + <#if price.competitivePrice?? && price.price?? && price.price?double < price.competitivePrice?double> <div>${uiLabelMap.ProductCompareAtPrice}: <span class="basePrice"><@ofbizCurrency amount=price.competitivePrice isoCode=price.currencyUsed/></span></div> </#if> - <#if price.listPrice?exists && price.price?exists && price.price?double < price.listPrice?double> + <#if price.listPrice?? && price.price?? && price.price?double < price.listPrice?double> <div>${uiLabelMap.ProductListPrice}: <span class="basePrice"><@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed/></span></div> </#if> - <#if price.listPrice?exists && price.defaultPrice?exists && price.price?exists && price.price?double < price.defaultPrice?double && price.defaultPrice?double < price.listPrice?double> + <#if price.listPrice?? && price.defaultPrice?? && price.price?? && price.price?double < price.defaultPrice?double && price.defaultPrice?double < price.listPrice?double> <div>${uiLabelMap.ProductRegularPrice}: <span class="basePrice"><@ofbizCurrency amount=price.defaultPrice isoCode=price.currencyUsed/></span></div> </#if> - <#if price.specialPromoPrice?exists> + <#if price.specialPromoPrice??> <div>${uiLabelMap.ProductSpecialPromoPrice}: <span class="basePrice"><@ofbizCurrency amount=price.specialPromoPrice isoCode=price.currencyUsed/></span></div> </#if> <div> <b> - <#if price.isSale?exists && price.isSale> + <#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?if_exists> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> - <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> - <#if product.reserv2ndPPPerc?exists && product.reserv2ndPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?exists || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}</#if> <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> - <#if product.reservNthPPPerc?exists &&product.reservNthPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} </#if> ${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> - <#if (!product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?exists || product.reservNthPPPerc == 0)><br />${uiLabelMap.ProductMaximum} ${product.reservMaxPersons!1} ${uiLabelMap.ProductPersons}.</#if> + ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual!> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> + <#if product.reserv2ndPPPerc?? && product.reserv2ndPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?? || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}</#if> <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> + <#if product.reservNthPPPerc?? &&product.reservNthPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?? || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} </#if> ${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> + <#if (!product.reserv2ndPPPerc?? || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?? || product.reservNthPPPerc == 0)><br />${uiLabelMap.ProductMaximum} ${product.reservMaxPersons!1} ${uiLabelMap.ProductPersons}.</#if> </#if> </b> </div> - <#if price.listPrice?exists && price.price?exists && price.price?double < price.listPrice?double> + <#if price.listPrice?? && price.price?? && price.price?double < price.listPrice?double> <#assign priceSaved = price.listPrice?double - price.price?double> <#assign percentSaved = (priceSaved?double / price.listPrice?double) * 100> <div>${uiLabelMap.OrderSave}: <span class="basePrice"><@ofbizCurrency amount=priceSaved isoCode=price.currencyUsed/> (${percentSaved?int}%)</span></div> </#if> <#-- show price details ("showPriceDetails" field can be set in the screen definition) --> - <#if (showPriceDetails?exists && showPriceDetails?default("N") == "Y")> - <#if price.orderItemPriceInfos?exists> + <#if (showPriceDetails?? && showPriceDetails?default("N") == "Y")> + <#if price.orderItemPriceInfos??> <#list price.orderItemPriceInfos as orderItemPriceInfo> - <div>${orderItemPriceInfo.description?if_exists}</div> + <div>${orderItemPriceInfo.description!}</div> </#list> </#if> </#if> <#-- Included quantities/pieces --> - <#if product.piecesIncluded?exists && product.piecesIncluded?long != 0> + <#if product.piecesIncluded?? && product.piecesIncluded?long != 0> <div> ${uiLabelMap.OrderPieces}: ${product.piecesIncluded} </div> </#if> - <#if (product.quantityIncluded?exists && product.quantityIncluded?double != 0) || product.quantityUomId?has_content> - <#assign quantityUom = product.getRelatedOne("QuantityUom", true)?if_exists/> + <#if (product.quantityIncluded?? && product.quantityIncluded?double != 0) || product.quantityUomId?has_content> + <#assign quantityUom = product.getRelatedOne("QuantityUom", true)!/> <div> - ${uiLabelMap.CommonQuantity}: ${product.quantityIncluded?if_exists} ${((quantityUom.abbreviation)?default(product.quantityUomId))?if_exists} + ${uiLabelMap.CommonQuantity}: ${product.quantityIncluded!} ${((quantityUom.abbreviation)?default(product.quantityUomId))!} </div> </#if> - <#if (product.weight?exists && product.weight?double != 0) || product.weightUomId?has_content> - <#assign weightUom = product.getRelatedOne("WeightUom", true)?if_exists/> + <#if (product.weight?? && product.weight?double != 0) || product.weightUomId?has_content> + <#assign weightUom = product.getRelatedOne("WeightUom", true)!/> <div> - ${uiLabelMap.CommonWeight}: ${product.weight?if_exists} ${((weightUom.abbreviation)?default(product.weightUomId))?if_exists} + ${uiLabelMap.CommonWeight}: ${product.weight!} ${((weightUom.abbreviation)?default(product.weightUomId))!} </div> </#if> - <#if (product.productHeight?exists && product.productHeight?double != 0) || product.heightUomId?has_content> - <#assign heightUom = product.getRelatedOne("HeightUom", true)?if_exists/> + <#if (product.productHeight?? && product.productHeight?double != 0) || product.heightUomId?has_content> + <#assign heightUom = product.getRelatedOne("HeightUom", true)!/> <div> - ${uiLabelMap.CommonHeight}: ${product.productHeight?if_exists} ${((heightUom.abbreviation)?default(product.heightUomId))?if_exists} + ${uiLabelMap.CommonHeight}: ${product.productHeight!} ${((heightUom.abbreviation)?default(product.heightUomId))!} </div> </#if> - <#if (product.productWidth?exists && product.productWidth?double != 0) || product.widthUomId?has_content> - <#assign widthUom = product.getRelatedOne("WidthUom", true)?if_exists/> + <#if (product.productWidth?? && product.productWidth?double != 0) || product.widthUomId?has_content> + <#assign widthUom = product.getRelatedOne("WidthUom", true)!/> <div> - ${uiLabelMap.CommonWidth}: ${product.productWidth?if_exists} ${((widthUom.abbreviation)?default(product.widthUomId))?if_exists} + ${uiLabelMap.CommonWidth}: ${product.productWidth!} ${((widthUom.abbreviation)?default(product.widthUomId))!} </div> </#if> - <#if (product.productDepth?exists && product.productDepth?double != 0) || product.depthUomId?has_content> - <#assign depthUom = product.getRelatedOne("DepthUom", true)?if_exists/> + <#if (product.productDepth?? && product.productDepth?double != 0) || product.depthUomId?has_content> + <#assign depthUom = product.getRelatedOne("DepthUom", true)!/> <div> - ${uiLabelMap.CommonDepth}: ${product.productDepth?if_exists} ${((depthUom.abbreviation)?default(product.depthUomId))?if_exists} + ${uiLabelMap.CommonDepth}: ${product.productDepth!} ${((depthUom.abbreviation)?default(product.depthUomId))!} </div> </#if> - <#if daysToShip?exists> + <#if daysToShip??> <div><b>${uiLabelMap.ProductUsuallyShipsIn} <font color="red">${daysToShip}</font> ${uiLabelMap.CommonDays}!<b></div> </#if> - <#if disFeatureList?exists && 0 < disFeatureList.size()> + <#if disFeatureList?? && 0 < disFeatureList.size()> <p> </p> <#list disFeatureList as currentFeature> <#assign disFeatureType = currentFeature.getRelatedOne("ProductFeatureType", true)/> <div> - <#if disFeatureType.description?exists>${disFeatureType.get("description", locale)}<#else>${currentFeature.productFeatureTypeId}</#if>: ${currentFeature.description} + <#if disFeatureType.description??>${disFeatureType.get("description", locale)}<#else>${currentFeature.productFeatureTypeId}</#if>: ${currentFeature.description} </div> </#list> <div> </div> </#if> - <form method="post" action="<@ofbizUrl>additem<#if requestAttributes._CURRENT_VIEW_?exists>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>" name="addform" style="margin: 0;"> + <form method="post" action="<@ofbizUrl>additem<#if requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>" name="addform" style="margin: 0;"> <#if requestAttributes.paramMap?has_content> - <input type="hidden" name="itemComment" value="${requestAttributes.paramMap.itemComment?if_exists}" /> - <input type="hidden" name="shipBeforeDate" value="${requestAttributes.paramMap.shipBeforeDate?if_exists}" /> - <input type="hidden" name="shipAfterDate" value="${requestAttributes.paramMap.shipAfterDate?if_exists}" /> - <input type="hidden" name="itemDesiredDeliveryDate" value="${requestAttributes.paramMap.itemDesiredDeliveryDate?if_exists}" /> + <input type="hidden" name="itemComment" value="${requestAttributes.paramMap.itemComment!}" /> + <input type="hidden" name="shipBeforeDate" value="${requestAttributes.paramMap.shipBeforeDate!}" /> + <input type="hidden" name="shipAfterDate" value="${requestAttributes.paramMap.shipAfterDate!}" /> + <input type="hidden" name="itemDesiredDeliveryDate" value="${requestAttributes.paramMap.itemDesiredDeliveryDate!}" /> </#if> <#assign inStock = true> <#-- Variant Selection --> - <#if product.isVirtual?if_exists?upper_case == "Y"> - <#if product.virtualVariantMethodEnum?if_exists == "VV_FEATURETREE" && featureLists?has_content> + <#if product.isVirtual!?upper_case == "Y"> + <#if product.virtualVariantMethodEnum! == "VV_FEATURETREE" && featureLists?has_content> <#list featureLists as featureList> <#list featureList as feature> <#if feature_index == 0> <div>${feature.description}: <select id="FT${feature.productFeatureTypeId}" name="FT${feature.productFeatureTypeId}" onchange="javascript:checkRadioButton();"> <option value="select" selected="selected"> select option </option> <#else> - <option value="${feature.productFeatureId}">${feature.description} <#if feature.price?exists>(+ <@ofbizCurrency amount=feature.price?string isoCode=feature.currencyUomId/>)</#if></option> + <option value="${feature.productFeatureId}">${feature.description} <#if feature.price??>(+ <@ofbizCurrency amount=feature.price?string isoCode=feature.currencyUomId/>)</#if></option> </#if> </#list> </select> @@ -470,8 +470,8 @@ ${virtualJavaScript?if_exists} </div> </#if> - <#if !product.virtualVariantMethodEnum?exists || product.virtualVariantMethodEnum == "VV_VARIANTTREE"> - <#if variantTree?exists && (variantTree.size() > 0)> + <#if !product.virtualVariantMethodEnum?? || product.virtualVariantMethodEnum == "VV_VARIANTTREE"> + <#if variantTree?? && (variantTree.size() > 0)> <#list featureSet as currentType> <div> <select name="FT${currentType}" onchange="javascript:getList(this.name, (this.selectedIndex-1), 1);"> @@ -496,7 +496,7 @@ ${virtualJavaScript?if_exists} <#else> <input type="hidden" name="product_id" value="${product.productId}"/> <input type="hidden" name="add_product_id" value="${product.productId}"/> - <#if productStoreId?exists> + <#if productStoreId??> <#assign isStoreInventoryNotAvailable = !(Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryAvailable(request, product, 1.0?double))> <#assign isStoreInventoryRequired = Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryRequired(request, product)> <#if isStoreInventoryNotAvailable> @@ -504,21 +504,21 @@ ${virtualJavaScript?if_exists} <div><b>${uiLabelMap.ProductItemOutOfStock}.</b></div> <#assign inStock = false> <#else> - <div><b>${product.inventoryMessage?if_exists}</b></div> + <div><b>${product.inventoryMessage!}</b></div> </#if> </#if> </#if> </#if> </td></tr><tr><td colspan="2" align="right"> <#-- check to see if introductionDate hasnt passed yet --> - <#if product.introductionDate?exists && nowTimestamp.before(product.introductionDate)> + <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)> <p> </p> <div style="color: red;">${uiLabelMap.ProductProductNotYetMadeAvailable}.</div> <#-- check to see if salesDiscontinuationDate has passed --> - <#elseif product.salesDiscontinuationDate?exists && nowTimestamp.after(product.salesDiscontinuationDate)> + <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)> <div style="color: red;">${uiLabelMap.ProductProductNoLongerAvailable}.</div> <#-- check to see if the product requires inventory check and has inventory --> - <#elseif product.virtualVariantMethodEnum?if_exists != "VV_FEATURETREE"> + <#elseif product.virtualVariantMethodEnum! != "VV_FEATURETREE"> <#if inStock> <#if product.requireAmount?default("N") == "Y"> <#assign hiddenStyle = "visible"> @@ -529,7 +529,7 @@ ${virtualJavaScript?if_exists} <span style="white-space: nowrap;"><b>${uiLabelMap.CommonAmount}:</b></span> <input type="text" size="5" name="add_amount" value=""/> </div> - <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> <table width="100%"><tr> <@htmlTemplate.renderDateTimeField name="reservStart" event="" action="" value="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="startDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> <@htmlTemplate.renderDateTimeField name="reservEnd" event="" action="" value="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="endDate1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> @@ -538,12 +538,12 @@ ${virtualJavaScript?if_exists} <td nowrap="nowrap" align="right">Number of persons</td><td><input type="text" size="4" name="reservPersons" value="2"/></td> <td nowrap="nowrap" align="right">Number of rooms</td><td><input type="text" size="5" name="quantity" value="1"/></td></tr></table> <#else/> - <input type="text" size="5" name="quantity" value="1"<#if product.isVirtual?if_exists?upper_case == "Y"> disabled="disabled"</#if>/> + <input type="text" size="5" name="quantity" value="1"<#if product.isVirtual!?upper_case == "Y"> disabled="disabled"</#if>/> </#if> <#-- This calls addItem() so that variants of virtual products cant be added before distinguishing features are selected, it should not be changed to additemSubmit() --> <a href="javascript:addItem()" class="buttontext"><span style="white-space: nowrap;">${uiLabelMap.OrderAddToCart}</span></a> </#if> - <#if requestParameters.category_id?exists> + <#if requestParameters.category_id??> <input type="hidden" name="category_id" value="${requestParameters.category_id}"/> </#if> </#if> @@ -551,10 +551,10 @@ ${virtualJavaScript?if_exists} <div> <#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous"> <hr /> - <form name="addToShoppingList" method="post" action="<@ofbizUrl>addItemToShoppingList<#if requestAttributes._CURRENT_VIEW_?exists>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>"> + <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="productStoreId" value="${productStoreId?if_exists}"/> + <input type="hidden" name="productStoreId" value="${productStoreId!}"/> <input type="hidden" name="reservStart" value= ""/> <select name="shoppingListId"> <#if shoppingLists?has_content> @@ -566,7 +566,7 @@ ${virtualJavaScript?if_exists} <option value="">${uiLabelMap.OrderNewShoppingList}</option> </select> - <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> <table><tr><td> </td><td align="right">${uiLabelMap.CommonStartDate} (yyyy-mm-dd)</td><td><input type="text" size="10" name="reservStartStr" /></td><td>Number of days</td><td><input type="text" size="4" name="reservLength" /></td><td> </td><td align="right">Number of persons</td><td><input type="text" size="4" name="reservPersons" value="1" /></td><td align="right">Qty </td><td><input type="text" size="5" name="quantity" value="1" /></td></tr></table> <#else> <input type="text" size="5" name="quantity" value="1"/> @@ -580,12 +580,12 @@ ${virtualJavaScript?if_exists} </#if> </div> <#-- Prefill first select box (virtual products only) --> - <#if variantTree?exists && 0 < variantTree.size()> + <#if variantTree?? && 0 < variantTree.size()> <script language="JavaScript" type="text/javascript">eval("list" + "${featureOrderFirst}" + "()");</script> </#if> <#-- Swatches (virtual products only) --> - <#if variantSample?exists && 0 < variantSample.size()> + <#if variantSample?? && 0 < variantSample.size()> <#assign imageKeys = variantSample.keySet()> <#assign imageMap = variantSample> <p> </p> @@ -596,15 +596,15 @@ ${virtualJavaScript?if_exists} <#list imageKeys as key> <#assign swatchProduct = imageMap.get(key)> <#if swatchProduct?has_content && indexer < maxIndex> - <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request)?if_exists> + <#assign imageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(swatchProduct, "SMALL_IMAGE_URL", request)!> <#if !imageUrl?string?has_content> - <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_URL")?if_exists> + <#assign imageUrl = productContentWrapper.get("SMALL_IMAGE_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?if_exists}${imageUrl}</@ofbizContentUrl>" class='cssImgSmall' alt="" /></a> + <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="linktext">${key}</a> </td> @@ -633,8 +633,8 @@ ${virtualJavaScript?if_exists} <#-- Long description of product --> <div id="long-description"> - <div>${productContentWrapper.get("LONG_DESCRIPTION")?if_exists}</div> - <div>${productContentWrapper.get("WARNINGS")?if_exists}</div> + <div>${productContentWrapper.get("LONG_DESCRIPTION")!}</div> + <div>${productContentWrapper.get("WARNINGS")!}</div> </div> <#-- Any attributes/etc may go here --> @@ -646,15 +646,15 @@ ${virtualJavaScript?if_exists} <#assign targetRequest = targetRequestName> </#if> <#if assocProducts?has_content> - <h2>${beforeName?if_exists}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME")?if_exists}</#if>${afterName?if_exists}</h2> + <h2>${beforeName!}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME")!}</#if>${afterName!}</h2> <div class="productsummary-container"> <#list assocProducts as productAssoc> <div> - <a href="<@ofbizUrl>${targetRequest}/<#if categoryId?exists>~category_id=${categoryId}/</#if>~product_id=${productAssoc.productIdTo?if_exists}</@ofbizUrl>" class="buttontext"> - ${productAssoc.productIdTo?if_exists} + <a href="<@ofbizUrl>${targetRequest}/<#if categoryId??>~category_id=${categoryId}/</#if>~product_id=${productAssoc.productIdTo!}</@ofbizUrl>" class="buttontext"> + ${productAssoc.productIdTo!} </a> - - <b>${productAssoc.reason?if_exists}</b> + - <b>${productAssoc.reason!}</b> </div> ${setRequestAttribute("optProductId", productAssoc.productIdTo)} ${setRequestAttribute("listIndex", listIndex)} |
Free forum by Nabble | Edit this page |