diff --git a/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl b/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl index 0fe26887fb..60457f4807 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/configproductdetail.ftl @@ -58,7 +58,7 @@ ${virtualJavaScript?if_exists} function popupDetail() { var defaultDetailImage = "${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}"; - if (defaultDetailImage == null || defaultDetailImage == "null") { + if (defaultDetailImage == null || defaultDetailImage == "null" || defaultDetailImage == "") { defaultDetailImage = "_NONE_"; } @@ -67,7 +67,10 @@ ${virtualJavaScript?if_exists} } if (detailImageUrl == "_NONE_") { - alert("No detail image available to display."); + hack = document.createElement('span'); + hack.innerHTML="${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"; + alert(hack.innerHTML); + return; return; } popUp("<@ofbizUrl>detailImage?detail=" + detailImageUrl + "", 'detailImage', '400', '550'); diff --git a/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl b/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl index 499966e864..85086af733 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/inlineProductDetail.ftl @@ -26,7 +26,7 @@ ${virtualJavaScript?if_exists} function popupDetailInline(inlineCounter) { var imageField = 'detailImage' + inlineCounter; var defaultDetailImage = document.getElementById(imageField); - if (defaultDetailImage == null || defaultDetailImage == "null") { + if (defaultDetailImage == null || defaultDetailImage == "null" || defaultDetailImage == "") { defaultDetailImage = "_NONE_"; } var fieldName = 'detailImageUrl' + inlineCounter; @@ -35,7 +35,10 @@ ${virtualJavaScript?if_exists} } if (window[fieldName] == "_NONE_") { - alert("No detail image available to display."); + hack = document.createElement('span'); + hack.innerHTML="${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"; + alert(hack.innerHTML); + return; return; } popUp("<@ofbizUrl>detailImage?detail=" + window[fieldName] + "", 'detailImage', '400', '550'); diff --git a/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl b/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl index cc5375a4ed..65eb539e74 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl @@ -96,7 +96,7 @@ ${virtualJavaScript?if_exists} function popupDetail() { var defaultDetailImage = "${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}"; - if (defaultDetailImage == null || defaultDetailImage == "null") { + if (defaultDetailImage == null || defaultDetailImage == "null" || defaultDetailImage == "") { defaultDetailImage = "_NONE_"; } @@ -105,7 +105,10 @@ ${virtualJavaScript?if_exists} } if (detailImageUrl == "_NONE_") { - alert("No detail image available to display."); + hack = document.createElement('span'); + hack.innerHTML="${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"; + alert(hack.innerHTML); + return; return; } popUp("<@ofbizUrl>detailImage?detail=" + detailImageUrl + "", 'detailImage', '400', '550'); diff --git a/framework/common/config/CommonUiLabels.xml b/framework/common/config/CommonUiLabels.xml index 56a8b7f354..e551d73f42 100644 --- a/framework/common/config/CommonUiLabels.xml +++ b/framework/common/config/CommonUiLabels.xml @@ -4500,6 +4500,10 @@ Custom method name for UoM conversion not found 没有找到用于货币转换的定制方法名称 + + No detail image available to display. + Aucune image détaillée à afficher. + لا عنصر موجود Kein Element gefunden diff --git a/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl b/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl index 4b51c308fc..454c729fe6 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl @@ -58,7 +58,7 @@ ${virtualJavaScript?if_exists} function popupDetail() { var defaultDetailImage = "${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}"; - if (defaultDetailImage == null || defaultDetailImage == "null") { + if (defaultDetailImage == null || defaultDetailImage == "null" || defaultDetailImage == "") { defaultDetailImage = "_NONE_"; } @@ -67,9 +67,13 @@ ${virtualJavaScript?if_exists} } if (detailImageUrl == "_NONE_") { - alert("No detail image available to display."); + hack = document.createElement('span'); + hack.innerHTML="${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"; + alert(hack.innerHTML); + return; return; } + alert(detailImageUrl); popUp("<@ofbizUrl>detailImage?detail=" + detailImageUrl + "", 'detailImage', '400', '550'); } @@ -244,7 +248,7 @@ function getConfigDetails(event) {
${uiLabelMap.ProductRegularPrice}: <@ofbizCurrency amount=price.defaultPrice isoCode=price.currencyUsed/>
- + <#if price.isSale?exists && price.isSale> ${uiLabelMap.OrderOnSale}! <#assign priceStyle = "salePrice"> @@ -252,7 +256,7 @@ function getConfigDetails(event) { <#assign priceStyle = "regularPrice"> ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual?if_exists> from <@ofbizCurrency amount=price.price isoCode=price.currencyUsed/> - +
<#if price.listPrice?exists && price.price?exists && price.price < price.listPrice> <#assign priceSaved = price.listPrice - price.price> @@ -363,7 +367,7 @@ function getConfigDetails(event) {
<#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous"> - +
@@ -427,7 +431,7 @@ function getConfigDetails(event) { - + <#-- Long description of product --> @@ -456,7 +460,7 @@ function getConfigDetails(event) {
- + <#assign counter = 0> <#assign questions = configwrapper.questions> <#list questions as question> @@ -598,14 +602,14 @@ function getConfigDetails(event) { - + <#assign counter = counter + 1> - + <#-- Product Reviews --> @@ -645,7 +649,7 @@ function getConfigDetails(event) {
${productReview.productReview?if_exists}
- + @@ -678,7 +682,7 @@ function getConfigDetails(event) { <#if assocProducts?has_content>  

${beforeName?if_exists}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME")?if_exists}${afterName?if_exists}

- + <#list assocProducts as productAssoc>
@@ -700,7 +704,7 @@ function getConfigDetails(event) { <#local listIndex = listIndex + 1> - + ${setRequestAttribute("optProductId", "")} ${setRequestAttribute("formNamePrefix", "")} @@ -725,7 +729,7 @@ ${setRequestAttribute("productValue", productValue)} <#-- special cross/up-sell area using commonFeatureResultIds (from common feature product search) --> <#if commonFeatureResultIds?has_content>

Similar Products That Might Interest You...

- + <#list commonFeatureResultIds as commonFeatureResultId>
diff --git a/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl b/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl index f62611d2b8..c865019d49 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl @@ -96,7 +96,7 @@ ${virtualJavaScript?if_exists} function popupDetail() { var defaultDetailImage = "${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}"; - if (defaultDetailImage == null || defaultDetailImage == "null") { + if (defaultDetailImage == null || defaultDetailImage == "null" || defaultDetailImage == "") { defaultDetailImage = "_NONE_"; } @@ -105,7 +105,9 @@ ${virtualJavaScript?if_exists} } if (detailImageUrl == "_NONE_") { - alert("No detail image available to display."); + hack = document.createElement('span'); + hack.innerHTML="${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"; + alert(hack.innerHTML); return; } popUp("<@ofbizUrl>detailImage?detail=" + detailImageUrl + "", 'detailImage', '400', '550');