Author: hansbak
Date: Wed Apr 7 03:57:28 2010
New Revision: 931424
URL:
http://svn.apache.org/viewvc?rev=931424&view=revLog:
Ebaystore: update source code to check product listing template options before export to eBay.
Modified:
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/PrepareProductListing.groovy
ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl
Modified: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/PrepareProductListing.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/PrepareProductListing.groovy?rev=931424&r1=931423&r2=931424&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/PrepareProductListing.groovy (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/store/PrepareProductListing.groovy Wed Apr 7 03:57:28 2010
@@ -55,6 +55,7 @@
contents = [];
if (addItemObj) {
site = (SiteCodeType)apiContext.getSite();
+ isExportValid = "false";
context.site = site;
context.siteCode = apiContext.getSite().value();
context.siteCode_Ebay_Motors = SiteCodeType.E_BAY_MOTORS.value();
@@ -69,7 +70,14 @@
content.productContentWrapper = contentWrapper;
content.product = product;
contents.add(content);
+
+ if (addItemMap.isVerify == "Y") {
+ isExportValid = "true";
+ } else {
+ isExportValid = "false";
+ }
}
+ context.isExportValid = isExportValid;
request.setAttribute("productStoreId", productStoreId);
categories = EbayEvents.getChildCategories(request);
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=931424&r1=931423&r2=931424&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl Wed Apr 7 03:57:28 2010
@@ -194,7 +194,9 @@ under the License.
<ul>
<li class="h3">Items to export</li>
<li><a href="<@ofbizUrl>clearExpListing</@ofbizUrl>?productStoreId=${productStoreId?if_exists}">Clear Listing</a></li>
+ <#if isExportValid?exists && isExportValid == "true">
<li><a href="<@ofbizUrl>exportListingToEbay</@ofbizUrl>?productStoreId=${productStoreId?if_exists}">Export Products Listing</a></li>
+ </#if>
</ul><br class="clear"/></div>
<div class="screenlet-body">
<form id="ProductsExportToEbay" method="post" action="<@ofbizUrl>exportProductsFromEbayStore</@ofbizUrl>" name="ProductsExportToEbay">