You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/10/09 00:41:30 UTC

svn commit: r1006056 [3/4] - in /ofbiz/branches/jquery: ./ applications/accounting/config/ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/webapp/accounting/WEB-INF/actions/reports/ applications/accounting/webapp/accounting/i...

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/servicedef/services.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/servicedef/services.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/servicedef/services.xml Fri Oct  8 22:41:27 2010
@@ -533,4 +533,165 @@ under the License.
         <attribute name="itemId" mode="IN" type="String"></attribute>
         <attribute name="productStoreId" mode="INOUT" type="String"></attribute>
     </service>
+    <service name="geteBayClosedItem" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="geteBayClosedItem">
+        <description>List closed item in store</description>
+        <attribute name="productStoreId" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="closedItemList" mode="OUT" type="List"></attribute>
+    </service>
+    <service name="getEbayOrders" engine="java" transaction-timeout="120000"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getEbayOrders">
+        <description>List closed item in store</description>
+        <attribute name="productStoreId" mode="INOUT" type="String" optional="false"></attribute>
+        <attribute name="itemId" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="transactionId" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="startTime" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="endTime" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="totalPrice" mode="OUT" type="Double" optional="true"></attribute>
+        <attribute name="amountPaid" mode="OUT" type="Double" optional="true"></attribute>
+        <attribute name="shippingDetail" mode="OUT" type="Map" optional="true"></attribute>
+        <attribute name="checkoutStatus" mode="OUT" type="String" optional="true"></attribute>
+        <attribute name="paymentMethod" mode="OUT" type="String" optional="true"></attribute>
+    </service>
+    <service name="getOrderTransactionList" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getOrderTransactionList">
+        <description>List closed item in store</description>
+        <attribute name="productStoreId" mode="INOUT" type="String" optional="true"></attribute>
+        <attribute name="orderList" mode="OUT" type="List" optional="true"></attribute>
+    </service>
+    <service name="getSellerTransaction" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getSellerTransaction">
+        <description>List closed item in store</description>
+        <attribute name="productStoreId" mode="INOUT" type="String" optional="true"></attribute>
+        <attribute name="timeTo" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="timeFrom" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="orderList" mode="OUT" type="List"></attribute>
+    </service>
+    <service name="getEbayStoreTransaction" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getEbayStoreTransaction">
+        <description>List closed item in store</description>
+        <attribute name="productStoreId" mode="INOUT" type="String" optional="false"></attribute>
+        <attribute name="fromDate" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="thruDate" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="formSelect" mode="OUT" type="String" optional="false"></attribute>
+        <attribute name="orderIdList" mode="OUT" type="List" optional="true"></attribute>
+        <attribute name="transactionsList" mode="OUT" type="List" optional="true"></attribute>
+    </service>
+    <service name="getEbayStoreOrder" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getEbayStoreOrder">
+        <description>Import transaction from ebay to OFBiz</description>
+        <attribute name="productStoreId" mode="INOUT" type="String" optional="false"></attribute>
+        <attribute name="fromDate" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="thruDate" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="formSelect" mode="OUT" type="String" optional="false"></attribute>
+        <attribute name="orderList" mode="OUT" type="List" optional="true"></attribute>
+    </service>
+    <service name="EbayStoreImportTransaction" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStoreOrder" invoke="EbayStoreImportTransaction">
+        <description>List closed item in store</description>
+        <attribute name="productStoreId" mode="INOUT" type="String" optional="false"></attribute>
+        <attribute name="externalId" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="title" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="createdDate" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="ebayUserIdBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="eiasTokenBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="checkoutStatus" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="productId" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="quantityPurchased" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="transactionPrice" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingService" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingServiceCost" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingTotalAdditionalCost" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="salesTaxAmount" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="salesTaxPercent" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="amountPaid" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippedTime" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="paidTime" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="buyerName" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="emailBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressPhone" mode="IN" type="String"></attribute>
+        <attribute name="shippingAddressStreet" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressStreet1" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressStreet2" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressPostalCode" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressCountry" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressStateOrProvince" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressCityName" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressCountry" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="formSelect" mode="OUT" type="String" optional="false"></attribute>
+    </service>
+    <service name="EbayStoreCreateTransactionShoppingCart" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStoreOrder" invoke="EbayStoreCreateTransactionShoppingCart">
+        <description>Create Shopping Cart to store transaction from Ebay</description>
+        <attribute name="productStoreId" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="externalId" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="title" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="createdDate" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="ebayUserIdBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="eiasTokenBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="checkoutStatus" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="productId" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="quantityPurchased" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="transactionPrice" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingService" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingServiceCost" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingTotalAdditionalCost" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="salesTaxAmount" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="salesTaxPercent" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="amountPaid" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippedTime" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="paidTime" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="buyerName" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="emailBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressPhone" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressStreet" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressStreet1" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressStreet2" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressPostalCode" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressCountry" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressStateOrProvince" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressCityName" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressCountry" mode="IN" type="String" optional="true"></attribute>
+    </service>
+    <service name="EbayStoreImportOrder" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStoreOrder" invoke="EbayStoreImportOrder">
+        <description>Import order from ebay to OFBiz</description>
+        <attribute name="orderId" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="externalId" mode="IN" type="String" optional="false"></attribute>
+        <attribute name="productStoreId" mode="INOUT" type="String" optional="false"></attribute>
+        <attribute name="ebayUserIdBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="emailBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="createdDate" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="paymentMethodUsed" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="amountPaid" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="paidTime" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippedTime" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="shippingServiceSelectedCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="shippingDetailsCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="checkoutStatusCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="externalTransactionCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="orderItemList" mode="IN" type="List" optional="true"></attribute>
+        <attribute name="formSelect" mode="OUT" type="String" optional="true"></attribute>
+    </service>
+    <service name="EbayStoreCreateOrderShoppingCart" engine="java" transaction-timeout="12000"
+        location="org.ofbiz.ebaystore.EbayStoreOrder" invoke="EbayStoreCreateOrderShoppingCart">
+        <description>Import order from ebay to OFBiz</description>
+        <attribute name="productStoreId" mode="IN" type="String"></attribute>
+        <attribute name="orderId" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="externalId" mode="IN" type="String"></attribute>
+        <attribute name="ebayUserIdBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="emailBuyer" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="createdDate" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="paymentMethodUsed" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="amountPaid" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="paidTime" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippedTime" mode="IN" type="String" optional="true"></attribute>
+        <attribute name="shippingAddressCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="shippingServiceSelectedCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="shippingDetailsCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="checkoutStatusCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="externalTransactionCtx" mode="IN" type="Map" optional="true"></attribute>
+        <attribute name="orderItemList" mode="IN" type="List" optional="true"></attribute>
+    </service>
 </services>

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java Fri Oct  8 22:41:27 2010
@@ -30,6 +30,8 @@ import java.net.HttpURLConnection;
 import java.net.URL;
 import java.nio.ByteBuffer;
 import java.nio.channels.FileChannel;
+import java.sql.Timestamp;
+import java.text.DateFormat;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Iterator;
@@ -45,6 +47,8 @@ import javolution.util.FastMap;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
@@ -67,11 +71,15 @@ import com.ebay.sdk.ApiContext;
 import com.ebay.sdk.ApiException;
 import com.ebay.sdk.SdkException;
 import com.ebay.sdk.SdkSoapException;
+import com.ebay.sdk.TimeFilter;
 import com.ebay.sdk.call.AddDisputeCall;
 import com.ebay.sdk.call.AddSecondChanceItemCall;
 import com.ebay.sdk.call.GetAllBiddersCall;
 import com.ebay.sdk.call.GetItemCall;
+import com.ebay.sdk.call.GetItemTransactionsCall;
 import com.ebay.sdk.call.GetMyeBaySellingCall;
+import com.ebay.sdk.call.GetOrdersCall;
+import com.ebay.sdk.call.GetSellerTransactionsCall;
 import com.ebay.sdk.call.GetSellingManagerSoldListingsCall;
 import com.ebay.sdk.call.GetStoreCall;
 import com.ebay.sdk.call.GetStoreOptionsCall;
@@ -80,11 +88,15 @@ import com.ebay.sdk.call.SetStoreCall;
 import com.ebay.sdk.call.SetStoreCategoriesCall;
 import com.ebay.sdk.call.VerifyAddSecondChanceItemCall;
 import com.ebay.sdk.util.eBayUtil;
+import com.ebay.soap.eBLBaseComponents.AddressType;
 import com.ebay.soap.eBLBaseComponents.AmountType;
+import com.ebay.soap.eBLBaseComponents.BuyerPaymentMethodCodeType;
+import com.ebay.soap.eBLBaseComponents.CheckoutStatusType;
 import com.ebay.soap.eBLBaseComponents.CurrencyCodeType;
 import com.ebay.soap.eBLBaseComponents.DetailLevelCodeType;
 import com.ebay.soap.eBLBaseComponents.DisputeExplanationCodeType;
 import com.ebay.soap.eBLBaseComponents.DisputeReasonCodeType;
+import com.ebay.soap.eBLBaseComponents.ExternalTransactionType;
 import com.ebay.soap.eBLBaseComponents.FeesType;
 import com.ebay.soap.eBLBaseComponents.GalleryTypeCodeType;
 import com.ebay.soap.eBLBaseComponents.GetAllBiddersModeCodeType;
@@ -99,13 +111,17 @@ import com.ebay.soap.eBLBaseComponents.I
 import com.ebay.soap.eBLBaseComponents.ListingTypeCodeType;
 import com.ebay.soap.eBLBaseComponents.MerchDisplayCodeType;
 import com.ebay.soap.eBLBaseComponents.OfferType;
+import com.ebay.soap.eBLBaseComponents.OrderIDArrayType;
+import com.ebay.soap.eBLBaseComponents.OrderStatusCodeType;
 import com.ebay.soap.eBLBaseComponents.OrderTransactionType;
 import com.ebay.soap.eBLBaseComponents.OrderType;
 import com.ebay.soap.eBLBaseComponents.PaginatedItemArrayType;
+import com.ebay.soap.eBLBaseComponents.PaginatedOrderTransactionArrayType;
 import com.ebay.soap.eBLBaseComponents.PaginationType;
 import com.ebay.soap.eBLBaseComponents.PhotoDisplayCodeType;
 import com.ebay.soap.eBLBaseComponents.PictureDetailsType;
 import com.ebay.soap.eBLBaseComponents.PictureSourceCodeType;
+import com.ebay.soap.eBLBaseComponents.SalesTaxType;
 import com.ebay.soap.eBLBaseComponents.SecondChanceOfferDurationCodeType;
 import com.ebay.soap.eBLBaseComponents.SellingManagerSearchType;
 import com.ebay.soap.eBLBaseComponents.SellingManagerSearchTypeCodeType;
@@ -117,6 +133,8 @@ import com.ebay.soap.eBLBaseComponents.S
 import com.ebay.soap.eBLBaseComponents.SetStoreCategoriesResponseType;
 import com.ebay.soap.eBLBaseComponents.SetStoreRequestType;
 import com.ebay.soap.eBLBaseComponents.SetStoreResponseType;
+import com.ebay.soap.eBLBaseComponents.ShippingDetailsType;
+import com.ebay.soap.eBLBaseComponents.ShippingServiceOptionsType;
 import com.ebay.soap.eBLBaseComponents.StoreCategoryUpdateActionCodeType;
 import com.ebay.soap.eBLBaseComponents.StoreColorSchemeType;
 import com.ebay.soap.eBLBaseComponents.StoreColorType;
@@ -138,14 +156,18 @@ import com.ebay.soap.eBLBaseComponents.S
 import com.ebay.soap.eBLBaseComponents.StoreThemeType;
 import com.ebay.soap.eBLBaseComponents.StoreType;
 import com.ebay.soap.eBLBaseComponents.TaskStatusCodeType;
+import com.ebay.soap.eBLBaseComponents.TradingRoleCodeType;
+import com.ebay.soap.eBLBaseComponents.TransactionArrayType;
 import com.ebay.soap.eBLBaseComponents.TransactionType;
 import com.ebay.soap.eBLBaseComponents.UserType;
 import com.ebay.soap.eBLBaseComponents.VerifyAddSecondChanceItemResponseType;
+import com.ibm.icu.text.SimpleDateFormat;
 
 public class EbayStore {
     private static final String resource = "EbayStoreUiLabels";
     private static final String module = ProductsExportToEbay.class.getName();
     public static ProductsExportToEbay productExportEbay = new ProductsExportToEbay();
+    private static List<Map<String, Object>> orderList = FastList.newInstance();
 
     private static void appendRequesterCredentials(Element elem, Document doc, String token) {
         Element requesterCredentialsElem = UtilXml.addChildElement(elem, "RequesterCredentials", doc);
@@ -1898,6 +1920,7 @@ public class EbayStore {
             GetMyeBaySellingCall api = new GetMyeBaySellingCall(apiContext);
             ItemListCustomizationType itemListType = new ItemListCustomizationType();
             itemListType.setInclude(Boolean.TRUE);
+            itemListType.setIncludeNotes(Boolean.TRUE);
             itemListType.setSort(ItemSortTypeCodeType.ITEM_ID_DESCENDING);
 
             String entriesPerPage = (String) context.get("entriesPerPage");
@@ -1961,7 +1984,10 @@ public class EbayStore {
             OrderTransactionType[] tempSoldItems = null;
             if (UtilValidate.isNotEmpty(api.getReturnedSoldList())) tempSoldItems = (api.getReturnedSoldList().getOrderTransactionArray()).getOrderTransaction();
             // add to list
-            List<Map> soldList =  EbayStore.getOrderTransactions(tempSoldItems);
+            List<Map> soldList = FastList.newInstance();
+            if (UtilValidate.isNotEmpty(tempSoldItems)) {
+                soldList =  EbayStore.getOrderTransactions(tempSoldItems);
+            }
             int soldSize = tempSoldItems == null ? 0 : tempSoldItems.length;
             ItemType[] tempUnSoldItems = null;
             if (UtilValidate.isNotEmpty(api.getReturnedUnsoldList())) tempUnSoldItems = (api.getReturnedUnsoldList().getItemArray()).getItem();
@@ -2108,7 +2134,9 @@ public class EbayStore {
                 TransactionType[] trans = order.getTransactionArray().getTransaction();
                 String orderId = order.getOrderID();
                 for (int rowIndex1 = 0; rowIndex1 < trans.length; rowIndex1++) {
-                    colsList.add(EbayStore.getTransaction(trans[rowIndex1]));
+                    Map<String, Object> transactionMap = EbayStore.getTransaction(trans[rowIndex1]);
+                    transactionMap.put("orderId", orderId);
+                    colsList.add(transactionMap);
                 }
             } else {
                 colsList.add(EbayStore.getTransaction(transaction));
@@ -2122,12 +2150,15 @@ public class EbayStore {
         ItemType item = transaction.getItem();
         String itemId = null; 
         String title = null;
+        String SKU = null;
         if (UtilValidate.isNotEmpty(item)) {
             itemId = item.getItemID();
             title = item.getTitle();
+            SKU = item.getSKU();
         }
         cols.put("itemId", itemId);
         cols.put("title", title);
+        cols.put("SKU", SKU);
         UserType buyer = transaction.getBuyer();
         String user = null;
         if (UtilValidate.isNotEmpty(buyer)) user = buyer.getUserID();
@@ -2344,4 +2375,694 @@ public class EbayStore {
         }
         return ServiceUtil.returnSuccess("Update Item  Successfully.");
     }
+    public Map<String, Object> geteBayClosedItem(DispatchContext dctx, Map<String, ? extends Object> context) {
+        Map <String, Object> result = FastMap.newInstance();
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        Delegator delegator = dctx.getDelegator();
+        Locale locale = (Locale) context.get("locale");
+        String productStoreId = (String) context.get("productStoreId");
+        List <Map<String, Object>> closedItems = FastList.newInstance();
+        try {
+            Map<String, Object> inMap = FastMap.newInstance();
+            inMap.put("productStoreId", productStoreId);
+            inMap.put("userLogin", userLogin);
+            Map<String, Object> resultUser = dispatcher.runSync("getEbayStoreUser", inMap);
+            String userID = (String) resultUser.get("userLoginId");
+            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
+            ItemListCustomizationType itemListType = new ItemListCustomizationType();
+            itemListType.setInclude(Boolean.TRUE);
+            itemListType.setSort(ItemSortTypeCodeType.ITEM_ID_DESCENDING);
+            
+            String entriesPerPage = (String) context.get("entriesPerPage");
+            String pageNumber = (String) context.get("pageNumber");
+            String listingType = (String) context.get("listingType");
+            
+            PaginationType page = new PaginationType();
+            if (UtilValidate.isNotEmpty(entriesPerPage)) {
+                page.setEntriesPerPage(Integer.valueOf(entriesPerPage));
+            }
+            if (UtilValidate.isNotEmpty(pageNumber)) {
+                page.setPageNumber(Integer.valueOf(pageNumber));
+            }
+            itemListType.setPagination(page);
+            if (UtilValidate.isNotEmpty(listingType)) {
+                itemListType.setListingType(ListingTypeCodeType.valueOf(listingType));
+            } else {
+                itemListType.setListingType(ListingTypeCodeType.FIXED_PRICE_ITEM);
+            }
+            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
+                    DetailLevelCodeType.RETURN_ALL,
+                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
+                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
+            };
+            GetMyeBaySellingCall getMyeBaySelling = new GetMyeBaySellingCall(apiContext);
+            getMyeBaySelling.setDetailLevel(detailLevels);
+            getMyeBaySelling.setSoldList(itemListType);
+            getMyeBaySelling.setUnsoldList(itemListType);
+            getMyeBaySelling.getMyeBaySelling();
+            ItemType[] tempUnSoldItems = null;
+            if (UtilValidate.isNotEmpty(getMyeBaySelling.getReturnedUnsoldList())) tempUnSoldItems = (getMyeBaySelling.getReturnedUnsoldList().getItemArray()).getItem();
+            
+            if (UtilValidate.isNotEmpty(tempUnSoldItems)) {
+                for (int i = 0; i < tempUnSoldItems.length; i++) {
+                    Map <String, Object> unsoldItemMap = getClosedItem(tempUnSoldItems[i]);
+                    unsoldItemMap.put("sellingStatus", "unsold");
+                    closedItems.add(unsoldItemMap);
+                }
+            }
+            OrderTransactionType[] tempSoldItems = null;
+            if (UtilValidate.isNotEmpty(getMyeBaySelling.getReturnedSoldList())) tempSoldItems  = (getMyeBaySelling.getReturnedSoldList().getOrderTransactionArray()).getOrderTransaction();
+            
+            if (UtilValidate.isNotEmpty(tempSoldItems)) {
+                for(int i = 0; i < tempSoldItems.length; i++) {
+                    ItemType soldItem = tempSoldItems[i].getTransaction().getItem();
+                    Map <String, Object> soldItemMap = getClosedItem(soldItem);
+                    soldItemMap.put("sellingStatus", "sold");
+                    closedItems.add(soldItemMap);
+                }
+            }
+            result.put("closedItemList", closedItems);
+        } catch (Exception e) {
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        return result;
+    }
+    public static Map<String ,Object> getClosedItem(ItemType tempItems) {
+        Map <String, Object> result = FastMap.newInstance();
+        if(UtilValidate.isNotEmpty(tempItems)) {
+            double hitCount = 0;
+            int quantity = 0;
+            int bidCount = 0;
+            double reservePrice = 0;
+            double buyItNowPrice = 0;
+            String listingType = null;
+            String endTime = null;
+            String viewItemURL= null;
+            String itemId = tempItems.getItemID();
+            String SKU = tempItems.getSKU();
+            String title = tempItems.getTitle();
+            result.put("itemId", itemId);
+            result.put("SKU", SKU);
+            result.put("title", title);
+            if(UtilValidate.isNotEmpty(tempItems.getBuyItNowPrice())) {
+                buyItNowPrice = tempItems.getBuyItNowPrice().getValue();
+            }
+            if(UtilValidate.isNotEmpty(tempItems.getHitCount())) {
+                hitCount = tempItems.getHitCount();
+            }
+            if(UtilValidate.isNotEmpty(tempItems.getReservePrice())) {
+                reservePrice = tempItems.getReservePrice().getValue();
+            }
+            if(UtilValidate.isNotEmpty(tempItems.getSellingStatus().getBidCount())) {
+                bidCount= tempItems.getSellingStatus().getBidCount();
+            }
+            if(UtilValidate.isNotEmpty(tempItems.getListingDetails().getEndTime())) {
+                Calendar endTimeItem = tempItems.getListingDetails().getEndTime();
+                endTime = eBayUtil.toAPITimeString(endTimeItem.getTime());
+            }
+            if(UtilValidate.isNotEmpty(tempItems.getListingDetails().getViewItemURL())) {
+                viewItemURL = tempItems.getListingDetails().getViewItemURL();
+            }
+            if(UtilValidate.isNotEmpty(tempItems.getListingType().values())) {
+                listingType = tempItems.getListingType().value();
+            }
+            
+            result.put("buyItNowPrice", buyItNowPrice);
+            result.put("hitCount", hitCount);
+            result.put("quantity", quantity);
+            result.put("reservePrice", reservePrice);
+            result.put("bidCount", bidCount);
+            result.put("endTime", endTime);
+            result.put("listingType", listingType);
+            result.put("viewItemURL", viewItemURL);
+        }
+        return result;
+    }
+
+    public static Map<String, Object> getShippingDetail(AddressType shippingAddress) {
+        if(UtilValidate.isEmpty(shippingAddress)) {
+            return ServiceUtil.returnError("Required shippingAddress parameter.");
+        }
+        Map<String, Object> result = FastMap.newInstance();
+        String buyerName = null;
+        String street = null;
+        String street1 = null;
+        String street2 = null;
+        String cityName = null;
+        String stateOrProvince = null;
+        String county = null;
+        String countryName = null;
+        String phone = null;
+        String postalCode = null;
+        if(UtilValidate.isNotEmpty(shippingAddress.getName())) {
+            buyerName = shippingAddress.getName();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getStreet())) {
+            street = shippingAddress.getStreet();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getStreet1())) {
+            street = shippingAddress.getStreet1();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getStreet2())) {
+            street = shippingAddress.getStreet2();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getCityName())) {
+            cityName = shippingAddress.getCityName();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getStateOrProvince())) {
+            stateOrProvince = shippingAddress.getStateOrProvince();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getCountry())) {
+            county = shippingAddress.getCountry().value();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getCountryName())) {
+            countryName = shippingAddress.getCountryName();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getPhone())) {
+            phone = shippingAddress.getPhone();
+        }
+        if(UtilValidate.isNotEmpty(shippingAddress.getPostalCode())) {
+            postalCode = shippingAddress.getPostalCode();
+        }
+        result.put("buyerName", buyerName);
+        result.put("shippingAddressStreet", street);
+        result.put("shippingAddressStreet1", street1);
+        result.put("shippingAddressStreet2", street2);
+        result.put("shippingAddressCityName", cityName);
+        result.put("shippingAddressStateOrProvince", stateOrProvince);
+        result.put("shippingAddressCountry", county);
+        result.put("countryName", countryName);
+        result.put("shippingAddressPhone", phone);
+        result.put("shippingAddressPostalCode", postalCode);
+        return result;
+    }
+    public static boolean checkExistProduct(Delegator delegator, String productId) {
+        boolean checkResult = false;
+        try {
+            GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId));
+            if(UtilValidate.isNotEmpty(product)) {
+                checkResult = true;
+            }
+        } catch(Exception e) {
+            return false;
+        }
+        return checkResult;
+    }
+    public static Map<String, Object> getTransactionHelper(TransactionType transaction, Locale locale) {
+        Map<String, Object> orderMap = FastMap.newInstance();
+        if(UtilValidate.isNotEmpty(transaction)) {
+            String orderId = null;
+            String externalId = null;
+            String createdDate = null;
+            String userId = null;
+            String itemId = null;
+            String title = null;
+            String SKU = null;
+            String viewItemURl = null;
+            int quantityPurchased = 0;
+            double transactionPrice = 0;
+            String buyer = null;
+            String eiasTokenBuyer = null;
+            String emailBuyer = null;
+            String checkoutStatus = null;
+            String paymentMethod = null;
+            String viewItemURL = null;
+            String currency = null;
+            double buyItNowPrice = 0;
+            double amountPaid = 0.0;
+            String shippingService = null;
+            double shippingServiceCost = 0.0;
+            double shippingTotalAdditionalCost = 0.0;
+            String shippedTime = null;
+            String paidTime = null;
+            double salesTaxAmount = 0.0;
+            float salesTaxPercent = 0;
+            Map<String, Object> itemSold = FastMap.newInstance();
+            Map<String, Object> address = FastMap.newInstance();
+
+            if(UtilValidate.isNotEmpty(transaction.getItem())) {
+                ItemType item = transaction.getItem();
+                itemId = item.getItemID();
+                title = item.getTitle();
+                SKU = item.getSKU();
+                buyItNowPrice = item.getBuyItNowPrice().getValue();
+                currency = item.getCurrency().value();
+                
+                if(UtilValidate.isNotEmpty(item.getListingDetails())) {
+                    viewItemURL = item.getListingDetails().getViewItemURL();
+                }
+            }
+
+            externalId = transaction.getTransactionID();
+            if ("0".equals(externalId)) {
+                // this is a Chinese Auction: ItemID is used to uniquely identify the transaction
+                externalId = "EBS_"+itemId;
+            } else {
+            	externalId = "EBS_"+externalId;
+            }
+
+            if (UtilValidate.isNotEmpty(transaction.getCreatedDate())) {
+                createdDate = EbayStoreHelper.convertDate(transaction.getCreatedDate().getTime(), locale);
+            }
+            if (UtilValidate.isNotEmpty(transaction.getShippedTime())) {
+                shippedTime = EbayStoreHelper.convertDate(transaction.getShippedTime().getTime(), locale);
+            }
+            if (UtilValidate.isNotEmpty(transaction.getPaidTime())) {
+                paidTime = EbayStoreHelper.convertDate(transaction.getPaidTime().getTime(), locale);
+            }
+            if (UtilValidate.isNotEmpty(transaction.getQuantityPurchased())) {
+                quantityPurchased = transaction.getQuantityPurchased();
+            }
+            if (UtilValidate.isNotEmpty(transaction.getTransactionPrice())) {
+                transactionPrice = transaction.getTransactionPrice().getValue();
+            }
+            if (UtilValidate.isNotEmpty(transaction.getAmountPaid())) {
+                amountPaid = transaction.getAmountPaid().getValue();
+            }
+            if(UtilValidate.isNotEmpty(transaction.getBuyer())) {
+                UserType getBuyer = transaction.getBuyer();
+                buyer = transaction.getBuyer().getUserID();
+                if (UtilValidate.isNotEmpty(getBuyer.getEmail())) {
+                    emailBuyer = getBuyer.getEmail();
+                }
+                if (UtilValidate.isNotEmpty(getBuyer.getEIASToken())) {
+                    eiasTokenBuyer = getBuyer.getEIASToken();
+                }
+                if (UtilValidate.isNotEmpty(getBuyer.getBuyerInfo().getShippingAddress())) {
+                    userId = getBuyer.getUserID();
+                    AddressType shipping = getBuyer.getBuyerInfo().getShippingAddress();
+                    address = getShippingDetail(shipping);
+                }
+            }
+            if(UtilValidate.isNotEmpty(transaction.getStatus())) {
+                if(UtilValidate.isNotEmpty(transaction.getStatus().getPaymentMethodUsed()))
+                    paymentMethod = transaction.getStatus().getPaymentMethodUsed().value();
+                if(UtilValidate.isNotEmpty(transaction.getStatus().getCheckoutStatus()))
+                    checkoutStatus = transaction.getStatus().getCheckoutStatus().value();
+            }
+            if (UtilValidate.isNotEmpty(transaction.getShippingServiceSelected())) {
+                ShippingServiceOptionsType shippingServiceSelect = transaction.getShippingServiceSelected();
+                if (UtilValidate.isNotEmpty(shippingServiceSelect.getShippingService())) {
+                    shippingService = shippingServiceSelect.getShippingService();
+                }
+                if (UtilValidate.isNotEmpty(shippingServiceSelect.getShippingServiceCost())) {
+                    shippingServiceCost = shippingServiceSelect.getShippingServiceCost().getValue();
+                }
+                if (UtilValidate.isNotEmpty(shippingServiceSelect.getShippingServiceAdditionalCost())) {
+                    shippingTotalAdditionalCost  = shippingServiceSelect.getShippingServiceAdditionalCost().getValue();
+                }
+            }
+            if (UtilValidate.isNotEmpty(transaction.getShippingDetails().getSalesTax().getSalesTaxAmount())) {
+                salesTaxAmount = transaction.getShippingDetails().getSalesTax().getSalesTaxAmount().getValue();
+            }
+            if (UtilValidate.isNotEmpty(transaction.getShippingDetails().getSalesTax().getSalesTaxPercent())) {
+                salesTaxPercent = transaction.getShippingDetails().getSalesTax().getSalesTaxPercent();
+            }
+            
+            orderMap.put("externalId", externalId);
+            orderMap.put("itemId", itemId);
+            orderMap.put("title", title);
+            orderMap.put("ebayUserIdBuyer", userId);
+            orderMap.put("eiasTokenBuyer", eiasTokenBuyer);
+            orderMap.put("productId", SKU);
+            orderMap.put("buyItNowPrice", buyItNowPrice);
+            orderMap.put("currency", currency);
+            orderMap.put("viewItemURL", viewItemURL);
+            orderMap.put("orderId", orderId);
+            orderMap.put("createdDate", createdDate);
+            orderMap.put("paidTime", paidTime);
+            orderMap.put("transactionPrice", transactionPrice);
+            orderMap.put("buyer", buyer);
+            orderMap.put("emailBuyer", emailBuyer);
+            orderMap.put("checkoutStatus", checkoutStatus.substring(8));
+            orderMap.put("amountPaid", amountPaid);
+            orderMap.put("quantityPurchased", quantityPurchased);
+            orderMap.put("itemSold", itemSold);
+            orderMap.put("paymentMethod", paymentMethod);
+            orderMap.put("buyerName", address.get("buyerName").toString());
+            orderMap.put("shippingAddressCityName", address.get("shippingAddressCityName").toString());
+            orderMap.put("shippingAddressCountry", address.get("shippingAddressCountry").toString());
+            orderMap.put("countryName", address.get("countryName").toString());
+            orderMap.put("shippingAddressPhone", address.get("shippingAddressPhone").toString());
+            orderMap.put("shippingAddressPostalCode", address.get("shippingAddressPostalCode").toString());
+            orderMap.put("shippingAddressStateOrProvince", address.get("shippingAddressStateOrProvince").toString());
+            orderMap.put("shippingAddressStreet", address.get("shippingAddressStreet").toString());
+            if (UtilValidate.isNotEmpty(address.get("shippingAddressStreet1"))) {
+                orderMap.put("shippingAddressStreet1", address.get("shippingAddressStreet1").toString());
+            }
+            if (UtilValidate.isNotEmpty(address.get("shippingAddressStreet2"))) {
+                orderMap.put("shippingAddressStreet2", address.get("shippingAddressStreet2").toString());
+            }
+            orderMap.put("shippingService", shippingService);
+            orderMap.put("shippingServiceCost", shippingServiceCost);
+            orderMap.put("shippingTotalAdditionalCost", shippingTotalAdditionalCost);
+            orderMap.put("shippedTime", shippedTime);
+            orderMap.put("salesTaxAmount", salesTaxAmount);
+            orderMap.put("salesTaxPercent", salesTaxPercent);
+        }
+        return orderMap;
+    }
+    public Map<String, Object> getEbayStoreTransaction(DispatchContext dctx, Map<String, ? extends Object> context) {
+        Map<String, Object> result = FastMap.newInstance();
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        Delegator delegator = dctx.getDelegator();
+        Locale locale = (Locale) context.get("locale");
+        List<Map<String, Object>> transactionList = FastList.newInstance();
+        List<String> orderIdList = FastList.newInstance();
+        String productStoreId = (String) context.get("productStoreId");
+        try {
+            Calendar fromDate = Calendar.getInstance();
+            Calendar toDate = Calendar.getInstance();
+            if (UtilValidate.isNotEmpty(context.get("thruDate"))) {
+                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+                dateFormat.parse(context.get("fromDate").toString());
+                fromDate.setTime(dateFormat.parse(context.get("fromDate").toString()));
+                
+                SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+                dateFormat2.parse(context.get("thruDate").toString());
+                toDate.setTime(dateFormat.parse(context.get("thruDate").toString()));
+            } else {
+                toDate.setTime(UtilDateTime.nowDate());
+                fromDate = null;
+            }
+
+            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
+            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
+                    DetailLevelCodeType.RETURN_ALL,
+                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
+                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
+            };
+            GetSellerTransactionsCall getSellerTransaction = new GetSellerTransactionsCall(apiContext);
+            getSellerTransaction.setIncludeContainingOrder(Boolean.TRUE);
+            getSellerTransaction.setDetailLevel(detailLevels);
+            if (UtilValidate.isEmpty(fromDate)) {
+                getSellerTransaction.setNumberOfDays(30);
+            }
+            TimeFilter modifiedTimeFilter = new TimeFilter(fromDate, toDate);
+            getSellerTransaction.setModifiedTimeFilter(modifiedTimeFilter);
+            TransactionType[] transactions = getSellerTransaction.getSellerTransactions();
+            List<String> orderIds = FastList.newInstance();
+            for (int tranCount = 0; tranCount < transactions.length; tranCount++) {
+                TransactionType transaction = transactions[tranCount];
+                if (UtilValidate.isNotEmpty(transaction.getContainingOrder())) {
+                    String orderId = transaction.getContainingOrder().getOrderID();
+                    if (!orderIdList.contains(orderId)) {
+                        orderIdList.add(orderId);
+                    }
+                    continue;
+                }
+                Map transactionMap = EbayStore.getTransactionHelper(transaction, locale);
+                transactionList.add(transactionMap);
+            }
+        } catch (Exception e) {
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        result.put("productStoreId", productStoreId);
+        result.put("formSelect", "transaction");
+        result.put("orderIdList", orderIdList);
+        result.put("transactionsList", transactionList);
+        return result;
+    }
+
+    public Map<String, Object> getEbayStoreOrder(DispatchContext dctx, Map<String, ? extends Object> context) {
+        Map<String, Object> result = FastMap.newInstance();
+        LocalDispatcher dispatcher = dctx.getDispatcher();
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        Delegator delegator = dctx.getDelegator();
+        Locale locale = (Locale) context.get("locale");
+        List<Map<String, Object>> orderList = FastList.newInstance();
+        String productStoreId = (String) context.get("productStoreId");
+        ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
+        try {
+            Calendar fromDate = Calendar.getInstance();
+            Calendar toDate = Calendar.getInstance();
+            if (UtilValidate.isNotEmpty(context.get("thruDate"))) {
+                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+                dateFormat.parse(context.get("fromDate").toString());
+                fromDate.setTime(dateFormat.parse(context.get("fromDate").toString()));
+                
+                SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+                dateFormat2.parse(context.get("thruDate").toString());
+                toDate.setTime(dateFormat.parse(context.get("thruDate").toString()));
+            } else {
+                toDate.setTime(UtilDateTime.nowDate());
+                fromDate = null;
+            }
+            
+            GetOrdersCall getOrder = new GetOrdersCall(apiContext);
+            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
+                    DetailLevelCodeType.RETURN_ALL,
+                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
+                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
+            };
+            getOrder.setDetailLevel(detailLevels);
+            getOrder.setCreateTimeFrom(fromDate);
+            getOrder.setCreateTimeTo(toDate);
+            getOrder.setOrderRole(TradingRoleCodeType.SELLER);
+            getOrder.setOrderStatus(OrderStatusCodeType.COMPLETED);
+        
+            OrderType[] orders = getOrder.getOrders();
+            for (int orderCount = 0; orderCount < orders.length; orderCount++) {
+                OrderType order = orders[orderCount];
+                Map<String, Object> orderMap = EbayStore.getOrderHelper(order, locale);
+                orderList.add(orderMap);
+            }
+            
+        } catch (Exception e) {
+        	result = ServiceUtil.returnFailure(e.getMessage());
+        }
+        System.out.println(orderList);
+        result.put("productStoreId", productStoreId);
+        result.put("formSelect", "order");
+        result.put("orderList", orderList);
+        return result;
+    }
+
+    private static Map<String, Object> getOrderHelper(OrderType order, Locale locale) {
+        FastMap<String, Object> orderCtx = FastMap.newInstance();
+        String externalOrderId = "EBS_"+order.getOrderID();
+        double amountPaid = 0.0;
+        String emailBuyer = null;
+        String createdTime = null;
+        String paidTime = null;
+        String paymentMethod = null;
+        String paymentStatus = null;
+        String shippedTime = null;
+        String shippingService = null;
+        double adjustmentAmount = 0.0;
+        double mountSaved = 0.0;
+        String ebayUserIdBuyer = null;
+        String eBayPaymentStatus = null;
+        String status = null;
+        double shippingServiceCost = 0.0;
+        double shippingTotalAdditionalCost = 0.0;
+        double salesTaxAmount = 0.0;
+        double salesTaxPercent = 0.0;
+        double insuranceCost = 0.0;
+        double insuranceFee = 0.0;
+        String insuranceOption = null;
+        boolean insuranceWanted = false;
+        String salesTaxState = null;
+        boolean shippingIncludedInTax = false;
+        String externalTransactionId = null;
+        String externalTransactionTime = null;
+        double feeOrCreditAmount = 0.0;
+        double paymentOrRefundAmount = 0.0;
+        Map<String, Object> shippingServiceSelectedCtx = FastMap.newInstance();
+        Map<String, Object> shippingDetailsCtx = FastMap.newInstance();
+        Map<String, Object> shippingAddressMap = FastMap.newInstance();
+        Map<String, Object> checkoutStatusCtx = FastMap.newInstance();
+        Map<String, Object> externalTransactionCtx = FastMap.newInstance();
+        if (UtilValidate.isNotEmpty(order.getAdjustmentAmount())) {
+            adjustmentAmount = order.getAdjustmentAmount().getValue();
+        }
+        if (UtilValidate.isNotEmpty(order.getTotal())) {
+            amountPaid = order.getTotal().getValue();
+        }
+        if (UtilValidate.isNotEmpty(order.getCreatedTime())) {
+            createdTime = EbayStoreHelper.convertDate(order.getCreatedTime().getTime(), locale);
+        }
+        if (UtilValidate.isNotEmpty(order.getPaidTime())) {
+            paidTime = EbayStoreHelper.convertDate(order.getPaidTime().getTime(), locale);
+        }
+        if (UtilValidate.isNotEmpty(order.getShippedTime())) {
+            shippedTime = EbayStoreHelper.convertDate(order.getShippedTime().getTime(), locale);
+        }
+        if (UtilValidate.isNotEmpty(order.getBuyerUserID())) {
+            ebayUserIdBuyer = order.getBuyerUserID();
+        }
+        if (UtilValidate.isNotEmpty(order.getShippingAddress())) {
+            AddressType shippingAddress = order.getShippingAddress();
+            shippingAddressMap = EbayStore.getShippingDetail(shippingAddress);
+        }
+        if (UtilValidate.isNotEmpty(order.getShippingServiceSelected())) {
+            ShippingServiceOptionsType shippingServiceSelected = order.getShippingServiceSelected();
+            if (UtilValidate.isNotEmpty(shippingServiceSelected.getShippingService())) {
+                shippingService = shippingServiceSelected.getShippingService();
+            }
+            if (UtilValidate.isNotEmpty(shippingServiceSelected.getShippingServiceCost())) {
+                shippingServiceCost = shippingServiceSelected.getShippingServiceCost().getValue();
+            }
+            if (UtilValidate.isNotEmpty(shippingServiceSelected.getShippingServiceAdditionalCost())) {
+                shippingTotalAdditionalCost = shippingServiceSelected.getShippingServiceAdditionalCost().getValue();
+            }
+            if (UtilValidate.isNotEmpty(shippingServiceSelected.getShippingInsuranceCost())) {
+                insuranceCost = shippingServiceSelected.getShippingInsuranceCost().getValue();
+            }
+        }
+        shippingServiceSelectedCtx.put("shippingService", shippingService);
+        shippingServiceSelectedCtx.put("shippingServiceCost", shippingServiceCost);
+        shippingServiceSelectedCtx.put("shippingTotalAdditionalCost", insuranceCost);
+
+        if (UtilValidate.isNotEmpty(order.getShippingDetails())) {
+            ShippingDetailsType shippingDetail = order.getShippingDetails();
+            if (UtilValidate.isNotEmpty(shippingDetail.getInsuranceFee())) {
+                insuranceFee = shippingDetail.getInsuranceFee().getValue();
+            }
+            if (UtilValidate.isNotEmpty(shippingDetail.getInsuranceOption())) {
+                insuranceOption = shippingDetail.getInsuranceOption().value();
+            }
+            if (UtilValidate.isNotEmpty(shippingDetail.isInsuranceWanted())) {
+                insuranceWanted = shippingDetail.isInsuranceWanted();
+            }
+            if (UtilValidate.isNotEmpty(shippingDetail.getSalesTax())) {
+                SalesTaxType salesTax = shippingDetail.getSalesTax();
+                if (UtilValidate.isNotEmpty(salesTax.getSalesTaxAmount())) {
+                    salesTaxAmount = salesTax.getSalesTaxAmount().getValue();
+                }
+                if (UtilValidate.isNotEmpty(salesTax.getSalesTaxPercent())) {
+                    salesTaxPercent = salesTax.getSalesTaxPercent().doubleValue();
+                }
+                if (UtilValidate.isNotEmpty(salesTax.getSalesTaxState())) {
+                    salesTaxState = salesTax.getSalesTaxState();
+                }
+                if (UtilValidate.isNotEmpty(salesTax.isShippingIncludedInTax())) {
+                    shippingIncludedInTax = salesTax.isShippingIncludedInTax();
+                }
+            }
+        }
+        shippingDetailsCtx.put("insuranceFee", insuranceFee);
+        shippingDetailsCtx.put("insuranceOption", insuranceOption);
+        shippingDetailsCtx.put("insuranceWanted", insuranceWanted);
+        shippingDetailsCtx.put("salesTaxAmount", salesTaxAmount);
+        shippingDetailsCtx.put("salesTaxPercent", salesTaxPercent);
+        shippingDetailsCtx.put("salesTaxState", salesTaxState);
+        shippingDetailsCtx.put("shippingIncludedInTax", shippingIncludedInTax);
+
+        if (UtilValidate.isNotEmpty(order.getAmountSaved())) {
+            mountSaved = order.getAmountSaved().getValue();
+        }
+
+        if (UtilValidate.isNotEmpty(order.getCheckoutStatus())) {
+            CheckoutStatusType checkoutStatus = order.getCheckoutStatus();
+            if (UtilValidate.isNotEmpty(checkoutStatus.getEBayPaymentStatus())) {
+                eBayPaymentStatus = checkoutStatus.getEBayPaymentStatus().value();
+            }
+            if (UtilValidate.isNotEmpty(checkoutStatus.getStatus())) {
+                status = checkoutStatus.getStatus().value();
+            }
+            if (UtilValidate.isNotEmpty(checkoutStatus.getPaymentMethod())) {
+                paymentMethod = checkoutStatus.getPaymentMethod().value();
+            }
+        }
+        checkoutStatusCtx.put("eBayPaymentStatus", eBayPaymentStatus);
+        checkoutStatusCtx.put("paymentMethodUsed", paymentMethod);
+        checkoutStatusCtx.put("completeStatus", status);
+
+        if (UtilValidate.isNotEmpty(order.getExternalTransaction())) {
+            ExternalTransactionType[] externalTransactions = order.getExternalTransaction();
+            for (int count = 0; count < externalTransactions.length; count++) {
+                ExternalTransactionType externalTransaction = externalTransactions[count];
+                if (UtilValidate.isNotEmpty(externalTransaction.getExternalTransactionID())) {
+                    externalTransactionId = externalTransaction.getExternalTransactionID();
+                }
+                if (UtilValidate.isNotEmpty(externalTransaction.getExternalTransactionTime())) {
+                    externalTransactionTime = EbayStoreHelper.convertDate(externalTransaction.getExternalTransactionTime().getTime(), locale);
+                }
+                if (UtilValidate.isNotEmpty(externalTransaction.getFeeOrCreditAmount())) {
+                    feeOrCreditAmount = externalTransaction.getFeeOrCreditAmount().getValue();
+                }
+                if (UtilValidate.isNotEmpty(externalTransaction.getPaymentOrRefundAmount())) {
+                    paymentOrRefundAmount = externalTransaction.getPaymentOrRefundAmount().getValue();
+                }
+            }
+        }
+        externalTransactionCtx.put("externalTransactionID", externalTransactionId);
+        externalTransactionCtx.put("externalTransactionTime", externalTransactionTime);
+        externalTransactionCtx.put("feeOrCreditAmount", feeOrCreditAmount);
+        externalTransactionCtx.put("paymentOrRefundAmount", paymentOrRefundAmount);
+
+        List<Map<String, Object>> orderItemList = FastList.newInstance();
+        if (UtilValidate.isNotEmpty(order.getTransactionArray().getTransaction())) {
+            TransactionType[] transactions = order.getTransactionArray().getTransaction();
+            for (int tranCount = 0; tranCount < transactions.length; tranCount++) {
+                Map<String, Object> orderItemCtx = FastMap.newInstance();
+                TransactionType transaction = transactions[tranCount];
+                int quantityPurchased = 0;
+                double transactionPrice = 0.0;
+                String createdDate = null;
+                if (UtilValidate.isNotEmpty(transaction.getQuantityPurchased())) {
+                    quantityPurchased = transaction.getQuantityPurchased();
+                }
+                if (UtilValidate.isNotEmpty(transaction.getTransactionPrice())) {
+                    transactionPrice = transaction.getTransactionPrice().getValue();
+                }
+                if (UtilValidate.isNotEmpty(transaction.getCreatedDate())) {
+                    createdDate = EbayStoreHelper.convertDate(transaction.getCreatedDate().getTime(), locale);
+                }
+                if (UtilValidate.isNotEmpty(transaction.getBuyer().getEmail())) {
+                    emailBuyer = transaction.getBuyer().getEmail();
+                }
+                String itemId = null;
+                String productId = null;
+                double startPrice = 0.0;
+                String title = null;
+                double currentPrice = 0.0;
+                String listingStatus = null;
+                if (UtilValidate.isNotEmpty(transaction.getItem())) {
+                    ItemType item = transaction.getItem();
+                    if (UtilValidate.isNotEmpty(item.getSKU())) {
+                        productId = item.getSKU();
+                    }
+                    if (UtilValidate.isNotEmpty(item.getItemID())) {
+                        itemId = item.getItemID();
+                    }
+                    if (UtilValidate.isNotEmpty(item.getPaymentMethods())) {
+                        BuyerPaymentMethodCodeType[] paymentMethods = item.getPaymentMethods();
+                    }
+                    if (UtilValidate.isNotEmpty(item.getStartPrice())) {
+                        startPrice = item.getStartPrice().getValue();
+                    }
+                    if (UtilValidate.isNotEmpty(item.getTitle())) {
+                        title = item.getTitle();
+                    }
+                }
+                orderItemCtx.put("orderId", externalOrderId);
+                orderItemCtx.put("closedDate", createdDate);
+                orderItemCtx.put("goodIdentificationIdValue", itemId);
+                orderItemCtx.put("quantity", quantityPurchased);
+                orderItemCtx.put("startPrice", startPrice);
+                orderItemCtx.put("title", title);
+                orderItemCtx.put("productId", productId);
+                orderItemCtx.put("transactionPrice", transactionPrice);
+                orderItemList.add(orderItemCtx);
+            }
+        }
+        orderCtx.put("externalId", externalOrderId);
+        orderCtx.put("emailBuyer", emailBuyer);
+        orderCtx.put("amountPaid", amountPaid);
+        orderCtx.put("createdDate", createdTime);
+        orderCtx.put("paidTime", paidTime);
+        orderCtx.put("shippedTime", shippedTime);
+        orderCtx.put("ebayUserIdBuyer", ebayUserIdBuyer);
+        orderCtx.put("shippingAddressCtx", shippingAddressMap);
+        orderCtx.put("shippingServiceSelectedCtx", shippingServiceSelectedCtx);
+        orderCtx.put("shippingDetailsCtx", shippingDetailsCtx);
+        orderCtx.put("checkoutStatusCtx", checkoutStatusCtx);
+        orderCtx.put("externalTransactionCtx", externalTransactionCtx);
+        orderCtx.put("orderItemList", orderItemList);
+        return orderCtx;
+    }
 }

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java Fri Oct  8 22:41:27 2010
@@ -22,6 +22,7 @@ package org.ofbiz.ebaystore;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.util.Calendar;
+import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -46,6 +47,7 @@ import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.serialize.SerializeException;
 import org.ofbiz.entity.serialize.XmlSerializer;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.party.contact.ContactHelper;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
@@ -91,6 +93,7 @@ import com.ebay.soap.eBLBaseComponents.S
 import com.ebay.soap.eBLBaseComponents.SiteCodeType;
 import com.ebay.soap.eBLBaseComponents.TradingRoleCodeType;
 import com.ebay.soap.eBLBaseComponents.VATDetailsType;
+import com.ibm.icu.text.SimpleDateFormat;
 
 public class EbayStoreHelper {
     private static final String configFileName = "ebayStore.properties";
@@ -736,4 +739,9 @@ public class EbayStoreHelper {
         }
         return isReserve;
     }
+
+    public static String convertDate(Date date, Locale locale) {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",locale);
+        return simpleDateFormat.format(date);
+    }
 }

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml Fri Oct  8 22:41:27 2010
@@ -469,6 +469,74 @@
         <response name="success" type="view" value="customerService"/>
         <response name="error" type="view" value="customerService"/>
     </request-map>
+    <request-map uri="ClosedListing">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ClosedListing"/>
+    </request-map>
+    <request-map uri="geteBayClosedItem">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="geteBayClosedItem"/>
+        <response name="success" type="view" value="ClosedListing"/>
+        <response name="error" type="view" value="ClosedListing"/>
+    </request-map>
+    <request-map uri="OrderListing">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="OrderListing"/>
+    </request-map>
+    <request-map uri="getEbayOrders">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="getEbayOrders"/>
+        <response name="success" type="view" value="OrderListing"/>
+        <response name="error" type="view" value="OrderListing"/>
+    </request-map>
+    <request-map uri="getSellerTransaction">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="getSellerTransaction"/>
+        <response name="success" type="view" value="OrderListing"/>
+        <response name="error" type="view" value="OrderListing"/>
+    </request-map>
+    <request-map uri="getMyeBaySelling">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="getMyeBaySelling"/>
+        <response name="success" type="view" value="ActiveListing"/>
+        <response name="error" type="view" value="ActiveListing"/>
+    </request-map>
+    <request-map uri="getEbayStoreTransaction">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="getEbayStoreTransaction"/>
+        <response name="success" type="view" value="OrderListing"/>
+        <response name="error" type="view" value="OrderListing"/>
+    </request-map>
+    <request-map uri="getEbayStoreOrder">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="getEbayStoreOrder"/>
+        <response name="success" type="view" value="OrderListing"/>
+        <response name="error" type="view" value="OrderListing"/>
+    </request-map>
+    <request-map uri="EbayStoreImportTransaction">
+        <security https="true" auth="true"/>
+        <event type="service-multi" invoke="EbayStoreImportTransaction"/>
+        <response name="success" type="view" value="OrderListing"/>
+        <response name="error" type="view" value="OrderListing"/>
+    </request-map>
+    <request-map uri="EbayStoreImportOrder">
+        <security https="true" auth="true"/>
+        <event type="service-multi" invoke="EbayStoreImportOrder"/>
+        <response name="success" type="view" value="OrderListing"/>
+        <response name="error" type="view" value="OrderListing"/>
+    </request-map>
+    <request-map uri="EbayStoreCreateTransactionShoppingCart">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="EbayStoreCreateTransactionShoppingCart"/>
+        <response name="success" type="view" value="OrderListing"/>
+        <response name="error" type="view" value="OrderListing"/>
+    </request-map>
+    <request-map uri="EbayStoreCreateOrderShoppingCart">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="EbayStoreCreateOrderShoppingCart"/>
+        <response name="success" type="view" value="OrderListing"/>
+        <response name="error" type="view" value="OrderListing"/>
+    </request-map>
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
@@ -517,5 +585,8 @@
     <!-- Customer Service-->
     <view-map name="customerService" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#customerService"/>
     <view-map name="customerOfferData" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#customerOfferData"/>
+    
+    <view-map name="ClosedListing" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#ClosedListing"/>
+    <view-map name="OrderListing" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#OrderListing"/>
     <!-- end of view mappings -->
 </site-conf>

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml Fri Oct  8 22:41:27 2010
@@ -148,7 +148,7 @@ value="${bsh:billingAccount != null ? or
             </drop-down>
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit/></field>
-    </form> 
+    </form>
     <!-- Inventory -->
     <form name="EbayStoreFacilityList" type="single" list-name="productStoreFacilityList"  target="ebayStoreInventory"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
@@ -700,4 +700,105 @@ value="${bsh:billingAccount != null ? or
         </field>
         <field name="updateContactStatus"><submit button-type="button"/></field>
     </form>
+    <form name="ClosedItemList" type="list"  target="doAction" list-name="closedList"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar" use-row-submit="true" separate-columns="true" view-size="100">
+        <field name="itemId" title="Item ID" sort-field="true"><display description="${itemId}"/></field>
+        <field name="SKU" title="Product ID"><display description="${SKU}"/></field>
+        <field name="title">
+            <hyperlink target="${viewItemURL}" description="${title}" target-type="plain" target-window="_BLANK"/>
+        </field>
+        <field name="sellingStatus" title="Status"><display description="${sellingStatus}"/></field>
+        <field name="endTime" title="Closing Time"><display description="${endTime}"/></field>
+        <field name="reservePrice" title="Reserve Price"><display description="${reservePrice}"/></field>
+        <field name="bidCount" title="Bids"><display description="${bidCount}"/></field>
+        <field name="hitCount" title="Hits"><display description="${hitCount}"/></field>
+        <field name="listingType" title="Listing Type"><display description="${listingType}"/></field>
+    </form>
+    <form name="TransactionList" type="multi" target="EbayStoreImportTransaction" list-name="transactionsList"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar" use-row-submit="true" separate-columns="true" view-size="100">
+        <row-actions>
+            <script location="component://ebaystore/webapp/ebaystore/WEB-INF/actions/store/CheckOrderStatus.groovy"></script>
+        </row-actions>
+        <field name="_rowSubmit"  position="1" title="${uiLabelMap.CommonSelect}"><check/></field>
+        <field name="productStoreId"><hidden value="${productStoreId}"/></field>
+        <field name="orderId" title="Order ID">
+            <hyperlink target="https://localhost:8443/ordermgr/control/orderview?orderId=${orderId}" description="${orderId}" target-type="plain" target-window="_BLANK"/>
+        </field>
+        <field name="externalId" title="Transaction ID"><display description="${externalId}"/></field>
+        <field name="ebayUserIdBuyer" title="Winner Bidder"><display description="${ebayUserIdBuyer}"/></field>
+        <field name="productId" title="Product ID"><display description="${productId}"/></field>
+        <field name="title" title="Product Name"><display description="${title}"/></field>
+        <field name="createdDate" title="Listing Close Date"><display description="${createdDate}"/></field>
+        <field name="paymentType"><display description="${paymentMethod}"></display></field>
+        <field name="quantityPurchased" title="Quntity"><display description="${quantityPurchased}"/></field>
+        <field name="transactionPrice" title="Price Order Total"><display description="${transactionPrice}"/></field>
+        <field name="checkoutStatus" title="Checkout Status"><display description="${checkoutStatus}"></display></field>
+        <field name="importStatus" title="Import Status"><display description="${importStatus}"></display></field>
+        <field name="amountPaid"><hidden value="${amountPaid}"/></field>
+        <field name="paidTime"><hidden value="${paidTime}"/></field>
+        <field name="currency"><hidden value="${currency}"></hidden></field>
+        <field name="buyerName"><hidden value="${buyerName}"></hidden></field>
+        <field name="eiasTokenBuyer"><hidden value="${eiasTokenBuyer}"></hidden></field>
+        <field name="emailBuyer"><hidden value="${emailBuyer}"></hidden></field>
+        <field name="shippingService"><hidden value="${shippingService}"></hidden></field>
+        <field name="shippingServiceCost"><hidden value="${shippingServiceCost}"></hidden></field>
+        <field name="shippingTotalAdditionalCost"><hidden value="${shippingTotalAdditionalCost}"></hidden></field>
+        <field name="salesTaxAmount"><hidden value="${salesTaxAmount}"></hidden></field>
+        <field name="salesTaxPercent"><hidden value="${salesTaxPercent}"></hidden></field>
+        <field name="shippingAddressCityName"><hidden value="${shippingAddressCityName}"></hidden></field>
+        <field name="shippingAddressCountry"><hidden value="${shippingAddressCountry}"></hidden></field>
+        <field name="shippingAddressPhone"><hidden value="${shippingAddressPhone}"></hidden></field>
+        <field name="shippingAddressPostalCode"><hidden value="${shippingAddressPostalCode}"></hidden></field>
+        <field name="shippingAddressStateOrProvince"><hidden value="${shippingAddressStateOrProvince}"></hidden></field>
+        <field name="shippingAddressStreet"><hidden value="${shippingAddressStreet}"></hidden></field>
+        <field name="shippingAddressStreet1"><hidden value="${shippingAddressStreet1}"></hidden></field>
+        <field name="shippingAddressStreet2"><hidden value="${shippingAddressStreet2}"></hidden></field>
+        <field name="import" title="Import Orders"><submit button-type="button"/></field>
+    </form>
+    <form name="OrderList" type="multi" target="EbayStoreImportOrder" list-name="orderLists"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar" use-row-submit="true" separate-columns="true" view-size="100">
+        <row-actions>
+            <script location="component://ebaystore/webapp/ebaystore/WEB-INF/actions/store/OrderListParameters.groovy"/>
+        </row-actions>
+        <field name="productStoreId"><hidden value="${productStoreId}"/></field>
+        <field name="_rowSubmit" position="1" title="${uiLabelMap.CommonSelect}" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><check/></field>
+        <field name="orderId" position="1" title="Order ID" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}">
+            <hyperlink target="https://localhost:8443/ordermgr/control/orderview?orderId=${orderId}" description="${orderId}" target-type="plain" target-window="_BLANK"/>
+        </field>
+        <field name="externalId" title="External ID" position="1" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><display description="${externalId}"></display></field>
+        <field name="ebayUserIdBuyer" title="Winning Bidder" position="1" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><display description="${ebayUserIdBuyer}"></display></field>
+        <field name="dummy4" title=" " position="1"><display></display></field>
+        <field name="dummy5" title=" " position="1"><display></display></field>
+        <field name="createdDate" title="Invoice Date" position="1" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><display description="${createdDate}"></display></field>
+        <field name="paymentMethodUsed" title="Payment Type" position="1" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><display description="${paymentMethodUsed}"></display></field>
+        <field name="dummy7" title=" " position="1"><display></display></field>
+        <field name="amountPaid" title="Order Total Price" position="1" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><display description="${amountPaid}"></display></field>
+
+        <field name="dummy1" title=" " position="2"><display></display></field>
+        <field name="dummy2" title=" " position="2"><display></display></field>
+        <field name="dummy3" title=" " position="2"><display></display></field>
+        <field name="dummy8" title=" " position="2"><display></display></field>
+        <field name="dummy10" title=" " position="2"><display></display></field>
+        <field name="productId" title="SKU" position="2"><display description="${productId}"></display></field>
+        <field name="title" title="Title" position="2"><display description="${title}"></display></field>
+        <field name="dummy9" title=" " position="2"><display></display></field>
+        <field name="dummy6" title=" " position="2"><display></display></field>
+        <field name="quantity" title="Quantity" position="2"><display description="${quantity}"></display></field>
+        <field name="amount" title="Amount price per item" position="2"><display description="${transactionPrice}"></display></field>
+        
+        <field name="paidTime" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><hidden value="${paidTime}"></hidden></field>
+        <field name="shippedTime" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><hidden value="${shippedTime}"></hidden></field>
+        <field name="emailBuyer" use-when="${bsh:String prev=(String)previousItem.get(&quot;externalId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(externalId)));}"><hidden value="${emailBuyer}"></hidden></field>
+
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field>
+    </form>
+    <form name="FindEbayStoreOrders" type="single" target="OrderListing"
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="productStoreId"><hidden value="${productStoreId}"></hidden></field>
+        <field name="formSelect"><hidden value="${formSelect}"></hidden></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDateTime}"><date-time type="String"/></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDateTime}"><date-time type="String"/></field>
+        <field name="selectedDate"><hidden value="true"></hidden></field>
+        <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit button-type="button"/></field>
+    </form>
 </forms>

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml Fri Oct  8 22:41:27 2010
@@ -631,4 +631,131 @@
            </widgets>
         </section>
     </screen>
+    <screen name="EbayclosedListing">
+        <section>
+            <actions>
+                <set field="sellingManagerItem" value="closedListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="ClosedListing">
+        <section>
+            <actions>
+                <service service-name="geteBayClosedItem" result-map="closedItemMap">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                </service>
+                <set field="closedList" from-field="closedItemMap.closedItemList"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayclosedListing">
+                    <decorator-section name="body">
+                        <screenlet title="Closed Item Listings">
+                            <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="ItemOption"/>
+                            <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="ClosedItemList"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EbayOrderListing">
+        <section>
+            <actions>
+                <set field="sellingManagerItem" value="orderListing"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="OrderListing">
+        <section>
+            <actions>
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+                <set field="check" from-field="parameters.formSelect" default-value="transaction"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="EbayOrderListing">
+                    <decorator-section name="body">
+                    <section>
+                        <condition>
+                            <if-compare operator="equals" value="transaction" field="check"/>
+                        </condition>
+                        <widgets>
+                            <section>
+                                <actions>
+                                    <set field="selectedDate" from-field="parameters.selectedDate" default-value="false"/>
+                                </actions>
+                                <widgets>
+                                <section>
+                                    <condition>
+                                        <if-compare operator="equals" value="true" field="selectedDate"/>
+                                    </condition>
+                                    <actions>
+                                        <service service-name="getEbayStoreTransaction" result-map="transactionResult">
+                                            <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                                            <field-map field-name="fromDate" from-field="parameters.fromDate"/>
+                                            <field-map field-name="thruDate" from-field="parameters.thruDate"/>
+                                        </service>
+                                        <set field="transactionsList" from-field="transactionResult.transactionsList"/>
+                                        <set field="selectedDate" value="false"/>
+                                    </actions>
+                                    <widgets/>
+                                </section>
+                                    <screenlet title="Order Listings (Import single Transactions)">
+                                        <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayOrderSubBar"/>
+                                        <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="FindEbayStoreOrders"/>
+                                        <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="TransactionList"/>
+                                    </screenlet>
+                                </widgets>
+                            </section>
+                        </widgets>
+                        <fail-widgets>
+                            <section>
+                                <actions>
+                                    <set field="formSelect" from-field="parameters.formSelect"/>
+                                    <set field="selectedDate" from-field="parameters.selectedDate" default-value="false"/>
+                                </actions>
+                                <widgets>
+                                <section>
+                                    <condition>
+                                        <if-compare operator="equals" value="true" field="selectedDate"/>
+                                    </condition>
+                                    <actions>
+                                        <service service-name="getEbayStoreOrder" result-map="orderResult">
+                                            <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                                            <field-map field-name="fromDate" from-field="parameters.fromDate"/>
+                                            <field-map field-name="thruDate" from-field="parameters.thruDate"/>
+                                        </service>
+                                        <set field="orderList" from-field="orderResult.orderList"/>
+                                        <script location="component://ebaystore/webapp/ebaystore/WEB-INF/actions/store/OrderListPrepare.groovy"/>
+                                        <set field="selectedDate" value="false"/>
+                                    </actions>
+                                    <widgets/>
+                                </section>
+                                    <screenlet title="Order Listings (Import many transactions)">
+                                        <include-menu location="component://ebaystore/widget/EbayStoreMenus.xml" name="EbayOrderSubBar"/>
+                                        <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="FindEbayStoreOrders"/>
+                                        <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="OrderList"/>
+                                    </screenlet>
+                                </widgets>
+                            </section>
+                        </fail-widgets>
+                    </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreMenus.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreMenus.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreMenus.xml Fri Oct  8 22:41:27 2010
@@ -71,13 +71,13 @@
                 <parameter param-name="productStoreId" value="${parameters.productStoreId}"/>
             </link>
         </menu-item>
-        <menu-item name="soldListing" title="${uiLabelMap.EbaySold}">
-            <link target="soldListing">
+        <menu-item name="closedListing" title="${uiLabelMap.ClosedListing}">
+            <link target="ClosedListing">
                 <parameter param-name="productStoreId" value="${parameters.productStoreId}"/>
             </link>
         </menu-item>
-        <menu-item name="unsoldListing" title="${uiLabelMap.EbayUnsold}">
-            <link target="unsoldListing">
+        <menu-item name="orderListing" title="${uiLabelMap.EbayOrders}">
+            <link target="OrderListing">
                 <parameter param-name="productStoreId" value="${parameters.productStoreId}"/>
             </link>
         </menu-item>
@@ -155,4 +155,20 @@
             </link>
         </menu-item>
     </menu>
+    <menu name="EbayOrderSubBar" menu-container-style="button-bar button-style-2" selected-menuitem-context-field-name="role">
+        <menu-item name="SelectTransaction" title="${uiLabelMap.EbayStoreStoreSelectTransaction}">
+            <link target="OrderListing">
+                <parameter param-name="formSelect" value="transaction"/>
+                <parameter param-name="selectedDate" value="false"/>
+                <parameter param-name="productStoreId" from-field="parameters.productStoreId"/>
+            </link>
+        </menu-item>
+        <menu-item name="SelectOrder" title="${uiLabelMap.EbayStoreStoreSelectOrder}">
+            <link target="OrderListing">
+                <parameter param-name="formSelect" value="order"/>
+                <parameter param-name="selectedDate" value="false"/>
+                <parameter param-name="productStoreId" from-field="parameters.productStoreId"/>
+            </link>
+        </menu-item>
+    </menu>
 </menus>