Author: ashish
Date: Mon Sep 21 11:06:28 2009
New Revision: 817206
URL:
http://svn.apache.org/viewvc?rev=817206&view=revLog:
This will allow to fetch eBay configuration values from database first and then from property file if not found.
Modified:
ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml
ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy
Modified: ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml?rev=817206&r1=817205&r2=817206&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml Mon Sep 21 11:06:28 2009
@@ -56,6 +56,7 @@
location="org.ofbiz.ebay.ProductsExportToEbay" invoke="getEbayCategories" auth="true">
<description>Get the list of eBay categories</description>
<attribute type="String" mode="IN" name="categoryCode" optional="true"/>
+ <attribute type="String" mode="IN" name="productStoreId" optional="true"/>
<attribute type="List" mode="OUT" name="categories" optional="true"/>
</service>
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=817206&r1=817205&r2=817206&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 Mon Sep 21 11:06:28 2009
@@ -18,11 +18,21 @@
*/
import org.ofbiz.webapp.website.WebSiteWorker;
+webSite = WebSiteWorker.getWebSite(request);
+productStoreId = "9000"; // provide the default value
+if (webSite) {
+ productStoreId = webSite.productStoreId;
+ context.productStoreId = productStoreId;
+ eBayConfig = delegator.findOne("EbayConfig", [productStoreId : productStoreId], false);
+ context.customXml = eBayConfig.customXml;
+ context.webSiteUrl = webSite.getString("standardContentPrefix")?:"
http://demo.ofbiz.org";
+}
+
categoryCode = parameters.categoryCode;
context.categoryCode = categoryCode;
userLogin = parameters.userLogin;
-results = dispatcher.runSync("getEbayCategories", [categoryCode : categoryCode, userLogin : userLogin]);
+results = dispatcher.runSync("getEbayCategories", [categoryCode : categoryCode, userLogin : userLogin, productStoreId : productStoreId]);
if (results.categories) {
context.categories = results.categories;
@@ -36,13 +46,4 @@
}
} else {
context.hideExportOptions = "N";
-}
-
-webSite = WebSiteWorker.getWebSite(request);
-if (webSite) {
- productStoreId = webSite.productStoreId;
- context.productStoreId = productStoreId;
- eBayConfig = delegator.findOne("EbayConfig", [productStoreId : productStoreId], false);
- context.customXml = eBayConfig.customXml;
- context.webSiteUrl = webSite.getString("standardContentPrefix")?:"
http://demo.ofbiz.org";
-}
+}
\ No newline at end of file