Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
2823 posts
|
Modified: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl?rev=923223&r1=923222&r2=923223&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl (original) +++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl Mon Mar 15 13:44:53 2010 @@ -15,186 +15,689 @@ software distributed under the License i KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + --> +<style> + #tabs{ + margin-left: 4px; + padding: 0; + background: transparent; + voice-family: "\"}\""; + voice-family: inherit; + padding-left: 5px; + } + #tabs ul{ + font: bold 11px Arial, Verdana, sans-serif; + margin:0; + padding:0; + list-style:none; + } + #tabs li{ + display:inline; + margin:0 2px 0 0; + padding:0; + text-transform:uppercase; + } + #tabs a{ + float:left; + background:#A3BBE6;// url(images/tabs_left.gif) no-repeat left top; + margin:0 2px 0 0; + padding:0 0 1px 3px; + text-decoration:none; + } + #tabs a span{ + float:left; + display:block; + background: transparent;// url(images/tabs_right.gif) no-repeat right top; + padding:4px 9px 2px 6px; + } + #tabs a span{float:none;} + #tabs a:hover{background-color: #7E94B9;color: white;} + #tabs a:hover span{background-color: #7E94B9;} + #tabHeaderActive_ span, #tabHeaderActive_ a { background-color: #42577B; color:#fff;} + .tabContent { + clear:both; + border:2px solid #42577B; + padding-top:2px; + background-color:#FFF; + } +</style> <script language="JavaScript" type="text/javascript"> - function changeEbayDuration(value) { - var listingDuration = document.ProductsExportToEbay.listingDuration; - listingDuration.options.length = 0; - for (i = listingDuration.options.length; i >= 0; i--) { - listingDuration.options[i] = null; + + function retrieveEbayCategoryByParent(url,cateId,productStoreId,id){ + if (cateId.match('true')){ + return true; + } + if (cateId.indexOf(':')!= -1) { + cateId = cateId.substring(0,cateId.indexOf(':')); + } + var pars = 'ebayCategoryId='+cateId+'&productStoreId='+productStoreId; + var myAjax = new Ajax.Request( url, { + method: 'get', + parameters: pars, + onLoading: function loading(){ + $('loading').innerHTML = '<b>Please wait...</b>'; + } , + onComplete: function writeCategoryList(originalRequest){ + $('loading').innerHTML = ''; + if(originalRequest.responseJSON!=null){ + removeOptions($(id)); + var resp = eval("("+originalRequest.responseText+")"); + var leng = resp.size(); + for (i=0;i<leng;i++) { + if (i == 0) { + $(id).options[0] = new Option("Please select",""); + } + var optVal = resp[i].CategoryCode; + var optName = resp[i].CategoryName; + var isLeaf = resp[i].IsLeafCategory; + $(id).options[i+1] = new Option(optName,optVal+":"+isLeaf); + } + } + } + } ); + } + + function retrieveTemplateByTemGroupId(templateGroupId,productStoreId,pkCategoryId){ + var pars = 'templateGroupId='+templateGroupId+'&productStoreId='+productStoreId+'&pkCategoryId='+pkCategoryId; + var url = '<@ofbizUrl>ebayAdItemTemplate</@ofbizUrl>'; + var myAjax = new Ajax.Request( url, { + method: 'get', + parameters: pars, + onComplete: function writeItemTemplates(originalRequest){ + removeOptions('theme'); + previewPic(":http://pics.ebay.com/aw/pics/vit/None2_sample_100x120.gif"); + if(originalRequest.responseJSON!=null){ + var resp = eval("("+originalRequest.responseText+")"); + var leng = resp.size(); + var j = 0; + for (i=0;i<leng+1;i++) { + if (i == 0) { + $('theme').options[0] = new Option("Please select","_NA_"); + } else { + var optVal = resp[i].TemplateId+":"+resp[i].TemplateImageURL; + $('theme').options[i] = new Option(resp[i].TemplateName,optVal); + j++; + } + } + } + } + } ); + } + function removeOptions(id){ + var elSel = $(id); + var i; + for (i = elSel.length - 1; i>=0; i--) { + elSel.remove(i); + } } - if (value == "FixedPriceItem"){ - listingDuration.options[0] = new Option("3 ${uiLabelMap.CommonDays}","Days_3"); - listingDuration.options[1] = new Option("5 ${uiLabelMap.CommonDays}","Days_5"); - listingDuration.options[2] = new Option("7 ${uiLabelMap.CommonDays}","Days_7"); - listingDuration.options[3] = new Option("10 ${uiLabelMap.CommonDays}","Days_10"); - listingDuration.options[4] = new Option("30 ${uiLabelMap.CommonDays}","Days_30"); - listingDuration.options[5] = new Option("Good 'Til Cancelled","2147483647"); - }else{ - listingDuration.options[0] = new Option("1 ${uiLabelMap.CommonDay}","Days_1"); - listingDuration.options[1] = new Option("3 ${uiLabelMap.CommonDays}","Days_3"); - listingDuration.options[2] = new Option("5 ${uiLabelMap.CommonDays}","Days_5"); - listingDuration.options[3] = new Option("7 ${uiLabelMap.CommonDays}","Days_7"); - listingDuration.options[4] = new Option("10 ${uiLabelMap.CommonDays} ($0.40)","Days_10"); + function enabledItemTemplate(val){ + var field = "enabledTheme"; + if ($(field).checked) { + $('themeGroup').disabled = false; + $('theme').disabled = false; + } else { + $('themeGroup').disabled = true; + $('theme').disabled = true; } } + function previewPic(val) { + if (val != null) val = val.substr(val.indexOf(":")+1); + $('themeImg').src = val; + } + function toggleDisp() { + for (var i=0;i<arguments.length;i++){ + var d = $(arguments[i]); + if (d.style.display == 'none') + d.style.display = 'block'; + else + d.style.display = 'none'; + } + } + function toggleTab(num,numelems,opennum,animate) { + if ($('tabContent'+num).style.display == 'none'){ + for (var i=1;i<=numelems;i++){ + if ((opennum == null) || (opennum != i)){ + var temph = 'tabHeader_'+i; + var h = $(temph); + if (!h){ + var h = $('tabHeaderActive_'); + h.id = temph; + } + var tempc = 'tabContent'+i; + var c = $(tempc); + if(c.style.display != 'none'){ + if (animate || typeof animate == 'undefined') + Effect.toggle(tempc,'blind',{duration:0.2, queue:{scope:'menus', limit: 3}}); + else + toggleDisp(tempc); + } + } + } + var h = $('tabHeader_'+num); + if (h){ + h.id = 'tabHeaderActive_'; + } + h.blur(); + var c = $('tabContent'+num); + c.style.marginTop = '2px'; + if (animate || typeof animate == 'undefined'){ + Effect.toggle('tabContent'+num,'blind',{duration:0.2, queue:{scope:'menus', position:'end', limit: 3}}); + }else{ + toggleDisp('tabContent'+num); + } + } + } </script> -<div> - <form id="ProductsExportToEbay" method="post" action="<@ofbizUrl>exportProductsFromEbayStore</@ofbizUrl>" name="ProductsExportToEbay"> - <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}"> - <input type="hidden" name="prodCatalogId" value="${parameters.SEARCH_CATALOG_ID?if_exists}"> - <input type="hidden" name="productCategoryId" value="${parameters.SEARCH_CATEGORY_ID?if_exists}"> - <#if !productIds?has_content> - <div><h2>${uiLabelMap.ProductNoResultsFound}.</h2></div> - </#if> - - <#if productIds?has_content> - <table border="0" cellpadding="2" cellspacing="0"> - <tr> - <td align="right" class="label">${uiLabelMap.CommonCountry}</td> - <td> </td> - <td> - <select name="country"> - <#if countries?exists> - <#list countries as country> - <option value="${country.geoCode}" <#if countryCode?exists && countryCode == country.geoCode>selected</#if>>${country.get("geoName",locale)}</option> - </#list> +<div class="screenlet"> + <div class="screenlet-title-bar"> + <ul> + <li class="h3">Items to export</li> + <li><a href="<@ofbizUrl>clearExpListing</@ofbizUrl>?productStoreId=${productStoreId?if_exists}">Clear Listing</a></li> + <li><a href="<@ofbizUrl>exportListingToEbay</@ofbizUrl>?productStoreId=${productStoreId?if_exists}">Export Products Listing</a></li> + </ul><br class="clear"/></div> + <div class="screenlet-body"> +<form id="ProductsExportToEbay" method="post" action="<@ofbizUrl>exportProductsFromEbayStore</@ofbizUrl>" name="ProductsExportToEbay"> + <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}"/> + <table class="basic-table" cellspacing="0"> + <tr><td> + <#if addItemObj?has_content> + <div class="button-bar button-style-2"> + <br class="clear"/> + <ul> + <#assign id = 1> + <#if contentList?has_content> + <#list contentList as content> + <#if !isProductId?has_content> + <li <#if id == 1>class="selected" <#assign isProductId = content.product.productId?if_exists><#else>id="tabHeader${id}"</#if>><a href="javascript:$('ProductsExportToEbay').action = '<@ofbizUrl>exportProductListing</@ofbizUrl>?isProductId=${content.product.productId?if_exists}';$('ProductsExportToEbay').submit();">${content.product.productName?if_exists}[${content.product.productId}]</a></li> + <#else> + <li <#if isProductId?exists && isProductId?if_exists == content.product.productId?if_exists >class="selected" <#assign isProductId = content.product.productId?if_exists><#else>id="tabHeader${id}"</#if>><a href="javascript:$('ProductsExportToEbay').action = '<@ofbizUrl>exportProductListing</@ofbizUrl>?isProductId=${content.product.productId?if_exists}';$('ProductsExportToEbay').submit();">${content.product.productName?if_exists}[${content.product.productId}]</a></li> + </#if> + <#assign id = id+1> + </#list> + </#if> + </ul> + <br class="clear"/> + </div> + <#assign addItemList = addItemObj.itemListing?if_exists> + <#if addItemList?has_content> + <#list addItemList as addItemObj> + <#assign addItem = addItemObj.addItemCall?if_exists> + <#assign isSaved = addItemObj.isSaved?if_exists> + <#assign isAutoRelist = addItemObj.isAutoRelist?if_exists> + <#assign item = addItem.getItem()?if_exists> + <#assign primaryCate = item.getPrimaryCategory()?if_exists> + <#if isProductId == item.getSKU()?if_exists> + <input type="hidden" name="productId" value="${item.getSKU()?if_exists}"/> + <#assign smallImageUrl = ""> + <#if contentList?has_content> + <#list contentList as content> + <#if content.product.productId?if_exists == item.getSKU()?if_exists><#assign smallImageUrl = content.productContentWrapper.get("SMALL_IMAGE_URL")?if_exists></#if> + </#list> + </#if> + <#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"></#if> + <table cellspacing="0" width="70%"> + <tr> + <td class="label">ItemID</td> + <td><input type="text" readOnly name="item" value="${item.getItemID()?if_exists}"/></td> + <td class="label">Item Fee</td> + <td> + <div> + <input type="text" readOnly name="itemFee" value="${request.getAttribute("itemFee")?if_exists}"/> + <!-- itemlisting buttons bar --> + <a href="#" onclick="javascript:document.ProductsExportToEbay.action='<@ofbizUrl>updateProductExportDetail</@ofbizUrl>';document.ProductsExportToEbay.submit();" class="buttontext">${uiLabelMap.CommonSave}</a> + <#-- request.setAttribute("isSaved")--> + <#if isSaved?exists && isSaved=="Y"> + <a href="#" class="buttontext" onclick="javascript:document.ProductsExportToEbay.action='<@ofbizUrl>verifyItem</@ofbizUrl>';document.ProductsExportToEbay.submit();">Verifly Item</a> + </#if> + <a href="#" class="buttontext" onclick="javascript:document.ProductsExportToEbay.action='<@ofbizUrl>removeProductFromListing</@ofbizUrl>';document.ProductsExportToEbay.submit();">Remove</a> + <#--a href="#" class="buttontext">Save and ${uiLabelMap.EbayExportToEbay}</a--> + <!-- end buttons bar --> + </div> + </td> + </tr> + </table> + <div class="screenlet"> + <div class="screenlet-title-bar"><ul><li class="h3">Product ${item.getSKU()?if_exists}</li></ul><br class="clear"/></div> + <div class="screenlet-body"> + <!-- ebay setting section --> + <table width="100%" cellspacing="0"> + <tr> + <td width="60%" valign="top"> + <table cellspacing="0"> + <tr> + <td class="label">SiteId</td> + <td> + <#assign site = item.getSite().value()?if_exists> + <input type="text" readOnly name="site" value="${item.getSite().name()?if_exists} [${item.getSite()?if_exists}]"/> + </td> + </tr> + <!-- set ebay category --> + <tr> + <td class="label">${uiLabelMap.FormFieldTitle_ebayCategory}</td> + <td> + <div> + <div id="loading"></div> + <select id="ebayCategory" name="ebayCategory" onchange="retrieveEbayCategoryByParent('<@ofbizUrl>retrieveEbayCategoryByParent</@ofbizUrl>',this.value,'${productStoreId}','ebayCategory')"> + <option value="">Please select</option> + <#if categories?exists> + <#if primaryCate?has_content> + <#if !primaryCate.isLeafCategory()?has_content> + <#assign leafCate = "false"> + <#else> + <#assign leafCate = "true"> + </#if> + <#assign primaryCateId = primaryCate.getCategoryID()?if_exists> + <option selected value="${primaryCate.getCategoryID()?if_exists}:${leafCate?if_exists}" >${primaryCate.getCategoryName()?if_exists}</option> + <#else> + <#list categories as csCate> + <#if !csCate.isLeafCategory()?has_content> + <#assign leafCate = "false"> + <#else> + CH_${primaryCate.getCategoryID()?if_exists}<#assign leafCate = "true"> + </#if> + <#assign primaryCateId = csCate.getCategoryID()?if_exists> + <option value="${csCate.getCategoryID()?if_exists}:${leafCate?if_exists}" >${csCate.getCategoryName()?if_exists}</option> + </#list> + </#if> + </#if> + </select> + <a class="buttontext" href="javascript:retrieveEbayCategoryByParent('<@ofbizUrl>retrieveEbayCategoryByParent</@ofbizUrl>','CH_<#if primaryCate?has_content>${primaryCate.getCategoryID()?if_exists}</#if>','${productStoreId}','ebayCategory')">${uiLabelMap.EbayChangeCategory}</a> <a class="buttontext" href="javascript:$('ProductsExportToEbay').action = '<@ofbizUrl>setSelectedCategory</@ofbizUrl>?isProductId=${isProductId?if_exists}';$('ProductsExportToEbay').submit();">${uiLabelMap.EbaySet}</a> + </div> + <input type="hidden" name="primaryCateId" value="${primaryCateId?if_exists}"/> + <div id="ebayCategory_Name">${priCateName?if_exists}</div> + </td> + </tr> + <!-- end of set category --> + <tr> + <td class="label">Title</td> + <td><input type="text" size="60" name="title" value="${item.getTitle()?if_exists}"/></td> + </tr> + <tr> + <td class="label">SKU</td> + <td><input type="text" readOnly name="sku" value="${item.getSKU()?if_exists}"/></td> + </tr> + <tr> + <td class="label">PictureURL</td> + <td> + <#assign pic = item.getPictureDetails()?if_exists> + <#assign picUrls = pic.getPictureURL()?if_exists> + <#assign picUrl = picUrls[0]?if_exists> + <input type="text" size="60" name="pictureUrl" value="${picUrl?if_exists}"/> + </td> + </tr> + <#--tr> + <td class="label">Description</td> + <input type="text" rows="3" cols="50" rows="4" name="description" size="50" value=""/> + <td><textarea name="description" style="height:88px;width:350px;"><#if item.getDescription()?exists>Description of item<#else>${item.getDescription()?if_exists}</#if></textarea></td> + </tr--> + <tr> + <td class="label">${uiLabelMap.CommonCountry}</td> + <td><input type="text" readOnly name="country" size="20" value="${item.getCountry().value()?if_exists}"/></td> + </tr> + <tr> + <td class="label">${uiLabelMap.FormFieldTitle_location}</td> + <td><input type="text" name="location" size="50" maxlength="50" value="${item.getLocation()?if_exists}" /></td> + </tr> + <tr> + <td class="label"><b>Enable auto-relist item</b></td> + <td><input type="checkbox" name="isAutoRelist" value="Y" <#if isAutoRelist == "Y">checked="checked"</#if>/></td> + </tr> + <tr> + <td class="label"></td> + <td><br/></td> + </tr> + </table> + </td> + <td width="40%" valign="top"> + <table width="100%" height="100%" id="table2" cellspacing="0"> + <tr> + <td> + <img src="<@ofbizContentUrl>${contentPathPrefix?if_exists}${smallImageUrl}</@ofbizContentUrl>" alt="Small Image"/><br/> + ${uiLabelMap.ProductProductId} : ${item.getSKU()?if_exists}<br/> + ${uiLabelMap.ProductProductName} : ${item.getTitle()?if_exists}<br/> + ${uiLabelMap.CommonDescription} : ${item.getDescription()?if_exists} + </td> + </tr> + </table> + </td> + </tr> + </table> + </div> + </div> + <!-- item specifices section --> + <#if primaryCate?has_content && primaryCate.getCategoryID()?exists && listingTypes?has_content> + <div class="screenlet"> + <div class="screenlet-title-bar"><ul><li class="h3">Item specifices</li></ul><br class="clear"/></div> + <div class="screenlet-body"> + + </div> + </div> + </#if> + <!-- Setup ad templates section --> + <#if primaryCate?has_content && primaryCate.getCategoryID()?exists && listingTypes?has_content> + <div class="screenlet"> + <div class="screenlet-title-bar"><ul><li class="h3">Details</li></ul><br class="clear"/></div> + <div class="screenlet-body"> + <table width="100%" height="100%" cellspacing="0"> + <tr> + <td width="60%" valign="top"> + <table cellspacing="0"> + <tr><td> + <script language="javascript" src="/images/htmledit/whizzywig.js" type="text/javascript"></script> + <script language="javascript" type="text/javascript"> buttonPath = "/images/htmledit/"; cssFile="/images/htmledit/simple.css";</script> + <textarea id="description" name="description" style="width:800px; height:300px"> + <#if item.getDescription()?exists>description<#else>${item.getDescription()?if_exists}</#if> + </textarea> + <script type="text/javascript"> + makeWhizzyWig("description", "all"); + </script> + </td></tr> + </table> + </td> + <td width="30%" valign="top"> + <table align="left" width="60%" height="100%" cellspacing="0"> + <tr> + <td></td> + <td><input type="checkbox" value="Y" onClick="javascript:enabledItemTemplate(this.value);" id="enabledTheme" name="enabledTheme"><b>Add a theme</b></checkbox></td> + </tr> + <tr> + <td class="label">Select Theme</td> + <td> + <#if adItemTemplates?has_content> + <select id="themeGroup" disabled onChange="javascript:retrieveTemplateByTemGroupId(this.value,'${productStoreId?if_exists}','${primaryCate.getCategoryID()?if_exists}');" name="themeGroup"> + <#list adItemTemplates as adItemTemplate> + <option value="${adItemTemplate.TemplateGroupId?if_exists}">${adItemTemplate.TemplateGroupName?if_exists}</option> + </#list> + </select> + </#if> + </td> + </tr> + <tr> + <td class="label">Select Design</td> + <td> + <#if adItemTemplates?has_content> + <select id="theme" disabled onChange="javascript:previewPic(this.value);" name="theme"> + <option value="">-</option> + </select> + </#if> + </td> + </tr> + <tr> + <td></td> + <td valign="top"> + <script type="text/javascript"> + function popUpImg(){ + //popUp($('themeImg').src, 'themeImgBig', '400', '550'); + } + </script> + <a id="themeImgUrl" href="javascript:popUpImg();"><img hspace="5" height="120" border="0" align="top" width="100" id="themeImg" name="themeImg" src="http://pics.ebay.com/aw/pics/vit/None2_sample_100x120.gif"/></a> + <br/><div style="height:120px"></div> + </td> + </tr> + </table> + </td> + </tr> + </table> + </div> + </div> + </#if> + <!-- product Price Type --> + <#if primaryCate?has_content && primaryCate.getCategoryID()?exists && listingTypes?has_content> + <div class="screenlet"> + <div class="screenlet-title-bar"><ul><li class="h3">Listing Type</li></ul><br class="clear"/></div> + <div class="screenlet-body"> + <br class="clear"/> + <!-- set listing type, duration, prices --> + <div id="tabs"> + <ul> + <#assign id = 1> + <#assign tabName = ""> + <#list listingTypes as listingType> + <#-- default with aution and fixed price --> + <#if listingType.type?if_exists.equals("Chinese") || listingType.type?if_exists == "FixedPriceItem"> + <#if listingType.type?if_exists.equals("Chinese") > <#assign tabName = "Auction"></#if> + <#if listingType.type?if_exists.equals("FixedPriceItem") > <#assign tabName = "Fixed Price"></#if> + <li <#if id==1 > style="margin-left: 1px" id="tabHeaderActive_"<#else> id="tabHeader_${id}" </#if>><a href="javascript:void(0)" onClick="toggleTab(${id},2)"><span>${tabName?if_exists}</span></a></li> + <#assign id = id + 1> + </#if> + </#list> + </ul> + </div> + <div id="tabscontent"> + <#assign id = 1> + <#list listingTypes as listingType> + <#if listingType.type?if_exists.equals("Chinese") || listingType.type?if_exists == "FixedPriceItem"> + <#if listingType.type?if_exists.equals("Chinese") > <#assign tabName = "Auction"></#if> + <#if listingType.type?if_exists.equals("FixedPriceItem") ><#assign tabName = "Fixed Price"></#if> + <div id="tabContent${id}" class="tabContent" <#if id != 1>style="display:none;"</#if>> + <br/> + <table width="50%" height="100%" id="table2" cellspacing="0"> + <tr> + <td class="label"></td> + <td> + <#if listingType.type?if_exists.equals("Chinese")> + <input type="radio" name="listype" value="auction"/><b>${tabName?if_exists}</b> + <#--<input type="checkbox" value="Y" name="enabledAuction_${id}"><b>${tabName?if_exists}</b></checkbox--> + <#elseif listingType.type?if_exists == "FixedPriceItem"> + <input type="radio" name="listype" value="fixedprice"/><b>${tabName?if_exists}</b> + <#--input type="checkbox" value="Y" name="enabledFixedPrice_${id}"><b>${tabName?if_exists}</b></checkbox--> + </#if> + </td> + <td class="label">Duration</td> + <td> + <#assign durations = listingType.durations?if_exists> + <#if durations?has_content> + <select name="duration_${id}"> + <#list durations as duration> + <#if duration.indexOf("_")!= -1> + <#assign dura = duration.substring(duration.indexOf("_")+1)> + <#elseif duration == "GTC"> + <#assign dura = "Good 'Til Cancelled"> + </#if> + <option value="${duration?if_exists}">${dura?if_exists} ${uiLabelMap.CommonDays}</option> + </#list> + </select> + </#if> + </td> + </tr> + <tr> + <td class="label">${uiLabelMap.CommonQuantity}</td> + <td> + <#if listingType.type?if_exists.equals("FixedPriceItem") > + <input type="text" size="3" value="1" name="quantity_${id}" size="12" maxlength="3"/> + <#else> + <input type="text" size="3" value="1" disabled name="quantity_${id}" size="12" maxlength="3"/> + </#if> + </td> + <td class="label">Lot Size</td> + <td><input type="text" size="10" name="lotsize_${id}" /></td> + </tr> + <#if productPrices?has_content> + <#list productPrices as productPrice> + <#assign currencyUomId = productPrice.currencyUomId?if_exists> + <#if productPrice.productPriceTypeId == "MINIMUM_PRICE"> + <#assign min = productPrice.price?if_exists> + <#elseif productPrice.productPriceTypeId == "MAXIMUM_PRICE"> + <#assign max = productPrice.price?if_exists> + </#if> + </#list> + </#if> + <tr> + <input type="hidden" name="currencyId_${id}" value="${currencyUomId?if_exists}"/> + <#if listingType.type?if_exists.equals("FixedPriceItem") > + <td class="label">Start Price</td> + <td><input type="text" size="6" name="startPrice_${id}" value="${min?if_exists}" />${currencyUomId?if_exists}</td> + <td class="label"></td> + <td></td> + <#else> + <td class="label">Start Price</td> + <td><input type="text" size="6" name="startPrice_${id}" value="${min?if_exists}" />${currencyUomId?if_exists}</td> + <td class="label">BIN Price</td> + <td><input type="text" size="6" name="buyItNowPrice_${id}" value="${max?if_exists}" <#if listingType.type?if_exists.equals("FixedPriceItem") >disabled</#if> />${currencyUomId?if_exists}</td> + </#if> + </tr> + <#if !listingType.type?if_exists.equals("FixedPriceItem") > + <tr> + <td class="label">Reserve Price</td> + <td><input type="text" size="6" name="reservePrice_${id}" <#if listingType.type?if_exists.equals("FixedPriceItem") >disabled</#if> />${currencyUomId?if_exists}</td> + <td class="label"></td> + <td></td> + </tr> + </#if> + <tr> + <td class="label">VATPercent</td> + <td><input type="text" size="6" name="vatPercent_${id}" /></td> + <td class="label">Postal code</td> + <td><input type="text" size="10" name="postalCode_${id}" /></td> + </tr> + <#if listingType.type?if_exists.equals("FixedPriceItem") > + <tr> + <td class="label"></td><!-- use when fixed price and store fixed price --> + <td><input type="checkbox" value="true" name="enableBestOffer_${id}" /><b>Enable Best Offer</b></td> + <td class="label"></td> + <td><br/></td> + </tr> + </#if> + <tr><td colspan="4"><br/></td></tr> + </table> + </div> + <#assign id = id + 1> + </#if> + + </#list> + </div> + <!-- end of set listing type, duration, prices --> + </div> + </div> + </#if> + <!-- payment section --> + <#if primaryCate?has_content && primaryCate.getCategoryID()?exists && listingTypes?has_content> + <div class="screenlet"> + <div class="screenlet-title-bar"><ul><li class="h3">Payment</li></ul><br class="clear"/></div> + <div class="screenlet-body"> + <table width="50%" height="100%" id="table2" cellspacing="0"> + <tr><td colspan="4"><br/></td></tr> + <tr> + <td colspan="4"> + <b><u>${uiLabelMap.FormFieldTitle_paymentMethodsAccepted}</u></b> + </td> + </tr> + <tr><td colspan="4"><br/></td></tr> + <tr> + <td colspan="4"> + <#assign is_payPal = false> + <#if paymentMethods?has_content> + <table> + <#assign j = 0> + <#list paymentMethods as paymentMethod> + <#if paymentMethod.value() != null> + <#if j == 0><tr></#if> + <#if paymentMethod.compareTo(buyerPayMethCode_PAY_PAL?if_exists) == 0 > + <#assign is_payPal = true> + </#if> + <td valign="top"><input type="checkbox" value="true" name="Payments_${paymentMethod.value()?if_exists}"></td> + <td align="left"><b>${paymentMethod.value()?if_exists}</b></td> + <#if j == 3> + </tr> + <#assign j = 0> + <#else> + <#assign j = j+1> + </#if> + </#if> + </#list> + </table> + <#--assign i = 0> + <#list paymentMethods as paymentMethod> + <input type="checkbox" value="${paymentMethod.name()?if_exists}" name="${paymentMethod.name()?if_exists}_${id}">${paymentMethod.value()?if_exists}</checkbox><span style="width:40px"/><#if i==3><br/><#assign i = -1></#if> + <#assign i=i+1> + </#list--> + </#if> + </td> + </tr> + <#if is_payPal == true> + <tr> + <td class="label">${uiLabelMap.FormFieldTitle_payPalEmail}</td> + <td><input type="text" name="paymentMethodPaypalEmail" id="paymentMethodPaypalEmail" size="50" maxlength="50" value="[hidden email]" /></td> + <td class="label"></td> + <td><br/></td> + </tr> + </#if> + <tr><td colspan="4"><br/></td></tr> + </table> + </div> + </div> + </#if> + <#if primaryCate?has_content && primaryCate.getCategoryID()?exists && listingTypes?has_content> + <div class="screenlet"> + <div class="screenlet-title-bar"><ul><li class="h3">Shipping Service</li></ul><br class="clear"/></div> + <div class="screenlet-body"> + <table cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr> + <td></td> + <td width="100%"><b>Demestic Shipping Service</b></td> + <td><img height="1" src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"></td> + </tr> + <tr> + <td></td> + <td width="100%"> + <select name="ShippingService" id="ShippingService" style="width:107px;"> + <#--for eBayMotors site, we add a 'None' Shipping Service--> + <#if siteCode?has_content && siteCode_Ebay_Motors?has_content> + <#if siteCode == siteCode_Ebay_Motors> + <option value="None">None</option> + </#if> + </#if> + <#if shippingServiceDetails?has_content> + <#list shippingServiceDetails as shippingServiceDetail> + <#assign shippingService = shippingServiceDetail.getShippingService()?if_exists> + <option value="${shippingService?if_exists}">${shippingService?if_exists}</option> + </#list> + </#if> + </select> + </td> + <td><img height="1" src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"></td> + </tr> + </table> + <table cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr> + <td style="WIDTH: 150px"><b>Ships to locations:</b></td> + </tr> + <tr> + <td> + <#if shippingLocationDetails?has_content> + <table> + <#assign j=0> + <#list shippingLocationDetails as shippingLocationDetail> + <#assign shippingLocation = shippingLocationDetail.getShippingLocation()?if_exists> + <#if j==0><tr></#if> + <td vAlign="top"><input type="checkbox" value="true" name="Shipping_${shippingLocation?if_exists}"></td> + <td align="left"><b>${shippingLocationDetail.getDescription()?if_exists}</b></td> + <#if j==3></tr><#assign j=0><#else><#assign j=j+1></#if> + </#list> + </table> + </#if> + </td> + </tr> + </table> + </div> + </div> </#if> - </select> - </td> - </tr> - <tr> - <td align="right" class="label">${uiLabelMap.FormFieldTitle_location}</td> - <td> </td> - <td> - <input type="text" name="location" size="50" maxlength="50" value="${parameters.location?if_exists}" /> - </td> - </tr> - <tr> - <td align="right" class="label">${uiLabelMap.FormFieldTitle_webSiteUrl}</td> - <td> </td> - <td> - <input type="text" name="webSiteUrl" size="100" value="${webSiteUrl?if_exists}"/> - </td> - </tr> - <tr> - <td align="center" colspan="3"><b><u>${uiLabelMap.FormFieldTitle_paymentMethodsAccepted}</u></b></td> - </tr> - <tr> - <td colspan="3"> - <table class="basic-table" cellspacing="0"> - <tr> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentPayPal}</td> - <td width="2%"><input type="checkbox" name="paymentPayPal" <#if parameters.paymentPayPal?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentVisaMC}</td> - <td width="2%"><input type="checkbox" name="paymentVisaMC" <#if parameters.paymentVisaMC?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentAmEx}</td> - <td width="2%"><input type="checkbox" name="paymentAmEx" <#if parameters.paymentAmEx?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentDiscover}</td> - <td width="2%"><input type="checkbox" name="paymentDiscover" <#if parameters.paymentDiscover?exists>checked</#if> /></td> - </tr> - <tr> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentMOCC}</td> - <td width="2%"><input type="checkbox" name="paymentMOCC" <#if parameters.paymentMOCC?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentPersonalCheck}</td> - <td width="2%"><input type="checkbox" name="paymentPersonalCheck" <#if parameters.paymentPersonalCheck?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentCCAccepted}</td> - <td width="2%"><input type="checkbox" name="paymentCCAccepted" <#if parameters.paymentCCAccepted?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentCashInPerson}</td> - <td width="2%"><input type="checkbox" name="paymentCashInPerson" <#if parameters.paymentCashInPerson?exists>checked</#if> /></td> - </tr> - <tr> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentCashOnPickup}</td> - <td width="2%"><input type="checkbox" name="paymentCashOnPickup" <#if parameters.paymentCashOnPickup?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentCOD}</td> - <td width="2%"><input type="checkbox" name="paymentCOD" <#if parameters.paymentCOD?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentCODPrePayDelivery}</td> - <td width="2%"><input type="checkbox" name="paymentCODPrePayDelivery" <#if parameters.paymentCODPrePayDelivery?exists>checked</#if> /></td> - <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentMoneyXferAccepted}</td> - <td width="2%"><input type="checkbox" name="paymentMoneyXferAccepted" <#if parameters.paymentMoneyXferAccepted?exists>checked</#if> /></td> - </tr> - </table> - </td> - </tr> - <tr> - <td align="right" class="label">${uiLabelMap.FormFieldTitle_payPalEmail}</td> - <td> </td> - <td> - <input type="text" name="payPalEmail" size="50" maxlength="50" value="${parameters.payPalEmail?if_exists}" /> - </td> - </tr> - <tr> - <td align="right" class="label">${uiLabelMap.FormFieldTitle_customXml}</td> - <td> </td> - <td> - <textarea cols="60" rows="6" wrap="soft" name="customXml"> ${(ebayConfig.customXml)?if_exists} </textarea> - </td> - </tr> - <#assign rowCount = 0 /> - <#list productIds as productId> - <tr> - <td colspan="3"> - <hr/> - <b>${productId}</b> - <input type="hidden" name="productId_o_${rowCount}" value="${productId}"/> - <table class="basic-table" cellspacing="0" width="50%"> - <tr> - <td colspan="2"> - <input type="checkbox" name="requireEbayInventory_o_${rowCount}" value="on"/> - </td> - <td colspan="2">${uiLabelMap.requireEbayInventory}</td> - </tr> - <tr> - <td> - <input type="checkbox" name="listingTypeAuc_o_${rowCount}" value="on"/> - </td> - <td>${uiLabelMap.eBayOnlineAuction}</td> - <td>${uiLabelMap.FormFieldTitle_listingDuration}</td> - <td> - <select name="listingDurationAuc_o_${rowCount}"> - <option value="Days_1">1 ${uiLabelMap.CommonDay}</option> - <option value="Days_3">3 ${uiLabelMap.CommonDays}</option> - <option value="Days_5">5 ${uiLabelMap.CommonDays}</option> - <option value="Days_7">7 ${uiLabelMap.CommonDays}</option> - <option value="Days_10">10 ${uiLabelMap.CommonDays}</option> - </select> - </td> - </tr> - <tr> - <td> - <input type="checkbox" name="listingTypeFixed_o_${rowCount}" value="on"/> - </td> - <td>${uiLabelMap.eBayFixedPrice}</td> - <td>${uiLabelMap.FormFieldTitle_listingDuration}</td> - <td> - <select name="listingDurationFixed_o_${rowCount}"> - <option value="Days_3">3 ${uiLabelMap.CommonDays}</option> - <option value="Days_5">5 ${uiLabelMap.CommonDays}</option> - <option value="Days_7">7 ${uiLabelMap.CommonDays}</option> - <option value="Days_10">10 ${uiLabelMap.CommonDays}</option> - <option value="Days_30">30 ${uiLabelMap.CommonDays}</option> - <option value="2147483647">Good 'Til Cancelled</option> - </select> - </td> - </tr> - <tr> - <td colspan="2">${uiLabelMap.CommonQuantity}</td> - <td colspan="2"> - <input type="text" name="quantity_o_${rowCount}" size="12" maxlength="12" value="<#if parameters.quantity?exists>${parameters.quantity?if_exists}<#else>1</#if>" /> - </td> - </tr> - </table> - </td> - </tr> - <#assign rowCount=rowCount + 1/> + <!-- end shipping section --> + </#if> </#list> - <tr> - <td colspan=2> </td> - <td> - <input type="submit" value="${uiLabelMap.EbayExportToEbay}" name="submitButton" class="smallSubmit"> - </td> - </tr> - </table> </#if> - </form> + </#if> + </td></tr> + </table> + <#--if addItemList?has_content> + <table cellspacing="0" class="basic-table"> + <tr> + <td align="center" colspan="2"> + <a href="#" class="buttontext">${uiLabelMap.EbayExportToEbay}</a> + <a href="#" class="buttontext">VeriflyItem</a> + + </#if--> +</form> +</div> </div> \ No newline at end of file Added: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl?rev=923223&view=auto ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl (added) +++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl Mon Mar 15 13:44:53 2010 @@ -0,0 +1,154 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#assign returnPolicyEnabled = ReturnPolicyEnabled?if_exists> +<#assign eBayDetails = EBayDetails?if_exists> +<#if eBayDetails?has_content> + <#assign returnPolicyDetails = eBayDetails.getReturnPolicyDetails()> +</#if> +<#if !returnPolicyEnabled?exists><#assign not = "not"></#if> +<#assign title = "Return policy is "+not?if_exists+" enabled for this category."> + +<form name="APIForm" id="APIForm" method="post" action="ReturnPolicyServlet" > + <table align="center" border="0"> + <tr><td><img src="ebay.gif"></td></tr> + <tr><td>${title?if_exists}</td></tr> + <tr> + <td> </td> + </tr> + <!-- specify return policy --> + <#if returnPolicyEnabled?if_exists == true> + <tr align="left"> + <td><b>Returns accepted:</b></td> + </tr> + <tr align="left"> + <td> + <select name="ReturnsAccepted"> + <#if returnPolicyDetails?has_content> + <#assign retAccpTypeArray = returnPolicyDetails.getReturnsAccepted()?if_exists> + for(int j = 0; j < retAccpTypeArray.length; j++){ + + <#list retAccpTypeArray as retAccpType> + <#assign returnAccepted = ""> + <option value="${retAccpType.getReturnsAcceptedOption()?if_exists}" + <#if returnAccepted != null && returnAccepted.equalsIgnoreCase(retAccpType.getReturnsAcceptedOption()?if_exists)>selected="select"</#if>> + ${retAccpType.getDescription()?if_exists}</option> + </#list> + </#if> + </select> + </td> + </tr> + <tr> + <td></td> + </tr> + <tr align="left"> + <td><b>Item must be returned within:</b></td> + </tr> + <tr align="left"> + <td> + <select name="ReturnsWithin"> + <#if returnPolicyDetails?has_content> + <#assign retWithinArray = returnPolicyDetails.getReturnsWithin()?if_exists> + <#list retWithinArray as retWithin> + <#assign returnWithin = ""> + <option value="${retWithin.getReturnsWithinOption()?if_exists}" + <#if returnWithin!=null && returnWithin.equalsIgnoreCase(retWithin.getReturnsWithinOption()?if_exists)>selected="select"</#if>> + ${retWithin.getDescription()?if_exists}</option> + </#list> + </#if> + </select> + </td> + </tr> + <tr> + <td></td> + </tr> + <tr align="left"> + <td> + <b>Refund will be given as:</b> + </td> + </tr> + <tr align="left"> + <td> + <select name="Refund"> + <#if returnPolicyDetails?has_content> + <#assign refundArray = returnPolicyDetails.getRefund()?if_exists> + <#list refundArray as refundAr> + <#assign refund = ""> + <option value="${refundAr.getRefundOption()?if_exists}" + <#if refund!=null && refund.equalsIgnoreCase(refundAr.getRefundOption())>selected="select"</#if>> + ${refundArray[j].getDescription()?if_exists}</option> + </#list> + </#if> + </select> + </td> + </tr> + <tr> + <td></td> + </tr> + <tr align="left"> + <td><b>Return shipping will be paid by:</b> + </td> + </tr> + <tr align="left"> + <td> + <select name="ShippingCostPaidBy"> + <#if returnPolicyDetails?has_content> + <#assign paidByArray = returnPolicyDetails.getShippingCostPaidBy()?if_exists> + <#list paidByArray as paidBy> + <#assign shippingCostPaidBy = ""> + <option value="${paidBy.getShippingCostPaidByOption()?if_exists}" + <#if shippingCostPaidBy!=null && shippingCostPaidBy.equalsIgnoreCase(paidBy.getShippingCostPaidByOption()?if_exists)>selected="select"</#if>> + ${paidBy.getDescription()?if_exists}</option> + </#list> + </#if> + </select> + </td> + </tr> + <tr> + <td></td> + </tr> + <tr align="left"> + <td> + <b>Return policy details(500 character limit):</b> + </td> + </tr> + <tr align="left"> + <td> + <textarea name="ReturnPolicyDetailsDescription" cols="70" rows="6"<#if !returnPolicyDetails.isDescription()?if_exists.booleanValue()>disabled="true"</#if>></textarea> + </td> + </tr> + <tr> + <td></td> + </tr> + <tr> + <td> + <font size="2" face="Verdana,Geneva,Arial,Helvetica" color="#666666" style="font-size:11px">- Specify a return policy. <A target=_new HREF="http://pages.ebay.com/help/sell/contextual/return-policy.html" onClick="if(window.openContextualHelpWindow){return openContextualHelpWindow(this.href)}" target="helpwin">Learn More</A>.</font> + </td> + </tr> + </#if> + <tr> + <td> </td> + </tr> + <tr> + <td align="center"> + <input type="submit" name="btSubmit" id="btSubmit" value="Continue"/> + </td> + </tr> + </table> +</form> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreScreens.xml?rev=923223&r1=923222&r2=923223&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreScreens.xml (original) +++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreScreens.xml Mon Mar 15 13:44:53 2010 @@ -185,29 +185,54 @@ under the License. </widgets> </section> </screen> - <screen name="productsearchexport"> + <screen name="productSearchResults"> <section> <actions> <set field="titleProperty" value="PageTitleSearchResults"/> <set field="headerItem" value="ebayStore"/> <set field="tabButtonItem" value="exportProductListing"/> - <entity-condition entity-name="Geo" list="countries"> + <set field="toEbayStore" default-value="Y"/> + <set field="productStoreId" from-field="parameters.productStoreId"/> + <script location="component://product/webapp/catalog/WEB-INF/actions/find/keywordsearch.groovy"/> + </actions> + <widgets> + <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <platform-specific> + <html><html-template location="component://ebay/webapp/ebay/find/EbayKeywordSearch.ftl"/></html> + </platform-specific> + <platform-specific> + <html><html-template location="component://ebay/webapp/ebay/find/ebayExportLink.ftl"/></html> + </platform-specific> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="prepareProductListing"> + <section> + <actions> + <set field="titleProperty" value="PageTitleSearchResults"/> + <set field="headerItem" value="ebayStore"/> + <set field="tabButtonItem" value="exportProductListing"/> + <!--set field="layoutSettings.javaScripts[+0]" value="/ebaystore/js/itemSpecifics.js" global="true"/--> + <!--entity-condition entity-name="Geo" list="countries"> <condition-expr field-name="geoTypeId" value="COUNTRY"/> <order-by field-name="geoName"/> - </entity-condition> + </entity-condition--> <set field="productStoreId" from-field="parameters.productStoreId"/> + <set field="search_CategoryId" type="String" from-field="parameters.SEARCH_CATEGORY_ID"/> <entity-one entity-name="EbayConfig" value-field="ebayConfig"> <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> </entity-one> - <script location="component://product/webapp/catalog/WEB-INF/actions/find/keywordsearch.groovy"/> - <script location="component://ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy"/> + <script location="component://ebaystore/webapp/ebaystore/WEB-INF/actions/store/PrepareProductListing.groovy"/> </actions> <widgets> <decorator-screen name="permission-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <platform-specific> + <platform-specific> <html><html-template location="component://ebaystore/webapp/ebaystore/store/productsearchExport.ftl"/></html> - </platform-specific> + </platform-specific> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |