<#-- 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!/> <#-- end variable setup --> <#-- virtual product javascript --> ${virtualJavaScript!}
<#-- Category next/previous --> <#if category??> <#-- Product image/name/price -->
<#if previousProductId??> ${uiLabelMap.CommonPrevious} |  ${(category.categoryName)?default(category.description)!} <#if nextProductId??>  | ${uiLabelMap.CommonNext}

<#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>

${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)> Size: <#else> Sizes Available: <#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?double < price.competitivePrice?double>
${uiLabelMap.ProductCompareAtPrice}: <@ofbizCurrency amount=price.competitivePrice isoCode=price.currencyUsed/>
<#if price.listPrice?? && price.price?? && price.price?double < price.listPrice?double>
${uiLabelMap.ProductListPrice}: <@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed/>
<#if price.listPrice?? && price.defaultPrice?? && price.price?? && price.price?double < price.defaultPrice?double && price.defaultPrice?double < price.listPrice?double>
${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?double < price.listPrice?double> <#assign priceSaved = price.listPrice?double - price.price?double> <#assign percentSaved = (priceSaved?double / price.listPrice?double) * 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?double != 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?double != 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?double != 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?double != 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?double != 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}!
<#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}
 
<#if requestAttributes.paramMap?has_content> <#assign inStock = true> <#-- 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>
${uiLabelMap.ProductItemOutOfStock}.
<#assign inStock = false> <#else> <#if productStoreId??> <#assign isStoreInventoryNotAvailable = !(Static["org.apache.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryAvailable(request, product, 1.0?double))> <#assign isStoreInventoryRequired = Static["org.apache.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryRequired(request, product)> <#if isStoreInventoryNotAvailable> <#if isStoreInventoryRequired>
${uiLabelMap.ProductItemOutOfStock}.
<#assign inStock = false> <#else>
${product.inventoryMessage!}
<#-- 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 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=""/> <#if (product.reservMaxPersons!)?is_number>
Number of persons Quantity
<#else> disabled="disabled"/> <#-- This calls addItem() so that variants of virtual products cant be added before distinguishing features are selected, it should not be changed to additemSubmit() --> ${uiLabelMap.OrderAddToCart}  <#if requestParameters.category_id??>
<#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous">
   <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN">
 ${uiLabelMap.CommonStartDate} (yyyy-mm-dd)Number of days Number of personsQty 
<#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"> <#assign indexer = indexer + 1> <#if (indexer > maxIndex)>
${uiLabelMap.ProductMoreOptions}

${key}
<#-- 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 --> <#-- Upgrades/Up-Sell/Cross-Sell --> <#macro associated assocProducts beforeName showName afterName formNamePrefix targetRequestName> <#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>
${productAssoc.productIdTo!} - ${productAssoc.reason!}
${setRequestAttribute("optProductId", productAssoc.productIdTo)} ${setRequestAttribute("listIndex", listIndex)} ${setRequestAttribute("formNamePrefix", formNamePrefix)} <#if targetRequestName?has_content> ${setRequestAttribute("targetRequestName", targetRequestName)} ${screens.render(productsummaryScreen)} <#local listIndex = listIndex + 1>
${setRequestAttribute("optProductId", "")} ${setRequestAttribute("formNamePrefix", "")} ${setRequestAttribute("targetRequestName", "")} <#assign productValue = product> <#assign listIndex = 1> ${setRequestAttribute("productValue", productValue)}
<#-- 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)}