Author: jacopoc
Date: Wed Jul 29 13:57:00 2009
New Revision: 798909
URL: http://svn.apache.org/viewvc?rev=798909&view=rev
Log:
Small enhancements to the eBay interface.
Modified:
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
Modified:
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java?rev=798909&r1=798908&r2=798909&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
(original)
+++
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
Wed Jul 29 13:57:00 2009
@@ -573,7 +573,10 @@
String productId =
UtilXml.childElementValue(itemElement, "SKU", "");
if (UtilValidate.isEmpty(productId)) {
- productId =
retrieveProductIdFromTitle(delegator, (String)order.get("title"));
+ productId =
UtilXml.childElementValue(itemElement, "ApplicationData", "");
+ if (UtilValidate.isEmpty(productId)) {
+ productId =
retrieveProductIdFromTitle(delegator, (String)order.get("title"));
+ }
}
order.put("productId", productId);
@@ -1047,6 +1050,7 @@
try {
Map context = FastMap.newInstance();
context.put("partyId", partyId);
+ context.put("toName", (String)address.get("buyerName"));
context.put("address1",
(String)address.get("shippingAddressStreet1"));
context.put("address2",
(String)address.get("shippingAddressStreet2"));
context.put("postalCode",
(String)address.get("shippingAddressPostalCode"));
@@ -1060,6 +1064,13 @@
Map summaryResult =
dispatcher.runSync("createPartyPostalAddress",context);
contactMechId = (String)summaryResult.get("contactMechId");
+ // Set also as a billing address
+ context = FastMap.newInstance();
+ context.put("partyId", partyId);
+ context.put("contactMechId", contactMechId);
+ context.put("contactMechPurposeTypeId", "BILLING_LOCATION");
+ context.put("userLogin", userLogin);
+ dispatcher.runSync("createPartyContactMechPurpose", context);
} catch (GenericServiceException e) {
Debug.logError(e, "Failed to createAddress", module);
}
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=798909&r1=798908&r2=798909&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
(original)
+++
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
Wed Jul 29 13:57:00 2009
@@ -193,6 +193,7 @@
UtilXml.addChildElementValue(itemElem, "Country",
(String)context.get("country"), itemDocument);
UtilXml.addChildElementValue(itemElem, "Location",
(String)context.get("location"), itemDocument);
UtilXml.addChildElementValue(itemElem, "Currency", "USD",
itemDocument);
+ UtilXml.addChildElementValue(itemElem, "ApplicationData",
prod.getString("productId"), itemDocument);
UtilXml.addChildElementValue(itemElem, "SKU",
prod.getString("productId"), itemDocument);
UtilXml.addChildElementValue(itemElem, "Title", title,
itemDocument);
UtilXml.addChildElementValue(itemElem, "Description",
description, itemDocument);