<#-- 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. --> ${virtualJavaScript!} <#if product??> <#-- variable setup --> <#if backendPath?default("N") == "Y"> <#assign productUrl><@ofbizCatalogUrl productId=product.productId productCategoryId=categoryId/> <#else> <#assign productUrl><@ofbizCatalogAltUrl productId=product.productId productCategoryId=categoryId/> <#if requestAttributes.productCategoryMember??> <#assign prodCatMem = requestAttributes.productCategoryMember> <#assign smallImageUrl = productContentWrapper.get("SMALL_IMAGE_URL", "url")!> <#assign largeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL", "url")!> <#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"> <#if !largeImageUrl?string?has_content><#assign largeImageUrl = "/images/defaultImage.jpg"> <#-- end variable setup --> <#assign productInfoLinkId = "productInfoLink"> <#assign productInfoLinkId = productInfoLinkId + product.productId/> <#assign productDetailId = "productDetailId"/> <#assign productDetailId = productDetailId + product.productId/>
Small Image
<#-- check to see if introductionDate hasn't passed yet --> <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)>
${uiLabelMap.ProductNotYetAvailable}
<#-- check to see if salesDiscontinuationDate has passed --> <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)>
${uiLabelMap.ProductNoLongerAvailable}
<#-- check to see if it is a rental item; will enter parameters on the detail screen--> <#elseif product.productTypeId! == "ASSET_USAGE"> ${uiLabelMap.OrderMakeBooking}... <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> <#elseif product.productTypeId! == "AGGREGATED" || product.productTypeId! == "AGGREGATED_SERVICE"> ${uiLabelMap.OrderConfigure}... <#-- check to see if the product is a virtual product --> <#elseif product.isVirtual?? && product.isVirtual == "Y"> ${uiLabelMap.OrderChooseVariations}... <#-- check to see if the product requires an amount --> <#elseif product.requireAmount?? && product.requireAmount == "Y"> ${uiLabelMap.OrderChooseAmount}... <#elseif product.productTypeId! == "ASSET_USAGE_OUT_IN"> ${uiLabelMap.OrderRent}... <#else>
${uiLabelMap.OrderAddToCart} <#if mainProducts?has_content>
<#if prodCatMem?? && prodCatMem.quantity?? && 0.00 < prodCatMem.quantity?double>
${uiLabelMap.CommonAddDefault}(${prodCatMem.quantity?string.number}) ${uiLabelMap.OrderToCart}
<#assign productCategory = delegator.findOne("ProductCategory", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", prodCatMem.productCategoryId), false)/> <#if productCategory.productCategoryTypeId != "BEST_SELL_CATEGORY">
${uiLabelMap.CommonAddDefault}(${prodCatMem.quantity?string.number}) ${uiLabelMap.OrderToCart}
${productContentWrapper.get("PRODUCT_NAME", "html")!}
${productContentWrapper.get("DESCRIPTION", "html")!}<#if daysToShip??> - ${uiLabelMap.ProductUsuallyShipsIn} ${daysToShip} ${uiLabelMap.CommonDays}!
<#-- Display category-specific product comments --> <#if prodCatMem?? && prodCatMem.comments?has_content>
${prodCatMem.comments}
<#-- example of showing a certain type of feature with the product --> <#if sizeProductFeatureAndAppls?has_content>
<#if (sizeProductFeatureAndAppls?size == 1)> ${uiLabelMap.SizeAvailableSingle}: <#else> ${uiLabelMap.SizeAvailableMultiple}: <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl> ${sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,
${product.productId!} <#if totalPrice??>
${uiLabelMap.ProductAggregatedPrice}: <@ofbizCurrency amount=totalPrice isoCode=totalPrice.currencyUsed/>
<#else> <#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.isSale?? && price.isSale> ${uiLabelMap.OrderOnSale}! <#assign priceStyle = "salePrice"> <#else> <#assign priceStyle = "regularPrice"> <#if (price.price?default(0) > 0 && product.requireAmount?default("N") == "N")> ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual!> ${uiLabelMap.CommonFrom} <@ofbizCurrency amount=price.price isoCode=price.currencyUsed/> <#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!}
<#if averageRating?? && (averageRating?double > 0) && numRatings?? && (numRatings?long > 2)>
${uiLabelMap.OrderAverageRating}: ${averageRating} (${uiLabelMap.CommonFrom} ${numRatings} ${uiLabelMap.OrderRatings})
addToCompare" name="addToCompare${requestAttributes.listIndex!}form">
${uiLabelMap.ProductAddToCompare}
<#else>  ${uiLabelMap.ProductErrorProductNotFound}.