Author: jacopoc
Date: Fri Sep 4 13:12:07 2009 New Revision: 811380 URL: http://svn.apache.org/viewvc?rev=811380&view=rev Log: Misc enhancements to the eBay export: hardcoded values moved from source files to configuration file. Modified: ofbiz/trunk/specialpurpose/ebay/config/ebayExport.properties ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Modified: ofbiz/trunk/specialpurpose/ebay/config/ebayExport.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/config/ebayExport.properties?rev=811380&r1=811379&r2=811380&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/config/ebayExport.properties (original) +++ ofbiz/trunk/specialpurpose/ebay/config/ebayExport.properties Fri Sep 4 13:12:07 2009 @@ -33,4 +33,4 @@ # production #eBayExport.xmlGatewayUri=https://api.ebay.com/ws/api.dll -eBayExport.customXml=<custom-xml><UseTaxTable>false</UseTaxTable><DispatchTimeMax>3</DispatchTimeMax><ReturnPolicy><ReturnsAcceptedOption>ReturnsNotAccepted</ReturnsAcceptedOption></ReturnPolicy><ShippingDetails><ShippingType>Flat</ShippingType><ShippingServiceOptions><ShippingService>UPS2ndDay</ShippingService><ShippingServicePriority>1</ShippingServicePriority><ShippingServiceCost>5</ShippingServiceCost><ShippingServiceAdditionalCost>2</ShippingServiceAdditionalCost><ShippingSurcharge>1</ShippingSurcharge></ShippingServiceOptions></ShippingDetails></custom-xml> +eBayExport.customXml=<custom-xml><Currency>USD</Currency><UseTaxTable>false</UseTaxTable><DispatchTimeMax>3</DispatchTimeMax><ReturnPolicy><ReturnsAcceptedOption>ReturnsNotAccepted</ReturnsAcceptedOption></ReturnPolicy><ShippingDetails><ShippingType>Flat</ShippingType><ShippingServiceOptions><ShippingService>UPS2ndDay</ShippingService><ShippingServicePriority>1</ShippingServicePriority><ShippingServiceCost>5</ShippingServiceCost><ShippingServiceAdditionalCost>2</ShippingServiceAdditionalCost><ShippingSurcharge>1</ShippingSurcharge></ShippingServiceOptions></ShippingDetails></custom-xml> Modified: ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml?rev=811380&r1=811379&r2=811380&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml (original) +++ ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml Fri Sep 4 13:12:07 2009 @@ -30,7 +30,7 @@ <description>Export products to eBay</description> <attribute type="List" mode="IN" name="selectResult" optional="false"/> <attribute type="String" mode="IN" name="country" optional="false"/> - <attribute type="String" mode="IN" name="location" optional="false"/> + <attribute type="String" mode="IN" name="location" optional="true"/> <attribute type="String" mode="IN" name="webSiteUrl" optional="false"/> <attribute type="String" mode="IN" name="ebayCategory" optional="true"/> <attribute type="String" mode="IN" name="paymentPayPal" optional="true"/> Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=811380&r1=811379&r2=811380&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java (original) +++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Fri Sep 4 13:12:07 2009 @@ -219,8 +219,10 @@ } Element itemElem = UtilXml.addChildElement(itemRequestElem, "Item", itemDocument); UtilXml.addChildElementValue(itemElem, "Country", (String)context.get("country"), itemDocument); - UtilXml.addChildElementValue(itemElem, "Location", (String)context.get("location"), itemDocument); - UtilXml.addChildElementValue(itemElem, "Currency", "USD", itemDocument); + String location = (String)context.get("location"); + if (UtilValidate.isNotEmpty(location)) { + UtilXml.addChildElementValue(itemElem, "Location", location, itemDocument); + } UtilXml.addChildElementValue(itemElem, "ApplicationData", prod.getString("productId"), itemDocument); UtilXml.addChildElementValue(itemElem, "SKU", prod.getString("productId"), itemDocument); UtilXml.addChildElementValue(itemElem, "Title", title, itemDocument); |
Free forum by Nabble | Edit this page |