svn commit: r957428 - in /ofbiz/trunk/specialpurpose/ebaystore: servicedef/services.xml src/org/ofbiz/ebaystore/EbayStore.java webapp/ebaystore/WEB-INF/controller.xml widget/EbaySellingManagerForms.xml widget/EbaySellingManagerScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r957428 - in /ofbiz/trunk/specialpurpose/ebaystore: servicedef/services.xml src/org/ofbiz/ebaystore/EbayStore.java webapp/ebaystore/WEB-INF/controller.xml widget/EbaySellingManagerForms.xml widget/EbaySellingManagerScreens.xml

hansbak-2
Author: hansbak
Date: Thu Jun 24 06:13:20 2010
New Revision: 957428

URL: http://svn.apache.org/viewvc?rev=957428&view=rev
Log:
Handle ebaystore product Item Specifics

Modified:
    ofbiz/trunk/specialpurpose/ebaystore/servicedef/services.xml
    ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml
    ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml

Modified: ofbiz/trunk/specialpurpose/ebaystore/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/servicedef/services.xml?rev=957428&r1=957427&r2=957428&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/servicedef/services.xml Thu Jun 24 06:13:20 2010
@@ -441,4 +441,45 @@ under the License.
         <attribute name="functionName" mode="IN" type="String" optional="false"/>
         <attribute name="logMessage" mode="IN" type="String" optional="false"/>
     </service>
+    <service name="getMyeBaySelling" engine="java" transaction-timeout="36000"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getMyeBaySelling" auth="true">
+        <attribute name="productStoreId" mode="IN" type="String" optional="false"/>
+        <attribute name="entriesPerPage" mode="IN" type="String" optional="true"/>
+        <attribute name="pageNumber" mode="IN" type="String" optional="true"/>
+        <attribute name="listingType" mode="IN" type="String" optional="true"/>
+        <attribute name="activeItems" mode="OUT" type="List" optional="true"/>
+        <attribute name="soldItems" mode="OUT" type="List" optional="true"/>
+        <attribute name="unsoldItems" mode="OUT" type="List" optional="true"/>
+        <attribute name="scheduledItems" mode="OUT" type="List" optional="true"/>
+        <attribute name="activeSize" mode="OUT" type="Integer" optional="true"/>
+        <attribute name="soldSize" mode="OUT" type="Integer" optional="true"/>
+        <attribute name="unsoldeSize" mode="OUT" type="Integer" optional="true"/>
+        <attribute name="scheduledSize" mode="OUT" type="Integer" optional="true"/>
+    </service>
+    <service name="getEbayStoreProductItem" engine="java" transaction-timeout="3600"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getEbayStoreProductItem" auth="true">
+        <description>Get item data (title, description, price information, and so on) for the specified item ID</description>
+        <attribute name="productStoreId" mode="IN" type="String" optional="false"/>
+        <attribute name="itemId" mode="IN" type="String" optional="false"/>
+        <attribute name="listingType" mode="OUT" type="String" optional="true"/>
+        <attribute name="title" mode="OUT" type="String" optional="true"/>
+        <attribute name="description" mode="OUT" type="String" optional="true"/>
+        <attribute name="price" mode="OUT" type="String" optional="true"/>
+        <attribute name="currencyId" mode="OUT" type="String" optional="true"/>
+        <attribute name="pictureURL" mode="OUT" type="String" optional="true"/>
+    </service>
+    <service name="reviseEbayStoreProductItem" engine="java" transaction-timeout="3600"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="reviseEbayStoreProductItem" auth="true">
+        <description>Change the properties of a currently active listing</description>
+        <attribute name="productStoreId" mode="IN" type="String" optional="false"/>
+        <attribute name="itemId" mode="IN" type="String" optional="false"/>
+        <attribute name="listingType" mode="IN" type="String" optional="true"/>
+        <attribute name="title" mode="IN" type="String" optional="true"/>
+        <attribute name="description" mode="IN" type="String" allow-html="safe"/>
+        <attribute name="price" mode="IN" type="String" optional="true"/>
+        <attribute name="currencyId" mode="IN" type="String" optional="true"/>
+        <attribute mode="IN" name="imageData" optional="true" type="java.nio.ByteBuffer"/>
+        <attribute mode="IN" name="_imageData_contentType" optional="true" type="String"/>
+        <attribute mode="IN" name="_imageData_fileName" optional="true" type="String"/>
+    </service>
 </services>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java?rev=957428&r1=957427&r2=957428&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java Thu Jun 24 06:13:20 2010
@@ -19,6 +19,8 @@
 package org.ofbiz.ebaystore;
 
 import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -26,6 +28,8 @@ import java.io.OutputStream;
 import java.math.BigDecimal;
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Iterator;
@@ -37,6 +41,7 @@ import javolution.util.FastList;
 import javolution.util.FastMap;
 
 import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.FileUtil;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
@@ -44,6 +49,7 @@ import org.ofbiz.base.util.UtilPropertie
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.common.DataModelConstants;
+
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
@@ -66,12 +72,19 @@ import com.ebay.sdk.SdkSoapException;
 import com.ebay.sdk.call.*;
 import com.ebay.sdk.util.eBayUtil;
 import com.ebay.soap.eBLBaseComponents.AmountType;
+import com.ebay.soap.eBLBaseComponents.BestOfferActionCodeType;
+import com.ebay.soap.eBLBaseComponents.BestOfferDetailsType;
+import com.ebay.soap.eBLBaseComponents.BestOfferStatusCodeType;
+import com.ebay.soap.eBLBaseComponents.BestOfferType;
+import com.ebay.soap.eBLBaseComponents.CategoryFeatureType;
 import com.ebay.soap.eBLBaseComponents.CheckoutStatusCodeType;
 import com.ebay.soap.eBLBaseComponents.CurrencyCodeType;
 import com.ebay.soap.eBLBaseComponents.DeleteSellingManagerTemplateRequestType;
 import com.ebay.soap.eBLBaseComponents.DeleteSellingManagerTemplateResponseType;
 import com.ebay.soap.eBLBaseComponents.DisputeExplanationCodeType;
 import com.ebay.soap.eBLBaseComponents.DisputeReasonCodeType;
+import com.ebay.soap.eBLBaseComponents.FeesType;
+import com.ebay.soap.eBLBaseComponents.GalleryTypeCodeType;
 import com.ebay.soap.eBLBaseComponents.GetAllBiddersModeCodeType;
 import com.ebay.soap.eBLBaseComponents.GetSellingManagerInventoryRequestType;
 import com.ebay.soap.eBLBaseComponents.GetSellingManagerInventoryResponseType;
@@ -80,13 +93,19 @@ import com.ebay.soap.eBLBaseComponents.G
 import com.ebay.soap.eBLBaseComponents.GetStoreRequestType;
 import com.ebay.soap.eBLBaseComponents.GetStoreResponseType;
 import com.ebay.soap.eBLBaseComponents.ItemSortTypeCodeType;
+import com.ebay.soap.eBLBaseComponents.ListingDetailsType;
 import com.ebay.soap.eBLBaseComponents.ListingTypeCodeType;
 import com.ebay.soap.eBLBaseComponents.MerchDisplayCodeType;
+import com.ebay.soap.eBLBaseComponents.NameRecommendationType;
 import com.ebay.soap.eBLBaseComponents.OfferType;
 import com.ebay.soap.eBLBaseComponents.OrderTransactionArrayType;
 import com.ebay.soap.eBLBaseComponents.OrderTransactionType;
 import com.ebay.soap.eBLBaseComponents.OrderType;
 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.RecommendationsType;
 import com.ebay.soap.eBLBaseComponents.SecondChanceOfferDurationCodeType;
 import com.ebay.soap.eBLBaseComponents.SellingManagerProductDetailsType;
 import com.ebay.soap.eBLBaseComponents.SellingManagerProductInventoryStatusType;
@@ -125,6 +144,7 @@ import com.ebay.soap.eBLBaseComponents.T
 import com.ebay.soap.eBLBaseComponents.TransactionArrayType;
 import com.ebay.soap.eBLBaseComponents.TransactionType;
 import com.ebay.soap.eBLBaseComponents.UserType;
+import com.ebay.soap.eBLBaseComponents.ValueRecommendationType;
 import com.ebay.soap.eBLBaseComponents.VerifyAddSecondChanceItemResponseType;
 
 import java.sql.Timestamp;
@@ -1442,6 +1462,8 @@ public class EbayStore {
         String buyerId = (String) context.get("buyerId");
         String listingType = (String) context.get("listingType");
         List soldItems = FastList.newInstance();
+        double reservPrice = 0;
+        int hitCount = 0;
         try {
             Map<String, Object> inMap = FastMap.newInstance();
             inMap.put("productStoreId", productStoreId);
@@ -1505,6 +1527,12 @@ public class EbayStore {
                             api.setDetailLevel(detailLevels);
                             ItemType itemType = api.getItem();
                             String itemUrl = null;
+                            
+                            entry.put("SKU", itemType.getSKU());
+                            if (UtilValidate.isNotEmpty(itemType.getReservePrice())) reservPrice = itemType.getReservePrice().getValue();
+                            entry.put("reservePrice", reservPrice);
+                            entry.put("hitCount", itemType.getHitCount() != null ? itemType.getHitCount() : 0);
+                            
                             if (itemType.getListingDetails() != null) {
                                 itemUrl  = itemType.getListingDetails().getViewItemURL();
                             }
@@ -1892,6 +1920,7 @@ public class EbayStore {
             GetMyeBaySellingCall api = new GetMyeBaySellingCall(apiContext);
             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");
@@ -1907,6 +1936,8 @@ public class EbayStore {
             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,
@@ -2031,6 +2062,8 @@ public class EbayStore {
     static Map<String, Object> schItemToColumns(ItemType item) {
         Map<String, Object> cols = FastMap.newInstance();
         int i = 0;
+        double reservPrice = 0;
+        int hitCount = 0;
         cols.put("itemId", item.getItemID() != null ? item.getItemID() : "");
         cols.put("title", item.getTitle() != null ? item.getTitle() : "");
 
@@ -2046,12 +2079,18 @@ public class EbayStore {
         }
         cols.put("quantity", quantityStr);
         cols.put("listingType", item.getListingType().value());
+        cols.put("SKU", item.getSKU());
+        if (UtilValidate.isNotEmpty(item.getReservePrice())) reservPrice = item.getReservePrice().getValue();
+        cols.put("reservePrice", reservPrice);
+        cols.put("hitCount", item.getHitCount() != null ? item.getHitCount() : 0);
         return cols;
     }
 
     static Map<String, Object> unsoldItemToColumns(ItemType item) {
         Map<String, Object> cols = FastMap.newInstance();
         int i = 0;
+        double reservPrice = 0;
+        int hitCount = 0;
         cols.put("itemId", item.getItemID() != null ? item.getItemID() : "");
         cols.put("title", item.getTitle() != null ? item.getTitle() : "");
 
@@ -2071,6 +2110,10 @@ public class EbayStore {
         }
         cols.put("quantity", quantityStr);
         cols.put("listingType", item.getListingType().value());
+        cols.put("SKU", item.getSKU());
+        if (UtilValidate.isNotEmpty(item.getReservePrice())) reservPrice = item.getReservePrice().getValue();
+        cols.put("reservePrice", reservPrice);
+        cols.put("hitCount", item.getHitCount() != null ? item.getHitCount() : 0);
         return cols;
     }
 
@@ -2191,4 +2234,136 @@ public class EbayStore {
         cols.put("sellerPaidStatus", sellerPaidStatus);
         return cols;
     }
+    
+    public Map<String, Object> getEbayStoreProductItem(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");
+        String itemID = (String) context.get("itemId");
+        
+        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);
+            GetItemCall api = new GetItemCall(apiContext);
+            
+            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
+                    DetailLevelCodeType.RETURN_ALL,
+                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
+                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
+            };
+            api.setDetailLevel(detailLevels);
+            api.getItem(itemID);
+            
+            // Set item type.
+            ItemType item = api.getReturnedItem();
+            String title = item.getTitle();
+            String description = item.getDescription();
+            String listingType = item.getListingType().value();
+            
+            if (item.getPictureDetails() != null) {
+                String url[] = item.getPictureDetails().getPictureURL();
+                if (url.length != 0) {
+                    result.put("pictureURL", url[0]);
+                } else {
+                    result.put("pictureURL", null);
+                }
+            } else {
+                result.put("pictureURL", null);
+            }
+            
+            result.put("title", title);
+            result.put("description", description);
+            AmountType amt = item.getStartPrice();
+            result.put("price", amt != null ? (new Double(amt.getValue()).toString()) : "");
+            result.put("currencyId", amt.getCurrencyID().toString());
+            result.put("listingType", listingType);
+        } catch (Exception e) {
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        return result;
+    }
+    
+    public Map<String, Object> reviseEbayStoreProductItem(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");
+        String itemID = (String) context.get("itemId");
+        String listingType = (String) context.get("listingType");
+        String title = (String) context.get("title");
+        String description = (String) context.get("description");
+        String price = (String) context.get("price");
+        String imageFileName = (String) context.get("_imageData_fileName");
+        String currencyId = (String) context.get("currencyId");
+        
+        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);
+            String sandboxEPSURL = "https://api.sandbox.ebay.com/ws/api.dll";
+            apiContext.setEpsServerUrl(sandboxEPSURL);
+            ReviseItemCall api = new ReviseItemCall(apiContext);
+            
+            // Set item type.
+            ItemType itemToBeRevised = new ItemType();
+            itemToBeRevised.setItemID(itemID);
+            
+            if (UtilValidate.isNotEmpty(title)) {
+                itemToBeRevised.setTitle(title);
+            }
+            
+            if (UtilValidate.isNotEmpty(description)) {
+                itemToBeRevised.setDescription(description);
+            }
+            
+            // Set startPrice value.
+            AmountType startPrice = new AmountType();
+            if (UtilValidate.isNotEmpty(price)) {
+                startPrice.setValue(Double.parseDouble(price));
+                startPrice.setCurrencyID(CurrencyCodeType.valueOf(currencyId));
+                itemToBeRevised.setStartPrice(startPrice);
+            }
+            
+            // Check upload image file.
+            if (UtilValidate.isNotEmpty(imageFileName)) {
+                
+                // Upload image to ofbiz path /runtime/tmp .
+                ByteBuffer byteWrap = (ByteBuffer) context.get("imageData");
+                File file = new File(System.getProperty("ofbiz.home"), "runtime" + File.separator + "tmp" + File.separator + imageFileName);
+                FileChannel wChannel = new FileOutputStream(file, false).getChannel();
+                wChannel.write(byteWrap);
+                wChannel.close();
+                
+                // Set path file picture to api and set picture details.
+                String [] pictureFiles = {System.getProperty("ofbiz.home") + File.separator + "runtime" + File.separator + "tmp" + File.separator + imageFileName};
+                PictureDetailsType pictureDetails = new PictureDetailsType();
+                pictureDetails.setGalleryType(GalleryTypeCodeType.GALLERY);
+                pictureDetails.setPhotoDisplay(PhotoDisplayCodeType.NONE);
+                pictureDetails.setPictureSource(PictureSourceCodeType.EPS);
+                itemToBeRevised.setPictureDetails(pictureDetails);
+                
+                api.setItemToBeRevised(itemToBeRevised);
+                api.uploadPictures(pictureFiles, pictureDetails);
+                FeesType fees = api.reviseItem();
+            } else {
+                api.setItemToBeRevised(itemToBeRevised);
+                FeesType fees = api.reviseItem();
+            }
+        } catch (Exception e) {
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        return ServiceUtil.returnSuccess("Update Item  Successfully.");
+    }
 }
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml?rev=957428&r1=957427&r2=957428&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml Thu Jun 24 06:13:20 2010
@@ -314,13 +314,22 @@
         <response name="success" type="request" value="clearExpListing"/>
         <response name="error" type="view" value="exportProductListing"/>
     </request-map>
-
     <!-- Selling Manager -->
     <request-map uri="sellingManager">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ebayStoreInventory"/>
         <response name="error" type="view" value="ebayStoreInventory"/>
     </request-map>
+    <request-map uri="getItemProduct">
+        <security auth="true" https="true"/>
+        <response name="success" type="view" value="GetItemProduct"/>
+    </request-map>
+    <request-map uri="editItemProduct">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="reviseEbayStoreProductItem"/>
+        <response name="success" type="view" value="GetItemProduct"/>
+        <response name="error" type="view" value="GetItemProduct"/>
+    </request-map>
     <!-- Active -->
     <request-map uri="activeListing">
         <security auth="true" https="true"/>
@@ -416,6 +425,7 @@
     <view-map name="AutomationPreferences" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#EbayAutomationPreferences"/>
     <!-- Selling Manager -->
     <view-map name="editEmailTemplate" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#EditEmailTemplate"/>
+    <view-map name="GetItemProduct" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#GetItemProduct"/>
     <!-- store Inventory -->
     <view-map name="ebayStoreInventory" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#ebayStoreInventory"/>
     <view-map name="ebayLoadStoreInventory" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#ebayLoadStoreInventory"/>
@@ -441,5 +451,6 @@
     <view-map name="WaitingToShipping" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#WaitingToShipping"/>
     <view-map name="ordersImported" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#ordersImported"/>
     <view-map name="errorMessageList" type="screen" page="component://ebaystore/widget/EbayStoreScreens.xml#errorMessageList"/>
+    
     <!-- end of view mappings -->
 </site-conf>

Modified: ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml?rev=957428&r1=957427&r2=957428&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml Thu Jun 24 06:13:20 2010
@@ -77,9 +77,12 @@ value="${bsh:billingAccount != null ? or
         </row-actions>
         <field name="productStoreId"><hidden value="${parameters.productStoreId}"/></field>
         <field name="itemId"><display description="${itemId}"/></field>
+        <field name="SKU" title="Product ID"><display/></field>
         <field name="title"><display description="${title}"/></field>
         <field name="buyer"><display description="${buyer}"/></field>
         <field name="listingType"><display description="${listingType}"/></field>
+        <field name="hitCount"><display/></field>
+        <field name="reservePrice"><display/></field>
         <field name="quantity"><display description="${quantity}"/></field>
         <field name="transactionId"><display description="${transactionId}"/></field>
         <field name="totalAmount"><display description="${totalAmount}"/></field>
@@ -469,7 +472,7 @@ value="${bsh:billingAccount != null ? or
     <form name="ActiveItemList" type="list"  target="doAction" list-name="activeItemList"
         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">
         <field name="itemId"><display/></field>
-        <field name="SKU"><display/></field>
+        <field name="SKU" title="Product ID"><display/></field>
         <field name="title">
             <hyperlink target="${viewItemURL}" description="${title}" target-type="plain" target-window="_BLANK"/>
         </field>
@@ -480,15 +483,20 @@ value="${bsh:billingAccount != null ? or
         <field name="startTime"><display/></field>
         <field name="quantity"><display/></field>
         <field name="listingType"><display/></field>
+        <field name="EditItem">
+            <hyperlink target="getItemProduct?productStoreId=${parameters.productStoreId}&amp;itemId=${itemId}" description="Edit" target-type="plain" target-window="_BLANK"/>
+        </field>
     </form>
     <!-- Unsold Listing -->
     <form name="UnsoldItemList" type="list"  target="doAction" list-name="unsoldItemList"
         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">
         <field name="productStoreId"><hidden value="${parameters.productStoreId}"/></field>
         <field name="itemId"><display/></field>
+        <field name="SKU" title="Product ID"><display/></field>
         <field name="title"><display/></field>
-        <field name="quantity"><display/></field>
         <field name="price"><display/></field>
+        <field name="hitCount"><display/></field>
+        <field name="reservePrice"><display/></field>
         <field name="startTime"><display/></field>
         <field name="endTime"><display/></field>
         <field name="quantity"><display/></field>
@@ -553,4 +561,17 @@ value="${bsh:billingAccount != null ? or
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit/></field>
     </form>
+    <form name="EditItemProduct"  target="editItemProduct" type="upload" >
+        <field name="productStoreId"><hidden value="${parameters.productStoreId}"/></field>
+        <field name="itemId"><hidden value="${parameters.itemId}"/></field>
+        <field name="listingType"><hidden/></field>
+        <field name="pictureURL" title="Picture" use-when="pictureURL==null"><image width="100" value="/images/defaultImage.jpg"></image></field>
+        <field name="pictureURL" title="Picture" use-when="pictureURL!=null"><image width="150"></image></field>
+        <field name="imageData" title="${uiLabelMap.CommonUpload}"><file/></field>
+        <field name="title"><text size="50"/></field>
+        <field name="description" encode-output="true"><textarea/></field>
+        <field name="price"><text/></field>
+        <field name="currencyId" title="Currency Code"><display/></field>
+        <field name="submit" title="${uiLabelMap.CommonUpdate}"><submit/></field>
+    </form>
 </forms>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml?rev=957428&r1=957427&r2=957428&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml Thu Jun 24 06:13:20 2010
@@ -460,7 +460,7 @@
             <widgets>
                 <decorator-screen name="EbayActiveListing">
                     <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.EbayOpenListings}">
+                        <screenlet title="Active to Open Listings">
                             <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="ItemOption"/>
                             <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="ActiveItemList"/>
                         </screenlet>
@@ -555,4 +555,31 @@
             </widgets>
         </section>
     </screen>
-</screens>
\ No newline at end of file
+    <screen name="GetItemProduct">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <service service-name="getEbayStoreProductItem" result-map="result">
+                    <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                    <field-map field-name="itemId" from-field="parameters.itemId"/>
+                </service>
+                <set field="title" from-field="result.title"/>
+                <set field="description" from-field="result.description"/>
+                <set field="price" from-field="result.price"/>
+                <set field="pictureURL" from-field="result.pictureURL"/>
+                <set field="listingType" from-field="result.listingType"/>
+                <set field="currencyId" from-field="result.currencyId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                            <screenlet title="Edit Product Item" collapsible="true" name="GetItemProduct">
+                                <include-form name="EditItemProduct"  location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                            </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>