Author: jacopoc
Date: Mon Jul 23 00:37:08 2007
New Revision: 558636
URL:
http://svn.apache.org/viewvc?view=rev&rev=558636Log:
Misc fixes for the eBay import form.
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/ImportOrdersFromEbay.java
ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/ImportOrdersFromEbay.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/ImportOrdersFromEbay.java?view=diff&rev=558636&r1=558635&r2=558636==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/ImportOrdersFromEbay.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/ImportOrdersFromEbay.java Mon Jul 23 00:37:08 2007
@@ -210,8 +210,10 @@
order.put("userLogin", (GenericValue) context.get("userLogin"));
Map error = createShoppingCart(delegator, dispatcher, locale, order, false);
String errorMsg = ServiceUtil.getErrorMessage(error);
- if (errorMsg != null) {
+ if (UtilValidate.isNotEmpty(errorMsg)) {
order.put("errorMessage", errorMsg);
+ } else {
+ order.put("errorMessage", "");
}
}
Map result = FastMap.newInstance();
@@ -427,8 +429,10 @@
GenericValue orderExist = externalOrderExists(delegator, externalId);
if (orderExist != null) {
order.put("orderId", (String)orderExist.get("orderId"));
+ } else {
+ order.put("orderId", "");
}
-
+
// retrieve transaction price
order.put("transactionPrice", UtilXml.childElementValue(transactionElement, "TransactionPrice", "0"));
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml?view=diff&rev=558636&r1=558635&r2=558636==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml Mon Jul 23 00:37:08 2007
@@ -163,6 +163,7 @@
<field name="shippingAddressCityName"><hidden/></field>
<field name="errorMessage"><display/></field>
<field name="_rowSubmit" title="${uiLabelMap.CommonSelect}" use-when="${canImportOrder}"><check/></field>
+ <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}" use-when="!${canImportOrder}"><display/></field>
<field name="submitButton" title="${uiLabelMap.OrderImportOrdersFromEbay}" widget-style="smallSubmit"><submit/></field>
</form>
</forms>