<#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <#-- variable setup --> <#assign price = priceMap! /> <#assign productImageList = productImageList! /> <#-- end variable setup --> <#-- virtual product javascript --> ${virtualJavaScript!} ${virtualVariantJavaScript!} <#macro showUnavailableVarients> <#if unavailableVariants??>
<#assign productAdditionalImage1 = productContentWrapper.get("ADDITIONAL_IMAGE_1", "url")! /> <#assign productAdditionalImage2 = productContentWrapper.get("ADDITIONAL_IMAGE_2", "url")! /> <#assign productAdditionalImage3 = productContentWrapper.get("ADDITIONAL_IMAGE_3", "url")! /> <#assign productAdditionalImage4 = productContentWrapper.get("ADDITIONAL_IMAGE_4", "url")! /> <#-- Category next/previous --> <#if category??>
<#if previousProductId??> ${uiLabelMap.CommonPrevious} |  ${(category.categoryName)?default(category.description)!} <#if nextProductId??> |  ${uiLabelMap.CommonNext}

<#if productImageList?has_content> <#-- Product image/name/price -->
<#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 productLargeImageUrl?string?has_content> <#if !productLargeImageUrl?string?has_content>
<#-- Show Image Approved -->
<#if productImageList?has_content> <#list productImageList as productImage>
<#else> <#-- Product image/name/price -->
<#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 productLargeImageUrl?string?has_content> <#if !productLargeImageUrl?string?has_content>
<#if productAdditionalImage1?string?has_content> <#if productAdditionalImage2?string?has_content> <#if productAdditionalImage3?string?has_content> <#if productAdditionalImage4?string?has_content>

${productContentWrapper.get("PRODUCT_NAME", "html")!}

${productContentWrapper.get("DESCRIPTION", "html")!}
${product.productId!}
<#-- example of showing a certain type of feature with the product --> <#if sizeProductFeatureAndAppls?has_content>
<#if (sizeProductFeatureAndAppls?size == 1)> ${uiLabelMap.OrderSizeAvailableSingle}: <#else> ${uiLabelMap.OrderSizeAvailableMultiple}: <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl> ${sizeProductFeatureAndAppl.description?default( sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.productFeatureId))} <#if sizeProductFeatureAndAppl_has_next>,
<#-- for prices: - 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 price.competitivePrice?? && price.price?? && price.price < price.competitivePrice>
${uiLabelMap.ProductCompareAtPrice}: <@ofbizCurrency amount=price.competitivePrice isoCode=price.currencyUsed />
<#if price.listPrice?? && price.price?? && price.price < price.listPrice>
${uiLabelMap.ProductListPrice}: <@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed />
<#if price.listPrice?? && price.defaultPrice?? && price.price?? && price.price < price.defaultPrice && price.defaultPrice < price.listPrice>
${uiLabelMap.ProductRegularPrice}: <@ofbizCurrency amount=price.defaultPrice isoCode=price.currencyUsed />
<#if price.specialPromoPrice??>
${uiLabelMap.ProductSpecialPromoPrice}: <@ofbizCurrency amount=price.specialPromoPrice isoCode=price.currencyUsed />
<#if price.isSale?? && price.isSale> ${uiLabelMap.OrderOnSale}! <#assign priceStyle = "salePrice" /> <#else> <#assign priceStyle = "regularPrice" /> ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual!> ${uiLabelMap.CommonFrom} <@ofbizCurrency amount=price.price isoCode=price.currencyUsed /> <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> <#if product.reserv2ndPPPerc?? && product.reserv2ndPPPerc != 0>
${uiLabelMap.ProductReserv2ndPPPerc} <#if !product.reservNthPPPerc?? || product.reservNthPPPerc == 0> ${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1} <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed /> <#if product.reservNthPPPerc?? &&product.reservNthPPPerc != 0>
${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?? || product.reserv2ndPPPerc == 0> ${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} ${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed /> <#if (!product.reserv2ndPPPerc?? || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?? || product.reservNthPPPerc == 0)>
${uiLabelMap.ProductMaximum} ${product.reservMaxPersons!1} ${uiLabelMap.ProductPersons}.
<#if price.listPrice?? && price.price?? && price.price < price.listPrice> <#assign priceSaved = price.listPrice - price.price /> <#assign percentSaved = (priceSaved / price.listPrice) * 100 />
${uiLabelMap.OrderSave}: <@ofbizCurrency amount=priceSaved isoCode=price.currencyUsed /> (${percentSaved?int}%)
<#-- show price details ("showPriceDetails" field can be set in the screen definition) --> <#if (showPriceDetails?? && showPriceDetails?default("N") == "Y")> <#if price.orderItemPriceInfos??> <#list price.orderItemPriceInfos as orderItemPriceInfo>
${orderItemPriceInfo.description!}
<#-- Included quantities/pieces --> <#if product.piecesIncluded?? && product.piecesIncluded?long != 0>
${uiLabelMap.OrderPieces}: ${product.piecesIncluded}
<#if (product.quantityIncluded?? && product.quantityIncluded != 0) || product.quantityUomId?has_content> <#assign quantityUom = product.getRelatedOne("QuantityUom", true)! />
${uiLabelMap.CommonQuantity} : ${product.quantityIncluded!} ${((quantityUom.abbreviation)?default(product.quantityUomId))!}
<#if (product.productWeight?? && product.productWeight != 0) || product.weightUomId?has_content> <#assign weightUom = product.getRelatedOne("WeightUom", true)! />
${uiLabelMap.CommonWeight}: ${product.productWeight!} ${((weightUom.abbreviation)?default(product.weightUomId))!}
<#if (product.productHeight?? && product.productHeight != 0) || product.heightUomId?has_content> <#assign heightUom = product.getRelatedOne("HeightUom", true)! />
${uiLabelMap.CommonHeight}: ${product.productHeight!} ${((heightUom.abbreviation)?default(product.heightUomId))!}
<#if (product.productWidth?? && product.productWidth != 0) || product.widthUomId?has_content> <#assign widthUom = product.getRelatedOne("WidthUom", true)! />
${uiLabelMap.CommonWidth}: ${product.productWidth!} ${((widthUom.abbreviation)?default(product.widthUomId))!}
<#if (product.productDepth?? && product.productDepth != 0) || product.depthUomId?has_content> <#assign depthUom = product.getRelatedOne("DepthUom", true)! />
${uiLabelMap.CommonDepth}: ${product.productDepth!} ${((depthUom.abbreviation)?default(product.depthUomId))!}
<#if daysToShip??>
${uiLabelMap.ProductUsuallyShipsIn} ${daysToShip} ${uiLabelMap.CommonDays}!
<#-- show tell a friend details only in ecommerce application -->
 
${uiLabelMap.CommonTellAFriend}
<#if disFeatureList?? && 0 < disFeatureList.size()>

 

<#list disFeatureList as currentFeature> <#assign disFeatureType = currentFeature.getRelatedOne("ProductFeatureType", true) />
<#if disFeatureType.description??> ${disFeatureType.get("description", locale)} <#else> ${currentFeature.productFeatureTypeId} :  ${currentFeature.description}
 
<#assign inStock = true /> <#assign commentEnable = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"] .getPropertyValue("order", "order.item.comment.enable", delegator)> <#if commentEnable.equals("Y")> <#assign orderItemAttr = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"] .getPropertyValue("order", "order.item.attr.prefix", delegator)> ${uiLabelMap.CommonComment}  <#-- Variant Selection --> <#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>
${feature.description}:
${uiLabelMap.CommonQuantity}:  ${uiLabelMap.OrderAddToCart}  
<#if !product.virtualVariantMethodEnum?? || product.virtualVariantMethodEnum == "VV_VARIANTTREE"> <#if variantTree?? && (variantTree.size() > 0)> <#list featureSet as currentType>
<#else> <#assign inStock = false /> <#else> <#if mainProducts?has_content>
<#if (availableInventory??) && (availableInventory <= 0) && product.requireAmount?default("N") == "N"> <#assign inStock = false /> <#-- check to see if introductionDate hasnt passed yet --> <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)>

 

${uiLabelMap.ProductProductNotYetMadeAvailable}.
<#-- check to see if salesDiscontinuationDate has passed --> <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)>
${uiLabelMap.ProductProductNoLongerAvailable}.
<#-- check to see if the product requires inventory check and has inventory --> <#elseif product.virtualVariantMethodEnum! != "VV_FEATURETREE"> <#if inStock> <#if product.requireAmount?default("N") == "Y"> <#assign hiddenStyle = "visible" /> <#else> <#assign hiddenStyle = "hidden"/>
${uiLabelMap.CommonAmount}: 
<#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN">
<@htmlTemplate.renderDateTimeField event="" action="" name="reservStart" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${startDate}" size="25" maxlength="30" id="reservStart1" dateType="date" shortDateInput=true timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
<#--td nowrap="nowrap" align="right">Number
of days    Number of days Number of persons Number of rooms
${uiLabelMap.OrderAddToCart} <#else> disabled="disabled"/>${uiLabelMap.OrderAddToCart} <@showUnavailableVarients/> <#else> <#if productStore??> <#if productStore.requireInventory?? && productStore.requireInventory == "N"> disabled="disabled"/>${uiLabelMap.OrderAddToCart} <@showUnavailableVarients/> <#else> ${uiLabelMap.OrderAddToCart}
${uiLabelMap.ProductItemOutOfStock}<#if product.inventoryMessage??>— ${product.inventoryMessage} <#if variantPriceList??> <#list variantPriceList as vpricing> <#assign variantName = vpricing.get("variantName")!> <#assign secondVariantName = vpricing.get("secondVariantName")!> <#assign minimumQuantity = vpricing.get("minimumQuantity")> <#if minimumQuantity > 0>
minimum order quantity for ${secondVariantName!} ${variantName!} is ${minimumQuantity!}
<#elseif minimumQuantity?? && minimumQuantity?has_content && minimumQuantity > 0>
minimum order quantity for ${productContentWrapper.get("PRODUCT_NAME", "html")!} is ${minimumQuantity!}
<#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous">
   <#--assign nowDate = Static["org.apache.ofbiz.base.util.UtilDateTime"].nowDateString("yyyy-MM-dd")--> <#if product.productTypeId! == "ASSET_USAGE">  ${uiLabelMap.CommonStartDate}(yyyy-mm-dd) <@htmlTemplate.renderDateTimeField name="reservStartStr" event="" action="" value="${startDate}" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="15" maxlength="30" id="reservStartStr" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> Number of days    
Number of persons     Qty   <#elseif product.productTypeId! == "ASSET_USAGE_OUT_IN">  ${uiLabelMap.CommonStartDate}(yyyy-mm-dd)    <@htmlTemplate.renderDateTimeField name="reservStartStr" event="" action="" value="${startDate}" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="15" maxlength="30" id="reservStartStr" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>  Number of days  
Qty  <#else> ${uiLabelMap.OrderAddToShoppingList}
<#else>
${uiLabelMap.OrderYouMust} ${uiLabelMap.CommonBeLogged} ${uiLabelMap.OrderToAddSelectedItemsToShoppingList}. 
<#-- Prefill first select box (virtual products only) --> <#if variantTree?? && 0 < variantTree.size()> <#-- Swatches (virtual products only) --> <#if variantSample?? && 0 < variantSample.size()> <#assign imageKeys = variantSample.keySet() /> <#assign imageMap = variantSample />

 

<#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 !imageUrl?string?has_content> <#assign imageUrl = "/images/defaultImage.jpg" /> ${key}
<#assign indexer = indexer + 1 /> <#if (indexer > maxIndex)>
${uiLabelMap.ProductMoreOptions}
<#-- Digital Download Files Associated with this Product --> <#if downloadProductContentAndInfoList?has_content>
${uiLabelMap.OrderDownloadFilesTitle}:
<#list downloadProductContentAndInfoList as downloadProductContentAndInfo>
${downloadProductContentAndInfo.contentName!}<#if downloadProductContentAndInfo.description?has_content> - ${downloadProductContentAndInfo.description}
<#-- Long description of product -->
${productContentWrapper.get("LONG_DESCRIPTION", "html")!}
${productContentWrapper.get("WARNINGS", "html")!}
<#-- Any attributes/etc may go here --> <#-- Product Reviews -->
${uiLabelMap.OrderCustomerReviews}:
<#if averageRating?? && (averageRating > 0) && numRatings?? && (numRatings > 1)>
${uiLabelMap.OrderAverageRating}: ${averageRating} <#if numRatings??> (${uiLabelMap.CommonFrom} ${numRatings} ${uiLabelMap.OrderRatings})

<#if productReviews?has_content> <#list productReviews as productReview> <#assign postedUserLogin = productReview.getRelatedOne("UserLogin", false) /> <#assign postedPerson = postedUserLogin.getRelatedOne("Person", false)! />
${uiLabelMap.CommonBy} : <#if productReview.postedAnonymous?default("N") == "Y"> ${uiLabelMap.OrderAnonymous} <#else> ${postedPerson.firstName} ${postedPerson.lastName} 
${uiLabelMap.CommonAt}: ${productReview.postedDateTime!} 
${uiLabelMap.OrderRanking}: ${productReview.productRating!?string}
 
${productReview.productReview!}

${uiLabelMap.ProductReviewThisProduct}!
<#else>
${uiLabelMap.ProductProductNotReviewedYet}.
${uiLabelMap.ProductBeTheFirstToReviewThisProduct}
<#-- Upgrades/Up-Sell/Cross-Sell --> <#macro associated assocProducts beforeName showName afterName formNamePrefix targetRequestName> <#assign pageProduct = product /> <#assign targetRequest = "product" /> <#if targetRequestName?has_content> <#assign targetRequest = targetRequestName /> <#if assocProducts?has_content>

${beforeName!} <#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME", "html")!}${afterName!}

<#list assocProducts as productAssoc> <#if productAssoc.productId == product.productId> <#assign assocProductId = productAssoc.productIdTo /> <#else> <#assign assocProductId = productAssoc.productId />
${assocProductId} <#if productAssoc.reason?has_content> - ${productAssoc.reason}
${setRequestAttribute("optProductId", assocProductId)} ${setRequestAttribute("listIndex", listIndex)} ${setRequestAttribute("formNamePrefix", formNamePrefix)} <#if targetRequestName?has_content> ${setRequestAttribute("targetRequestName", targetRequestName)} ${screens.render(productsummaryScreen)} <#assign product = pageProduct /> <#local listIndex = listIndex + 1 />
${setRequestAttribute("optProductId", "")} ${setRequestAttribute("formNamePrefix", "")} ${setRequestAttribute("targetRequestName", "")} <#assign productValue = product /> <#assign listIndex = 1 /> ${setRequestAttribute("productValue", productValue)}
<#-- also bought --> <@associated assocProducts=alsoBoughtProducts beforeName="" showName="N" afterName="${uiLabelMap.ProductAlsoBought}" formNamePrefix="albt" targetRequestName="" /> <#-- obsolete --> <@associated assocProducts=obsoleteProducts beforeName="" showName="Y" afterName=" ${uiLabelMap.ProductObsolete}" formNamePrefix="obs" targetRequestName="" /> <#-- cross sell --> <@associated assocProducts=crossSellProducts beforeName="" showName="N" afterName="${uiLabelMap.ProductCrossSell}" formNamePrefix="cssl" targetRequestName="crosssell" /> <#-- up sell --> <@associated assocProducts=upSellProducts beforeName="${uiLabelMap.ProductUpSell} " showName="Y" afterName=":" formNamePrefix="upsl" targetRequestName="upsell" /> <#-- obsolescence --> <@associated assocProducts=obsolenscenseProducts beforeName="" showName="Y" afterName=" ${uiLabelMap.ProductObsolescense}" formNamePrefix="obce" targetRequestName="" />
<#-- special cross/up-sell area using commonFeatureResultIds (from common feature product search) --> <#if commonFeatureResultIds?has_content>

${uiLabelMap.ProductSimilarProducts}

<#list commonFeatureResultIds as commonFeatureResultId> ${setRequestAttribute("optProductId", commonFeatureResultId)} ${setRequestAttribute("listIndex", commonFeatureResultId_index)} ${setRequestAttribute("formNamePrefix", "cfeatcssl")} <#-- ${setRequestAttribute("targetRequestName", targetRequestName)} --> ${screens.render(productsummaryScreen)}

${uiLabelMap.EcommerceProductTags}

<#if productTags??>

${uiLabelMap.EcommerceProductTagsDetail}:

  • <#assign no = 0 /> <#list productTags?keys?sort as productTag> <#assign tagValue = productTags.get(productTag)!/> <#if tagValue?has_content> ${productTag} (${tagValue}) <#if no < (productTags.size() - 1)> | <#assign no = no + 1 />

${uiLabelMap.EcommerceAddYourTags}:

${uiLabelMap.EcommerceAddTagsDetail}