svn commit: r831534 - in /ofbiz/trunk: applications/product/webapp/catalog/WEB-INF/actions/find/ applications/product/webapp/catalog/find/ specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ specialpurpose/ebay/webapp/ebay/find/ specialpurpose/ebay/w...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r831534 - in /ofbiz/trunk: applications/product/webapp/catalog/WEB-INF/actions/find/ applications/product/webapp/catalog/find/ specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ specialpurpose/ebay/webapp/ebay/find/ specialpurpose/ebay/w...

ashish-18
Author: ashish
Date: Sat Oct 31 12:01:52 2009
New Revision: 831534

URL: http://svn.apache.org/viewvc?rev=831534&view=rev
Log:
Applied patch from jira issue OFBIZ-3132 - Multiple productStore support to googleBase and eBay.

Changes includes following:
1) Created new search form for eBay and GoogleBase - It was not good to update *advancesearch*.ftl file present inside catalog component. Now it will be easy to maintain separate file for future deployments.
2) Restricted productStoreId and prodCatalogId field to search.
3) Added webSite drop-down on "Export to eBay" and "Export to GoogleBase" page.
4) Select webSite to get the webSiteUrl.

Thanks Parimal for your contribution - this will surely help the community.
Special thanks to Mridul, Rishi, Chirag, Deepak & Me :-) for discussing requirement and also special thanks to Jacopo for the notes and discussion on requirements.
 

Added:
    ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl   (with props)
    ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl   (with props)
Modified:
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy
    ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl
    ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy
    ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl
    ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml
    ofbiz/trunk/specialpurpose/googlebase/data/DemoGoogleBaseData.xml
    ofbiz/trunk/specialpurpose/googlebase/entitydef/entitymodel.xml
    ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy
    ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseForms.xml
    ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy Sat Oct 31 12:01:52 2009
@@ -18,13 +18,23 @@
  */
 
 import org.ofbiz.entity.condition.*
+import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.product.catalog.*
+import org.ofbiz.product.category.CategoryWorker;
 import org.ofbiz.product.feature.*
 import org.ofbiz.product.product.*
 import org.ofbiz.product.store.ProductStoreWorker;
 
+categoryIds = [];
+prodCatalogList = [];
+categoryList = [];
+
 searchCategoryId = parameters.SEARCH_CATEGORY_ID;
-productStoreId = ProductStoreWorker.getProductStoreId(request);
+if (parameters.productStoreId) {
+    productStoreId = parameters.productStoreId;
+} else {
+    productStoreId = ProductStoreWorker.getProductStoreId(request);
+}
 if ((!searchCategoryId || searchCategoryId.length() == 0) && !productStoreId) {
     currentCatalogId = CatalogWorker.getCurrentCatalogId(request);
     searchCategoryId = CatalogWorker.getCatalogSearchCategoryId(request, currentCatalogId);
@@ -52,6 +62,39 @@
 // get the GoodIdentification types
 goodIdentificationTypes = delegator.findList("GoodIdentificationType", null, null, ['description'], null, false);
 
+//get all productStoreIds used in EbayConfig
+ebayConfigList = delegator.findList("EbayConfig", null, null, null, null, false);
+
+//get all productStoreIds used in GoogleBaseConfig
+googleBaseConfigList = delegator.findList("GoogleBaseConfig", null, null, null, null, false);
+
+if (productStoreId) {
+    productStoreCatalogs = CatalogWorker.getStoreCatalogs(delegator, productStoreId);
+    if (productStoreCatalogs) {
+        productStoreCatalogs.each { productStoreCatalog ->
+            prodCatalog = delegator.findOne("ProdCatalog", [prodCatalogId : productStoreCatalog.prodCatalogId], true);
+            prodCatalogList.add(prodCatalog);
+        }
+    }
+}
+if (parameters.SEARCH_CATALOG_ID) {
+    CategoryWorker.getRelatedCategories(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, parameters.SEARCH_CATALOG_ID), true);
+    if (request.getAttribute("topLevelList")) {
+       categoryList = request.getAttribute("topLevelList");
+    }
+    context.searchCatalogId = parameters.SEARCH_CATALOG_ID;
+} else if (prodCatalogList) {
+    catalog = EntityUtil.getFirst(prodCatalogList);
+    context.searchCatalogId = catalog.prodCatalogId;
+    CategoryWorker.getRelatedCategories(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, catalog.prodCatalogId), true);
+    if (request.getAttribute("topLevelList")) {
+       categoryList = request.getAttribute("topLevelList");
+    }
+}
+if (categoryList) {
+    categoryIds = EntityUtil.getFieldListFromEntityList(categoryList, "productCategoryId", true);
+}
+
 context.searchCategoryId = searchCategoryId;
 context.searchCategory = searchCategory;
 context.productFeaturesByTypeMap = productFeaturesByTypeMap;
@@ -60,4 +103,9 @@
 context.searchConstraintStrings = searchConstraintStrings;
 context.searchSortOrderString = searchSortOrderString;
 context.supplerPartyRoleAndPartyDetails = supplerPartyRoleAndPartyDetails;
-context.goodIdentificationTypes = goodIdentificationTypes;
\ No newline at end of file
+context.goodIdentificationTypes = goodIdentificationTypes;
+context.ebayConfigList = ebayConfigList;
+context.googleBaseConfigList = googleBaseConfigList;
+context.categoryIds = categoryIds;
+context.productStoreId = productStoreId;
+context.prodCatalogList = prodCatalogList;
\ No newline at end of file

Modified: ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl Sat Oct 31 12:01:52 2009
@@ -93,6 +93,7 @@
     </table>
 
     <form method="post" name="products">
+      <input type="hidden" name="productStoreId" value="${parameters.productStoreId?if_exists}" />
       <table cellspacing="0" class="basic-table">
         <#assign listIndex = lowIndex>
         <#assign rowClass = "2">

Modified: ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy (original)
+++ ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy Sat Oct 31 12:01:52 2009
@@ -16,36 +16,50 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import org.ofbiz.webapp.website.WebSiteWorker;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.util.EntityUtil;
 
-webSite = WebSiteWorker.getWebSite(request);
-productStoreId = null;
-if (webSite) {
-    productStoreId = webSite.productStoreId;
-    context.productStoreId = productStoreId;
-    eBayConfig = delegator.findOne("EbayConfig", [productStoreId : productStoreId], false);
-    context.customXml = eBayConfig.customXml;
-    context.webSiteUrl = webSite.getString("standardContentPrefix");
-    
-    categoryCode = parameters.categoryCode;
-    context.categoryCode = categoryCode;
-    userLogin = parameters.userLogin;
-    
-    if (productStoreId) {
-        results = dispatcher.runSync("getEbayCategories", [categoryCode : categoryCode, userLogin : userLogin, productStoreId : productStoreId]);
-    }
-    
-    if (results.categories) {
-        context.categories = results.categories;
+webSiteList = [];
+webSite = null;
+if (parameters.productStoreId) {
+    productStoreId = parameters.productStoreId;
+    webSiteList = delegator.findList("WebSite", EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId), null, null, null, false);
+    if (parameters.webSiteId) {
+        webSite = delegator.findOne("WebSite", ["webSiteId" : parameters.webSiteId], true);
+        context.selectedWebSiteId = parameters.webSiteId;
+    } else if (webSiteList) {
+        webSite = EntityUtil.getFirst(webSiteList);
+        context.selectedWebSiteId = webSite.webSiteId;
     }
-    
-    if (categoryCode) {
-        if (!"Y".equals(categoryCode.substring(0, 1)) && !"".equals(categoryCode)) {
-            context.hideExportOptions = "Y";
+    context.productStoreId = productStoreId;
+    context.webSiteList = webSiteList;
+
+    if (webSite) {
+        eBayConfig = delegator.findOne("EbayConfig", [productStoreId : productStoreId], false);
+        context.customXml = eBayConfig.customXml;
+        context.webSiteUrl = webSite.getString("standardContentPrefix");
+        
+        categoryCode = parameters.categoryCode;
+        context.categoryCode = categoryCode;
+        userLogin = parameters.userLogin;
+        
+        if (productStoreId) {
+            results = dispatcher.runSync("getEbayCategories", [categoryCode : categoryCode, userLogin : userLogin, productStoreId : productStoreId]);
+        }
+        
+        if (results.categories) {
+            context.categories = results.categories;
+        }
+        
+        if (categoryCode) {
+            if (!"Y".equals(categoryCode.substring(0, 1)) && !"".equals(categoryCode)) {
+                context.hideExportOptions = "Y";
+            } else {
+                context.hideExportOptions = "N";
+            }
         } else {
             context.hideExportOptions = "N";
-        }
-    } else {
-        context.hideExportOptions = "N";
-    }    
-}
+        }    
+    }
+}
\ No newline at end of file

Added: ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl?rev=831534&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl (added)
+++ ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl Sat Oct 31 12:01:52 2009
@@ -0,0 +1,375 @@
+<#--
+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.
+-->
+
+<script type="text/javascript">
+//<![CDATA[
+    function selectChange(id) {
+        var formId = id ;
+        formId.action="<@ofbizUrl>main</@ofbizUrl>";
+        formId.submit();
+    }
+    function submit (id) {
+      var formId = id;
+      if(!$('searchCatalogId').empty() && !$('searchProductStoreId').empty()){
+          $(formId).submit();
+      } else {
+          if($('searchProductStoreId').empty()) {
+               $('productStoreErrorMessage').show();
+          }
+          if($('searchCatalogId').empty()) {
+             $('catalogErrorMessage').show();
+          }
+      }
+    }
+//]]>
+</script>
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <h3>${uiLabelMap.ProductAdvancedSearchInCategory}</h3>
+  </div>
+  <div class="screenlet-body">
+    <form id="advToKeywordSearchform" method="post" action="<@ofbizUrl>keywordsearch</@ofbizUrl>" style="margin: 0;">
+      <fieldset>
+        <input type="hidden" name="VIEW_SIZE" value="25"/>
+        <input type="hidden" name="PAGING" value="Y"/>
+        <input type="hidden" name="noConditionFind" value="Y"/>
+        <table cellspacing="0" class="basic-table">
+          <#if searchCategory?has_content>
+            <input type="hidden" name="SEARCH_CATEGORY_ID" value="${searchCategoryId?if_exists}"/>
+            <tr>
+              <td class="label" align="right" valign="middle">
+                ${uiLabelMap.ProductCategory}:
+              </td>
+              <td valign="middle">
+                <div>
+                  <b>"${(searchCategory.description)?if_exists}" [${(searchCategory.productCategoryId)?if_exists}]</b> ${uiLabelMap.ProductIncludeSubCategories}?
+                  ${uiLabelMap.CommonYes}<input type="radio" name="SEARCH_SUB_CATEGORIES" value="Y" checked/>
+                  ${uiLabelMap.CommonNo}<input type="radio" name="SEARCH_SUB_CATEGORIES" value="N"/>
+                </div>
+              </td>
+            </tr>
+          <#else>
+            <tr>
+              <td class="label" align="right" valign="top">
+                ${uiLabelMap.ProductProductStore}:
+              </td>
+              <td valign="middle">
+                <select name="productStoreId" id="searchProductStoreId" onchange="javascript:selectChange($('advToKeywordSearchform'));">
+                  <#if ebayConfigList?has_content>
+                    <#list ebayConfigList as ebayConfig>
+                      <#assign productStore = delegator.findOne("ProductStore", {"productStoreId" : ebayConfig.productStoreId}, true) />
+                      <#assign displayDesc = productStore.storeName?default("${uiLabelMap.ProductNoDescription}") />
+                      <#if (18 < displayDesc?length)>
+                         <#assign displayDesc = displayDesc[0..15] + "...">
+                       </#if>
+                       <option value="${productStore.productStoreId}" <#if productStoreId?if_exists == productStore.productStoreId> selected="selected"</#if>>${displayDesc} [${productStore.productStoreId}]</option>
+                     </#list>
+                  </#if>
+                </select>
+                <span id="productStoreErrorMessage" style="display:none;" class="errorMessage">${uiLabelMap.CommonRequired}</span>
+              </td>
+            </tr>
+            <tr>
+              <td class="label" align="right" valign="top">
+                ${uiLabelMap.ProductCatalog}:
+              </td>
+              <td valign="middle">
+                <div>
+                  <select name="SEARCH_CATALOG_ID" id="searchCatalogId" onchange="javascript:selectChange($('advToKeywordSearchform'));" class="required">
+                    <#list prodCatalogList as prodCatalog>
+                      <#assign displayDesc = prodCatalog.catalogName?default("${uiLabelMap.ProductNoDescription}") />
+                      <#if (18 < displayDesc?length)>
+                        <#assign displayDesc = displayDesc[0..15] + "...">
+                      </#if>
+                      <option value="${prodCatalog.prodCatalogId}" <#if searchCatalogId?if_exists == prodCatalog.prodCatalogId> selected="selected"</#if>>${displayDesc} [${prodCatalog.prodCatalogId}]</option>
+                    </#list>
+                  </select>
+                  <span id="catalogErrorMessage" style="display:none;" class="errorMessage">${uiLabelMap.CommonRequired}</span>
+                </div>
+              </td>
+            </tr>
+            <tr>
+              <td class="label" align="right" valign="top">
+                ${uiLabelMap.ProductCategory}:
+              </td>
+              <td valign="middle">
+                <div>
+                  <#if categoryIds?has_content>
+                    <select name="SEARCH_CATEGORY_ID">
+                      <option value="">- ${uiLabelMap.ProductAnyCategory} -</option>
+                      <#list categoryIds as categoryId>
+                        <#assign productCategory = delegator.findOne("ProductCategory", {"productCategoryId" : categoryId}, true) />
+                        <#assign displayDesc = productCategory.categoryName?default("${uiLabelMap.ProductNoDescription}") />
+                        <#if (18 < displayDesc?length)>
+                          <#assign displayDesc = displayDesc[0..15] + "...">
+                        </#if>
+                        <option value="${productCategory.productCategoryId}">${displayDesc} [${productCategory.productCategoryId}]</option>
+                      </#list>
+                    </select>
+                  <#else>
+                    <input type="text" id="SEARCH_CATEGORY_ID" name="SEARCH_CATEGORY_ID" size="20" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}" />
+                    <a href="javascript:call_fieldlookup2($('SEARCH_CATEGORY_ID'),'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}" /></a>
+                  </#if>
+                  ${uiLabelMap.ProductIncludeSubCategories}?
+                  ${uiLabelMap.CommonYes}<input type="radio" name="SEARCH_SUB_CATEGORIES" value="Y" checked="checked" />
+                  ${uiLabelMap.CommonNo}<input type="radio" name="SEARCH_SUB_CATEGORIES" value="N" />
+                  ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_CATEGORY_EXC" value="" checked="checked" />
+                  ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_CATEGORY_EXC" value="Y" />
+                  ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_CATEGORY_EXC" value="N" />
+                </div>
+              </td>
+            </tr>
+          </#if>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductProductName}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_PRODUCT_NAME" size="20" value="${requestParameters.SEARCH_PRODUCT_NAME?if_exists}" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductInternalName}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_INTERNAL_PROD_NAME" size="20" value="${requestParameters.SEARCH_INTERNAL_PROD_NAME?if_exists}" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductKeywords}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_STRING" size="40" value="${requestParameters.SEARCH_STRING?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonAny}<input type="radio" name="SEARCH_OPERATOR" value="OR" <#if searchOperator == "OR">checked</#if> />
+                ${uiLabelMap.CommonAll}<input type="radio" name="SEARCH_OPERATOR" value="AND" <#if searchOperator == "AND">checked</#if> />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductFeatureCategory} ${uiLabelMap.CommonIds}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_CAT1" size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT1?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC1" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC1" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC1" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_CAT2" size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT2?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC2" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC2" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC2" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_CAT3" size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT3?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC3" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC3" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC3" value="N" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductFeatureGroup} ${uiLabelMap.CommonIds}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_GRP1" size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP1?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC1" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC1" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC1" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_GRP2" size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP2?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC2" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC2" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC2" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_GRP3" size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP3?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC3" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC3" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC3" value="N" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductFeatures} ${uiLabelMap.CommonIds}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_FEAT1" size="15" value="${requestParameters.SEARCH_FEAT1?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_FEAT_EXC1" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_FEAT_EXC1" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_FEAT_EXC1" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_FEAT2" size="15" value="${requestParameters.SEARCH_FEAT2?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_FEAT_EXC2" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_FEAT_EXC2" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_FEAT_EXC2" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_FEAT3" size="15" value="${requestParameters.SEARCH_FEAT3?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_FEAT_EXC3" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_FEAT_EXC3" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_FEAT_EXC3" value="N" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductListPriceRange}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="LIST_PRICE_LOW" size="8" value="${requestParameters.LIST_PRICE_LOW?if_exists}" />&nbsp;
+                <input type="text" name="LIST_PRICE_HIGH" size="8" value="${requestParameters.LIST_PRICE_HIGH?if_exists}" />&nbsp;
+              </div>
+            </td>
+          </tr>
+          <#list productFeatureTypeIdsOrdered as productFeatureTypeId>
+            <#assign findPftMap = Static["org.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId", productFeatureTypeId) />
+            <#assign productFeatureType = delegator.findByPrimaryKeyCache("ProductFeatureType", findPftMap) />
+            <#assign productFeatures = productFeaturesByTypeMap[productFeatureTypeId] />
+            <tr>
+              <td class="label" align="right" valign="middle">
+                ${(productFeatureType.get("description",locale))?if_exists}:
+              </td>
+              <td valign="middle">
+                <div>
+                  <select name="pft_${productFeatureTypeId}">
+                    <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+                    <#list productFeatures as productFeature>
+                      <option value="${productFeature.productFeatureId}">${productFeature.description?default("${uiLabelMap.ProductNoDescription}")} [${productFeature.productFeatureId}]</option>
+                    </#list>
+                  </select>
+                </div>
+              </td>
+            </tr>
+          </#list>
+          <tr>
+            <td class="label" align="right" valign="middle">
+              ${uiLabelMap.ProductSupplier}:
+            </td>
+            <td valign="middle">
+              <div>
+                <select name="SEARCH_SUPPLIER_ID">
+                  <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+                  <#list supplerPartyRoleAndPartyDetails as supplerPartyRoleAndPartyDetail>
+                    <option value="${supplerPartyRoleAndPartyDetail.partyId}">${supplerPartyRoleAndPartyDetail.groupName?if_exists} ${supplerPartyRoleAndPartyDetail.firstName?if_exists} ${supplerPartyRoleAndPartyDetail.lastName?if_exists} [${supplerPartyRoleAndPartyDetail.partyId}]</option>
+                  </#list>
+                </select>
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="middle">
+              ${uiLabelMap.CommonSortedBy}:
+            </td>
+            <td valign="middle">
+              <div>
+                <select name="sortOrder">
+                  <option value="SortKeywordRelevancy">${uiLabelMap.ProductKeywordRelevancy}</option>
+                  <option value="SortProductField:productName">${uiLabelMap.ProductProductName}</option>
+                  <option value="SortProductField:internalName">${uiLabelMap.ProductInternalName}</option>
+                  <option value="SortProductField:totalQuantityOrdered">${uiLabelMap.ProductPopularityByOrders}</option>
+                  <option value="SortProductField:totalTimesViewed">${uiLabelMap.ProductPopularityByViews}</option>
+                  <option value="SortProductField:averageCustomerRating">${uiLabelMap.ProductCustomerRating}</option>
+                  <option value="SortProductPrice:LIST_PRICE">${uiLabelMap.ProductListPrice}</option>
+                  <option value="SortProductPrice:DEFAULT_PRICE">${uiLabelMap.ProductDefaultPrice}</option>
+                  <option value="SortProductPrice:AVERAGE_COST">${uiLabelMap.ProductAverageCost}</option>
+                  <option value="SortProductPrice:MINIMUM_PRICE">${uiLabelMap.ProductMinimumPrice}</option>
+                  <option value="SortProductPrice:MAXIMUM_PRICE">${uiLabelMap.ProductMaximumPrice}</option>
+                </select>
+                ${uiLabelMap.ProductLowToHigh}<input type="radio" name="sortAscending" value="Y" checked />
+                ${uiLabelMap.ProductHighToLow}<input type="radio" name="sortAscending" value="N" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="middle">
+              ${uiLabelMap.ProductPrioritizeProductsInCategory}:
+            </td>
+            <td valign="middle">
+              <input type="text" id="PRIORITIZE_CATEGORY_ID" name="PRIORITIZE_CATEGORY_ID" size="20" maxlength="20" value="${requestParameters.PRIORITIZE_CATEGORY_ID?if_exists}" />
+              <a href="javascript:call_fieldlookup2($('PRIORITIZE_CATEGORY_ID'),'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}" /></a>
+            </td>
+          </tr>
+          <tr>
+            <td class="label">
+              ${uiLabelMap.ProductGoodIdentificationType}:
+            </td>
+            <td>
+              <select name="SEARCH_GOOD_IDENTIFICATION_TYPE">
+                <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+                <#list goodIdentificationTypes as goodIdentificationType>
+                  <option value="${goodIdentificationType.goodIdentificationTypeId}">${goodIdentificationType.get("description")?if_exists}</option>
+                </#list>
+              </select>
+            </td>
+          </tr>
+          <tr>
+            <td class="label">
+              ${uiLabelMap.ProductGoodIdentificationValue}:
+            </td>
+            <td>
+              <input type="text" name="SEARCH_GOOD_IDENTIFICATION_VALUE" size="60" maxlength="60" value="${requestParameters.SEARCH_GOOD_IDENTIFICATION_VALUE?if_exists}" />
+              ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_GOOD_IDENTIFICATION_INCL" value="Y" checked="checked" />
+              ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_GOOD_IDENTIFICATION_INCL" value="N" />
+            </td>
+          </tr>
+          <#if searchConstraintStrings?has_content>
+            <tr>
+              <td align="right" valign="top" class="label">
+                ${uiLabelMap.ProductLastSearch}
+              </td>
+              <td valign="top">
+                <#list searchConstraintStrings as searchConstraintString>
+                  <div>&nbsp;-&nbsp;${searchConstraintString}</div>
+                </#list>
+                <span class="label">${uiLabelMap.CommonSortedBy}:</span>${searchSortOrderString}
+                <div>
+                  ${uiLabelMap.ProductNewSearch}<input type="radio" name="clearSearch" value="Y" checked="checked" />
+                  ${uiLabelMap.CommonRefineSearch}<input type="radio" name="clearSearch" value="N" />
+                </div>
+              </td>
+            </tr>
+          </#if>
+          <tr>
+            <td align="center" colspan="2">
+              <hr/>
+              <a href="javascript:submit($('advToKeywordSearchform'));" class="buttontext">${uiLabelMap.CommonFind}</a>
+            </td>
+          </tr>
+        </table>
+      </fieldset>
+    </form>
+  </div>
+</div>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl (original)
+++ ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl Sat Oct 31 12:01:52 2009
@@ -22,6 +22,12 @@
          document.forms["ProductsExportToEbay"].submit();
      }
 
+    function changeWebSite(Id) {
+        var formId = Id ;
+        formId.action="<@ofbizUrl>ProductsExportToEbay</@ofbizUrl>";
+        formId.submit();
+    }
+
      function activateSubmitButton() {
          categ = document.forms["ProductsExportToEbay"].ebayCategory.value;
          if (categ != null && (categ.substring(0, 1) == 'Y' || categ == '')) {
@@ -33,7 +39,7 @@
     }
 </script>
 <div>
-    <form method="post" action="<@ofbizUrl>PostProductsToEbay</@ofbizUrl>" name="ProductsExportToEbay">
+    <form id="ProductsExportToEbay" method="post" action="<@ofbizUrl>PostProductsToEbay</@ofbizUrl>" name="ProductsExportToEbay">
         <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}">
         <table border="0" cellpadding="2" cellspacing="0">
              <tr>
@@ -101,6 +107,21 @@
                 <td align="right" class="label">${uiLabelMap.CommonWebsite}</td>
                 <td>&nbsp;</td>
                 <td>
+                  <select name="webSiteId" onchange="javascript:changeWebSite($('ProductsExportToEbay'));">
+                    <#list webSiteList as webSite>
+                      <#assign displayDesc = webSite.siteName?default("${uiLabelMap.ProductNoDescription}")>
+                      <#if (18 < displayDesc?length)>
+                        <#assign displayDesc = displayDesc[0..15] + "...">
+                      </#if>
+                      <option value="${webSite.webSiteId}" <#if selectedWebSiteId?if_exists == webSite.webSiteId> selected="selected"</#if>>${displayDesc} [${webSite.webSiteId}]</option>
+                    </#list>
+                  </select>
+                </td>
+            </tr>
+            <tr>
+                <td align="right" class="label">${uiLabelMap.FormFieldTitle_webSiteUrl}</td>
+                <td>&nbsp;</td>
+                <td>
                     <input type="text" name="webSiteUrl" size="100" value="${webSiteUrl?if_exists}"/>
                 </td>
             </tr>

Modified: ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml Sat Oct 31 12:01:52 2009
@@ -30,16 +30,13 @@
                     <condition-expr field-name="showInSelect" operator="not-equals" value="N"/>
                     <order-by field-name="description"/>
                 </entity-condition>
-                <entity-condition entity-name="ProdCatalog" list="prodCatalogs">
-                    <order-by field-name="catalogName"/>
-                </entity-condition>
                 <script location="component://product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
-                            <html><html-template location="component://product/webapp/catalog/find/advancedsearch.ftl"/></html>
+                            <html><html-template location="component://ebay/webapp/ebay/find/EbayAdvancedSearch.ftl"/></html>
                         </platform-specific>
                     </decorator-section>
                 </decorator-screen>
@@ -72,6 +69,7 @@
     <screen name="ProductsExportToEbay">
         <section>
             <actions>
+                <property-map resource="GoogleBaseUiLabels" map-name="uiLabelMap" global="true"/>
                 <set field="headerItem" value="export"/>
                 <set field="titleProperty" value="PageTitleEbayProductsExportToEbay"/>
                 <set field="selectResult" from-field="parameters.selectResult"/>

Modified: ofbiz/trunk/specialpurpose/googlebase/data/DemoGoogleBaseData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/data/DemoGoogleBaseData.xml?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/data/DemoGoogleBaseData.xml (original)
+++ ofbiz/trunk/specialpurpose/googlebase/data/DemoGoogleBaseData.xml Sat Oct 31 12:01:52 2009
@@ -19,6 +19,6 @@
 -->
 
 <entity-engine-xml>
-    <WebSite webSiteId="GOOGLEBASE" productStoreId="9000" />
-    <GoogleBaseConfig productStoreId="9000" developerKey="HKLh9khgVieditoO0b4JR2fnBT2yXp_ZAY8_yft3CFXhHIE1NvwkxQ1pZ4qyVEGh_FtRe5KtJPTKDorNP" authenticationUrl="https://www.google.com/accounts/ClientLogin" accountEmail="[hidden email]" accountPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" postItemsUrl="http://www.google.com/base/feeds/items/batch" webSiteUrl="http://demo.ofbiz.org"/>      
+    <WebSite webSiteId="GOOGLEBASE" standardContentPrefix="http://demo.ofbiz.org" productStoreId="9000" />
+    <GoogleBaseConfig productStoreId="9000" developerKey="HKLh9khgVieditoO0b4JR2fnBT2yXp_ZAY8_yft3CFXhHIE1NvwkxQ1pZ4qyVEGh_FtRe5KtJPTKDorNP" authenticationUrl="https://www.google.com/accounts/ClientLogin" accountEmail="[hidden email]" accountPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" postItemsUrl="http://www.google.com/base/feeds/items/batch" webSiteId="GOOGLEBASE"/>      
 </entity-engine-xml>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/googlebase/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/entitydef/entitymodel.xml?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/specialpurpose/googlebase/entitydef/entitymodel.xml Sat Oct 31 12:01:52 2009
@@ -49,17 +49,14 @@
         <field name="accountEmail" type="name"><description>Gmail Account for logging into Google Base</description></field>
         <field name="accountPassword" type="name" encrypt="true"></field>
         <field name="postItemsUrl" type="value"><description>All the items should be posted to this url</description></field>
-        <field name="webSiteUrl" type="value">
-            <description>
-                This will be the URL where products will be present. In short we can say Merchant Website.
-                This URL will be same as that of the "Website URL" present in basic settings inside Google Base account.
-                Please refer this page after logging with your user credentails: http://www.google.com/base/basicsettings
-            </description>
-        </field>
+        <field name="webSiteId" type="id-ne"></field>
         <prim-key field="productStoreId"/>      
         <relation type="one" fk-name="GBS_PROD_STORE" rel-entity-name="ProductStore">
             <key-map field-name="productStoreId"/>
         </relation>
+        <relation type="one" fk-name="GBS_WEBSITE" rel-entity-name="WebSite">
+            <key-map field-name="webSiteId"/>
+        </relation>
     </entity>
 </entitymodel>    
     
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy (original)
+++ ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy Sat Oct 31 12:01:52 2009
@@ -17,16 +17,24 @@
  * under the License.
  */
 
-import org.ofbiz.webapp.website.WebSiteWorker;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.util.EntityUtil;
 
-webSite = WebSiteWorker.getWebSite(request);
-if (webSite) {
-    productStoreId = webSite.productStoreId;
-    context.productStoreId = productStoreId;
-    if (productStoreId) {
-        googleBaseConfig = delegator.findOne("GoogleBaseConfig", [productStoreId : productStoreId], false);
-        if (googleBaseConfig) {
-            context.webSiteUrl = googleBaseConfig.webSiteUrl;
-        }
+webSiteList = [];
+webSite = null;
+if (parameters.productStoreId) {
+    productStoreId = parameters.productStoreId;
+    webSiteList = delegator.findList("WebSite", EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId), null, null, null, false);
+    if (parameters.webSiteId) {
+        webSite = delegator.findOne("WebSite", ["webSiteId" : parameters.webSiteId], true);
+        context.webSiteId = parameters.webSiteId;
+    } else if (webSiteList) {
+        webSite = EntityUtil.getFirst(webSiteList);
+        context.webSiteId = webSite.webSiteId;
     }
-}
+    context.productStoreId = productStoreId;
+    context.webSiteList = webSiteList;
+    context.webSiteUrl = webSite.standardContentPrefix;
+    parameters.webSiteUrl = webSite.standardContentPrefix;;
+}
\ No newline at end of file

Added: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl?rev=831534&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl (added)
+++ ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl Sat Oct 31 12:01:52 2009
@@ -0,0 +1,375 @@
+<#--
+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.
+-->
+
+<script type="text/javascript">
+//<![CDATA[
+    function selectChange(id) {
+        var formId = id ;
+        formId.action="<@ofbizUrl>main</@ofbizUrl>";
+        formId.submit();
+    }
+    function submit (id) {
+      var formId = id;
+      if(!$('searchCatalogId').empty() && !$('searchProductStoreId').empty()){
+          $(formId).submit();
+      } else {
+          if($('searchProductStoreId').empty()) {
+               $('productStoreErrorMessage').show();
+          }
+          if($('searchCatalogId').empty()) {
+             $('catalogErrorMessage').show();
+          }
+      }
+    }
+//]]>
+</script>
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <h3>${uiLabelMap.ProductAdvancedSearchInCategory}</h3>
+  </div>
+  <div class="screenlet-body">
+    <form id="advToKeywordSearchform" method="post" action="<@ofbizUrl>keywordsearch</@ofbizUrl>" style="margin: 0;">
+      <fieldset>
+        <input type="hidden" name="VIEW_SIZE" value="25"/>
+        <input type="hidden" name="PAGING" value="Y"/>
+        <input type="hidden" name="noConditionFind" value="Y"/>
+        <table cellspacing="0" class="basic-table">
+          <#if searchCategory?has_content>
+            <input type="hidden" name="SEARCH_CATEGORY_ID" value="${searchCategoryId?if_exists}"/>
+            <tr>
+              <td class="label" align="right" valign="middle">
+                ${uiLabelMap.ProductCategory}:
+              </td>
+              <td valign="middle">
+                <div>
+                  <b>"${(searchCategory.description)?if_exists}" [${(searchCategory.productCategoryId)?if_exists}]</b> ${uiLabelMap.ProductIncludeSubCategories}?
+                  ${uiLabelMap.CommonYes}<input type="radio" name="SEARCH_SUB_CATEGORIES" value="Y" checked/>
+                  ${uiLabelMap.CommonNo}<input type="radio" name="SEARCH_SUB_CATEGORIES" value="N"/>
+                </div>
+              </td>
+            </tr>
+          <#else>
+            <tr>
+              <td class="label" align="right" valign="top">
+                ${uiLabelMap.ProductProductStore}:
+              </td>
+              <td valign="middle">
+                <select name="productStoreId" id="searchProductStoreId" onchange="javascript:selectChange($('advToKeywordSearchform'));">
+                  <#if googleBaseConfigList?has_content>
+                    <#list googleBaseConfigList as googleBaseConfig>
+                      <#assign productStore = delegator.findOne("ProductStore", {"productStoreId" : googleBaseConfig.productStoreId}, true) />
+                      <#assign displayDesc = productStore.storeName?default("${uiLabelMap.ProductNoDescription}") />
+                      <#if (18 < displayDesc?length)>
+                         <#assign displayDesc = displayDesc[0..15] + "...">
+                       </#if>
+                       <option value="${productStore.productStoreId}" <#if productStoreId?if_exists == productStore.productStoreId> selected="selected"</#if>>${displayDesc} [${productStore.productStoreId}]</option>
+                     </#list>
+                  </#if>
+                </select>
+                <span id="productStoreErrorMessage" style="display:none;" class="errorMessage">${uiLabelMap.CommonRequired}</span>
+              </td>
+            </tr>
+            <tr>
+              <td class="label" align="right" valign="top">
+                ${uiLabelMap.ProductCatalog}:
+              </td>
+              <td valign="middle">
+                <div>
+                  <select name="SEARCH_CATALOG_ID" id="searchCatalogId" onchange="javascript:selectChange($('advToKeywordSearchform'));" class="required">
+                    <#list prodCatalogList as prodCatalog>
+                      <#assign displayDesc = prodCatalog.catalogName?default("${uiLabelMap.ProductNoDescription}") />
+                      <#if (18 < displayDesc?length)>
+                        <#assign displayDesc = displayDesc[0..15] + "...">
+                      </#if>
+                      <option value="${prodCatalog.prodCatalogId}" <#if searchCatalogId?if_exists == prodCatalog.prodCatalogId> selected="selected"</#if>>${displayDesc} [${prodCatalog.prodCatalogId}]</option>
+                    </#list>
+                  </select>
+                  <span id="catalogErrorMessage" style="display:none;" class="errorMessage">${uiLabelMap.CommonRequired}</span>
+                </div>
+              </td>
+            </tr>
+            <tr>
+              <td class="label" align="right" valign="top">
+                ${uiLabelMap.ProductCategory}:
+              </td>
+              <td valign="middle">
+                <div>
+                  <#if categoryIds?has_content>
+                    <select name="SEARCH_CATEGORY_ID">
+                      <option value="">- ${uiLabelMap.ProductAnyCategory} -</option>
+                      <#list categoryIds as categoryId>
+                        <#assign productCategory = delegator.findOne("ProductCategory", {"productCategoryId" : categoryId}, true) />
+                        <#assign displayDesc = productCategory.categoryName?default("${uiLabelMap.ProductNoDescription}") />
+                        <#if (18 < displayDesc?length)>
+                          <#assign displayDesc = displayDesc[0..15] + "...">
+                        </#if>
+                        <option value="${productCategory.productCategoryId}">${displayDesc} [${productCategory.productCategoryId}]</option>
+                      </#list>
+                    </select>
+                  <#else>
+                    <input type="text" id="SEARCH_CATEGORY_ID" name="SEARCH_CATEGORY_ID" size="20" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}" />
+                    <a href="javascript:call_fieldlookup2($('SEARCH_CATEGORY_ID'),'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}" /></a>
+                  </#if>
+                  ${uiLabelMap.ProductIncludeSubCategories}?
+                  ${uiLabelMap.CommonYes}<input type="radio" name="SEARCH_SUB_CATEGORIES" value="Y" checked="checked" />
+                  ${uiLabelMap.CommonNo}<input type="radio" name="SEARCH_SUB_CATEGORIES" value="N" />
+                  ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_CATEGORY_EXC" value="" checked="checked" />
+                  ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_CATEGORY_EXC" value="Y" />
+                  ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_CATEGORY_EXC" value="N" />
+                </div>
+              </td>
+            </tr>
+          </#if>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductProductName}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_PRODUCT_NAME" size="20" value="${requestParameters.SEARCH_PRODUCT_NAME?if_exists}" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductInternalName}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_INTERNAL_PROD_NAME" size="20" value="${requestParameters.SEARCH_INTERNAL_PROD_NAME?if_exists}" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductKeywords}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_STRING" size="40" value="${requestParameters.SEARCH_STRING?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonAny}<input type="radio" name="SEARCH_OPERATOR" value="OR" <#if searchOperator == "OR">checked</#if> />
+                ${uiLabelMap.CommonAll}<input type="radio" name="SEARCH_OPERATOR" value="AND" <#if searchOperator == "AND">checked</#if> />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductFeatureCategory} ${uiLabelMap.CommonIds}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_CAT1" size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT1?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC1" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC1" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC1" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_CAT2" size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT2?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC2" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC2" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC2" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_CAT3" size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT3?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC3" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC3" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_CAT_EXC3" value="N" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductFeatureGroup} ${uiLabelMap.CommonIds}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_GRP1" size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP1?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC1" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC1" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC1" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_GRP2" size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP2?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC2" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC2" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC2" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_PROD_FEAT_GRP3" size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP3?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC3" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC3" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_PROD_FEAT_GRP_EXC3" value="N" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductFeatures} ${uiLabelMap.CommonIds}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="SEARCH_FEAT1" size="15" value="${requestParameters.SEARCH_FEAT1?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_FEAT_EXC1" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_FEAT_EXC1" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_FEAT_EXC1" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_FEAT2" size="15" value="${requestParameters.SEARCH_FEAT2?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_FEAT_EXC2" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_FEAT_EXC2" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_FEAT_EXC2" value="N" />
+              </div>
+              <div>
+                <input type="text" name="SEARCH_FEAT3" size="15" value="${requestParameters.SEARCH_FEAT3?if_exists}" />&nbsp;
+                ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_FEAT_EXC3" value="" checked="checked" />
+                ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_FEAT_EXC3" value="Y" />
+                ${uiLabelMap.CommonAlwaysInclude}<input type="radio" name="SEARCH_FEAT_EXC3" value="N" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductListPriceRange}:
+            </td>
+            <td valign="middle">
+              <div>
+                <input type="text" name="LIST_PRICE_LOW" size="8" value="${requestParameters.LIST_PRICE_LOW?if_exists}" />&nbsp;
+                <input type="text" name="LIST_PRICE_HIGH" size="8" value="${requestParameters.LIST_PRICE_HIGH?if_exists}" />&nbsp;
+              </div>
+            </td>
+          </tr>
+          <#list productFeatureTypeIdsOrdered as productFeatureTypeId>
+            <#assign findPftMap = Static["org.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId", productFeatureTypeId) />
+            <#assign productFeatureType = delegator.findByPrimaryKeyCache("ProductFeatureType", findPftMap) />
+            <#assign productFeatures = productFeaturesByTypeMap[productFeatureTypeId] />
+            <tr>
+              <td class="label" align="right" valign="middle">
+                ${(productFeatureType.get("description",locale))?if_exists}:
+              </td>
+              <td valign="middle">
+                <div>
+                  <select name="pft_${productFeatureTypeId}">
+                    <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+                    <#list productFeatures as productFeature>
+                      <option value="${productFeature.productFeatureId}">${productFeature.description?default("${uiLabelMap.ProductNoDescription}")} [${productFeature.productFeatureId}]</option>
+                    </#list>
+                  </select>
+                </div>
+              </td>
+            </tr>
+          </#list>
+          <tr>
+            <td class="label" align="right" valign="middle">
+              ${uiLabelMap.ProductSupplier}:
+            </td>
+            <td valign="middle">
+              <div>
+                <select name="SEARCH_SUPPLIER_ID">
+                  <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+                  <#list supplerPartyRoleAndPartyDetails as supplerPartyRoleAndPartyDetail>
+                    <option value="${supplerPartyRoleAndPartyDetail.partyId}">${supplerPartyRoleAndPartyDetail.groupName?if_exists} ${supplerPartyRoleAndPartyDetail.firstName?if_exists} ${supplerPartyRoleAndPartyDetail.lastName?if_exists} [${supplerPartyRoleAndPartyDetail.partyId}]</option>
+                  </#list>
+                </select>
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="middle">
+              ${uiLabelMap.CommonSortedBy}:
+            </td>
+            <td valign="middle">
+              <div>
+                <select name="sortOrder">
+                  <option value="SortKeywordRelevancy">${uiLabelMap.ProductKeywordRelevancy}</option>
+                  <option value="SortProductField:productName">${uiLabelMap.ProductProductName}</option>
+                  <option value="SortProductField:internalName">${uiLabelMap.ProductInternalName}</option>
+                  <option value="SortProductField:totalQuantityOrdered">${uiLabelMap.ProductPopularityByOrders}</option>
+                  <option value="SortProductField:totalTimesViewed">${uiLabelMap.ProductPopularityByViews}</option>
+                  <option value="SortProductField:averageCustomerRating">${uiLabelMap.ProductCustomerRating}</option>
+                  <option value="SortProductPrice:LIST_PRICE">${uiLabelMap.ProductListPrice}</option>
+                  <option value="SortProductPrice:DEFAULT_PRICE">${uiLabelMap.ProductDefaultPrice}</option>
+                  <option value="SortProductPrice:AVERAGE_COST">${uiLabelMap.ProductAverageCost}</option>
+                  <option value="SortProductPrice:MINIMUM_PRICE">${uiLabelMap.ProductMinimumPrice}</option>
+                  <option value="SortProductPrice:MAXIMUM_PRICE">${uiLabelMap.ProductMaximumPrice}</option>
+                </select>
+                ${uiLabelMap.ProductLowToHigh}<input type="radio" name="sortAscending" value="Y" checked />
+                ${uiLabelMap.ProductHighToLow}<input type="radio" name="sortAscending" value="N" />
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="middle">
+              ${uiLabelMap.ProductPrioritizeProductsInCategory}:
+            </td>
+            <td valign="middle">
+              <input type="text" id="PRIORITIZE_CATEGORY_ID" name="PRIORITIZE_CATEGORY_ID" size="20" maxlength="20" value="${requestParameters.PRIORITIZE_CATEGORY_ID?if_exists}" />
+              <a href="javascript:call_fieldlookup2($('PRIORITIZE_CATEGORY_ID'),'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt="${uiLabelMap.CommonClickHereForFieldLookup}" /></a>
+            </td>
+          </tr>
+          <tr>
+            <td class="label">
+              ${uiLabelMap.ProductGoodIdentificationType}:
+            </td>
+            <td>
+              <select name="SEARCH_GOOD_IDENTIFICATION_TYPE">
+                <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+                <#list goodIdentificationTypes as goodIdentificationType>
+                  <option value="${goodIdentificationType.goodIdentificationTypeId}">${goodIdentificationType.get("description")?if_exists}</option>
+                </#list>
+              </select>
+            </td>
+          </tr>
+          <tr>
+            <td class="label">
+              ${uiLabelMap.ProductGoodIdentificationValue}:
+            </td>
+            <td>
+              <input type="text" name="SEARCH_GOOD_IDENTIFICATION_VALUE" size="60" maxlength="60" value="${requestParameters.SEARCH_GOOD_IDENTIFICATION_VALUE?if_exists}" />
+              ${uiLabelMap.CommonInclude}<input type="radio" name="SEARCH_GOOD_IDENTIFICATION_INCL" value="Y" checked="checked" />
+              ${uiLabelMap.CommonExclude}<input type="radio" name="SEARCH_GOOD_IDENTIFICATION_INCL" value="N" />
+            </td>
+          </tr>
+          <#if searchConstraintStrings?has_content>
+            <tr>
+              <td align="right" valign="top" class="label">
+                ${uiLabelMap.ProductLastSearch}
+              </td>
+              <td valign="top">
+                <#list searchConstraintStrings as searchConstraintString>
+                  <div>&nbsp;-&nbsp;${searchConstraintString}</div>
+                </#list>
+                <span class="label">${uiLabelMap.CommonSortedBy}:</span>${searchSortOrderString}
+                <div>
+                  ${uiLabelMap.ProductNewSearch}<input type="radio" name="clearSearch" value="Y" checked="checked" />
+                  ${uiLabelMap.CommonRefineSearch}<input type="radio" name="clearSearch" value="N" />
+                </div>
+              </td>
+            </tr>
+          </#if>
+          <tr>
+            <td align="center" colspan="2">
+              <hr/>
+              <a href="javascript:submit($('advToKeywordSearchform'));" class="buttontext">${uiLabelMap.CommonFind}</a>
+            </td>
+          </tr>
+        </table>
+      </fieldset>
+    </form>
+  </div>
+</div>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseForms.xml?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseForms.xml (original)
+++ ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseForms.xml Sat Oct 31 12:01:52 2009
@@ -20,7 +20,7 @@
 
 <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
-    <form name="ProductsExportToGoogle" type="single" target="searchExportProductListToGoogle"
+    <form id="productsExportToGoogle" name="ProductsExportToGoogle" type="single" target="searchExportProductListToGoogle"
         header-row-style="header-row" default-table-style="basic-table">
         <field name="productStoreId"><hidden/></field>
         <field name="selectResult"><hidden/></field>
@@ -32,6 +32,11 @@
                 <option key="IT" description="${uiLabelMap.GoogleBaseExportCountryCodeIT}"/>
             </drop-down>
         </field>
+        <field name="webSiteId" event="onChange" action="javascript:$('productsExportToGoogle').action='${persistAction}';$('productsExportToGoogle').submit();">
+            <drop-down current="selected">
+                <list-options list-name="webSiteList" key-name="webSiteId" description="${siteName}"/>
+            </drop-down>
+        </field>
         <field name="webSiteUrl"><text size="50" maxlength="250" default-value="${webSiteUrl}"/></field>
         <field name="webSiteMountPoint"><text size="30" maxlength="30" default-value="ecommerce"/></field>
         <field name="actionType">

Modified: ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml?rev=831534&r1=831533&r2=831534&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml Sat Oct 31 12:01:52 2009
@@ -29,16 +29,13 @@
                     <condition-expr field-name="showInSelect" operator="not-equals" value="N"/>
                     <order-by field-name="description"/>
                 </entity-condition>
-                <entity-condition entity-name="ProdCatalog" list="prodCatalogs">
-                    <order-by field-name="catalogName"/>
-                </entity-condition>
                 <script location="component://product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonFindDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
-                            <html><html-template location="component://product/webapp/catalog/find/advancedsearch.ftl"/></html>
+                            <html><html-template location="component://googlebase/webapp/googlebase/find/GoogleBaseAdvancedSearch.ftl"/></html>
                         </platform-specific>
                     </decorator-section>
                 </decorator-screen>