|
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=984399&r1=984398&r2=984399&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 Wed Aug 11 13:22:40 2010 @@ -37,25 +37,23 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import javax.swing.table.AbstractTableModel; +import javax.swing.table.TableModel; + 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; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilXml; -import org.ofbiz.common.DataModelConstants; - +import org.ofbiz.ebay.EbayHelper; +import org.ofbiz.ebay.ProductsExportToEbay; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.condition.EntityCondition; -import org.ofbiz.entity.condition.EntityOperator; -import org.ofbiz.entity.transaction.TransactionUtil; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; @@ -69,52 +67,51 @@ import com.ebay.sdk.ApiContext; import com.ebay.sdk.ApiException; import com.ebay.sdk.SdkException; import com.ebay.sdk.SdkSoapException; -import com.ebay.sdk.call.*; +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.GetMyeBaySellingCall; +import com.ebay.sdk.call.GetSellingManagerSoldListingsCall; +import com.ebay.sdk.call.GetStoreCall; +import com.ebay.sdk.call.GetStoreOptionsCall; +import com.ebay.sdk.call.ReviseItemCall; +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.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.DetailLevelCodeType; 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; import com.ebay.soap.eBLBaseComponents.GetStoreOptionsRequestType; import com.ebay.soap.eBLBaseComponents.GetStoreOptionsResponseType; import com.ebay.soap.eBLBaseComponents.GetStoreRequestType; import com.ebay.soap.eBLBaseComponents.GetStoreResponseType; +import com.ebay.soap.eBLBaseComponents.ItemArrayType; +import com.ebay.soap.eBLBaseComponents.ItemListCustomizationType; import com.ebay.soap.eBLBaseComponents.ItemSortTypeCodeType; -import com.ebay.soap.eBLBaseComponents.ListingDetailsType; +import com.ebay.soap.eBLBaseComponents.ItemType; 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.PaginatedItemArrayType; 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; -import com.ebay.soap.eBLBaseComponents.SellingManagerProductType; import com.ebay.soap.eBLBaseComponents.SellingManagerSearchType; import com.ebay.soap.eBLBaseComponents.SellingManagerSearchTypeCodeType; import com.ebay.soap.eBLBaseComponents.SellingManagerSoldListingsPropertyTypeCodeType; -import com.ebay.soap.eBLBaseComponents.SellingManagerTemplateDetailsArrayType; -import com.ebay.soap.eBLBaseComponents.SellingManagerTemplateDetailsType; +import com.ebay.soap.eBLBaseComponents.SellingManagerSoldOrderType; +import com.ebay.soap.eBLBaseComponents.SellingManagerSoldTransactionType; import com.ebay.soap.eBLBaseComponents.SellingStatusType; import com.ebay.soap.eBLBaseComponents.SetStoreCategoriesRequestType; import com.ebay.soap.eBLBaseComponents.SetStoreCategoriesResponseType; @@ -139,31 +136,12 @@ import com.ebay.soap.eBLBaseComponents.S import com.ebay.soap.eBLBaseComponents.StoreSubscriptionLevelCodeType; import com.ebay.soap.eBLBaseComponents.StoreThemeArrayType; import com.ebay.soap.eBLBaseComponents.StoreThemeType; -import com.ebay.soap.eBLBaseComponents.StoreType; +import com.ebay.soap.eBLBaseComponents.StoreType; import com.ebay.soap.eBLBaseComponents.TaskStatusCodeType; -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; - -import javax.swing.event.TableModelListener; -import javax.swing.table.AbstractTableModel; -import javax.swing.table.TableModel; - -import com.ebay.soap.eBLBaseComponents.DetailLevelCodeType; -import com.ebay.soap.eBLBaseComponents.ItemArrayType; -import com.ebay.soap.eBLBaseComponents.ItemListCustomizationType; -import com.ebay.soap.eBLBaseComponents.ItemType; -import com.ebay.soap.eBLBaseComponents.PaginatedItemArrayType; -import com.ebay.soap.eBLBaseComponents.SellingManagerSoldOrderType; -import com.ebay.soap.eBLBaseComponents.SellingManagerSoldTransactionType; - -import org.ofbiz.ebay.ProductsExportToEbay; -import org.ofbiz.ebay.EbayHelper; - public class EbayStore { private static final String resource = "EbayStoreUiLabels"; private static final String module = ProductsExportToEbay.class.getName(); @@ -2366,4 +2344,4 @@ public class EbayStore { } return ServiceUtil.returnSuccess("Update Item Successfully."); } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java Wed Aug 11 13:22:40 2010 @@ -18,17 +18,20 @@ */ package org.ofbiz.ebaystore; +import java.math.BigDecimal; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Collections; +import java.util.Date; import java.util.Enumeration; import java.util.Hashtable; -import java.util.Date; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Random; +import java.util.SortedMap; +import java.util.TreeMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -47,7 +50,6 @@ import org.ofbiz.entity.GenericEntityExc import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; -import org.ofbiz.product.store.ProductStoreWorker; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; @@ -58,20 +60,28 @@ import com.ebay.sdk.ApiContext; import com.ebay.sdk.ApiException; import com.ebay.sdk.SdkException; import com.ebay.sdk.SdkSoapException; +import com.ebay.sdk.call.AddDisputeCall; import com.ebay.sdk.call.AddItemCall; import com.ebay.sdk.call.AddOrderCall; -import com.ebay.sdk.call.AddDisputeCall; import com.ebay.sdk.call.DeleteSellingManagerTemplateCall; +import com.ebay.sdk.call.GetBestOffersCall; +import com.ebay.sdk.call.GetItemCall; +import com.ebay.sdk.call.GetMyeBaySellingCall; import com.ebay.sdk.call.GetSellingManagerInventoryCall; import com.ebay.sdk.call.GetSellingManagerSoldListingsCall; import com.ebay.sdk.call.GetUserCall; import com.ebay.sdk.call.LeaveFeedbackCall; +import com.ebay.sdk.call.RespondToBestOfferCall; +import com.ebay.sdk.call.VerifyAddSecondChanceItemCall; +import com.ebay.sdk.call.RelistItemCall; import com.ebay.soap.eBLBaseComponents.AddOrderRequestType; import com.ebay.soap.eBLBaseComponents.AddOrderResponseType; import com.ebay.soap.eBLBaseComponents.AmountType; -import com.ebay.sdk.call.RelistItemCall; -import com.ebay.sdk.util.eBayUtil; import com.ebay.soap.eBLBaseComponents.AutomatedLeaveFeedbackEventCodeType; +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.BuyerPaymentMethodCodeType; import com.ebay.soap.eBLBaseComponents.CommentTypeCodeType; import com.ebay.soap.eBLBaseComponents.CurrencyCodeType; @@ -83,18 +93,19 @@ import com.ebay.soap.eBLBaseComponents.D import com.ebay.soap.eBLBaseComponents.FeedbackDetailType; import com.ebay.soap.eBLBaseComponents.GetSellingManagerInventoryRequestType; import com.ebay.soap.eBLBaseComponents.GetSellingManagerInventoryResponseType; +import com.ebay.soap.eBLBaseComponents.ItemArrayType; +import com.ebay.soap.eBLBaseComponents.ItemListCustomizationType; +import com.ebay.soap.eBLBaseComponents.ItemSortTypeCodeType; import com.ebay.soap.eBLBaseComponents.ItemType; -import com.ebay.soap.eBLBaseComponents.ListingDurationCodeType; -import com.ebay.soap.eBLBaseComponents.ListingDurationDefinitionType; +import com.ebay.soap.eBLBaseComponents.ListingTypeCodeType; import com.ebay.soap.eBLBaseComponents.OrderType; -import com.ebay.soap.eBLBaseComponents.ItemType; +import com.ebay.soap.eBLBaseComponents.PaginatedItemArrayType; +import com.ebay.soap.eBLBaseComponents.PaginationType; import com.ebay.soap.eBLBaseComponents.SellingManagerOrderStatusType; import com.ebay.soap.eBLBaseComponents.SellingManagerPaidStatusCodeType; import com.ebay.soap.eBLBaseComponents.SellingManagerProductDetailsType; -import com.ebay.soap.eBLBaseComponents.SellingManagerProductInventoryStatusType; import com.ebay.soap.eBLBaseComponents.SellingManagerProductType; import com.ebay.soap.eBLBaseComponents.SellingManagerShippedStatusCodeType; -import com.ebay.soap.eBLBaseComponents.SellingManagerSoldListingsSortTypeCodeType; import com.ebay.soap.eBLBaseComponents.SellingManagerSoldOrderType; import com.ebay.soap.eBLBaseComponents.SellingManagerSoldTransactionType; import com.ebay.soap.eBLBaseComponents.SellingManagerTemplateDetailsArrayType; @@ -1152,4 +1163,227 @@ public class EbayStoreAutoPreferences { } return ServiceUtil.returnSuccess(); } + public static Map<String, Object> autoBestOffer(DispatchContext dctx, Map<String, ? extends Object> context) { + LocalDispatcher dispatcher = dctx.getDispatcher(); + Delegator delegator = dctx.getDelegator(); + Locale locale = (Locale) context.get("locale"); + try { + GenericValue userLogin = delegator.findOne("UserLogin", false, "userLoginId", "system"); + String jobId = (String) context.get("jobId"); + String productStoreId = (String) context.get("productStoreId"); + GenericValue ebayProductStorePref = (GenericValue) delegator.findByPrimaryKey("EbayProductStorePref", UtilMisc.toMap("productStoreId", productStoreId, "autoPrefEnumId", "EBAY_AUTO_BEST_OFFER")); + String parentPrefCondId = ebayProductStorePref.getString("parentPrefCondId"); + List<GenericValue> ebayProductStorePrefCond = delegator.findByAnd("EbayProductStorePrefCond", UtilMisc.toMap("parentPrefCondId", parentPrefCondId)); + //Parameters + String priceType = ebayProductStorePrefCond.get(0).getString("condition"); + String acceptBestOfferValue = ebayProductStorePrefCond.get(1).getString("condition"); + String rejectOffer = ebayProductStorePrefCond.get(2).getString("condition"); + String ignoreOfferMessage = ebayProductStorePrefCond.get(3).getString("condition"); + String rejectGreaterEnable = ebayProductStorePrefCond.get(4).getString("condition"); + String greaterValue = ebayProductStorePrefCond.get(5).getString("condition"); + String lessValue = ebayProductStorePrefCond.get(6).getString("condition"); + String rejectGreaterMsg = ebayProductStorePrefCond.get(7).getString("condition"); + String rejectLessEnable = ebayProductStorePrefCond.get(8).getString("condition"); + String lessThanValue = ebayProductStorePrefCond.get(9).getString("condition"); + String rejectLessMsg = ebayProductStorePrefCond.get(10).getString("condition"); + //case parameter to double type + BigDecimal acceptPercentValue = new BigDecimal(acceptBestOfferValue); + BigDecimal greaterPercentValue = new BigDecimal(greaterValue); + BigDecimal lessThanPercentValue = new BigDecimal(lessValue); + BigDecimal rejectPercentValue = new BigDecimal(lessThanValue); + + 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); + //GetMysbaySellingCall for get total page + GetMyeBaySellingCall getTotalPage = new GetMyeBaySellingCall(apiContext); + ItemListCustomizationType itemListType = new ItemListCustomizationType(); + itemListType.setInclude(Boolean.TRUE); + itemListType.setSort(ItemSortTypeCodeType.ITEM_ID_DESCENDING); + itemListType.setListingType(ListingTypeCodeType.FIXED_PRICE_ITEM); + DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] { + DetailLevelCodeType.RETURN_ALL, + DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES, + DetailLevelCodeType.ITEM_RETURN_DESCRIPTION + }; + getTotalPage.setDetailLevel(detailLevels); + getTotalPage.setActiveList(itemListType); + getTotalPage.getMyeBaySelling(); + int totalPage = getTotalPage.getReturnedActiveList().getPaginationResult().getTotalNumberOfPages(); + for (int t = 1; t <= totalPage; t++) { + //GetMyebaySellingCall for get item that is sold on store + GetMyeBaySellingCall ebaySelling = new GetMyeBaySellingCall(apiContext); + //Set type of item + ItemListCustomizationType itemList = new ItemListCustomizationType(); + itemList.setInclude(Boolean.TRUE); + itemListType.setSort(ItemSortTypeCodeType.ITEM_ID_DESCENDING); + itemListType.setListingType(ListingTypeCodeType.FIXED_PRICE_ITEM); + + PaginationType page = new PaginationType(); + page.setPageNumber(t); + itemList.setPagination(page); + itemList.setListingType(ListingTypeCodeType.FIXED_PRICE_ITEM); + + DetailLevelCodeType[] detailLevel = new DetailLevelCodeType[] { + DetailLevelCodeType.RETURN_ALL, + DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES, + DetailLevelCodeType.ITEM_RETURN_DESCRIPTION, + DetailLevelCodeType.RETURN_HEADERS, + DetailLevelCodeType.RETURN_MESSAGES + }; + ebaySelling.setDetailLevel(detailLevel); + ebaySelling.setActiveList(itemList); + ebaySelling.getMyeBaySelling(); + PaginatedItemArrayType itemListCustomizationType = ebaySelling.getReturnedActiveList(); + ItemArrayType itemArrayType = itemListCustomizationType.getItemArray(); + int itemArrayTypeSize = itemArrayType.getItemLength(); + + //Loop for get item + for (int itemCount = 0; itemCount < itemArrayTypeSize; itemCount++) { + ItemType item = itemArrayType.getItem(itemCount); + String itemID = item.getItemID(); + Double buyItNowPrice = item.getBuyItNowPrice().getValue(); + GetItemCall getItem = new GetItemCall(apiContext); + getItem.setDetailLevel(detailLevel); + getItem.getItem(itemID); + String SKUItem = getItem.getSKU(); + ItemType itemBestOffer = getItem.getReturnedItem(); + String sellerUserID = itemBestOffer.getSeller().getUserID(); + BestOfferDetailsType bestOfferDetailsType = itemBestOffer.getBestOfferDetails(); + int inventoryQuantityItem = item.getQuantityAvailable(); //Quantity of the item + int bestOfferCount = itemBestOffer.getBestOfferDetails().getBestOfferCount(); + Boolean bestOfferIsEnabled = itemBestOffer.getBestOfferDetails().isBestOfferEnabled(); + //Check value of Best offer Detail not null + if ((bestOfferDetailsType != null) && (bestOfferCount > 0) && bestOfferIsEnabled.equals(true)) { + //Get base price from kindOfPrice parameter + Double doBasePrice = null; + if (priceType.equals("BUY_IT_NOW_PRICE")) { + doBasePrice = buyItNowPrice; + } else if (priceType.equals("START_PRICE")) { + doBasePrice = itemBestOffer.getStartPrice().getValue(); + } else if (priceType.equals("RESERVE_PRICE")) { + doBasePrice = itemBestOffer.getReservePrice().getValue(); + } else if (priceType.equals("RETAIL_PRICE")) { + //ignore + } else if (priceType.equals("SELLER_COST")) { + List<GenericValue> supplierProduct = delegator.findByAnd("SupplierProduct", "productId", SKUItem, UtilMisc.toList("availableFromDate DESC")); + String lastPrice = supplierProduct.get(0).getString("lastPrice"); + doBasePrice = Double.parseDouble(lastPrice); + } else if (priceType.equals("SECOND_CHANCE_PRICE")) { + VerifyAddSecondChanceItemCall verifyAddSecondChanceItemCall = new VerifyAddSecondChanceItemCall(apiContext); + doBasePrice = verifyAddSecondChanceItemCall.getBuyItNowPrice().getValue(); + } else if (priceType.equals("STORE_PRICE")) { + //ignore + } + BigDecimal basePrice = new BigDecimal(doBasePrice); + BigDecimal percent = new BigDecimal(100); + //Calculate price with base price and percent from parameter + BigDecimal acceptPrice = (basePrice.multiply(acceptPercentValue)).divide(percent); + BigDecimal greaterPrice = (basePrice.multiply(greaterPercentValue)).divide(percent); + BigDecimal lessThanPrice = (basePrice.multiply(lessThanPercentValue)).divide(percent); + BigDecimal rejectPrice = (basePrice.multiply(rejectPercentValue)).divide(percent); + + //GetBestOfferCall for get best offer detail + GetBestOffersCall getBestOfferCall = new GetBestOffersCall(apiContext); + getBestOfferCall.setItemID(itemID); + getBestOfferCall.setDetailLevel(detailLevel); + getBestOfferCall.setBestOfferStatus(BestOfferStatusCodeType.ALL); + getBestOfferCall.getBestOffers(); + BestOfferType[] bestOffers = getBestOfferCall.getReturnedBestOffers(); + List<String> acceptBestOfferIndexId = FastList.newInstance(); + SortedMap<String, Object> acceptBestOfferIDs = new TreeMap<String, Object>(); + //Loop for get data best offer from buyer + RespondToBestOfferCall respondToBestOfferCall = new RespondToBestOfferCall(apiContext); + respondToBestOfferCall.setItemID(itemID); + for (int offerCount = 0; offerCount < bestOffers.length; offerCount++) { + BestOfferType bestOfferType = bestOffers[offerCount]; + BestOfferStatusCodeType bestOfferStatusCodeType = bestOfferType.getStatus(); + //Check status of best offer + if (bestOfferStatusCodeType == BestOfferStatusCodeType.PENDING) { + String bestOfferID = bestOfferType.getBestOfferID(); + UserType buyer = bestOfferType.getBuyer(); + String buyerUserID = buyer.getUserID(); + AmountType price = bestOfferType.getPrice(); + String offerPrice = new Double(price.getValue()).toString(); + Double doCerrentPrice = Double.parseDouble(offerPrice); + int offerQuantity = bestOfferType.getQuantity(); + String[] bestOfferIDs = { bestOfferID }; + respondToBestOfferCall.setBestOfferIDs(bestOfferIDs); + + if (rejectOffer.equals("Y")) { + if (offerQuantity > inventoryQuantityItem) { + respondToBestOfferCall.setSellerResponse("Your order is more than inventory item's Buy-It-Now price."); + respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); + respondToBestOfferCall.respondToBestOffer(); + continue; + } + } + + String buyerMessage = bestOfferType.getBuyerMessage(); + if (ignoreOfferMessage.equals("Y") && UtilValidate.isNotEmpty(buyerMessage)) { + GenericValue userOfferCheck = delegator.findByPrimaryKey("EbayUserBestOffer", UtilMisc.toMap("itemId", itemID, "userId", buyerUserID)); + if (UtilValidate.isEmpty(userOfferCheck)) { + GenericValue ebayUserBestOffer = delegator.makeValue("EbayUserBestOffer"); + ebayUserBestOffer.put("productStoreId", productStoreId); + ebayUserBestOffer.put("itemId", itemID); + ebayUserBestOffer.put("userId", buyerUserID); + ebayUserBestOffer.put("bestOfferId", bestOfferID); + ebayUserBestOffer.put("contactStatus", "NOT_CONTACT"); + ebayUserBestOffer.create(); + } + continue; + } + BigDecimal cerrentPrice = new BigDecimal(doCerrentPrice); + if (cerrentPrice.compareTo(acceptPrice) >= 0) { + acceptBestOfferIndexId.add(bestOfferID); + String Quantity = String.valueOf(offerQuantity); + acceptBestOfferIDs.put(bestOfferID, Quantity); + } else if ((cerrentPrice.compareTo(greaterPrice) >= 0) && (cerrentPrice.compareTo(lessThanPrice) <= 0 ) && rejectGreaterEnable.equals("Y")) { + respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); + respondToBestOfferCall.setSellerResponse(rejectGreaterMsg); + respondToBestOfferCall.respondToBestOffer(); + } else if ((cerrentPrice.compareTo(rejectPrice) <= 0 && rejectLessEnable.equals("Y"))) { + respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); + respondToBestOfferCall.setSellerResponse(rejectLessMsg); + respondToBestOfferCall.respondToBestOffer(); + } else { + respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); + respondToBestOfferCall.respondToBestOffer(); + } + } + } + + if (acceptBestOfferIndexId.size() > 0) { + int quantityAvailable = inventoryQuantityItem; + Collections.sort(acceptBestOfferIndexId); + RespondToBestOfferCall respondAcceptBestOfferCall = new RespondToBestOfferCall(apiContext); + respondAcceptBestOfferCall.setItemID(itemID); + for (String bestOfferIdIndex : acceptBestOfferIndexId) { + if (quantityAvailable <= 0) break; + Integer offerQuantity = Integer.parseInt(acceptBestOfferIDs.get(bestOfferIdIndex).toString()); + String[] bestOfferID = { bestOfferIdIndex }; + respondAcceptBestOfferCall.setBestOfferIDs(bestOfferID); + //respondAcceptBestOfferCall.setBestOfferIDs(bestOfferID); + if (offerQuantity <= quantityAvailable) { + respondAcceptBestOfferCall.setBestOfferAction(BestOfferActionCodeType.ACCEPT); + quantityAvailable = quantityAvailable - offerQuantity; + } else { + respondAcceptBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); + } + respondAcceptBestOfferCall.respondToBestOffer(); + } + } + } + } + } + } catch (ApiException e){ + return ServiceUtil.returnError(e.getMessage()); + }catch(Exception e){ + return ServiceUtil.returnError(e.getMessage()); + } + return ServiceUtil.returnSuccess(); + } } Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java Wed Aug 11 13:22:40 2010 @@ -22,11 +22,11 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.ofbiz.base.util.Debug; -import org.ofbiz.base.util.UtilValidate; - import javolution.util.FastList; import javolution.util.FastMap; + +import org.ofbiz.base.util.Debug; + import com.ebay.sdk.ApiContext; import com.ebay.sdk.ApiException; import com.ebay.sdk.SdkException; @@ -48,7 +48,6 @@ import com.ebay.soap.eBLBaseComponents.I import com.ebay.soap.eBLBaseComponents.ListingDurationDefinitionType; import com.ebay.soap.eBLBaseComponents.ListingDurationDefinitionsType; import com.ebay.soap.eBLBaseComponents.ListingDurationReferenceType; -import com.ebay.soap.eBLBaseComponents.ListingTypeCodeType; import com.ebay.soap.eBLBaseComponents.NameRecommendationType; import com.ebay.soap.eBLBaseComponents.RecommendationsType; import com.ebay.soap.eBLBaseComponents.SiteDefaultsType; @@ -343,4 +342,4 @@ public class EbayStoreCategoryFacade { public List<Map<String,Object>> getAdItemTemplates() { return this.adItemTemplates; } -} \ No newline at end of file +} 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=984399&r1=984398&r2=984399&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 Wed Aug 11 13:22:40 2010 @@ -21,25 +21,24 @@ package org.ofbiz.ebaystore; import java.io.IOException; import java.math.BigDecimal; -import java.sql.Timestamp; +import java.util.Calendar; import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.HashMap; import java.util.Set; -import java.util.Iterator; -import java.util.Calendar; import javax.servlet.http.HttpServletRequest; 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.UtilMisc; import org.ofbiz.base.util.UtilValidate; +import org.ofbiz.ebay.EbayHelper; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericDelegator; import org.ofbiz.entity.GenericEntityException; @@ -86,18 +85,13 @@ import com.ebay.soap.eBLBaseComponents.P import com.ebay.soap.eBLBaseComponents.ReturnPolicyType; import com.ebay.soap.eBLBaseComponents.ShipmentTrackingDetailsType; import com.ebay.soap.eBLBaseComponents.ShippingDetailsType; -import com.ebay.soap.eBLBaseComponents.ShippingServiceCodeType; +import com.ebay.soap.eBLBaseComponents.ShippingLocationDetailsType; import com.ebay.soap.eBLBaseComponents.ShippingServiceOptionsType; import com.ebay.soap.eBLBaseComponents.ShippingTypeCodeType; import com.ebay.soap.eBLBaseComponents.SiteCodeType; -import com.ebay.soap.eBLBaseComponents.ShippingLocationDetailsType; import com.ebay.soap.eBLBaseComponents.TradingRoleCodeType; import com.ebay.soap.eBLBaseComponents.VATDetailsType; -import org.ofbiz.ebay.EbayHelper; - -import sun.net.www.content.text.Generic; - public class EbayStoreHelper { private static final String configFileName = "ebayStore.properties"; private static final String module = EbayStoreHelper.class.getName(); Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java Wed Aug 11 13:22:40 2010 @@ -32,17 +32,15 @@ import javax.servlet.http.HttpSession; import javolution.util.FastList; import javolution.util.FastMap; +import net.sf.json.JSONObject; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilValidate; -import org.ofbiz.ebay.ProductsExportToEbay; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericValue; -import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; -import org.ofbiz.service.ServiceUtil; import org.ofbiz.webapp.event.EventHandlerException; import com.ebay.sdk.ApiContext; @@ -55,15 +53,10 @@ import com.ebay.soap.eBLBaseComponents.G import com.ebay.soap.eBLBaseComponents.GetStoreOptionsResponseType; import com.ebay.soap.eBLBaseComponents.StoreColorSchemeType; import com.ebay.soap.eBLBaseComponents.StoreColorType; -import com.ebay.soap.eBLBaseComponents.StoreCustomCategoryType; -import com.ebay.soap.eBLBaseComponents.StoreFontFaceCodeType; -import com.ebay.soap.eBLBaseComponents.StoreFontSizeCodeType; import com.ebay.soap.eBLBaseComponents.StoreFontType; import com.ebay.soap.eBLBaseComponents.StoreThemeArrayType; import com.ebay.soap.eBLBaseComponents.StoreThemeType; -import net.sf.json.JSONObject; - public class EbayStoreOptions { private static final String module = EbayStoreOptions.class.getName(); Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreSiteFacade.java Wed Aug 11 13:22:40 2010 @@ -18,27 +18,15 @@ */ package org.ofbiz.ebaystore; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Locale; import java.util.Map; import javolution.util.FastList; -import javolution.util.FastMap; - -import org.ofbiz.base.util.Debug; -import org.ofbiz.ebay.EbayHelper; -import org.ofbiz.entity.Delegator; -import org.ofbiz.service.DispatchContext; -import org.ofbiz.service.ServiceUtil; -import org.ofbiz.webapp.taglib.ServiceTag; -import org.w3c.dom.Document; import com.ebay.sdk.ApiContext; import com.ebay.sdk.ApiException; import com.ebay.sdk.SdkException; -import com.ebay.sdk.SdkSoapException; import com.ebay.sdk.attributes.AttributesMaster; import com.ebay.sdk.attributes.AttributesXmlDownloader; import com.ebay.sdk.attributes.AttributesXslDownloader; @@ -47,32 +35,22 @@ import com.ebay.sdk.attributes.model.IAt import com.ebay.sdk.attributes.model.IAttributesXmlProvider; import com.ebay.sdk.attributes.model.IAttributesXslProvider; import com.ebay.sdk.attributes.model.ICategoryCSProvider; -import com.ebay.sdk.call.GetAttributesCSCall; -import com.ebay.sdk.call.GetCategory2CSCall; -import com.ebay.sdk.call.GetDescriptionTemplatesCall; import com.ebay.sdk.call.GetStoreCall; import com.ebay.sdk.helper.cache.CategoriesDownloader; import com.ebay.sdk.helper.cache.DetailsDownloader; import com.ebay.sdk.helper.cache.FeaturesDownloader; -import com.ebay.sdk.util.eBayUtil; import com.ebay.soap.eBLBaseComponents.CategoryFeatureType; import com.ebay.soap.eBLBaseComponents.CategoryType; -import com.ebay.soap.eBLBaseComponents.DescriptionTemplateType; import com.ebay.soap.eBLBaseComponents.FeatureDefinitionsType; import com.ebay.soap.eBLBaseComponents.GetCategoryFeaturesResponseType; -import com.ebay.soap.eBLBaseComponents.GetDescriptionTemplatesRequestType; -import com.ebay.soap.eBLBaseComponents.GetDescriptionTemplatesResponseType; import com.ebay.soap.eBLBaseComponents.GetStoreRequestType; import com.ebay.soap.eBLBaseComponents.GetStoreResponseType; import com.ebay.soap.eBLBaseComponents.GeteBayDetailsResponseType; -import com.ebay.soap.eBLBaseComponents.ItemSpecificsEnabledCodeType; -import com.ebay.soap.eBLBaseComponents.ItemSpecificsEnabledDefinitionType; import com.ebay.soap.eBLBaseComponents.SiteCodeType; import com.ebay.soap.eBLBaseComponents.SiteDefaultsType; import com.ebay.soap.eBLBaseComponents.StoreCustomCategoryArrayType; import com.ebay.soap.eBLBaseComponents.StoreCustomCategoryType; import com.ebay.soap.eBLBaseComponents.StoreType; -import com.ebay.soap.eBLBaseComponents.ThemeGroupType; public class EbayStoreSiteFacade { public static final String module = EbayStoreSiteFacade.class.getName(); @@ -258,4 +236,4 @@ public class EbayStoreSiteFacade { public Map<SiteCodeType, GeteBayDetailsResponseType> getEBayDetailsMap() { return eBayDetailsMap; } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetDisputeInfo.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetDisputeInfo.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetDisputeInfo.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetDisputeInfo.groovy Wed Aug 11 13:22:40 2010 @@ -97,4 +97,4 @@ entry.put("value", makeSpace(DisputeExpl explanations.add(entry); context.reasons = reasons; -context.explanations = explanations; \ No newline at end of file +context.explanations = explanations; Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetEbayJobsandbox.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetEbayJobsandbox.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetEbayJobsandbox.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/automationPreferences/GetEbayJobsandbox.groovy Wed Aug 11 13:22:40 2010 @@ -28,4 +28,4 @@ if(jobSandboxs) { jobId = delegator.getNextSeqId("JobSandbox"); } context.jobId = jobId; -context.job = job; \ No newline at end of file +context.job = job; Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy Wed Aug 11 13:22:40 2010 @@ -31,4 +31,4 @@ if (contentRoles.size() != 0) { } } } -context.contentId = contentId; \ No newline at end of file +context.contentId = contentId; Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/feedback/FeedbackList.groovy Wed Aug 11 13:22:40 2010 @@ -83,4 +83,4 @@ contents.each{ content -> commentator : commentator]; recentFeedbackList.add(entry); } -context.recentFeedbackList = recentFeedbackList; \ No newline at end of file +context.recentFeedbackList = recentFeedbackList; Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/RetrieveStoreOptions.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/RetrieveStoreOptions.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/RetrieveStoreOptions.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/RetrieveStoreOptions.groovy Wed Aug 11 13:22:40 2010 @@ -62,4 +62,4 @@ if (productStoreId != null) { context.put("storeFontTheme",storeFontTheme); } context.put("themeType",flag); -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/SoldAction.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/SoldAction.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/SoldAction.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/SoldAction.groovy Wed Aug 11 13:22:40 2010 @@ -39,4 +39,4 @@ actionList.add(inMap); hasAction = true; context.actionList = actionList; -context.hasAction = hasAction; \ No newline at end of file +context.hasAction = hasAction; Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/StoreAccount.groovy Wed Aug 11 13:22:40 2010 @@ -40,4 +40,4 @@ if (productStoreRoles != null && ebayAcc } } context.put("stores",results); -} \ No newline at end of file +} 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=984399&r1=984398&r2=984399&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 Wed Aug 11 13:22:40 2010 @@ -406,6 +406,69 @@ <response name="success" type="view" value="errorMessageList"/> <response name="error" type="view" value="errorMessageList"/> </request-map> + <request-map uri="bestOffer"> + <security https="true" auth="true"/> + <response name="success" type="view" value="bestOffer"/> + <response name="error" type="view" value="bestOffer"/> + </request-map> + <request-map uri="setBestOffer"> + <security https="true" auth="true"/> + <event type="service" invoke="setBestOffer"/> + <response name="success" type="view" value="AutomationPreferences"/> + <response name="error" type="view" value="AutomationPreferences"/> + </request-map> + <request-map uri="ebayAutoPrefCond"> + <security https="true" auth="true"/> + <event type="java" path="org.ofbiz.ebaystore.EbayStoreAutoPrefEvents" invoke="ebayAutoPrefCond"/> + <response name="success" type="view" value="AutomationPreferences"/> + <response name="error" type="view" value="AutomationPreferences"/> + </request-map> + <request-map uri="ebayBestOfferPrefCond"> + <security https="true" auth="true"/> + <event type="service" invoke="ebayBestOfferPrefCond"/> + <response name="success" type="view" value="AutomationPreferences"/> + <response name="error" type="view" value="AutomationPreferences"/> + </request-map> + <request-map uri="createEbayProductStorePrefCond"> + <security auth="true" https="true"/> + <event type="service" invoke="createEbayProductStorePrefCond"/> + <response name="success" type="view" value="AutomationPreferences"/> + <response name="error" type="view" value="AutomationPreferences"/> + </request-map> + <request-map uri="updateEbayProductStorePrefCond"> + <security auth="true" https="true"/> + <event type="service" invoke="updateEbayProductStorePrefCond"/> + <response name="success" type="view" value="AutomationPreferences"/> + <response name="error" type="view" value="AutomationPreferences"/> + </request-map> + <request-map uri="customerService"> + <security https="true" auth="true"/> + <response name="success" type="view" value="customerService"/> + <response name="error" type="view" value="customerService"/> + </request-map> + <request-map uri="customerOfferData"> + <security https="true" auth="true"/> + <response name="success" type="view" value="customerOfferData"/> + <response name="error" type="view" value="customerOfferData"/> + </request-map> + <request-map uri="listBestOfferIncludeMessage"> + <security auth="true" https="true"/> + <event type="service" invoke="listBestOfferIncludeMessage"/> + <response name="success" type="view" value="customerService"/> + <response name="error" type="view" value="customerService"/> + </request-map> + <request-map uri="updateContactStatus"> + <security auth="true" https="true"/> + <event type="service" invoke="updateContactStatus"/> + <response name="success" type="view" value="customerOfferData"/> + <response name="error" type="view" value="customerOfferData"/> + </request-map> + <request-map uri="deleteContactAlert"> + <security auth="true" https="true"/> + <event type="service" invoke="deleteContactAlert"/> + <response name="success" type="view" value="customerService"/> + <response name="error" type="view" value="customerService"/> + </request-map> <!-- end of request mappings --> <!-- View Mappings --> @@ -451,6 +514,8 @@ <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"/> - + <!-- 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"/> <!-- end of view mappings --> </site-conf> Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/CommonScreens.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/CommonScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/CommonScreens.xml Wed Aug 11 13:22:40 2010 @@ -158,4 +158,4 @@ </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayAccountForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayAccountForms.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayAccountForms.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayAccountForms.xml Wed Aug 11 13:22:40 2010 @@ -76,4 +76,4 @@ under the License. <field name="email"><display description="${results.email}"/></field> <field name="status"><display description="${results.status}"/></field> </form> -</forms> \ No newline at end of file +</forms> Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayEmailScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayEmailScreens.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayEmailScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayEmailScreens.xml Wed Aug 11 13:22:40 2010 @@ -103,4 +103,4 @@ </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml Wed Aug 11 13:22:40 2010 @@ -561,6 +561,50 @@ value="${bsh:billingAccount != null ? or </field> <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit/></field> </form> + <form name="bestOffer" type="single" target="ebayAutoPrefCond"> + <field name="productStoreId"><hidden value="${parameters.productStoreId}"/></field> + <field name="automateEnable" title="Enable" tooltip="${uiLabelMap.EbayEvaluateOn}" tooltip-style="h3"><check/></field> + <field name="kindOfPrice" title="Based Price" tooltip="${uiLabelMap.EbayBasedOn}" tooltip-style="h3"> + <drop-down> + <option key="" description="None Price"/> + <entity-options key-field-name="enumId" description="${enumId}" entity-name="Enumeration"> + <entity-constraint name="enumTypeId" operator="equals" value="EBAY_AUTO_PRICE"/> + </entity-options> + </drop-down> + </field> + <field name="acceptBestOfferValue" title="Percent value to accept" tooltip="${uiLabelMap.EbayAcceptTheBestOffer1}" tooltip-style="h3"><text/></field> + <field name="rejectOffer" title="Reject the offer" tooltip="${uiLabelMap.EbayRejectTheOffer}" tooltip-style="h3"><check/></field> + <field name="ignoreOfferMessage" title="Ignore offer message" tooltip="${uiLabelMap.EbayIgnoreTheOffer}" tooltip-style="h3"><check/></field> + <field name="rejectGreaterEnable" title="Enable rejection"><check/></field> + <field name="greaterValue" title="Greater price percent" tooltip="${uiLabelMap.EbayRejectGreaterRate1}" tooltip-style="h3"><text/></field> + <field name="lessValue" title="Less price percent" tooltip="${uiLabelMap.EbayRejectGreaterRate2}" tooltip-style="h3"><text/></field> + <field name="rejectGreaterMsg" title="${uiLabelMap.EbayRejectGreaterRate3}"><textarea cols="100" rows="2"/></field> + <field name="dummy" title=" "><display/></field> + <field name="rejectLessEnable" title="Enable rejection"><check/></field> + <field name="lessThanValue" title="Less price percent" tooltip="${uiLabelMap.EbayRejectLessRate1}" tooltip-style="h3"><text/></field> + <field name="rejectLessMsg" title="${uiLabelMap.EbayRejectGreaterRate3}"><textarea cols="100" rows="2"/></field> + <field name="save"><submit/> + </field> + <sort-order> + <field-group title="Enable Best Offer" collapsible="true"> + <sort-field name="automateEnable"/> + <sort-field name="kindOfPrice"/> + <sort-field name="acceptBestOfferValue"/> + <sort-field name="rejectOffer"/> + <sort-field name="ignoreOfferMessage"/> + </field-group> + <field-group title="Rejection Notifications" collapsible="true"> + <sort-field name="rejectGreaterEnable"/> + <sort-field name="greaterValue"/> + <sort-field name="lessValue"/> + <sort-field name="rejectGreaterMsg"/> + <sort-field name="dummy"/> + <sort-field name="rejectLessEnable"/> + <sort-field name="lessThanValue"/> + <sort-field name="rejectLessMsg"/> + </field-group> + </sort-order> + </form> <form name="EditItemProduct" target="editItemProduct" type="upload" > <field name="productStoreId"><hidden value="${parameters.productStoreId}"/></field> <field name="itemId"><hidden value="${parameters.itemId}"/></field> @@ -574,4 +618,86 @@ value="${bsh:billingAccount != null ? or <field name="currencyId" title="Currency Code"><display/></field> <field name="submit" title="${uiLabelMap.CommonUpdate}"><submit/></field> </form> -</forms> \ No newline at end of file + <form name="bestOfferIncludeMessage" type="list" title="" list-name="listIt" + odd-row-style="alternate-row" default-table-style="basic-table"> + <actions> + <set field="productStoreId" from-field="parameters.productStoreId"/> + <entity-and entity-name="EbayUserBestOffer" list="listIt"> + <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> + </entity-and> + </actions> + <row-actions> + + <set field="userId" value="${userId}"/> + <set field="itemId" value="${itemId}"/> + <set field="bestOfferId" value="${bestOfferId}"/> + <set field="contactStatus" value="${contactStatus}"/> + <service service-name="listBestOfferIncludeMessage" result-map="inMap"> + <field-map field-name="userId" from-field="userId"/> + <field-map field-name="itemId" from-field="itemId"/> + <field-map field-name="bestOfferId" from-field="bestOfferId"/> + <field-map field-name="productStoreId" from-field="productStoreId"/> + </service> + </row-actions> + + <field name="itemId" title="Item ID"><display description="${itemId}"/></field> + <field name="itemName" title="Item Name"><display description="${inMap.itemName}"/></field> + <field name="userId" title="User ID"><display description="${userId}"/></field> + <field name="message" title="Message"><hidden value="${inMap.message}"/></field> + <field name="userEmail" title="Email"><hidden value="${inMap.email}"/></field> + <field name="offerStatus" title="Offer Status"><display description="${inMap.offerStatus}"/></field> + <field name="contactStatus" title="Contact Status"><display description="${contactStatus}"/></field> + <field name="viewCustomerDataButton" widget-style="buttontext" title="View Customer Offer Data"> + <hyperlink target="customerOfferData" description="View Data" also-hidden="false"> + <parameter param-name="productStoreId" from-field="productStoreId"/> + <parameter param-name="itemId" from-field="itemId"/> + <parameter param-name="userId" from-field="userId"/> + <parameter param-name="offerId" from-field="bestOfferId"/> + <parameter param-name="itemName" value="${inMap.itemName}"/> + <parameter param-name="email" value="${inMap.email}"/> + <parameter param-name="message" value="${inMap.message}"/> + <parameter param-name="quantity" value="${inMap.quantity}"/> + <parameter param-name="price" value="${inMap.price}"/> + <parameter param-name="contactStatus" from-field="contactStatus"/> + </hyperlink> + </field> + <field name="deleteOfferButton" title="Delete Offer Alert Data" widget-style="buttontext"> + <hyperlink target="deleteContactAlert" description="Delete Data" also-hidden="false"> + <parameter param-name="itemId" from-field="itemId"/> + <parameter param-name="userId" from-field="userId"/> + <parameter param-name="productStoreId" from-field="productStoreId"/> + </hyperlink> + </field> + </form> + <form name="viewCustomerOfferData" type="single" target="updateContactStatus"> + <field name="customerUserId" title="Customer User ID"><display description="${userId}"/></field> + <field name="productId" title="Item Id"><display description="${itemId}"/></field> + <field name="productName" title="Item Name"><display description="${itemName}"/></field> + <field name="orderQuantity"><display description="${quantity}"/></field> + <field name="offerPrice"><display description="${price}"/></field> + <field name="customerEmail"><display description="${email}"/></field> + <field name="customerMessage"><display description="${message}"/></field> + <field name="currentContact"><display description="${contactStatus}"/></field> + + <field name="userId"><hidden value="${userId}"/></field> + <field name="itemId"><hidden value="${itemId}"/></field> + <field name="itemName"><hidden value="${itemName}"/></field> + <field name="productStoreId"><hidden value="${productStoreId}"/></field> + <field name="offerId"><hidden value="${offerId}"/></field> + <field name="price"><hidden value="${price}"/></field> + <field name="message"><hidden value="${message}"/></field> + <field name="email"><hidden value="${email}"/></field> + <field name="quantity"><hidden value="${quantity}"/></field> + <field name="contactStatus"><hidden value="${contactStatus}"/></field> + <field name="contactSetting" title="Contact Status Setting"> + <drop-down > + <option key="_NA_" description="_Select_"/> + <option key="NOT_CONTACT" description="Not Contact"/> + <option key="CONTACTING" description="Contacting"/> + <option key="ACCEPT" description="Accept Offer"/> + <option key="DECLINE" description="Decline Offer"/> + </drop-down> + </field> + <field name="updateContactStatus"><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=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml Wed Aug 11 13:22:40 2010 @@ -269,6 +269,9 @@ <screenlet title="${uiLabelMap.EbayBlockItemOutOfStock}" id="blockItemsOutOfStock" collapsible="true" initially-collapsed="true"> <include-form name="blockItemsOutOfStock" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/> </screenlet> + <screenlet title="${uiLabelMap.AutoBestOfferSetting}" id="bestOfferSetting" collapsible="true" initially-collapsed="true"> + <include-form name="bestOffer" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/> + </screenlet> </decorator-section> </decorator-screen> </widgets> @@ -582,4 +585,50 @@ </widgets> </section> </screen> + <screen name="customerService"> + <section> + <actions> + <set field="headerItem" value="ebayStore"/> + <service service-name="getEbayStoreUser" result-map="result"> + <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> + </service> + <set field="productStoreId" from-field="parameters.productStoreId"/> + <set field="userLoginId" from-field="result.userLoginId"/> + </actions> + <widgets> + <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet name="ebayCustomerService" title="Customer Offer Included Message" collapsible="true"> + <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="bestOfferIncludeMessage"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="customerOfferData"> + <section> + <actions> + <set field="productStoreId" value="${parameters.productStoreId}"/> + <set field="itemId" value="${parameters.itemId}"/> + <set field="userId" value="${parameters.userId}"/> + <set field="itemName" value="${parameters.itemName}"/> + <set field="email" value="${parameters.email}"/> + <set field="quantity" value="${parameters.quantity}"/> + <set field="price" value="${parameters.price}"/> + <set field="message" value="${parameters.message}"/> + <set field="offerId" value="${parameters.offerId}"/> + <set field="contactStatus" value="${parameters.contactStatus}"/> + </actions> + <widgets> + <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet name="customerData" title="Customer Offer Data"> + <include-form location="component://ebaystore/widget/EbaySellingManagerForms.xml" name="viewCustomerOfferData"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreForms.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreForms.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreForms.xml Wed Aug 11 13:22:40 2010 @@ -127,4 +127,4 @@ value="${bsh:billingAccount != null ? or <field name="functionName"><display/></field> <field name="logMessage"><display/></field> </form> -</forms> \ No newline at end of file +</forms> Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreMenus.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreMenus.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreMenus.xml Wed Aug 11 13:22:40 2010 @@ -96,6 +96,11 @@ <parameter param-name="productStoreId" value="${parameters.productStoreId}"/> </link> </menu-item> + <menu-item name="customerService" title="Customer Service"> + <link target="customerService"> + <parameter param-name="productStoreId" value="${parameters.productStoreId}"/> + </link> + </menu-item> </menu> <menu name="EbayAccountTabBar" selected-menuitem-context-field-name="accountItem" type="simple" default-selected-style="selected" menu-container-style="button-bar button-style-2"> @@ -150,4 +155,4 @@ </link> </menu-item> </menu> -</menus> \ No newline at end of file +</menus> Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreScreens.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/widget/EbayStoreScreens.xml Wed Aug 11 13:22:40 2010 @@ -259,4 +259,4 @@ under the License. </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Wed Aug 11 13:22:40 2010 @@ -1053,7 +1053,7 @@ under the License. Map shipCost = org.ofbiz.order.shoppingcart.shipping.ShippingEvents.getShipGroupEstimate(dispatcher, delegator, shoppingCart, 0); shippingTotal = shipCost.get("shippingTotal"); if (shippingTotal == null) { - shippingTotal = 0.00; + shippingTotal = java.math.BigDecimal.ZERO; } shoppingCart.setItemShipGroupEstimate(shippingTotal, 0); parameters.put("shippingTotal", org.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal, isoCode, locale)); @@ -1068,7 +1068,6 @@ under the License. cartGrandTotal = org.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getGrandTotal(), isoCode, locale); parameters.put("cartGrandTotal", cartGrandTotal); - ]]></call-bsh> <call-class-method method-name="doPromotions" class-name="org.ofbiz.order.shoppingcart.product.ProductPromoWorker"> <field field="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart"/> @@ -1245,4 +1244,4 @@ under the License. <store-value value-field="loggedInUser"/> </if-compare-field> </simple-method> -</simple-methods> \ No newline at end of file +</simple-methods> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/LayeredNavigation.groovy Wed Aug 11 13:22:40 2010 @@ -136,4 +136,4 @@ context.lowIndex = result.lowIndex; context.highIndex = result.highIndex; context.paging = result.paging; context.previousViewSize = result.previousViewSize; -context.searchConstraintStrings = result.searchConstraintStrings; \ No newline at end of file +context.searchConstraintStrings = result.searchConstraintStrings; Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy Wed Aug 11 13:22:40 2010 @@ -79,4 +79,4 @@ if (userLogin) { context.billToFaxNumber = billToFaxNumber; context.billToFaxExtension = faxPartyContactMech.extension; } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy Wed Aug 11 13:22:40 2010 @@ -41,4 +41,4 @@ if (userLogin) { context.extension = partyContactMech.extension; } } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy Wed Aug 11 13:22:40 2010 @@ -67,4 +67,4 @@ if (userLogin) { context.shipToFaxNumber = shipToFaxNumber; context.shipToFaxExtension = faxPartyContactMech.extension; } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Wed Aug 11 13:22:40 2010 @@ -588,7 +588,7 @@ under the License. <request-map uri="checkoutoptions"> <security https="true" auth="true"/> <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="setCheckOutPages"/> - <response name="shippingaddress" type="view" value="checkoutshippingaddress"/> + <response name="shippingaddress" type="view" value="checkoutshippingaddress" save-current-view="true"/> <response name="shippingoptions" type="request" value="setOrderCurrencyAgreementShipDates"/> <response name="payment" type="request" value="setPoNumber"/> <response name="confirm" type="request" value="calcShipping"/> @@ -994,7 +994,7 @@ under the License. </request-map> <!-- ContactMech Requests --> - <request-map uri="editcontactmech"><security https="true" auth="true"/><response name="success" type="view" value="editcontactmech" save-last-view="true"/></request-map> + <request-map uri="editcontactmech"><security https="true" auth="true"/><response name="success" type="view" value="editcontactmech"/></request-map> <request-map uri="editcontactmechnosave"><security https="true" auth="true"/><response name="success" type="view" value="editcontactmech"/></request-map> <request-map uri="editcontactmechdone"><security https="true" auth="true"/><response name="success" type="view-last" value="editcontactmech"/></request-map> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Wed Aug 11 13:22:40 2010 @@ -543,8 +543,8 @@ under the License. <input id="cardNumber" name="cardNumber" class="required" type="text" value="${cardNumber?if_exists}" size="30" maxlength="16" /> </span> <span> - <label for="CVV2">CVV2</label> - <input id="CVV2" name="cardSecurityCode" size="4" type="text" maxlength="4" value="" /> + <label for="billToCardSecurityCode">CVV2</label> + <input id="billToCardSecurityCode" name="billToCardSecurityCode" size="4" type="text" maxlength="4" value="" /> </span> </div> <div> @@ -656,4 +656,4 @@ under the License. <h3>${uiLabelMap.EcommerceStep} 4: ${uiLabelMap.AccountingBilling}</h3> <h3>${uiLabelMap.EcommerceStep} 5: ${uiLabelMap.OrderSubmitOrder}</h3> </div> -</div> \ No newline at end of file +</div> Modified: ofbiz/branches/jquery/specialpurpose/googlebase/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlebase/entitydef/entitymodel.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlebase/entitydef/entitymodel.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlebase/entitydef/entitymodel.xml Wed Aug 11 13:22:40 2010 @@ -57,4 +57,4 @@ under the License. </relation> </entity> </entitymodel> - \ No newline at end of file + Modified: ofbiz/branches/jquery/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java (original) +++ ofbiz/branches/jquery/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java Wed Aug 11 13:22:40 2010 @@ -620,4 +620,4 @@ public class ProductsExportToGoogle { } return buildGoogleBaseConfigContext; } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/GoogleBaseAdvancedSearch.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/GoogleBaseAdvancedSearch.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/GoogleBaseAdvancedSearch.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/GoogleBaseAdvancedSearch.groovy Wed Aug 11 13:22:40 2010 @@ -65,4 +65,4 @@ context.googleBaseConfigList = googleBas context.categoryIds = categoryIds; context.productStoreId = productStoreId; context.prodCatalogList = prodCatalogList; -context.searchCatalogId = currentCatalogId; \ No newline at end of file +context.searchCatalogId = currentCatalogId; Modified: ofbiz/branches/jquery/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy (original) +++ ofbiz/branches/jquery/specialpurpose/googlebase/webapp/googlebase/WEB-INF/actions/productsExportToGoogle.groovy Wed Aug 11 13:22:40 2010 @@ -37,4 +37,4 @@ if (parameters.productStoreId) { context.webSiteList = webSiteList; context.webSiteUrl = webSite.standardContentPrefix; parameters.webSiteUrl = webSite.standardContentPrefix;; -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/googlebase/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlebase/widget/CommonScreens.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlebase/widget/CommonScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlebase/widget/CommonScreens.xml Wed Aug 11 13:22:40 2010 @@ -120,4 +120,4 @@ under the License. </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/branches/jquery/specialpurpose/googlebase/widget/GoogleBaseForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlebase/widget/GoogleBaseForms.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlebase/widget/GoogleBaseForms.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlebase/widget/GoogleBaseForms.xml Wed Aug 11 13:22:40 2010 @@ -104,4 +104,4 @@ under the License. <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> </form> -</forms> \ No newline at end of file +</forms> Modified: ofbiz/branches/jquery/specialpurpose/googlebase/widget/GoogleBaseScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlebase/widget/GoogleBaseScreens.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlebase/widget/GoogleBaseScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlebase/widget/GoogleBaseScreens.xml Wed Aug 11 13:22:40 2010 @@ -128,4 +128,4 @@ under the License. </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/branches/jquery/specialpurpose/googlecheckout/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlecheckout/entitydef/entitymodel.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlecheckout/entitydef/entitymodel.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlecheckout/entitydef/entitymodel.xml Wed Aug 11 13:22:40 2010 @@ -103,4 +103,4 @@ under the License. <key-map field-name="shipmentMethodTypeId"/> </relation> </entity> -</entitymodel> \ No newline at end of file +</entitymodel> Modified: ofbiz/branches/jquery/specialpurpose/googlecheckout/servicedef/secas.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlecheckout/servicedef/secas.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlecheckout/servicedef/secas.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlecheckout/servicedef/secas.xml Wed Aug 11 13:22:40 2010 @@ -75,4 +75,4 @@ under the License. <eca service="deleteOrderAdjustment" event="in-validate" run-on-failure="false"> <action service="catchEditGoogleOrder" mode="sync" result-to-context="true" ignore-failure="false"/> </eca> - </service-eca> \ No newline at end of file + </service-eca> Modified: ofbiz/branches/jquery/specialpurpose/googlecheckout/servicedef/services_request.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlecheckout/servicedef/services_request.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlecheckout/servicedef/services_request.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlecheckout/servicedef/services_request.xml Wed Aug 11 13:22:40 2010 @@ -83,4 +83,4 @@ location="org.ofbiz.googlecheckout.GoogleRequestServices"> <attribute name="orderId" type="String" mode="IN" optional="false"/> </service> - </services> \ No newline at end of file + </services> Modified: ofbiz/branches/jquery/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java (original) +++ ofbiz/branches/jquery/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java Wed Aug 11 13:22:40 2010 @@ -433,7 +433,7 @@ public class GoogleCheckoutHelper { String partyId = null; // look for an existing shipping address - List<GenericValue> shipInfo = PartyWorker.findMatchingPartyAndPostalAddress(delegator, shipAddr.getAddress1(), + List<GenericValue> shipInfo = PartyWorker.findMatchingPersonPostalAddresses(delegator, shipAddr.getAddress1(), (UtilValidate.isEmpty(shipAddr.getAddress2()) ? null : shipAddr.getAddress2()), shipAddr.getCity(), shipAddr.getRegion(), shipAddr.getPostalCode(), null, getCountryGeoId(shipAddr.getCountryCode()), shipAddr.getStructuredName().getFirstName(), null, shipAddr.getStructuredName().getLastName()); @@ -446,7 +446,7 @@ public class GoogleCheckoutHelper { } // look for an existing billing address - List<GenericValue> billInfo = PartyWorker.findMatchingPartyAndPostalAddress(delegator, billAddr.getAddress1(), + List<GenericValue> billInfo = PartyWorker.findMatchingPersonPostalAddresses(delegator, billAddr.getAddress1(), (UtilValidate.isEmpty(billAddr.getAddress2()) ? null : billAddr.getAddress2()), billAddr.getCity(), billAddr.getRegion(), billAddr.getPostalCode(), null, getCountryGeoId(billAddr.getCountryCode()), billAddr.getStructuredName().getFirstName(), null, billAddr.getStructuredName().getLastName()); @@ -480,7 +480,7 @@ public class GoogleCheckoutHelper { // create the billing address if necessary if (billCmId == null) { // check the billing address again (in case it was just created) - billInfo = PartyWorker.findMatchingPartyAndPostalAddress(delegator, billAddr.getAddress1(), + billInfo = PartyWorker.findMatchingPersonPostalAddresses(delegator, billAddr.getAddress1(), billAddr.getAddress2(), billAddr.getCity(), billAddr.getRegion(), billAddr.getPostalCode(), null, getCountryGeoId(billAddr.getCountryCode()), billAddr.getStructuredName().getFirstName(), null, billAddr.getStructuredName().getLastName()); @@ -704,4 +704,4 @@ public class GoogleCheckoutHelper { } } -} \ No newline at end of file +} Modified: ofbiz/branches/jquery/specialpurpose/googlecheckout/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlecheckout/widget/CommonScreens.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlecheckout/widget/CommonScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlecheckout/widget/CommonScreens.xml Wed Aug 11 13:22:40 2010 @@ -39,4 +39,4 @@ under the License. </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/branches/jquery/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml?rev=984399&r1=984398&r2=984399&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml (original) +++ ofbiz/branches/jquery/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml Wed Aug 11 13:22:40 2010 @@ -171,4 +171,4 @@ under the License. </field> <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> </form> -</forms> \ No newline at end of file +</forms> |
| Free forum by Nabble | Edit this page |
