Author: byersa
Date: Sat Feb 17 21:37:18 2007
New Revision: 508870
URL: http://svn.apache.org/viewvc?view=rev&rev=508870
Log:
Added custom feature export piece.
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java?view=diff&rev=508870&r1=508869&r2=508870
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
Sat Feb 17 21:37:18 2007
@@ -411,6 +411,11 @@
Map productMap = new HashMap();
String productId = searchResultView.getString("productId");
productMap.put("productId", productId);
+
+ List productFeaturesCustomRaw =
delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId",
productId, "productFeatureTypeId", "HAZMAT") );
+ List productFeaturesCustom =
EntityUtil.filterByDate(productFeaturesCustomRaw);
+ productMap.put("productFeatureCustom",
EntityUtil.getFirst(productFeaturesCustom));
+
List productCategoriesRaw =
delegator.findByAnd("ProductCategoryAndMember", UtilMisc.toMap("productId",
productId));
List productCategories =
EntityUtil.filterByDate(productCategoriesRaw);
productMap.put("productCategories", productCategories);
Modified:
ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl?view=diff&rev=508870&r1=508869&r2=508870
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl
(original)
+++ ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl Sat
Feb 17 21:37:18 2007
@@ -16,5 +16,5 @@
specific language governing permissions and limitations
under the License.
--><#list productExportList as productExportMap><#assign
productCategoryCount=0/><#assign productFeatureCount=0/>
-${productExportMap.productId} <#list productExportMap.productCategories as
productCategoryAndMember><#if
productCategoryAndMember.categoryName?has_content><#if productCategoryCount
> 0>,</#if>${productCategoryAndMember.categoryName}<#assign
productCategoryCount=productCategoryCount + 1/></#if></#list> <#list
productExportMap.productFeatures as productFeatureAndAppl><#if
productFeatureAndAppl.description?has_content><#if productFeatureCount >
0>,</#if>${productFeatureAndAppl.description}<#assign
productFeatureCount=productFeatureCount + 1/></#if></#list>
+${productExportMap.productId} <#if
productExportMap.productFeatureCustom?has_content>${productExportMap.productFeatureCustom.description?if_exists}</#if>
<#list productExportMap.productCategories as
productCategoryAndMember><#if
productCategoryAndMember.categoryName?has_content><#if productCategoryCount
> 0>,</#if>${productCategoryAndMember.categoryName}<#assign
productCategoryCount=productCategoryCount + 1/></#if></#list> <#list
productExportMap.productFeatures as productFeatureAndAppl><#if
productFeatureAndAppl.description?has_content><#if productFeatureCount >
0>,</#if>${productFeatureAndAppl.description}<#assign
productFeatureCount=productFeatureCount + 1/></#if></#list>
</#list>