<#-- 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 productContentWrapper = productContentWrapper!> <#assign price = priceMap!> <#-- end variable setup --> <#-- virtual product javascript --> ${virtualJavaScript!}
<#-- Category next/previous --> <#if category??> <#-- Product image/name/price --> <#-- Long description of product --> <#if productContentWrapper.get("LONG_DESCRIPTION", "html") != ""> <#-- Any attributes/etc may go here --> <#-- Product Configurator --> <#-- Product Reviews --> <#if productReviews?has_content> <#list productReviews as productReview> <#assign postedUserLogin = productReview.getRelatedOne("UserLogin", false)> <#assign postedPerson = postedUserLogin.getRelatedOne("Person", false)!> <#else>
<#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)> <#-- TODO : i18n --> Size: <#else> Sizes Available: <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl> ${sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.abbrev?default( sizeProductFeatureAndAppl.productFeatureId))} <#if sizeProductFeatureAndAppl_has_next>,
<#-- for prices: - if totalPrice is present, use it (totalPrice is the price calculated from the parts) - if price < competitivePrice, show competitive or "Compare At" price - if price < listPrice, show list price - if price < defaultPrice and defaultPrice < listPrice, show default - if isSale show price with salePrice style and print "On Sale!" --> <#if totalPrice??>
${uiLabelMap.ProductAggregatedPrice}: <@ofbizCurrency amount=totalPrice isoCode=totalPrice.currencyUsed/>
<#else> <#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.isSale?? && price.isSale> ${uiLabelMap.OrderOnSale}! <#assign priceStyle = "salePrice"> <#else> <#assign priceStyle = "regularPrice"> ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual!> from <@ofbizCurrency amount=price.price isoCode=price.currencyUsed/>
<#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}%)
<#-- Included quantities/pieces --> <#if product.quantityIncluded?? && product.quantityIncluded != 0>
${uiLabelMap.OrderIncludes}:${product.quantityIncluded!}${product.quantityUomId!}
<#if product.piecesIncluded?? && product.piecesIncluded?long != 0>
${uiLabelMap.OrderPieces}:${product.piecesIncluded}
<#if daysToShip??>
${uiLabelMap.ProductUsuallyShipsIn} ${daysToShip} ${uiLabelMap.CommonDays}
<#-- show tell a friend details only in ecommerce application -->
 
<#if disFeatureList?? && 0 < disFeatureList.size()>

 

<#list disFeatureList as currentFeature>
${currentFeature.productFeatureTypeId}: ${currentFeature.description}
 
<#assign inStock = true> <#-- Variant Selection --> <#if product.isVirtual?? && "Y" == product.isVirtual?upper_case> <#if variantTree?? && 0 < variantTree.size()> <#list featureSet as currentType>
<#else>
${uiLabelMap.ProductItemOutOfStock}.
<#assign inStock = false> <#else> <#if productNotAvailable??> <#assign isStoreInventoryRequired = Static["org.apache.ofbiz.product.store.ProductStoreWorker"] .isStoreInventoryRequired(request, product)> <#if isStoreInventoryRequired>
${uiLabelMap.ProductItemOutOfStock}.
<#assign inStock = false> <#else>
${product.inventoryMessage!}
<#-- check to see if introductionDate hasn't 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 --> <#else> <#if inStock> <#if "Y" == product.requireAmount?default("N")> <#assign hiddenStyle = "visible"> <#else> <#assign hiddenStyle = "hidden">
Amount: 
<#if !configwrapper.isCompleted()>
[${uiLabelMap.EcommerceProductNotConfigured}] 
<#else> <#if minimumQuantity?? && minimumQuantity > 0> Minimum order quantity is ${minimumQuantity}. <#if requestParameters.category_id??>
<#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous">
<#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.OrderMoreOptionsAvailable}.

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

<#assign counter = 0> <#assign questions = configwrapper.questions> <#list questions as question> <#assign counter = counter + 1>
${question.question}
<#if question.isFirst()>
${StringUtil.wrapString(question.description!)}
<#assign instructions = question.content.get("INSTRUCTIONS", "html")!> <#if instructions?has_content && instructions != ""> Instructions <#assign image = question.content.get("IMAGE_URL", "url")!> <#if image?string?has_content> <#else>
<#if question.isStandard()> <#-- Standard item: all the options are always included --> <#assign options = question.options> <#list options as option>
${option.description} <#if !option.isAvailable()> (*)
<#else> <#if question.isSingleChoice()> <#-- Single choice question --> <#assign options = question.options> <#assign selectedOption = question.getSelected()!> <#assign selectedPrice = 0.0> <#if selectedOption?has_content> <#assign selectedPrice = selectedOption.getPrice()> <#-- The single choice input can be implemented with radio buttons or a select field --> <#if renderSingleChoiceWithRadioButtons?? && "Y" == renderSingleChoiceWithRadioButtons> <#-- This is the radio button implementation --> <#if !question.isMandatory()>
<#assign optionCounter = 0> <#list options as option> <#assign componentCounter = 0> <#if showOffsetPrice?? && "Y" == showOffsetPrice> <#assign shownPrice = option.price - selectedPrice> <#else> <#assign shownPrice = option.price> <#-- Render virtual compoennts --> <#if option.hasVirtualComponent()>
<#else>
checked="checked"/>
<#assign optionCounter = optionCounter + 1> <#else> <#-- And this is the select box implementation --> <#else> <#-- Multi choice question --> <#assign options = question.options> <#assign optionCounter = 0> <#list options as option> <#assign componentCounter = 0> <#-- Render virtual compoennts --> <#if option.hasVirtualComponent()>
<#else>
checked="checked"/>
<#assign optionCounter = optionCounter + 1>
${uiLabelMap.OrderCustomerReviews}:
<#if averageRating?? && (averageRating > 0) && numRatings?? && (numRatings > 1)>
${uiLabelMap.OrderAverageRating}: ${averageRating} <#if numRatings??>(${uiLabelMap.CommonFrom} ${numRatings} ${uiLabelMap.OrderRatings})

${uiLabelMap.CommonBy}: <#if "Y" == productReview.postedAnonymous?default("N")> ${uiLabelMap.OrderAnonymous} <#else> ${postedPerson.firstName} ${postedPerson.lastName}
${uiLabelMap.CommonOn}: ${productReview.postedDateTime!}
${uiLabelMap.OrderRanking}: ${productReview.productRating!?string}
 
${productReview.productReview!}
${uiLabelMap.ProductReviewThisProduct}!
${uiLabelMap.ProductProductNotReviewedYet}.
${uiLabelMap.ProductBeTheFirstToReviewThisProduct}
<#-- Upgrades/Up-Sell/Cross-Sell --> <#macro associated assocProducts beforeName showName afterName formNamePrefix targetRequestName> <#local targetRequest = "product"> <#if targetRequestName?has_content> <#local targetRequest = targetRequestName> <#if assocProducts?has_content>

${beforeName!}<#if "Y" == showName>${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=" is made obsolete by these products:" formNamePrefix="obs" targetRequestName=""/> <#-- cross sell --> <@associated assocProducts=crossSellProducts beforeName="" showName="N" afterName="You might be interested in these as well:" formNamePrefix="cssl" targetRequestName="crosssell"/> <#-- up sell --> <@associated assocProducts=upSellProducts beforeName="Try these instead of " showName="Y" afterName=":" formNamePrefix="upsl" targetRequestName="upsell"/> <#-- obsolescence --> <@associated assocProducts=obsolenscenseProducts beforeName="" showName="Y" afterName=" makes these products obsolete:" formNamePrefix="obce" targetRequestName=""/>
<#-- 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>
${setRequestAttribute("optProductId", commonFeatureResultId)} ${setRequestAttribute("listIndex", commonFeatureResultId_index)} ${setRequestAttribute("formNamePrefix", "cfeatcssl")} <#-- ${setRequestAttribute("targetRequestName", targetRequestName)} --> ${screens.render(productsummaryScreen)}
<#if commonFeatureResultId_has_next>