Added: ofbiz/trunk/applications/order/template/entry/catalog/inlineProductDetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/entry/catalog/inlineProductDetail.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/entry/catalog/inlineProductDetail.ftl (added) +++ ofbiz/trunk/applications/order/template/entry/catalog/inlineProductDetail.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,392 @@ +<#-- +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!} +<#assign addedJavaScript = requestAttributes.addedJavaScript?default("N")/> +<#if ("N" == addedJavaScript)> + ${setRequestAttribute("addedJavaScript", "Y")} + <script language="JavaScript" type="text/javascript"> + + function popupDetailInline(inlineCounter) { + var imageField = 'detailImage' + inlineCounter; + var defaultDetailImage = document.getElementById(imageField); + if (defaultDetailImage == null || defaultDetailImage == "null" || defaultDetailImage == "") { + defaultDetailImage = "_NONE_"; + } + var fieldName = 'detailImageUrl' + inlineCounter; + if (window[fieldName] == null || window[fieldName] == "null") { + window[fieldName] = defaultDetailImage; + } + + if (window[fieldName] == "_NONE_") { + hack = document.createElement('span'); + hack.innerHTML="${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"; + showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"); + return; + } + window[fieldName] = window[fieldName].replace(/\&\#47;/g, "/"); + popUp("<@ofbizUrl>detailImage?detail=" + window[fieldName] + "</@ofbizUrl>", 'detailImage', '400', '550'); + } + + function setAddProductIdInline(inlineCounter, name) { + var add_product_id = 'add_product_id' + inlineCounter; + var product_id_display = 'product_id_display' + inlineCounter; + document.configform[add_product_id].value = name; + if (name == '' || name == 'NULL' || isVirtualInline(inlineCounter, name) == true) { + //document.configform.quantity.disabled = true; + var elem = document.getElementById(product_id_display); + var txt = document.createTextNode(''); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + + checkOption(inlineCounter); + } else { + //document.configform.quantity.disabled = false; + var elem = document.getElementById(product_id_display); + var txt = document.createTextNode(name); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + } + } + + function checkOption(inlineCounter) { + var option = document.getElementById(inlineCounter.substring(0, inlineCounter.length - 2)); + if (option.checked) { + option.checked=false; + } + } + + function setVariantPriceInline(inlineCounter, sku) { + var variant_price_display = 'variant_price_display' + inlineCounter; + if (sku == '' || sku == 'NULL' || isVirtualInline(inlineCounter, sku) == true) { + var elem = document.getElementById(variant_price_display); + var txt = document.createTextNode(''); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + } + else { + var elem = document.getElementById(variant_price_display); + var functionName = 'getVariantPrice' + inlineCounter; + var price = window[functionName](sku); + var txt = document.createTextNode('+' + price); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + } + } + function isVirtualInline(inlineCounter, product) { + var isVirtual = false; + var fieldName = 'VIR' + inlineCounter; + <#if virtualJavaScript??> + for (i = 0; i < window[fieldName].length; i++) { + if (window[fieldName][i] == product) { + isVirtual = true; + } + } + </#if> + return isVirtual; + } + + function toggleAmtInline(inlineCounter, toggle) { + var fieldName = 'add_amount' + inlineCounter; + if (toggle == 'Y') { + changeObjectVisibility(fieldName, "visible"); + } + + if (toggle == 'N') { + changeObjectVisibility(fieldName, "hidden"); + } + } + + function findIndexInline(varname, name ) { + for (i = 0; i < window[varname].length; i++) { + if ( window[varname][i] == name) { + return i; + } + } + return -1; + } + + function checkOptionToggle(inlineCounter, disable) { + var index = inlineCounter.indexOf('_'); + var optionElementName = inlineCounter.substring(0,index); + var option = document.getElementById(optionElementName); + if ("true" == disable) { + option.disabled = true; + if (option.checked == true) { + option.checked == false; + } + } else { + //check all virtual product for the option + } + } + + function checkOptionVariants(optionName) { + var option = document.getElementById(optionName); + if (option.checked == false) { + return false; + } + + var fieldName = "add_product_id" + optionName + "_"; + var index = 15 + optionName.toString().length; + var cform = document.forms["configform"]; + var len = cform.elements.length; + for (var i = 0; i < len; i++) { + var element = cform.elements[i]; + if (element.name.substring(0, index) == fieldName) { + if (element.value == '' || element.value == 'NULL') { + option.checked = false; + showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonPleaseSelectAllFeaturesFirst}"); + return false; + } + } + } + } + + function getListInline(inlineCounter, name, index, src) { + currentFeatureIndex = findIndexInline('OPT'+inlineCounter, name); + + if (currentFeatureIndex == 0) { + // set the images for the first selection + if ([index] != null) { + if (document.images['mainImage'+ inlineCounter] != null) { + document.images['mainImage'+ inlineCounter].src = window['IMG'+ inlineCounter][index]; + window['detailImageUrl'+ inlineCounter] = window['DET'+ inlineCounter][index]; + } + } + + // set the drop down index for swatch selection + document.forms["configform"].elements[name].selectedIndex = (index*1)+1; + } + + if (currentFeatureIndex < (window['OPT'+ inlineCounter].length-1)) { + // eval the next list if there are more + var selectedValue = document.forms["configform"].elements[name].options[(index*1)+1].value; + if (index == -1) { + var featureOrderFirst = window['OPT'+ inlineCounter][(currentFeatureIndex)].toString(); + var length = featureOrderFirst.length; + featureOrderFirst = featureOrderFirst.substring(2, length); + var Variable1 = eval("list" + featureOrderFirst + "()"); + } else { + var Variable1 = eval("list" + window['OPT'+ inlineCounter][(currentFeatureIndex+1)] + selectedValue + "()"); + } + + // set the product ID to NULL to trigger the alerts + setAddProductIdInline(inlineCounter, 'NULL'); + + // set the variant price to NULL + setVariantPriceInline(inlineCounter, 'NULL'); + + //checkOptionToggle(inlineCounter, 'false'); + } else { + // this is the final selection -- locate the selected index of the last selection + var indexSelected = document.forms["configform"].elements[name].selectedIndex; + + // using the selected index locate the sku + var sku = document.forms["configform"].elements[name].options[indexSelected].value; + + // set the product ID + setAddProductIdInline(inlineCounter, sku); + + // set the variant price + setVariantPriceInline(inlineCounter, sku); + + // check for amount box + var functionName = 'checkAmtReq' + inlineCounter; + toggleAmtInline(inlineCounter, window[functionName](sku)); + + //checkOptionToggle(inlineCounter, 'true'); + } + } + + + </script> +</#if> + +<#if product.virtualVariantMethodEnum! == "VV_FEATURETREE" && featureLists?has_content> + <script language="JavaScript" type="text/javascript"> + function checkRadioButtoninline${inlineCounter}(inlineCounter, productId) { + var add_product_id = 'add_product_id' + inlineCounter; + <#list featureLists as featureList> + <#list featureList as feature> + <#if feature_index == 0> + var myList = document.getElementById("FT" +inlineCounter + "${feature.productFeatureTypeId}"); + if (myList.options[0].selected == true) { + document.configform[add_product_id].value = 'NULL'; + checkOption(inlineCounter); + return; + } + <#break> + </#if> + </#list> + </#list> + document.configform[add_product_id].value = productId; + } + </script> +</#if> + + +<#assign price = priceMap!/> +<div id="inlineproductdetail${inlineCounter}"> +<table border="0" cellpadding="2" cellspacing="0" width="100%"> + <tr> + <td align="left" valign="top" width="0"> + <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL", "url")!> + <#if firstLargeImage?has_content> + <#assign productLargeImageUrl = firstLargeImage> + </#if> + <#if productLargeImageUrl?string?has_content> + <input type="hidden" name="detailImage${inlineCounter}" value="${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}"/> + <a href="javascript:popupDetailInline('${inlineCounter}');"><img src='<@ofbizContentUrl>${contentPathPrefix!}${productLargeImageUrl!}</@ofbizContentUrl>' name='mainImage${inlineCounter}' vspace='5' hspace='5' class='cssImgLarge' align='left' alt="" /></a> + </#if> + </td> + <td align="right" valign="top" width="100%"> + <#-- <h2>${productContentWrapper.get("PRODUCT_NAME", "html")!}</h2> --> + <#assign inStock = true> + <#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> + <div>${feature.description}: <select id="FT${inlineCounter}${feature.productFeatureTypeId}" name="FT${inlineCounter}${feature.productFeatureTypeId}" onchange="javascript:checkRadioButtoninline${inlineCounter}('${inlineCounter}', '${product.productId}');"> + <option value="select" selected="selected"> select option </option> + <#else> + <option value="${feature.productFeatureId}">${feature.description} <#if feature.price??>(+ <@ofbizCurrency amount=feature.price?string isoCode=feature.currencyUomId/>)</#if></option> + </#if> + </#list> + </select> + </div> + </#list> + <input type="hidden" name="product_id${inlineCounter}" value="${product.productId}"/> + <input type="hidden" name="add_product_id${inlineCounter}" value="NULL"/> + </#if> + <#if !product.virtualVariantMethodEnum?? || product.virtualVariantMethodEnum == "VV_VARIANTTREE"> + <#if variantTree?? && (variantTree.size() > 0)> + <#list featureSet as currentType> + <div> + <select name="FT${inlineCounter}${currentType}" onchange="javascript:getListInline('${inlineCounter}', this.name, (this.selectedIndex-1), 1);"> + <option>${featureTypes.get(currentType)}</option> + </select> + </div> + </#list> + <input type="hidden" name="product_id${inlineCounter}" value="${product.productId}"/> + <input type="hidden" name="add_product_id${inlineCounter}" value="NULL"/> + <div> + <b><span id="product_id_display${inlineCounter}"> </span></b> + <b><div id="variant_price_display${inlineCounter}"> </div></b> + </div> + <#else> + <input type="hidden" name="product_id${inlineCounter}" value="${product.productId}"/> + <input type="hidden" name="add_product_id${inlineCounter}" value="NULL"/> + <div><b>${uiLabelMap.ProductItemOutOfStock}.</b></div> + <#assign inStock = false> + </#if> + </#if> + <#else> + <input type="hidden" name="product_id${inlineCounter}" value="${product.productId}"/> + <input type="hidden" name="add_product_id${inlineCounter}" value="${product.productId}"/> + <#assign isStoreInventoryNotAvailable = !(Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryAvailable(request, product, 1.0?double))> + <#assign isStoreInventoryRequired = Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryRequired(request, product)> + <#if isStoreInventoryNotAvailable> + <#if isStoreInventoryRequired> + <div><b>${uiLabelMap.ProductItemOutOfStock}.</b></div> + <#assign inStock = false> + <#else> + <div><b>${product.inventoryMessage!}</b></div> + </#if> + </#if> + </#if> + </td></tr> + <tr><td COLSPAN="2" align="right"> + <#-- check to see if introductionDate hasnt passed yet --> + <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)> + <p> </p> + <div style="color: red;">${uiLabelMap.ProductProductNotYetMadeAvailable}.</div> + <#-- check to see if salesDiscontinuationDate has passed --> + <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)> + <div style="color: red;">${uiLabelMap.ProductProductNoLongerAvailable}.</div> + <#-- 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"> + </#if> + <div id="add_amount${inlineCounter}" class="${hiddenStyle}"> + <span style="white-space: nowrap;"><b>${uiLabelMap.CommonAmount}:</b></span> + <input type="text" size="5" name="add_amount${inlineCounter}" value=""/> + </div> + </#if> + </#if> + </td></tr> + + <tr><td COLSPAN="2" align="right"> + <#if variantTree?? && 0 < variantTree.size()> + <script language="JavaScript" type="text/javascript">eval("list"+ "${inlineCounter}" + "${featureOrderFirst}" + "()");</script> + </#if> + + <#-- Swatches (virtual products only) . For now commented out, before fixing a bug + <#if variantSample?? && 0 < variantSample.size()> + <#assign imageKeys = variantSample.keySet()> + <#assign imageMap = variantSample> + <p> </p> + <table cellspacing="0" cellpadding="0"> + <tr> + <#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.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> + <#if !imageUrl?string?has_content> + <#assign imageUrl = "/images/defaultImage.jpg"> + </#if> + <td align="center" valign="bottom"> + <a href="javascript:getListInline('${inlineCounter}', 'FT${inlineCounter}${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix!}${imageUrl}</@ofbizContentUrl>" border="0" width="60" height="60" alt="" /></a> + <br /> + <a href="javascript:getListInline('${inlineCounter}', 'FT${inlineCounter}${featureOrderFirst}','${indexer}',1);" class="linktext">${key}</a> + </td> + </#if> + <#assign indexer = indexer + 1> + </#list> + <#if (indexer > maxIndex)> + <div><b>${uiLabelMap.ProductMoreOptions}</b></div> + </#if> + </tr> + </table> + </#if> --> + </td> + </tr> +</table> +</div> Propchange: ofbiz/trunk/applications/order/template/entry/catalog/inlineProductDetail.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/entry/catalog/inlineProductDetail.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/entry/catalog/inlineProductDetail.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/order/template/entry/catalog/keywordsearch.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/entry/catalog/keywordsearch.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/entry/catalog/keywordsearch.ftl (added) +++ ofbiz/trunk/applications/order/template/entry/catalog/keywordsearch.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,94 @@ +<#-- +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. +--> + +<h1>${uiLabelMap.ProductProductSearch}, <span class="h2">${uiLabelMap.ProductYouSearchedFor}:</span></h1> +<br /> +<ul> +<#list searchConstraintStrings as searchConstraintString> + <li><a href="<@ofbizUrl>keywordsearch?removeConstraint=${searchConstraintString_index}&clearSearch=N</@ofbizUrl>" class="buttontext">X</a> ${searchConstraintString}</li> +</#list> +</ul> +<br /> +<div>${uiLabelMap.CommonSortedBy}: ${searchSortOrderString}</div> +<br /> +<div><a href="<@ofbizUrl>advancedsearch?SEARCH_CATEGORY_ID=${(requestParameters.SEARCH_CATEGORY_ID)!}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRefineSearch}</a></div> + +<#if !productIds?has_content> + <h2> ${uiLabelMap.ProductNoResultsFound}.</h2> +</#if> + +<#if productIds?has_content> + <div class="product-prevnext"> + <#-- Start Page Select Drop-Down --> + <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 1)?double / viewSize?double)> + <select name="pageSelect" onchange="window.location=this[this.selectedIndex].value;"> + <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int + 1} ${uiLabelMap.CommonOf} ${viewIndexMax + 1}</option> + <#list 0..viewIndexMax as curViewNum> + <option value="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${curViewNum?int}/~clearSearch=N</@ofbizUrl>">${uiLabelMap.CommonGotoPage} ${curViewNum + 1}</option> + </#list> + </select> + <#-- End Page Select Drop-Down --> + <b> + <#if (viewIndex?int > 0)> + <a href="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int - 1}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> | + </#if> + <#if (listSize?int > 0)> + <span>${lowIndex+1} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}</span> + </#if> + <#if highIndex?int < listSize?int> + | <a href="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex+1}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a> + </#if> + </b> + </div> +</#if> + +<#if productIds?has_content> + <div class="productsummary-container"> + <#list productIds as productId> <#-- note that there is no boundary range because that is being done before the list is put in the content --> + ${setRequestAttribute("optProductId", productId)} + ${setRequestAttribute("listIndex", productId_index)} + ${screens.render(productsummaryScreen)} + </#list> + </div> +</#if> + +<#if productIds?has_content> + <div class="product-prevnext"> + <#-- Start Page Select Drop-Down --> + <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 1)?double / viewSize?double)> + <select name="pageSelect" onchange="window.location=this[this.selectedIndex].value;"> + <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int + 1} ${uiLabelMap.CommonOf} ${viewIndexMax + 1}</option> + <#list 0..viewIndexMax as curViewNum> + <option value="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${curViewNum?int}/~clearSearch=N</@ofbizUrl>">${uiLabelMap.CommonGotoPage} ${curViewNum + 1}</option> + </#list> + </select> + <#-- End Page Select Drop-Down --> + <b> + <#if (viewIndex?int > 0)> + <a href="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int - 1}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> | + </#if> + <#if (listSize?int > 0)> + <span>${lowIndex+1} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}</span> + </#if> + <#if highIndex?int < listSize?int> + | <a href="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex+1}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a> + </#if> + </b> + </div> +</#if> Propchange: ofbiz/trunk/applications/order/template/entry/catalog/keywordsearch.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/entry/catalog/keywordsearch.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/entry/catalog/keywordsearch.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/order/template/entry/catalog/keywordsearchbox.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/entry/catalog/keywordsearchbox.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/entry/catalog/keywordsearchbox.ftl (added) +++ ofbiz/trunk/applications/order/template/entry/catalog/keywordsearchbox.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,77 @@ +<#-- +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. +--> + +<div id="keywordsearchbox" class="screenlet"> + <div class="screenlet-title-bar"> + <ul> + <li class="h3">${uiLabelMap.ProductSearchCatalog}</li> + </ul> + <br class="clear"/> + </div> + <div class="screenlet-body"> + <form name="keywordsearchform" id="keywordsearchbox_keywordsearchform" method="post" action="<@ofbizUrl>keywordsearch</@ofbizUrl>"> + <fieldset class="inline"> + <input type="hidden" name="VIEW_SIZE" value="10" /> + <input type="hidden" name="PAGING" value="Y" /> + <div> + <input type="text" name="SEARCH_STRING" size="14" maxlength="50" value="${requestParameters.SEARCH_STRING!}" /> + </div> + <#if 0 < otherSearchProdCatalogCategories?size> + <div> + <select name="SEARCH_CATEGORY_ID" size="1"> + <option value="${searchCategoryId!}">${uiLabelMap.ProductEntireCatalog}</option> + <#list otherSearchProdCatalogCategories as otherSearchProdCatalogCategory> + <#assign searchProductCategory = otherSearchProdCatalogCategory.getRelatedOne("ProductCategory", true)> + <#if searchProductCategory??> + <option value="${searchProductCategory.productCategoryId}">${searchProductCategory.description?default("No Description " + searchProductCategory.productCategoryId)}</option> + </#if> + </#list> + </select> + </div> + <#else> + <input type="hidden" name="SEARCH_CATEGORY_ID" value="${searchCategoryId!}" /> + </#if> + <div> + <input type="radio" name="SEARCH_OPERATOR" id="SEARCH_OPERATOR_OR" value="OR" <#if searchOperator == "OR">checked="checked"</#if> /><label for="SEARCH_OPERATOR_OR">${uiLabelMap.CommonAny}</label> + <input type="radio" name="SEARCH_OPERATOR" id="SEARCH_OPERATOR_AND" value="AND" <#if searchOperator == "AND">checked="checked"</#if> /><label for="SEARCH_OPERATOR_AND">${uiLabelMap.CommonAll}</label> + <input type="submit" value="${uiLabelMap.CommonFind}" class="button" /> + </div> + </fieldset> + </form> + <form name="advancedsearchform" id="keywordsearchbox_advancedsearchform" method="post" action="<@ofbizUrl>advancedsearch</@ofbizUrl>"> + <fieldset> + <#if 0 < otherSearchProdCatalogCategories?size> + <label for="SEARCH_CATEGORY_ID">${uiLabelMap.ProductAdvancedSearchIn}: </label> + <select name="SEARCH_CATEGORY_ID" id="SEARCH_CATEGORY_ID" size="1"> + <option value="${searchCategoryId!}">${uiLabelMap.ProductEntireCatalog}</option> + <#list otherSearchProdCatalogCategories as otherSearchProdCatalogCategory> + <#assign searchProductCategory = otherSearchProdCatalogCategory.getRelatedOne("ProductCategory", true)> + <#if searchProductCategory??> + <option value="${searchProductCategory.productCategoryId}">${searchProductCategory.description?default("No Description " + searchProductCategory.productCategoryId)}</option> + </#if> + </#list> + </select> + <#else> + <input type="hidden" name="SEARCH_CATEGORY_ID" value="${searchCategoryId!}" /> + </#if> + <input type="submit" value="${uiLabelMap.ProductAdvancedSearch}" class="button" /> + </fieldset> + </form> + </div> +</div> \ No newline at end of file Propchange: ofbiz/trunk/applications/order/template/entry/catalog/keywordsearchbox.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/entry/catalog/keywordsearchbox.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/entry/catalog/keywordsearchbox.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/order/template/entry/catalog/product.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/entry/catalog/product.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/entry/catalog/product.ftl (added) +++ ofbiz/trunk/applications/order/template/entry/catalog/product.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,25 @@ +<#-- +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. +--> +${pages.get("/entry/OrderEntryTabBar.ftl")} +<#if requestAttributes.product?has_content> + ${pages.get(requestAttributes.detailTemplate)} +<#else> + <#assign productId = requestAttributes.productId!> + <center><h2>${uiLabelMap.ProductProductNotFound} ${productId!}!</h2></center> +</#if> Propchange: ofbiz/trunk/applications/order/template/entry/catalog/product.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/entry/catalog/product.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/entry/catalog/product.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/order/template/entry/catalog/productdetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/entry/catalog/productdetail.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/entry/catalog/productdetail.ftl (added) +++ ofbiz/trunk/applications/order/template/entry/catalog/productdetail.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,710 @@ +<#-- +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!} +<script language="JavaScript" type="text/javascript"> +<!-- + var detailImageUrl = null; + function setAddProductId(name) { + document.addform.add_product_id.value = name; + if (document.addform.quantity == null) return; + if (name == '' || name == 'NULL' || isVirtual(name) == true) { + document.addform.quantity.disabled = true; + var elem = document.getElementById('product_id_display'); + var txt = document.createTextNode(''); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + } else { + document.addform.quantity.disabled = false; + var elem = document.getElementById('product_id_display'); + var txt = document.createTextNode(name); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + } + } + function setVariantPrice(sku) { + if (sku == '' || sku == 'NULL' || isVirtual(sku) == true) { + var elem = document.getElementById('variant_price_display'); + var txt = document.createTextNode(''); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + } + else { + var elem = document.getElementById('variant_price_display'); + var price = getVariantPrice(sku); + var txt = document.createTextNode(price); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + } + } + function isVirtual(product) { + var isVirtual = false; + <#if virtualJavaScript??> + for (i = 0; i < VIR.length; i++) { + if (VIR[i] == product) { + isVirtual = true; + } + } + </#if> + return isVirtual; + } + function addItem() { + if (document.addform.add_product_id.value == 'NULL') { + showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonPleaseSelectAllRequiredOptions}"); + return; + } else { + if (isVirtual(document.addform.add_product_id.value)) { + document.location = '<@ofbizUrl>product?category_id=${categoryId!}&product_id=</@ofbizUrl>' + document.addform.add_product_id.value; + return; + } else { + document.addform.submit(); + } + } + } + + function popupDetail() { + var defaultDetailImage = "${firstDetailImage?default(mainDetailImageUrl?default("_NONE_"))}"; + if (defaultDetailImage == null || defaultDetailImage == "null" || defaultDetailImage == "") { + defaultDetailImage = "_NONE_"; + } + + if (detailImageUrl == null || detailImageUrl == "null") { + detailImageUrl = defaultDetailImage; + } + + if (detailImageUrl == "_NONE_") { + hack = document.createElement('span'); + hack.innerHTML="${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"; + showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonNoDetailImageAvailableToDisplay}"); + return; + } + detailImageUrl = detailImageUrl.replace(/\&\#47;/g, "/"); + popUp("<@ofbizUrl>detailImage?detail=" + detailImageUrl + "</@ofbizUrl>", 'detailImage', '400', '550'); + } + + function toggleAmt(toggle) { + if (toggle == 'Y') { + changeObjectVisibility("add_amount", "visible"); + } + + if (toggle == 'N') { + changeObjectVisibility("add_amount", "hidden"); + } + } + + function findIndex(name) { + for (i = 0; i < OPT.length; i++) { + if (OPT[i] == name) { + return i; + } + } + return -1; + } + + function getList(name, index, src) { + currentFeatureIndex = findIndex(name); + + if (currentFeatureIndex == 0) { + // set the images for the first selection + if (IMG[index] != null) { + if (document.images['mainImage'] != null) { + document.images['mainImage'].src = IMG[index]; + detailImageUrl = DET[index]; + } + } + + // set the drop down index for swatch selection + document.forms["addform"].elements[name].selectedIndex = (index*1)+1; + } + + if (currentFeatureIndex < (OPT.length-1)) { + // eval the next list if there are more + var selectedValue = document.forms["addform"].elements[name].options[(index*1)+1].value; + if (index == -1) { + <#if featureOrderFirst??> + var Variable1 = eval("list" + "${featureOrderFirst}" + "()"); + </#if> + } else { + var Variable1 = eval("list" + OPT[(currentFeatureIndex+1)] + selectedValue + "()"); + } + // set the product ID to NULL to trigger the alerts + setAddProductId('NULL'); + + // set the variant price to NULL + setVariantPrice('NULL'); + } else { + // this is the final selection -- locate the selected index of the last selection + var indexSelected = document.forms["addform"].elements[name].selectedIndex; + + // using the selected index locate the sku + var sku = document.forms["addform"].elements[name].options[indexSelected].value; + + // display alternative packaging dropdown + ajaxUpdateArea("product_uom", "<@ofbizUrl>ProductUomDropDownOnly</@ofbizUrl>", "productId=" + sku); + + // set the product ID + setAddProductId(sku); + + // set the variant price + setVariantPrice(sku); + + // check for amount box + toggleAmt(checkAmtReq(sku)); + } + } + + function validate(x){ + var msg=new Array(); + msg[0]="Please use correct date format [yyyy-mm-dd]"; + + var y=x.split("-"); + if(y.length!=3){ showAlert(msg[0]);return false; } + if((y[2].length>2)||(parseInt(y[2])>31)) { showAlert(msg[0]); return false; } + if(y[2].length==1){ y[2]="0"+y[2]; } + if((y[1].length>2)||(parseInt(y[1])>12)){ showAlert(msg[0]); return false; } + if(y[1].length==1){ y[1]="0"+y[1]; } + if(y[0].length>4){ showAlert(msg[0]); return false; } + if(y[0].length<4) { + if(y[0].length==2) { + y[0]="20"+y[0]; + } else { + showAlert(msg[0]); + return false; + } + } + return (y[0]+"-"+y[1]+"-"+y[2]); + } + + function showAlert(msg) { + showErrorAlert("${uiLabelMap.CommonErrorMessage2}",msg); + } + + function additemSubmit(){ + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> + newdatevalue = validate(document.addform.reservStart.value); + if (newdatevalue == false) { + document.addform.reservStart.focus(); + } else { + document.addform.reservStart.value = newdatevalue; + document.addform.submit(); + } + <#else> + document.addform.submit(); + </#if> + } + + function addShoplistSubmit(){ + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> + if (document.addToShoppingList.reservStartStr.value == "") { + document.addToShoppingList.submit(); + } else { + newdatevalue = validate(document.addToShoppingList.reservStartStr.value); + if (newdatevalue == false) { + document.addToShoppingList.reservStartStr.focus(); + } else { + document.addToShoppingList.reservStartStr.value = newdatevalue; + // document.addToShoppingList.reservStart.value = ; + document.addToShoppingList.reservStartStr.value.slice(0,9)+" 00:00:00.000000000"; + document.addToShoppingList.submit(); + } + } + <#else> + document.addToShoppingList.submit(); + </#if> + } + + <#if product.virtualVariantMethodEnum! == "VV_FEATURETREE" && featureLists?has_content> + function checkRadioButton() { + var block1 = document.getElementById("addCart1"); + var block2 = document.getElementById("addCart2"); + <#list featureLists as featureList> + <#list featureList as feature> + <#if feature_index == 0> + var myList = document.getElementById("FT${feature.productFeatureTypeId}"); + if (myList.options[0].selected == true){ + block1.style.display = "none"; + block2.style.display = "block"; + return; + } + <#break> + </#if> + </#list> + </#list> + block1.style.display = "block"; + block2.style.display = "none"; + } + </#if> + + function displayProductVirtualVariantId(variantId) { + document.addform.product_id.value = variantId; + var elem = document.getElementById('product_id_display'); + var txt = document.createTextNode(variantId); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + setVariantPrice(variantId); + } + //--> + </script> + +<div id="productdetail"> + +<table border="0" cellpadding="2" cellspacing="0" width="100%"> + <#-- Category next/previous --> + <#if category??> + <tr> + <td colspan="2" align="right"> + <#if previousProductId??> + <a href="<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${previousProductId!}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> | + </#if> + <a href="<@ofbizUrl>category/~category_id=${categoryId!}</@ofbizUrl>" class="linktext">${(category.categoryName)?default(category.description)!}</a> + <#if nextProductId??> + | <a href="<@ofbizUrl>product/~category_id=${categoryId!}/~product_id=${nextProductId!}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a> + </#if> + </td> + </tr> + </#if> + + <tr><td colspan="2"><hr /></td></tr> + + <#-- Product image/name/price --> + <tr> + <td valign="top" width="0"> + <#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> + <#if productLargeImageUrl?string?has_content> + <a href="javascript:popupDetail();"><img src="<@ofbizContentUrl>${contentPathPrefix!}${productLargeImageUrl!}</@ofbizContentUrl>" name="mainImage" vspace="5" hspace="5" class='cssImgLarge' alt="" /></a> + </#if> + </td> + <td align="right" valign="top"> + <h2>${productContentWrapper.get("PRODUCT_NAME", "html")!}</h2> + <div>${productContentWrapper.get("DESCRIPTION", "html")!}</div> + <div><b>${product.productId!}</b></div> + <#-- example of showing a certain type of feature with the product --> + <#if sizeProductFeatureAndAppls?has_content> + <div> + <#if (sizeProductFeatureAndAppls?size == 1)> + Size: + <#else> + Sizes Available: + </#if> + <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl> + ${sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,</#if> + </#list> + </div> + </#if> + + <#-- 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> + <div>${uiLabelMap.ProductCompareAtPrice}: <span class="basePrice"><@ofbizCurrency amount=price.competitivePrice isoCode=price.currencyUsed/></span></div> + </#if> + <#if price.listPrice?? && price.price?? && price.price?double < price.listPrice?double> + <div>${uiLabelMap.ProductListPrice}: <span class="basePrice"><@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed/></span></div> + </#if> + <#if price.listPrice?? && price.defaultPrice?? && price.price?? && price.price?double < price.defaultPrice?double && price.defaultPrice?double < price.listPrice?double> + <div>${uiLabelMap.ProductRegularPrice}: <span class="basePrice"><@ofbizCurrency amount=price.defaultPrice isoCode=price.currencyUsed/></span></div> + </#if> + <#if price.specialPromoPrice??> + <div>${uiLabelMap.ProductSpecialPromoPrice}: <span class="basePrice"><@ofbizCurrency amount=price.specialPromoPrice isoCode=price.currencyUsed/></span></div> + </#if> + <div> + <b> + <#if price.isSale?? && price.isSale> + <span class="salePrice">${uiLabelMap.OrderOnSale}!</span> + <#assign priceStyle = "salePrice"> + <#else> + <#assign priceStyle = "regularPrice"> + </#if> + ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual!> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> + <#if product.reserv2ndPPPerc?? && product.reserv2ndPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?? || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}</#if> <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> + <#if product.reservNthPPPerc?? &&product.reservNthPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?? || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} </#if> ${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> + <#if (!product.reserv2ndPPPerc?? || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?? || product.reservNthPPPerc == 0)><br />${uiLabelMap.ProductMaximum} ${product.reservMaxPersons!1} ${uiLabelMap.ProductPersons}.</#if> + </#if> + </b> + </div> + <#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> + <div>${uiLabelMap.OrderSave}: <span class="basePrice"><@ofbizCurrency amount=priceSaved isoCode=price.currencyUsed/> (${percentSaved?int}%)</span></div> + </#if> + <#-- 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> + <div>${orderItemPriceInfo.description!}</div> + </#list> + </#if> + </#if> + + <#-- Included quantities/pieces --> + <#if product.piecesIncluded?? && product.piecesIncluded?long != 0> + <div> + ${uiLabelMap.OrderPieces}: ${product.piecesIncluded} + </div> + </#if> + <#if (product.quantityIncluded?? && product.quantityIncluded?double != 0) || product.quantityUomId?has_content> + <#assign quantityUom = product.getRelatedOne("QuantityUom", true)!/> + <div> + ${uiLabelMap.CommonQuantity}: ${product.quantityIncluded!} ${((quantityUom.abbreviation)?default(product.quantityUomId))!} + </div> + </#if> + + <#if (product.productWeight?? && product.productWeight?double != 0) || product.weightUomId?has_content> + <#assign weightUom = product.getRelatedOne("WeightUom", true)!/> + <div> + ${uiLabelMap.CommonWeight}: ${product.productWeight!} ${((weightUom.abbreviation)?default(product.weightUomId))!} + </div> + </#if> + <#if (product.productHeight?? && product.productHeight?double != 0) || product.heightUomId?has_content> + <#assign heightUom = product.getRelatedOne("HeightUom", true)!/> + <div> + ${uiLabelMap.CommonHeight}: ${product.productHeight!} ${((heightUom.abbreviation)?default(product.heightUomId))!} + </div> + </#if> + <#if (product.productWidth?? && product.productWidth?double != 0) || product.widthUomId?has_content> + <#assign widthUom = product.getRelatedOne("WidthUom", true)!/> + <div> + ${uiLabelMap.CommonWidth}: ${product.productWidth!} ${((widthUom.abbreviation)?default(product.widthUomId))!} + </div> + </#if> + <#if (product.productDepth?? && product.productDepth?double != 0) || product.depthUomId?has_content> + <#assign depthUom = product.getRelatedOne("DepthUom", true)!/> + <div> + ${uiLabelMap.CommonDepth}: ${product.productDepth!} ${((depthUom.abbreviation)?default(product.depthUomId))!} + </div> + </#if> + + <#if daysToShip??> + <div><b>${uiLabelMap.ProductUsuallyShipsIn} <font color="red">${daysToShip}</font> ${uiLabelMap.CommonDays}!<b></div> + </#if> + + <#if disFeatureList?? && 0 < disFeatureList.size()> + <p> </p> + <#list disFeatureList as currentFeature> + <#assign disFeatureType = currentFeature.getRelatedOne("ProductFeatureType", true)/> + <div> + <#if disFeatureType.description??>${disFeatureType.get("description", locale)}<#else>${currentFeature.productFeatureTypeId}</#if>: ${currentFeature.description} + </div> + </#list> + <div> </div> + </#if> + + <form method="post" action="<@ofbizUrl>additem<#if requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>" name="addform" style="margin: 0;"> + <#if requestAttributes.paramMap?has_content> + <input type="hidden" name="itemComment" value="${requestAttributes.paramMap.itemComment!}" /> + <input type="hidden" name="shipBeforeDate" value="${requestAttributes.paramMap.shipBeforeDate!}" /> + <input type="hidden" name="shipAfterDate" value="${requestAttributes.paramMap.shipAfterDate!}" /> + <input type="hidden" name="itemDesiredDeliveryDate" value="${requestAttributes.paramMap.itemDesiredDeliveryDate!}" /> + </#if> + <#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> + <div>${feature.description}: <select id="FT${feature.productFeatureTypeId}" name="FT${feature.productFeatureTypeId}" onchange="javascript:checkRadioButton();"> + <option value="select" selected="selected"> select option </option> + <#else> + <option value="${feature.productFeatureId}">${feature.description} <#if feature.price??>(+ <@ofbizCurrency amount=feature.price?string isoCode=feature.currencyUomId/>)</#if></option> + </#if> + </#list> + </select> + </div> + </#list> + <input type="hidden" name="product_id" value="${product.productId}"/> + <input type="hidden" name="add_product_id" value="${product.productId}"/> + <div id="addCart1" style="display:none;> + <span style="white-space: nowrap;"><b>${uiLabelMap.CommonQuantity}:</b></span> + <input type="text" size="5" name="quantity" value="1"/> + <a href="javascript:javascript:addItem();" class="buttontext"><span style="white-space: nowrap;">${uiLabelMap.OrderAddToCart}</span></a> + + </div> + <div id="addCart2" style="display:block;> + <span style="white-space: nowrap;"><b>${uiLabelMap.CommonQuantity}:</b></span> + <input type="text" size="5" value="1" disabled="disabled"/> + <a href="javascript:showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonPleaseSelectAllFeaturesFirst}");" class="buttontext"><span style="white-space: nowrap;">${uiLabelMap.OrderAddToCart}</span></a> + + </div> + </#if> + <#if !product.virtualVariantMethodEnum?? || product.virtualVariantMethodEnum == "VV_VARIANTTREE"> + <#if variantTree?? && (variantTree.size() > 0)> + <#list featureSet as currentType> + <div> + <select name="FT${currentType}" onchange="javascript:getList(this.name, (this.selectedIndex-1), 1);"> + <option>${featureTypes.get(currentType)}</option> + </select> + </div> + </#list> + <span id="product_uom"></span> + <input type="hidden" name="product_id" value="${product.productId}"/> + <input type="hidden" name="add_product_id" value="NULL"/> + <div> + <b><span id="product_id_display"> </span></b> + <b><div id="variant_price_display"> </div></b> + </div> + <#else> + <input type="hidden" name="product_id" value="${product.productId}"/> + <input type="hidden" name="add_product_id" value="NULL"/> + <div><b>${uiLabelMap.ProductItemOutOfStock}.</b></div> + <#assign inStock = false> + </#if> + </#if> + <#else> + <input type="hidden" name="product_id" value="${product.productId}"/> + <input type="hidden" name="add_product_id" value="${product.productId}"/> + <#if productStoreId??> + <#assign isStoreInventoryNotAvailable = !(Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryAvailable(request, product, 1.0?double))> + <#assign isStoreInventoryRequired = Static["org.ofbiz.product.store.ProductStoreWorker"].isStoreInventoryRequired(request, product)> + <#if isStoreInventoryNotAvailable> + <#if isStoreInventoryRequired> + <div><b>${uiLabelMap.ProductItemOutOfStock}.</b></div> + <#assign inStock = false> + <#else> + <div><b>${product.inventoryMessage!}</b></div> + </#if> + </#if> + </#if> + </#if> + </td></tr><tr><td colspan="2" align="right"> + <#-- check to see if introductionDate hasnt passed yet --> + <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)> + <p> </p> + <div style="color: red;">${uiLabelMap.ProductProductNotYetMadeAvailable}.</div> + <#-- check to see if salesDiscontinuationDate has passed --> + <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)> + <div style="color: red;">${uiLabelMap.ProductProductNoLongerAvailable}.</div> + <#-- 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"> + </#if> + <div id="add_amount" class="${hiddenStyle}"> + <span style="white-space: nowrap;"><b>${uiLabelMap.CommonAmount}:</b></span> + <input type="text" size="5" name="add_amount" value=""/> + </div> + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> + <table width="100%"><tr> + <@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=""/> + <tr> + <#--td nowrap="nowrap" align="right">Number<br />of days</td><td><input type="textt" size="4" name="reservLength"/></td></tr><tr><td> </td><td align="right" nowrap> </td--> + <#if (product.reservMaxPersons!)?is_number> + <td nowrap="nowrap" align="right">Number of persons</td> + <td><input type="text" size="4" name="reservPersons" value="2"/></td> + </#if> + <td nowrap="nowrap" align="right">Quantity</td> + <td><input type="text" size="5" name="quantity" value="1"/></td> + </tr> + </table> + <#else/> + <input type="text" size="5" name="quantity" value="1"<#if product.isVirtual!?upper_case == "Y"> disabled="disabled"</#if>/> + </#if> + <#-- This calls addItem() so that variants of virtual products cant be added before distinguishing features are selected, it should not be changed to additemSubmit() --> + <a href="javascript:addItem()" class="buttontext"><span style="white-space: nowrap;">${uiLabelMap.OrderAddToCart}</span></a> + </#if> + <#if requestParameters.category_id??> + <input type="hidden" name="category_id" value="${requestParameters.category_id}"/> + </#if> + </#if> + </form> + <div> + <#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous"> + <hr /> + <form name="addToShoppingList" method="post" action="<@ofbizUrl>addItemToShoppingList<#if requestAttributes._CURRENT_VIEW_??>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>"> + <input type="hidden" name="productId" value="${product.productId}"/> + <input type="hidden" name="product_id" value="${product.productId}"/> + <input type="hidden" name="productStoreId" value="${productStoreId!}"/> + <input type="hidden" name="reservStart" value= ""/> + <select name="shoppingListId"> + <#if shoppingLists?has_content> + <#list shoppingLists as shoppingList> + <option value="${shoppingList.shoppingListId}">${shoppingList.listName}</option> + </#list> + </#if> + <option value="">---</option> + <option value="">${uiLabelMap.OrderNewShoppingList}</option> + </select> + + <#if product.productTypeId! == "ASSET_USAGE" || product.productTypeId! == "ASSET_USAGE_OUT_IN"> + <table><tr><td> </td><td align="right">${uiLabelMap.CommonStartDate} (yyyy-mm-dd)</td><td><input type="text" size="10" name="reservStartStr" /></td><td>Number of days</td><td><input type="text" size="4" name="reservLength" /></td><td> </td><td align="right">Number of persons</td><td><input type="text" size="4" name="reservPersons" value="1" /></td><td align="right">Qty </td><td><input type="text" size="5" name="quantity" value="1" /></td></tr></table> + <#else> + <input type="text" size="5" name="quantity" value="1"/> + <input type="hidden" name="reservStartStr" value= ""/> + </#if> + <a href="javascript:addShoplistSubmit();" class="buttontext">${uiLabelMap.OrderAddToShoppingList}</a> + </form> + <#else> <br /> + ${uiLabelMap.OrderYouMust} <a href="<@ofbizUrl>checkLogin/showcart</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonBeLogged}</a> + ${uiLabelMap.OrderToAddSelectedItemsToShoppingList}. + </#if> + </div> + <#-- Prefill first select box (virtual products only) --> + <#if variantTree?? && 0 < variantTree.size()> + <script language="JavaScript" type="text/javascript">eval("list" + "${featureOrderFirst}" + "()");</script> + </#if> + + <#-- Swatches (virtual products only) --> + <#if variantSample?? && 0 < variantSample.size()> + <#assign imageKeys = variantSample.keySet()> + <#assign imageMap = variantSample> + <p> </p> + <table cellspacing="0" cellpadding="0"> + <tr> + <#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.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> + <#if !imageUrl?string?has_content> + <#assign imageUrl = "/images/defaultImage.jpg"> + </#if> + <td align="center" valign="bottom"> + <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);"><img src="<@ofbizContentUrl>${contentPathPrefix!}${imageUrl}</@ofbizContentUrl>" class='cssImgSmall' alt="" /></a> + <br /> + <a href="javascript:getList('FT${featureOrderFirst}','${indexer}',1);" class="linktext">${key}</a> + </td> + </#if> + <#assign indexer = indexer + 1> + </#list> + <#if (indexer > maxIndex)> + <div><b>${uiLabelMap.ProductMoreOptions}</b></div> + </#if> + </tr> + </table> + </#if> + </td> + </tr> +</table> + + <#-- Digital Download Files Associated with this Product --> + <#if downloadProductContentAndInfoList?has_content> + <div id="download-files"> + <div>${uiLabelMap.OrderDownloadFilesTitle}:</div> + <#list downloadProductContentAndInfoList as downloadProductContentAndInfo> + <div>${downloadProductContentAndInfo.contentName}<#if downloadProductContentAndInfo.description?has_content> - ${downloadProductContentAndInfo.description}</#if></div> + </#list> + </div> + </#if> + + <#-- Long description of product --> + <div id="long-description"> + <div>${productContentWrapper.get("LONG_DESCRIPTION", "html")!}</div> + <div>${productContentWrapper.get("WARNINGS", "html")!}</div> + </div> + + <#-- 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> + <#if assocProducts?has_content> + <h2>${beforeName!}<#if showName == "Y">${productContentWrapper.get("PRODUCT_NAME", "html")!}</#if>${afterName!}</h2> + + <div class="productsummary-container"> + <#list assocProducts as productAssoc> + <div> + <a href="<@ofbizUrl>${targetRequest}/<#if categoryId??>~category_id=${categoryId}/</#if>~product_id=${productAssoc.productIdTo!}</@ofbizUrl>" class="buttontext"> + ${productAssoc.productIdTo!} + </a> + - <b>${productAssoc.reason!}</b> + </div> + ${setRequestAttribute("optProductId", productAssoc.productIdTo)} + ${setRequestAttribute("listIndex", listIndex)} + ${setRequestAttribute("formNamePrefix", formNamePrefix)} + <#if targetRequestName?has_content> + ${setRequestAttribute("targetRequestName", targetRequestName)} + </#if> + ${screens.render(productsummaryScreen)} + <#local listIndex = listIndex + 1> + </#list> + </div> + + ${setRequestAttribute("optProductId", "")} + ${setRequestAttribute("formNamePrefix", "")} + ${setRequestAttribute("targetRequestName", "")} + </#if> +</#macro> + +<#assign productValue = product> +<#assign listIndex = 1> +${setRequestAttribute("productValue", productValue)} +<div id="associated-products"> + <#-- 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=""/> +</div> + +<#-- special cross/up-sell area using commonFeatureResultIds (from common feature product search) --> +<#if commonFeatureResultIds?has_content> + <h2>${uiLabelMap.ProductSimilarProducts}</h2> + + <div class="productsummary-container"> + <#list commonFeatureResultIds as commonFeatureResultId> + ${setRequestAttribute("optProductId", commonFeatureResultId)} + ${setRequestAttribute("listIndex", commonFeatureResultId_index)} + ${setRequestAttribute("formNamePrefix", "cfeatcssl")} + <#-- ${setRequestAttribute("targetRequestName", targetRequestName)} --> + ${screens.render(productsummaryScreen)} + </#list> + </div> +</#if> +</div> Propchange: ofbiz/trunk/applications/order/template/entry/catalog/productdetail.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/entry/catalog/productdetail.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/entry/catalog/productdetail.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/order/template/entry/catalog/productsummary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/entry/catalog/productsummary.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/entry/catalog/productsummary.ftl (added) +++ ofbiz/trunk/applications/order/template/entry/catalog/productsummary.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,235 @@ +<#-- +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!} +<script type="text/javascript"> +<!-- + function displayProductVirtualId(variantId, virtualProductId, pForm) { + if(variantId){ + pForm.product_id.value = variantId; + }else{ + pForm.product_id.value = ''; + variantId = ''; + } + var elem = document.getElementById('product_id_display'); + var txt = document.createTextNode(variantId); + if(elem.hasChildNodes()) { + elem.replaceChild(txt, elem.firstChild); + } else { + elem.appendChild(txt); + } + + var priceElem = document.getElementById('variant_price_display'); + var price = getVariantPrice(variantId); + var priceTxt = null; + if(price){ + priceTxt = document.createTextNode(price); + }else{ + priceTxt = document.createTextNode(''); + } + + if(priceElem.hasChildNodes()) { + priceElem.replaceChild(priceTxt, priceElem.firstChild); + } else { + priceElem.appendChild(priceTxt); + } + } +//--> +</script> +<#if product??> + <#-- variable setup --> + <#if backendPath?default("N") == "Y"> + <#assign productUrl><@ofbizCatalogUrl productId=product.productId productCategoryId=categoryId/></#assign> + <#else> + <#assign productUrl><@ofbizCatalogAltUrl productId=product.productId productCategoryId=categoryId/></#assign> + </#if> + + <#if requestAttributes.productCategoryMember??> + <#assign prodCatMem = requestAttributes.productCategoryMember> + </#if> + <#assign smallImageUrl = productContentWrapper.get("SMALL_IMAGE_URL", "url")!> + <#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"></#if> + <#-- end variable setup --> + <#assign productInfoLinkId = "productInfoLink"> + <#assign productInfoLinkId = productInfoLinkId + product.productId/> + <#assign productDetailId = "productDetailId"/> + <#assign productDetailId = productDetailId + product.productId/> + <div class="productsummary"> + <div class="smallimage"> + <a href="${productUrl}"> + <span id="${productInfoLinkId}" class="popup_link"><img src="<@ofbizContentUrl>${contentPathPrefix!}${smallImageUrl}</@ofbizContentUrl>" alt="Small Image"/></span> + </a> + </div> + <div id="${productDetailId}" class="popup" style="display:none;"> + <table> + <tr valign="top"> + <td> + <img src="<@ofbizContentUrl>${contentPathPrefix!}${smallImageUrl}</@ofbizContentUrl>" alt="Small Image"/><br /> + ${uiLabelMap.ProductProductId} : ${product.productId!}<br /> + ${uiLabelMap.ProductProductName} : ${product.productName!}<br /> + ${uiLabelMap.CommonDescription} : ${productContentWrapper.get("DESCRIPTION", "html")!} + </td> + </tr> + </table> + </div> + <script type="text/javascript"> + jQuery("#${productInfoLinkId}").hover(function() { + jQuery("#${productDetailId}").fadeIn("slow"); + }, function () { + jQuery("#${productDetailId}").fadeOut("fast"); + }); + </script> + <div class="productbuy"> + <#-- check to see if introductionDate hasn't passed yet --> + <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)> + <div style="color: red;">${uiLabelMap.ProductNotYetAvailable}</div> + <#-- check to see if salesDiscontinuationDate has passed --> + <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)> + <div style="color: red;">${uiLabelMap.ProductNoLongerAvailable}</div> + <#-- check to see if it is a rental item; will enter parameters on the detail screen--> + <#elseif product.productTypeId! == "ASSET_USAGE"> + <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a> + <#-- 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"> + <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderConfigure}...</a> + <#-- check to see if the product is a virtual product --> + <#elseif product.isVirtual?? && product.isVirtual == "Y"> + <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderChooseVariations}...</a> + <#-- check to see if the product requires an amount --> + <#elseif product.requireAmount?? && product.requireAmount == "Y"> + <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderChooseAmount}...</a> + <#elseif product.productTypeId! == "ASSET_USAGE_OUT_IN"> + <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderRent}...</a> + <#else> + <form method="post" action="<@ofbizUrl>additem</@ofbizUrl>" name="the${requestAttributes.formNamePrefix!}${requestAttributes.listIndex!}form" style="margin: 0;"> + <input type="hidden" name="add_product_id" value="${product.productId}"/> + <input type="text" size="5" name="quantity" value="1"/> + <input type="hidden" name="clearSearch" value="N"/> + <input type="hidden" name="mainSubmitted" value="Y"/> + <a href="javascript:document.the${requestAttributes.formNamePrefix!}${requestAttributes.listIndex!}form.submit()" class="buttontext">${uiLabelMap.OrderAddToCart}</a> + <#if mainProducts?has_content> + <input type="hidden" name="product_id" value=""/> + <select name="productVariantId" onchange="javascript:displayProductVirtualId(this.value, '${product.productId}', this.form);"> + <option value="">Select Unit Of Measure</option> + <#list mainProducts as mainProduct> + <option value="${mainProduct.productId}">${mainProduct.uomDesc} : ${mainProduct.piecesIncluded}</option> + </#list> + </select> + <div style="display: inline-block;"> + <strong><span id="product_id_display"> </span></strong> + <strong><span id="variant_price_display"> </span></strong> + </div> + </#if> + </form> + + <#if prodCatMem?? && prodCatMem.quantity?? && 0.00 < prodCatMem.quantity?double> + <form method="post" action="<@ofbizUrl>additem</@ofbizUrl>" name="the${requestAttributes.formNamePrefix!}${requestAttributes.listIndex!}defaultform" style="margin: 0;"> + <input type="hidden" name="add_product_id" value="${prodCatMem.productId!}"/> + <input type="hidden" name="quantity" value="${prodCatMem.quantity!}"/> + <input type="hidden" name="clearSearch" value="N"/> + <input type="hidden" name="mainSubmitted" value="Y"/> + <a href="javascript:document.the${requestAttributes.formNamePrefix!}${requestAttributes.listIndex!}defaultform.submit()" class="buttontext">${uiLabelMap.CommonAddDefault}(${prodCatMem.quantity?string.number}) ${uiLabelMap.OrderToCart}</a> + </form> + <#assign productCategory = delegator.findOne("ProductCategory", Static["org.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", prodCatMem.productCategoryId), false)/> + <#if productCategory.productCategoryTypeId != "BEST_SELL_CATEGORY"> + <form method="post" action="<@ofbizUrl>additem</@ofbizUrl>" name="the${requestAttributes.formNamePrefix!}${requestAttributes.listIndex!}defaultform" style="margin: 0;"> + <input type="hidden" name="add_product_id" value="${prodCatMem.productId!}"/> + <input type="hidden" name="quantity" value="${prodCatMem.quantity!}"/> + <input type="hidden" name="clearSearch" value="N"/> + <input type="hidden" name="mainSubmitted" value="Y"/> + <a href="javascript:document.the${requestAttributes.formNamePrefix!}${requestAttributes.listIndex!}defaultform.submit()" class="buttontext">${uiLabelMap.CommonAddDefault}(${prodCatMem.quantity?string.number}) ${uiLabelMap.OrderToCart}</a> + </form> + </#if> + </#if> + </#if> + </div> + <div class="productinfo"> + <div> + <a href="${productUrl}" class="linktext">${productContentWrapper.get("PRODUCT_NAME", "html")!}</a> + </div> + <div>${productContentWrapper.get("DESCRIPTION", "html")!}<#if daysToShip??> - ${uiLabelMap.ProductUsuallyShipsIn} <b>${daysToShip}</b> ${uiLabelMap.CommonDays}!</#if></div> + + <#-- Display category-specific product comments --> + <#if prodCatMem?? && prodCatMem.comments?has_content> + <div>${prodCatMem.comments}</div> + </#if> + + <#-- example of showing a certain type of feature with the product --> + <#if sizeProductFeatureAndAppls?has_content> + <div> + <#if (sizeProductFeatureAndAppls?size == 1)> + ${uiLabelMap.SizeAvailableSingle}: + <#else> + ${uiLabelMap.SizeAvailableMultiple}: + </#if> + <#list sizeProductFeatureAndAppls as sizeProductFeatureAndAppl> + ${sizeProductFeatureAndAppl.abbrev?default(sizeProductFeatureAndAppl.description?default(sizeProductFeatureAndAppl.productFeatureId))}<#if sizeProductFeatureAndAppl_has_next>,</#if> + </#list> + </div> + </#if> + <div> + <b>${product.productId!}</b> + <#if totalPrice??> + <div>${uiLabelMap.ProductAggregatedPrice}: <span class='basePrice'><@ofbizCurrency amount=totalPrice isoCode=totalPrice.currencyUsed/></span></div> + <#else> + <#if price.competitivePrice?? && price.price?? && price.price?double < price.competitivePrice?double> + ${uiLabelMap.ProductCompareAtPrice}: <span class='basePrice'><@ofbizCurrency amount=price.competitivePrice isoCode=price.currencyUsed/></span> + </#if> + <#if price.listPrice?? && price.price?? && price.price?double < price.listPrice?double> + ${uiLabelMap.ProductListPrice}: <span class="basePrice"><@ofbizCurrency amount=price.listPrice isoCode=price.currencyUsed/></span> + </#if> + <b> + <#if price.isSale?? && price.isSale> + <span class="salePrice">${uiLabelMap.OrderOnSale}!</span> + <#assign priceStyle = "salePrice"> + <#else> + <#assign priceStyle = "regularPrice"> + </#if> + + <#if (price.price?default(0) > 0 && product.requireAmount?default("N") == "N")> + ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual!> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> + </#if> + </b> + <#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}: <span class="basePrice"><@ofbizCurrency amount=priceSaved isoCode=price.currencyUsed/> (${percentSaved?int}%)</span> + </#if> + </#if> + <#-- 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> + <div>${orderItemPriceInfo.description!}</div> + </#list> + </#if> + </#if> + </div> + <#if averageRating?? && (averageRating?double > 0) && numRatings?? && (numRatings?long > 2)> + <div>${uiLabelMap.OrderAverageRating}: ${averageRating} (${uiLabelMap.CommonFrom} ${numRatings} ${uiLabelMap.OrderRatings})</div> + </#if> + <form method="post" action="<@ofbizUrl secure="${request.isSecure()?string}">addToCompare</@ofbizUrl>" name="addToCompare${requestAttributes.listIndex!}form"> + <input type="hidden" name="productId" value="${product.productId}"/> + <input type="hidden" name="mainSubmitted" value="Y"/> + </form> + <a href="javascript:document.addToCompare${requestAttributes.listIndex!}form.submit()" class="buttontext">${uiLabelMap.ProductAddToCompare}</a> + </div> + </div> +<#else> + ${uiLabelMap.ProductErrorProductNotFound}.<br /> +</#if> Propchange: ofbiz/trunk/applications/order/template/entry/catalog/productsummary.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/template/entry/catalog/productsummary.ftl ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/template/entry/catalog/productsummary.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/order/template/entry/catalog/quickadd.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/entry/catalog/quickadd.ftl?rev=1736868&view=auto ============================================================================== --- ofbiz/trunk/applications/order/template/entry/catalog/quickadd.ftl (added) +++ ofbiz/trunk/applications/order/template/entry/catalog/quickadd.ftl Mon Mar 28 11:14:22 2016 @@ -0,0 +1,69 @@ +<#-- +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. +--> + +<#if productCategory?has_content> + <h2>${productCategory.categoryName!}</h2> + <form name="choosequickaddform" method="post" action="<@ofbizUrl>quickadd</@ofbizUrl>" style='margin: 0;'> + <select name='category_id'> + <option value='${productCategory.productCategoryId}'>${productCategory.categoryName!}</option> + <option value='${productCategory.productCategoryId}'>--</option> + <#list quickAddCats as quickAddCatalogId> + <#assign loopCategory = delegator.findOne("ProductCategory", Static["org.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", quickAddCatalogId), true)> + <#if loopCategory?has_content> + <option value='${quickAddCatalogId}'>${loopCategory.categoryName!}</option> + </#if> + </#list> + </select> + <div><a href="javascript:document.choosequickaddform.submit()" class="buttontext">${uiLabelMap.ProductChooseQuickAddCategory}</a></div> + </form> + <#if productCategory.categoryImageUrl?? || productCategory.longDescription??> + <div> + <#if productCategory.categoryImageUrl??> + <img src="<@ofbizContentUrl>${productCategory.categoryImageUrl}</@ofbizContentUrl>" vspace="5" hspace="5" class="cssImgLarge" alt="" /> + </#if> + ${productCategory.longDescription!} + </div> + </#if> +</#if> + +<#if productCategoryMembers?? && 0 < productCategoryMembers?size> + <form method="post" action="<@ofbizUrl>addtocartbulk</@ofbizUrl>" name="bulkaddform"> + <fieldset> + <input type='hidden' name='category_id' value='${categoryId}' /> + <div class="quickaddall"> + <a href="javascript:document.bulkaddform.submit()" class="buttontext">${uiLabelMap.OrderAddAllToCart}</a> + </div> + <div class="quickaddtable"> + <#list productCategoryMembers as productCategoryMember> + <#assign product = productCategoryMember.getRelatedOne("Product", true)> + <p> + ${setRequestAttribute("optProductId", productCategoryMember.productId)} + ${screens.render(quickaddsummaryScreen)} + </p> + </#list> + </div> + <div class="quickaddall"> + <a href="javascript:document.bulkaddform.submit()" class="buttontext">${uiLabelMap.OrderAddAllToCart}</a> + </div> + </fieldset> + </form> +<#else> + <label>${uiLabelMap.ProductNoProductsInThisCategory}.</label> +</#if> + |
Free forum by Nabble | Edit this page |