Author: jleroux Date: Mon Oct 20 09:51:54 2014 New Revision: 1633087 URL: http://svn.apache.org/r1633087 Log: Keeps in sync with OFBiz trunk HEAD
Added: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/actions/includes/CcTypes.groovy - copied unchanged from r1633085, ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/CcTypes.groovy Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ (props changed) ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/ContentTypeData.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/TemplateData.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestForms.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestScreens.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/data/PartyPortletData.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/webapp/partymgr/WEB-INF/controller.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventForms.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventScreens.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/PartyForms.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_shipment.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductWorker.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/shipment/PackOrder.ftl ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/widget/HelpScreens.xml (contents, props changed) ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/resources/templates/CommonScreens.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailContactListScreens.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailGiftCardScreens.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailOrderScreens.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailProductScreens.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailReturnScreens.xml ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/tools/demo-backup/check-svn-update.sh Propchange: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1631450-1633085 Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/ContentTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/ContentTypeData.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/ContentTypeData.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/ContentTypeData.xml Mon Oct 20 09:51:54 2014 @@ -219,7 +219,7 @@ under the License. <SurveyQuestionType surveyQuestionTypeId="TEXTAREA" description="Text (multi-line)"/> <SurveyQuestionType surveyQuestionTypeId="URL" description="URL"/> - <DataResource dataResourceId="STDWRAP001" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/> + <DataResource dataResourceId="STDWRAP001" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL" dataResourceName="Standard SubContent Wrapper" mimeTypeId="text/html"/> <ElectronicText dataResourceId="STDWRAP001"> <textData><![CDATA[<#assign mapKey=wrapMapKey?if_exists/> <#assign subDataResourceId=wrapDataResourceId?if_exists/> @@ -252,8 +252,7 @@ under the License. </div> </div>]]></textData> </ElectronicText> - <Content contentId="STDWRAP001" contentTypeId="DOCUMENT" dataResourceId="STDWRAP001" contentName="Standard SubContent Wrapper" description="Standard SubContent Wrapper"/> - + <Content contentId="STDWRAP001" contentTypeId="DOCUMENT" dataResourceId="STDWRAP001" contentName="Standard SubContent Wrapper" description="Standard SubContent Wrapper" mimeTypeId="text/html"/> <Content contentId="TREE_ROOT"/> <WebAnalyticsType description="Web Analytics" hasTable="N" parentTypeId="" webAnalyticsTypeId="WEB_ANALYTICS"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/TemplateData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/TemplateData.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/TemplateData.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/data/TemplateData.xml Mon Oct 20 09:51:54 2014 @@ -27,7 +27,6 @@ under the License. <DataResource dataResourceId="ARTICLE_WRAP" dataResourceTypeId="OFBIZ_FILE" dataTemplateTypeId="FTL" /> <DataResource dataResourceId="LEFTBAR" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL" dataResourceName="Left Bar" objectInfo="LEFT BAR"/> <DataResource dataResourceId="RP_MEDAL" dataResourceTypeId="IMAGE_OBJECT" dataTemplateTypeId="NONE" dataResourceName="Project Reliance Medallion Logo" objectInfo="pr_medal.png"/> - <DataResource dataResourceId="STDWRAP001" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL" dataResourceName="Standard SubContent Wrapper" mimeTypeId="text/html"/> <DataResource dataResourceId="TMPLT_IMG_CENTER" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL" dataResourceName="Image Centered" mimeTypeId="text/html"/> <DataResource dataResourceId="TEMPLATE_IMAGE_LEFT" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL" dataResourceName="Image Left" mimeTypeId="text/html"/> <DataResource dataResourceId="TEMPLATE_TEXT_ONLY" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL" dataResourceName="Template Text" mimeTypeId="text/html"/> @@ -55,7 +54,6 @@ under the License. <Content contentId="VIEW_WRAP" contentTypeId="DOCUMENT" dataResourceId="VIEW_WRAP" contentName="View Wrap"/> <Content contentId="WRAP_ARTICLE" contentTypeId="DOCUMENT" dataResourceId="WRAP_ARTICLE"/> <Content contentId="WRAP_NEXT_PREV" contentTypeId="ANNOTATION" dataResourceId="WRAP_NEXT_PREV" contentName="Next-Prev wrapper" description="Next and Previous wrapper"/> - <Content contentId="WRAP_STD_001" contentTypeId="DOCUMENT" dataResourceId="STDWRAP001" contentName="Standard SubContent Wrapper" description="Standard SubContent Wrapper" mimeTypeId="text/html"/> <Content contentId="WRAP_STD_LOOP" contentTypeId="DOCUMENT" dataResourceId="WRAP_STD_LOOP" contentName="Loop Wrap" mimeTypeId="text/html"/> <Content contentId="WRAP_VIEW" contentTypeId="DOCUMENT" dataResourceId="WRAP_VIEW"/> <Content contentId="ARTICLE_WRAP" contentTypeId="DOCUMENT" dataResourceId="ARTICLE_WRAP"/> @@ -153,40 +151,6 @@ under the License. </script> ]]></textData> </ElectronicText> - <ElectronicText dataResourceId="STDWRAP001"> - <textData><![CDATA[<#assign mapKey=wrapMapKey?if_exists/> -<#assign subDataResourceId=wrapDataResourceId?if_exists/> -<#assign subDataResourceTypeId=wrapDataResourceTypeId?if_exists/> -<#assign contentIdTo=wrapContentIdTo?if_exists/> -<#assign mimeTypeId=wrapMimeTypeId?if_exists/> -<#assign subContentId=wrapSubContentId?if_exists/> -<div id="divTwo" class="wrapOuter"> - <div> - ${mapKey?if_exists} - <a class="buttontext" href="javascript:lookupSubContent('<@ofbizUrl>/LookupSubContent</@ofbizUrl>', '${contentIdTo?if_exists}','${mapKey?if_exists}', '${subDataResourceTypeId?if_exists}', '${mimeTypeId?if_exists}')" ->[Find]</a> - <#assign ofbizRequest=""/> - <#assign httpParams="contentIdTo=" + contentIdTo?if_exists + "&mapKey=" + mapKey?if_exists /> - <#if subDataResourceTypeId == "IMAGE_OBJECT"> - <#assign ofbizRequest="EditLayoutImage"/> - <#else> - <#if subDataResourceTypeId == "URL_RESOURCE"> - <#assign ofbizRequest="EditLayoutUrl"/> - <#else> - <#assign ofbizRequest="EditLayoutSubContent"/> - </#if> - </#if> - <a class="buttontext" href="<@ofbizUrl>/${ofbizRequest}?${httpParams}&mode=add</@ofbizUrl>">[New]</a> - <#if subContentId?exists && (0 < subContentId?length)> - <a class="buttontext" href="<@ofbizUrl>/${ofbizRequest}?${httpParams}&contentId=${subContentId}&drData -ResourceId=${subDataResourceId?if_exists}</@ofbizUrl>">[Edit]</a> - </#if> - </div> -<div id="divOne" class="wrapInner"> -<@renderWrappedText/> -</div> -</div>]]></textData> - </ElectronicText> <ElectronicText dataResourceId="TMPLT_IMG_CENTER"> <textData><![CDATA[<table> <tr> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java Mon Oct 20 09:51:54 2014 @@ -78,9 +78,8 @@ public class ContentServicesComplex { return results; } - @SuppressWarnings("unchecked") public static Map<String, Object> getAssocAndContentAndDataResourceMethod(Delegator delegator, String contentId, String mapKey, String direction, Timestamp fromDate, Timestamp thruDate, String fromDateStr, String thruDateStr, List<String> assocTypes, List<String> contentTypes) { - List exprList = FastList.newInstance(); + List<EntityCondition> exprList = FastList.newInstance(); EntityExpr joinExpr = null; String viewName = null; if (mapKey != null) { @@ -133,7 +132,7 @@ public class ContentServicesComplex { EntityConditionList<EntityExpr> thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR); exprList.add(thruExprList); } - EntityConditionList<EntityExpr> assocExprList = EntityCondition.makeCondition(exprList, EntityOperator.AND); + EntityConditionList<EntityCondition> assocExprList = EntityCondition.makeCondition(exprList, EntityOperator.AND); List<GenericValue> relatedAssocs = null; try { relatedAssocs = delegator.findList(viewName, assocExprList, null,UtilMisc.toList("caFromDate"), null, false); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Oct 20 09:51:54 2014 @@ -3557,6 +3557,9 @@ public class OrderServices { item.setIsModifiedPrice(true); } + item.setItemComment(changeComments); + item.setDesiredDeliveryDate(itemDesiredDeliveryDate); + cart.clearItemShipInfo(item); cart.setItemShipGroupQty(item, item.getQuantity(), shipGroupIdx); } else { ShoppingCartItem item = ShoppingCartItem.makeItem(null, productId, null, quantity, null, null, null, null, null, null, null, null, prodCatalogId, null, null, null, dispatcher, cart, null, null, null, Boolean.FALSE, Boolean.FALSE); @@ -3715,6 +3718,15 @@ public class OrderServices { } } + // Update the item comment + if (itemCommentMap != null && itemCommentMap.containsKey(itemSeqId)) { + String comments = itemCommentMap.get(itemSeqId); + if (UtilValidate.isNotEmpty(comments)) { + cartItem.setItemComment(comments); + Debug.logInfo("Set item comment: [" + itemSeqId + "] " + comments, module); + } + } + // update the order item attributes if (itemAttributesMap != null) { // go through the item attributes map once to get a list of key names @@ -4247,6 +4259,7 @@ public class OrderServices { String oldItemDescription = oldOrderItem.getString("itemDescription") != null ? oldOrderItem.getString("itemDescription") : ""; BigDecimal oldQuantity = oldOrderItem.getBigDecimal("quantity") != null ? oldOrderItem.getBigDecimal("quantity") : BigDecimal.ZERO; BigDecimal oldUnitPrice = oldOrderItem.getBigDecimal("unitPrice") != null ? oldOrderItem.getBigDecimal("unitPrice") : BigDecimal.ZERO; + String oldItemComment = oldOrderItem.getString("comments") != null ? oldOrderItem.getString("comments") : ""; boolean changeFound = false; Map<String, Object> modifiedItem = FastMap.newInstance(); @@ -4255,6 +4268,11 @@ public class OrderServices { changeFound = true; } + if (!oldItemComment.equals(valueObj.getString("comments"))) { + modifiedItem.put("changeComments", valueObj.getString("comments")); + changeFound = true; + } + BigDecimal quantityDif = valueObj.getBigDecimal("quantity").subtract(oldQuantity); BigDecimal unitPriceDif = valueObj.getBigDecimal("unitPrice").subtract(oldUnitPrice); if (quantityDif.compareTo(BigDecimal.ZERO) != 0) { @@ -4269,15 +4287,10 @@ public class OrderServices { // found changes to store Map<String, String> itemReasonMap = UtilGenerics.checkMap(changeMap.get("itemReasonMap")); - Map<String, String> itemCommentMap = UtilGenerics.checkMap(changeMap.get("itemCommentMap")); if (UtilValidate.isNotEmpty(itemReasonMap)) { String changeReasonId = itemReasonMap.get(valueObj.getString("orderItemSeqId")); modifiedItem.put("reasonEnumId", changeReasonId); } - if (UtilValidate.isNotEmpty(itemCommentMap)) { - String changeComments = itemCommentMap.get(valueObj.getString("orderItemSeqId")); - modifiedItem.put("changeComments", changeComments); - } modifiedItem.put("orderId", valueObj.getString("orderId")); modifiedItem.put("orderItemSeqId", valueObj.getString("orderItemSeqId")); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy Mon Oct 20 09:51:54 2014 @@ -54,52 +54,20 @@ andMap = [productCategoryId : productCat limitView : limitView]; andMap.put("prodCatalogId", currentCatalogId); andMap.put("checkViewAllow", true); +// Prevents out of stock product to be displayed on site +productStore = ProductStoreWorker.getProductStore(request); +if (productStore) { + andMap.put("productStoreId", productStore.productStoreId); +} if (context.orderByFields) { andMap.put("orderByFields", context.orderByFields); } else { andMap.put("orderByFields", ["sequenceNum", "productId"]); } catResult = dispatcher.runSync("getProductCategoryAndLimitedMembers", andMap); - productCategory = catResult.productCategory; productCategoryMembers = catResult.productCategoryMembers; - -// Prevents out of stock product to be displayed on site -productStore = ProductStoreWorker.getProductStore(request); -if(productStore) { - if("N".equals(productStore.showOutOfStockProducts)) { - productsInStock = []; - productCategoryMembers.each { productCategoryMember -> - product = delegator.findOne("Product", [productId : productCategoryMember.productId], true); - boolean isMarketingPackage = EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.productTypeId, "parentTypeId", "MARKETING_PKG"); - context.isMarketingPackage = (isMarketingPackage? "true": "false"); - if (isMarketingPackage) { - resultOutput = dispatcher.runSync("getMktgPackagesAvailable", [productId : productCategoryMember.productId]); - availableInventory = resultOutput.availableToPromiseTotal; - if(availableInventory > 0) { - productsInStock.add(productCategoryMember); - } - } else { - facilities = delegator.findList("ProductFacility", EntityCondition.makeCondition([productId : productCategoryMember.productId]), null, null, null, false); - availableInventory = 0.0; - if (facilities) { - facilities.each { facility -> - lastInventoryCount = facility.lastInventoryCount; - if (lastInventoryCount != null) { - availableInventory += lastInventoryCount; - } - } - if (availableInventory > 0) { - productsInStock.add(productCategoryMember); - } - } - } - } - context.productCategoryMembers = productsInStock; - } else { - context.productCategoryMembers = productCategoryMembers; - } -} +context.productCategoryMembers = productCategoryMembers; context.productCategory = productCategory; context.viewIndex = catResult.viewIndex; context.viewSize = catResult.viewSize; Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Mon Oct 20 09:51:54 2014 @@ -25,6 +25,7 @@ import org.ofbiz.entity.condition.*; import org.ofbiz.entity.util.*; import org.ofbiz.base.util.*; import org.ofbiz.base.util.collections.*; +import org.ofbiz.entity.util.EntityQuery; import org.ofbiz.order.order.*; import org.ofbiz.party.contact.*; import org.ofbiz.product.inventory.InventoryWorker; @@ -55,9 +56,11 @@ def partyId = null; orderHeader = null; orderItems = null; orderAdjustments = null; +comments = null; if (orderId) { orderHeader = delegator.findOne("OrderHeader", [orderId : orderId], false); + comments = EntityQuery.use(delegator).select("orderItemSeqId", "changeComments", "changeDatetime", "changeUserLogin").from("OrderItemChange").where(UtilMisc.toList(EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId))).orderBy("-changeDatetime").queryList(); } if (orderHeader) { @@ -73,6 +76,7 @@ if (orderHeader) { orderTerms = orderHeader.getRelated("OrderTerm", null, null, false); context.orderHeader = orderHeader; + context.comments = comments; context.orderReadHelper = orderReadHelper; context.orderItems = orderItems; context.orderAdjustments = orderAdjustments; Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl Mon Oct 20 09:51:54 2014 @@ -41,14 +41,14 @@ under the License. </script> <#macro paginationControls> - <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 1)?double / viewSize?double)> + <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize)?double / viewSize?double)> <#if (viewIndexMax?int > 0)> <div class="product-prevnext"> <select name="pageSelect" onchange="callDocumentByPaginate(this[this.selectedIndex].value);"> <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int + 1} ${uiLabelMap.CommonOf} ${viewIndexMax}</option> <#if (viewIndex?int > 1)> - <#list 0..viewIndexMax as curViewNum> - <option value="${productCategoryId}~${viewSize}~${curViewNum?int}">${uiLabelMap.CommonGotoPage} ${curViewNum + 1}</option> + <#list 1..viewIndexMax as curViewNum> + <option value="${productCategoryId}~${viewSize}~${curViewNum-1?int}">${uiLabelMap.CommonGotoPage} ${curViewNum}</option> </#list> </#if> </select> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl Mon Oct 20 09:51:54 2014 @@ -193,7 +193,7 @@ under the License. </#list> </select> <span class="label">${uiLabelMap.CommonComments}</span> - <input type="text" name="icm_${orderItem.orderItemSeqId}" value="" size="30" maxlength="60"/> + <input type="text" name="icm_${orderItem.orderItemSeqId}" value="${orderItem.comments!}" size="30" maxlength="60"/> <#if (orderHeader.orderTypeId == 'PURCHASE_ORDER')> <span class="label">${uiLabelMap.OrderEstimatedShipDate}</span> <@htmlTemplate.renderDateTimeField name="isdm_${orderItem.orderItemSeqId}" value="${orderItem.estimatedShipDate!}" event="" action="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="25" maxlength="30" id="isdm_${orderItem.orderItemSeqId}" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl Mon Oct 20 09:51:54 2014 @@ -656,6 +656,47 @@ under the License. </tr> </#list> </#if> + <#if orderItem.comments?has_content> + <tr<#if itemClass == "1"> class="alternate-row"</#if>> + <td> </td> + <td> + <div class= "screenlet"> + <div class = "screenlet-body"> + <table> + <tr> + <td align="right"> + <span class="label">${uiLabelMap.CommonComments}</span> + </td> + <td align=""> + <span class="label">${uiLabelMap.CommonCurrent}:</span> ${orderItem.comments} + <#assign orderItemSeqId = orderItem.orderItemSeqId!> + <#if comments?has_content> + <hr/> + <#list comments as comm> + <#if comm.orderItemSeqId?has_content && orderItemSeqId?has_content && comm.orderItemSeqId == orderItemSeqId> + <#if comm.changeComments?has_content> + <div> + ${(comm.changeComments)!} + + <#if comm.changeDatetime?has_content>${Static["org.ofbiz.base.util.UtilFormatOut"].formatDateTime(comm.changeDatetime, "", locale, timeZone)?default("0000-00-00 00:00:00")}</#if> ${uiLabelMap.CommonBy} - [${(comm.changeUserLogin)!}] + </div> + </#if> + </#if> + </#list> + </#if> + </td> + </tr> + </table> + </div> + </div> + </td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + </tr> + </#if> <#if itemClass == "2"> <#assign itemClass = "1"> <#else> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestForms.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestForms.xml Mon Oct 20 09:51:54 2014 @@ -83,7 +83,7 @@ under the License. </actions> </form> - <form name="ListRequestList" type="list" use-row-submit="true" list-name="custRequests" title="List of customer requests" + <form name="ListRequestList" type="list" use-row-submit="true" list-name="custRequests" title="List of customer requests" sort-field-parameter-name="custRequestSortField" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> <field name="custRequestId" sort-field="true"> <hyperlink description="${custRequestId}" target="ViewRequest"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestScreens.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestScreens.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/CustRequestScreens.xml Mon Oct 20 09:51:54 2014 @@ -513,7 +513,7 @@ under the License. <screen name="IncomingCustRequests"> <section> <actions> - <set field="parameters.sortField" from-field="parameters.sortField" default-value="-custRequestDate"/> + <set field="custRequestSortField" from-field="parameters.custRequestSortField" default-value="-custRequestDate"/> <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> <entity-condition list="custRequests" entity-name="CustReqAndTypeAndPartyRel"> <condition-list combine="and"> @@ -523,7 +523,7 @@ under the License. <condition-expr field-name="partyIdTo" operator="equals" from-field="userLogin.partyId"/> </condition-list> </condition-list> - <order-by field-name="${parameters.sortField}"/> + <order-by field-name="${custRequestSortField}"/> </entity-condition> </actions> <widgets> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/data/PartyPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/data/PartyPortletData.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/data/PartyPortletData.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/data/PartyPortletData.xml Mon Oct 20 09:51:54 2014 @@ -163,7 +163,6 @@ <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="Visits" portletSeqId="00001" columnSeqId="00002" sequenceNum="4"/> <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="Content" portletSeqId="00001" columnSeqId="00002" sequenceNum="5"/> <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="Notes" portletSeqId="00001" columnSeqId="00002" sequenceNum="6"/> - <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="Visits" portletSeqId="00001" columnSeqId="00002" sequenceNum="7"/> <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="ProductStores" portletSeqId="00001" columnSeqId="00002" sequenceNum="8"/> </entity-engine-xml> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/webapp/partymgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/webapp/partymgr/WEB-INF/controller.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/webapp/partymgr/WEB-INF/controller.xml Mon Oct 20 09:51:54 2014 @@ -637,11 +637,6 @@ under the License. </request-map> <request-map uri="ViewCommunicationEvent"> <security https="true" auth="true"/> - <event type="service" invoke="setCommEventRoleToRead"/> - <response name="success" type="view" value="ViewCommunicationEvent"/> - </request-map> - <request-map uri="viewCommunicationEvent"> - <security https="true" auth="true"/> <response name="success" type="view" value="ViewCommunicationEvent"/> </request-map> <request-map uri="uploadAttachFiletoEmail"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventForms.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventForms.xml Mon Oct 20 09:51:54 2014 @@ -487,9 +487,9 @@ under the License. </form> <form name="ListPartyCommEvents" type="list" target="RemoveCommunicationEventRole" list-name="listIt" - odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar" sort-field-parameter-name="partyCommEventSortField"> <actions> - <set field="parameters.sortField" from-field="parameters.sortField" default-value="${groovy: 'true'.equals(parameters.all) ? '-entryDate' : 'entryDate'}"/> + <set field="parameters.partyCommEventSortField" from-field="parameters.partyCommEventSortField" default-value="${groovy: 'true'.equals(parameters.all) ? '-entryDate' : 'entryDate'}"/> <set field="searchParameters.partyId" from-field="partyId"/> <set field="searchParameters.statusId" value="COM_UNKNOWN_PARTY"/> <set field="searchParameters.statusId_op" value="notEqual"/> @@ -499,7 +499,7 @@ under the License. <service service-name="performFind" result-map="result" result-map-list="listIt"> <field-map field-name="inputFields" from-field="searchParameters"/> <field-map field-name="entityName" value="CommunicationEventAndRole"/> - <field-map field-name="orderBy" from-field="parameters.sortField"/> + <field-map field-name="orderBy" from-field="parameters.partyCommEventSortField"/> <field-map field-name="viewIndex" from-field="viewIndex"/> <field-map field-name="viewSize" from-field="viewSize"/> </service> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventScreens.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventScreens.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/CommunicationEventScreens.xml Mon Oct 20 09:51:54 2014 @@ -380,6 +380,7 @@ under the License. <set field="titleProperty" value="PageTitleViewCommunication"/> <set field="tabButtonItem" value="OverView"/> <set field="parentCommEventId" from-field="parameters.parentCommEventId"/> + <service service-name="setCommEventRoleToRead"></service> <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/> <set field="partyIdFrom" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> </actions> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/PartyForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/PartyForms.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/PartyForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/PartyForms.xml Mon Oct 20 09:51:54 2014 @@ -707,7 +707,7 @@ under the License. <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> </form> - <form name="ListCarrierAccounts" type="list" target="updatePartyCarrierAccount" + <form name="ListCarrierAccounts" type="list" target="updatePartyCarrierAccount" list-name="carrierAccounts" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate="true" view-size="3" paginate-target="viewprofile" paginate-target-anchor="ListCarrierAccounts"> <actions> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_shipment.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_shipment.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_shipment.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_shipment.xml Mon Oct 20 09:51:54 2014 @@ -627,7 +627,6 @@ under the License. <attribute name="selInfo" type="Map" string-map-prefix="sel_" mode="IN" optional="true"/> <attribute name="iteInfo" type="Map" string-map-prefix="ite_" mode="IN" optional="true"/> <attribute name="wgtInfo" type="Map" string-map-prefix="wgt_" mode="IN" optional="true"/> - <attribute name="boxTypeInfo" type="Map" string-map-prefix="boxType_" mode="IN" optional="true"/> <attribute name="numPackagesInfo" type="Map" string-map-prefix="numPackages_" mode="IN" optional="true"/> </service> @@ -690,6 +689,7 @@ under the License. <attribute name="dimensionUomId" type="String" mode="IN" optional="true"/> <attribute name="weightUomId" type="String" mode="IN" optional="true"/> <attribute name="shipmentId" type="String" mode="OUT" optional="false"/> + <attribute name="boxTypes" type="Map" string-map-prefix="boxType_" mode="IN" optional="true"/> </service> <!-- Shipment Plan Services --> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml Mon Oct 20 09:51:54 2014 @@ -152,6 +152,7 @@ under the License. <attribute name="introductionDateLimit" type="java.sql.Timestamp" mode="IN" optional="true"/> <attribute name="releaseDateLimit" type="java.sql.Timestamp" mode="IN" optional="true"/> <attribute name="orderByFields" type="List" mode="IN" optional="true"/> + <attribute name="productStoreId" mode="IN" type="String" optional="true"/> <attribute name="productCategory" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/> <attribute name="productCategoryMembers" type="java.util.Collection" mode="OUT" optional="true"/> <!-- this list will only contain the limited members if limitView=true --> <attribute name="viewIndex" type="Integer" mode="OUT" optional="false"/> <!-- this is a 1 based index, ie the first results are in index 1 --> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java Mon Oct 20 09:51:54 2014 @@ -21,7 +21,9 @@ package org.ofbiz.product.category; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.io.Writer; +import java.math.BigDecimal; import java.sql.Timestamp; +import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -34,6 +36,7 @@ import javolution.util.FastMap; import net.sf.json.JSONObject; import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -47,9 +50,13 @@ import org.ofbiz.entity.condition.Entity import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.util.EntityFindOptions; import org.ofbiz.entity.util.EntityListIterator; +import org.ofbiz.entity.util.EntityTypeUtil; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.product.catalog.CatalogWorker; +import org.ofbiz.product.product.ProductWorker; import org.ofbiz.service.DispatchContext; +import org.ofbiz.service.GenericServiceException; +import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; /** @@ -211,6 +218,7 @@ public class CategoryServices { public static Map<String, Object> getProductCategoryAndLimitedMembers(DispatchContext dctx, Map<String, ? extends Object> context) { Delegator delegator = dctx.getDelegator(); + LocalDispatcher dispatcher = dctx.getDispatcher(); String productCategoryId = (String) context.get("productCategoryId"); boolean limitView = ((Boolean) context.get("limitView")).booleanValue(); int defaultViewSize = ((Integer) context.get("defaultViewSize")).intValue(); @@ -236,7 +244,7 @@ public class CategoryServices { } Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - + int viewIndex = 0; try { viewIndex = Integer.valueOf((String) context.get("viewIndexString")).intValue(); @@ -271,7 +279,18 @@ public class CategoryServices { lowIndex = 0; highIndex = 0; } - + Boolean filterOutOfStock = false ; + try { + String productStoreId = (String) context.get("productStoreId"); + if (UtilValidate.isNotEmpty(productStoreId)) { + GenericValue productStore = delegator.findOne("ProductStore", UtilMisc.toMap("productStoreId", productStoreId), false); + if (productStore != null && "N".equals(productStore.getString("showOutOfStockProducts"))) { + filterOutOfStock = true; + } + } + } catch (GenericEntityException e) { + Debug.logWarning(e.getMessage(), module); + } List<GenericValue> productCategoryMembers = null; if (productCategory != null) { try { @@ -292,7 +311,16 @@ public class CategoryServices { if (!filterConditions.isEmpty()) { productCategoryMembers = EntityUtil.filterByCondition(productCategoryMembers, EntityCondition.makeCondition(filterConditions, EntityOperator.AND)); } - + + // filter out of stock products + if (filterOutOfStock) { + try { + productCategoryMembers = ProductWorker.filterOutOfStockProducts(productCategoryMembers, dispatcher, delegator); + } catch (GeneralException e) { + Debug.logWarning("Problem filtering out of stock products :"+e.getMessage(), module); + } + + } // filter out the view allow before getting the sublist if (UtilValidate.isNotEmpty(viewProductCategoryId)) { productCategoryMembers = CategoryWorker.filterProductsInCategory(delegator, productCategoryMembers, viewProductCategoryId); @@ -370,7 +398,15 @@ public class CategoryServices { lowIndex = 1; highIndex = listSize; } - + // filter out of stock products + if (filterOutOfStock) { + try { + productCategoryMembers = ProductWorker.filterOutOfStockProducts(productCategoryMembers, dispatcher, delegator); + listSize = productCategoryMembers.size(); + } catch (GeneralException e) { + Debug.logWarning("Problem filtering out of stock products :"+e.getMessage(), module); + } + } // null safety if (productCategoryMembers == null) { productCategoryMembers = FastList.newInstance(); @@ -398,7 +434,7 @@ public class CategoryServices { if (productCategoryMembers != null) result.put("productCategoryMembers", productCategoryMembers); return result; } - + // Please note : the structure of map in this function is according to the JSON data map of the jsTree @SuppressWarnings("unchecked") public static void getChildCategoryTree(HttpServletRequest request, HttpServletResponse response){ Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon Oct 20 09:51:54 2014 @@ -21,6 +21,7 @@ package org.ofbiz.product.product; import java.math.BigDecimal; import java.math.MathContext; import java.sql.Timestamp; +import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; @@ -32,6 +33,7 @@ import javolution.util.FastMap; import javolution.util.FastSet; import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; @@ -1205,4 +1207,43 @@ nextProd: return false; } + + // Method to filter-out out of stock products + public static List<GenericValue> filterOutOfStockProducts (List<GenericValue> productsToFilter, LocalDispatcher dispatcher, Delegator delegator) throws GeneralException { + ArrayList<GenericValue> productsInStock = new ArrayList<GenericValue>(); + if (UtilValidate.isNotEmpty(productsToFilter)) { + for (GenericValue genericRecord : productsToFilter) { + String productId = genericRecord.getString("productId"); + GenericValue product = null; + product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true); + Boolean isMarketingPackage = EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG"); + + if ( UtilValidate.isNotEmpty(isMarketingPackage) && isMarketingPackage) { + Map<String, Object> resultOutput = new FastMap<String, Object>(); + resultOutput = dispatcher.runSync("getMktgPackagesAvailable", UtilMisc.toMap("productId" ,productId)); + Debug.logWarning("Error getting available marketing package.", module); + + BigDecimal availableInventory = (BigDecimal) resultOutput.get("availableToPromiseTotal"); + if(availableInventory.compareTo(BigDecimal.ZERO) > 0) { + productsInStock.add(genericRecord); + } + } else { + List<GenericValue> facilities = delegator.findList("ProductFacility", EntityCondition.makeCondition("productId",EntityOperator.EQUALS, productId), null, null, null, false); + BigDecimal availableInventory = BigDecimal.ZERO; + if (UtilValidate.isNotEmpty(facilities)) { + for (GenericValue facility : facilities) { + BigDecimal lastInventoryCount = facility.getBigDecimal("lastInventoryCount"); + if (lastInventoryCount != null) { + availableInventory = lastInventoryCount.add(availableInventory); + } + } + if (availableInventory.compareTo(BigDecimal.ZERO) > 0) { + productsInStock.add(genericRecord); + } + } + } + } + } + return productsInStock; + } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java Mon Oct 20 09:51:54 2014 @@ -116,7 +116,6 @@ public class PackingServices { Map<String, String> pkgInfo = UtilGenerics.checkMap(context.get("pkgInfo")); Map<String, String> wgtInfo = UtilGenerics.checkMap(context.get("wgtInfo")); Map<String, String> numPackagesInfo = UtilGenerics.checkMap(context.get("numPackagesInfo")); - Map<String, String> boxTypeInfo = UtilGenerics.checkMap(context.get("boxTypeInfo")); if (selInfo != null) { for (String rowKey: selInfo.keySet()) { @@ -131,8 +130,6 @@ public class PackingServices { String pkgStr = pkgInfo.get(rowKey); String qtyStr = qtyInfo.get(rowKey); String wgtStr = wgtInfo.get(rowKey); - String boxType = boxTypeInfo.get(rowKey); - session.setShipmentBoxTypeId(boxType); Debug.logInfo("Item: " + orderItemSeqId + " / Product: " + prdStr + " / Quantity: " + qtyStr + " / Package: " + pkgStr + " / Weight: " + wgtStr, module); @@ -288,12 +285,14 @@ public class PackingServices { String pickerPartyId = (String) context.get("pickerPartyId"); BigDecimal additionalShippingCharge = (BigDecimal) context.get("additionalShippingCharge"); Map<String, String> packageWeights = UtilGenerics.checkMap(context.get("packageWeights")); + Map<String, String> boxTypes = UtilGenerics.checkMap(context.get("boxTypes")); String weightUomId = (String) context.get("weightUomId"); session.setHandlingInstructions(instructions); session.setPickerPartyId(pickerPartyId); session.setAdditionalShippingCharge(additionalShippingCharge); session.setWeightUomId(weightUomId); setSessionPackageWeights(session, packageWeights); + setSessionShipmentBoxTypes(session, boxTypes); Boolean force = (Boolean) context.get("forceComplete"); if (force == null) { @@ -338,4 +337,18 @@ public class PackingServices { } return shippableWeight; } + + public static void setSessionShipmentBoxTypes(PackingSession session, Map<String, String> boxTypes) { + if (UtilValidate.isNotEmpty(boxTypes)) { + for (Map.Entry<String, String> entry: boxTypes.entrySet()) { + String packageSeqId = entry.getKey(); + String boxTypeStr = entry.getValue(); + if (UtilValidate.isNotEmpty(boxTypeStr)) { + session.setShipmentBoxType(Integer.parseInt(packageSeqId), boxTypeStr); + } else { + session.setShipmentBoxType(Integer.parseInt(packageSeqId), null); + } + } + } + } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Mon Oct 20 09:51:54 2014 @@ -70,6 +70,7 @@ public class PackingSession implements j protected List<ItemDisplay> itemInfos = null; protected int packageSeq = -1; protected int status = 1; + protected Map<Integer, String> shipmentBoxTypes = null; private transient Delegator _delegator = null; private transient LocalDispatcher _dispatcher = null; @@ -91,6 +92,7 @@ public class PackingSession implements j this.itemInfos = FastList.newInstance(); this.packageSeq = 1; this.packageWeights = FastMap.newInstance(); + this.shipmentBoxTypes = FastMap.newInstance(); } public PackingSession(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId) { @@ -598,6 +600,7 @@ public class PackingSession implements j public void clearAllLines() { this.packLines.clear(); this.packageWeights.clear(); + this.shipmentBoxTypes.clear(); this.packageSeq = 1; } @@ -610,6 +613,7 @@ public class PackingSession implements j this.primaryShipGrp = null; this.additionalShippingCharge = null; if (this.packageWeights != null) this.packageWeights.clear(); + if (this.shipmentBoxTypes != null) this.shipmentBoxTypes.clear(); this.weightUomId = null; this.packageSeq = 1; this.status = 1; @@ -795,7 +799,7 @@ public class PackingSession implements j Map<String, Object> pkgCtx = FastMap.newInstance(); pkgCtx.put("shipmentId", shipmentId); pkgCtx.put("shipmentPackageSeqId", shipmentPackageSeqId); - pkgCtx.put("shipmentBoxTypeId", this.shipmentBoxTypeId); + pkgCtx.put("shipmentBoxTypeId", getShipmentBoxType(i+1)); pkgCtx.put("weight", getPackageWeight(i+1)); pkgCtx.put("weightUomId", getWeightUomId()); pkgCtx.put("userLogin", userLogin); @@ -989,6 +993,25 @@ public class PackingSession implements j setPackageWeight(packageSeqId, newPackageWeight); } + // These methods (setShipmentBoxType and getShipmentBoxType) are added so that each package will have different box type. + public void setShipmentBoxType(int packageSeqId, String shipmentBoxType) { + if (UtilValidate.isEmpty(shipmentBoxType)) { + shipmentBoxTypes.remove(Integer.valueOf(packageSeqId)); + } else { + shipmentBoxTypes.put(Integer.valueOf(packageSeqId), shipmentBoxType); + } + } + + public String getShipmentBoxType(int packageSeqId) { + if (this.shipmentBoxTypes == null) return null; + String shipmentBoxType = null; + Object p = shipmentBoxTypes.get(packageSeqId); + if (p != null) { + shipmentBoxType = (String) p; + } + return shipmentBoxType; + } + class ItemDisplay extends AbstractMap<Object, Object> { public GenericValue orderItem; Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy Mon Oct 20 09:51:54 2014 @@ -18,6 +18,7 @@ */ import java.math.MathContext; +import java.sql.Timestamp; if (parameters.fromDateSellThrough) { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy Mon Oct 20 09:51:54 2014 @@ -133,10 +133,10 @@ if (orderId) { orderItemShipGroup = orh.getOrderItemShipGroup(shipGroupSeqId); context.orderItemShipGroup = orderItemShipGroup; carrierPartyId = orderItemShipGroup.carrierPartyId; - if ("USPS".equals(carrierPartyId)) { carrierShipmentBoxTypes = delegator.findList("CarrierShipmentBoxType", EntityCondition.makeCondition([partyId : carrierPartyId]), null, null, null, false); + if (carrierShipmentBoxTypes) { context.carrierShipmentBoxTypes = carrierShipmentBoxTypes; - } + } if ("ORDER_APPROVED".equals(orderHeader.statusId)) { if (shipGroupSeqId) { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/shipment/PackOrder.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/shipment/PackOrder.ftl?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/shipment/PackOrder.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/shipment/PackOrder.ftl Mon Oct 20 09:51:54 2014 @@ -266,9 +266,6 @@ under the License. <td> </td> <td align="center">${uiLabelMap.ProductPackQty}</td> <td align="center">${uiLabelMap.ProductPackedWeight} (${("uiLabelMap.ProductShipmentUomAbbreviation_" + defaultWeightUomId)?eval})</td> - <#if carrierShipmentBoxTypes?has_content> - <td align="center">${uiLabelMap.ProductShipmentBoxType}</td> - </#if> <td align="center">${uiLabelMap.ProductPackage}</td> <td align="right"> <b>*</b> ${uiLabelMap.ProductPackages}</td> </tr> @@ -315,17 +312,6 @@ under the License. <td align="center"> <input type="text" size="7" name="wgt_${rowKey}" value="" /> </td> - <#if carrierShipmentBoxTypes?has_content> - <td align="center"> - <select name="boxType_${rowKey}"> - <option value=""></option> - <#list carrierShipmentBoxTypes as carrierShipmentBoxType> - <#assign shipmentBoxType = carrierShipmentBoxType.getRelatedOne("ShipmentBoxType", false) /> - <option value="${shipmentBoxType.shipmentBoxTypeId}">${shipmentBoxType.description?default(shipmentBoxType.shipmentBoxTypeId)}</option> - </#list> - </select> - </td> - </#if> <td align="center"> <select name="pkg_${rowKey}"> <#if packingSession.getPackageSeqIds()?exists> @@ -395,6 +381,22 @@ under the License. <input type="hidden" name="productStoreId" value="${productStoreId!}"/> </#if> </td> + <#if carrierShipmentBoxTypes?has_content> + <td> + <span class="label">${uiLabelMap.ProductShipmentBoxType}</span> + <br/> + <#list packageSeqIds as packageSeqId> + <select name="boxType_${packageSeqId}"> + <option value=""></option> + <#list carrierShipmentBoxTypes as carrierShipmentBoxType> + <#assign shipmentBoxType = carrierShipmentBoxType.getRelatedOne("ShipmentBoxType", false) /> + <option value="${shipmentBoxType.shipmentBoxTypeId}">${shipmentBoxType.description?default(shipmentBoxType.shipmentBoxTypeId)}</option> + </#list> + </select> + <br/> + </#list> + </td> + </#if> </#if> <td nowrap="nowrap"> <span class="label">${uiLabelMap.ProductAdditionalShippingCharge}:</span> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml Mon Oct 20 09:51:54 2014 @@ -262,12 +262,10 @@ under the License. <!-- ================================================================== --> <!-- Apply patches where needed --> <!-- ================================================================== --> - - - <target name="build-dev" - description="Patch sources in a dev environment if patch files are present in runtime/patches. Needs a Subversion client installed"> - <!-- patch task can't handle a fileset => create a global patch --> + <target name="build-dev" + description="Patch sources in a dev environment if patch files are present in runtime/patches."> + <!-- Ant patch task can't handle a fileset => create a global patch --> <concat destfile="${basedir}/runtime/patches/dev.patch" encoding="UTF-8" outputencoding="UTF-8"> <fileset dir="${basedir}/runtime/patches" casesensitive="no"> <exclude name="dev.patch"/> <!-- exclude the patch itself in case it's still there --> @@ -277,20 +275,71 @@ under the License. <if> <available file="${basedir}/runtime/patches/dev.patch"/> <then> - <exec executable="svn" dir="${basedir}"> - <arg value="patch"/> - <arg value="${basedir}/runtime/patches/dev.patch"/> - </exec> - <delete> - <fileset dir="${basedir}/runtime/patches" includes="dev.patch"/> - </delete> + <antcall target="patch"> + <param name="dir-name" value="${basedir}"/> + <param name="diff-file" value="${basedir}/runtime/patches/dev.patch"/> + </antcall> + <delete file="${basedir}/runtime/patches/dev.patch"/> </then> </if> </target> + <!-- Following allow to use "svn patch" and fallback on "patch" if necessary --> + <target name="calculate-svn-patch-available"> + <mkdir dir="build/svn-check"/> + <exec dir="build/svn-check" output="build/svn-check/svn.output" executable="svn" failonerror="true"> + <arg value="--version" /> + </exec> + <loadfile property="svn-output" srcFile="build/svn-check/svn.output"/> + <condition property="svn-version-ok"> + <!-- On Linux prefer patch because "svn patch" needs "ant exec and you can't check patching errors --> + <and> + <os family="windows"/> + <or> + <!-- This might also depend on the format of the working copy --> + <contains string="${svn-output}" substring="1.7."/> + <contains string="${svn-output}" substring="1.8."/> + <contains string="${svn-output}" substring="1.9."/> + <contains string="${svn-output}" substring="1.10."/> + <contains string="${svn-output}" substring="1.11."/> + </or> + </and> + </condition> + <delete dir="build/svn-check"/> + </target> + + <target name="calculate-patch-available" depends="calculate-svn-patch-available" unless="svn-version-ok"> + <condition property="patch-ok"> + <os family="unix"/> + </condition> + </target> + + <target name="check-svn-patch-available" depends="calculate-svn-patch-available" unless="svn-version-ok"> + <echo message="You need svn version 1.7 or higher - attempting patch instead."/> + </target> + + <target name="check-patch-available" depends="calculate-patch-available" unless="patch-ok"/> + + <target name="patch-via-svn" depends="check-svn-patch-available" if="svn-version-ok"> + <exec dir="${basedir}" executable="svn" failonerror="true"> + <arg value="patch" /> + <arg value="${diff-file}" /> + <arg value="${dir-name}" /> + </exec> + </target> + + <target name="patch-via-patch" depends="check-patch-available" if="patch-ok"> + <exec dir="${basedir}" executable="patch" input="${diff-file}" failonerror="true"> + <arg value="--binary" /><!-- To prevent EOL issues which comes when using mixed development platforms (ie Unix and Win) --> + <arg value="-p0" /> + </exec> + </target> + + <target name="patch" depends="patch-via-svn,patch-via-patch"/> + <target name="build-test" description="Patch and build all sources for use in a test environment. On Windows you need to have patch.exe in the path and patch files must all be in dos format (CR+LF)"> - <subant inheritall="false" target="prepare-to-build-test"> + <subant inheritall="false" target="prepare-to-build-test" failonerror="true"> <fileset dir="${basedir}/hot-deploy" casesensitive="no"> <exclude name="disabled/**"/> <include name="*/build.xml"/> @@ -301,7 +350,7 @@ under the License. <target name="build-qa" description="Patch and build all sources for use in a qa environment. On Windows you need to have patch.exe in the path and patch files must all be in dos format (CR+LF)"> - <subant inheritall="false" target="prepare-to-build-qa"> + <subant inheritall="false" target="prepare-to-build-qa" failonerror="true"> <fileset dir="${basedir}/hot-deploy" casesensitive="no"> <exclude name="disabled/**"/> <include name="*/build.xml"/> @@ -312,7 +361,7 @@ under the License. <target name="build-production" description="Patch and build all sources for use in a live environment. On Windows you need to have patch.exe in the path and patch files must all be in dos format (CR+LF)"> - <subant inheritall="false" target="prepare-to-build-production"> + <subant inheritall="false" target="prepare-to-build-production" failonerror="true"> <fileset dir="${basedir}/hot-deploy" casesensitive="no"> <exclude name="disabled/**"/> <include name="*/build.xml"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/common.xml Mon Oct 20 09:51:54 2014 @@ -162,10 +162,10 @@ under the License. <!-- This macro applies all patches found in ./patches/@{deployment} relative to ${ofbiz.home.dir} and stops the build process if patches fail (to save time deleting all the rejects) + We use patch command here instead of svn patch because it's supposed to run in a server where patch is intalled in path --> <macrodef name="apply-patches"> <attribute name="deployment" default="dev" /> - <sequential> <!-- patch task can't handle a fileset => create a global patch --> <if> @@ -175,13 +175,11 @@ under the License. <!-- exclude the patch itself in case it's still there --> <fileset dir="patches" includes="@{deployment}/*.patch"/> </concat> - - <patch strip="0" patchfile="patches/@{deployment}.patch" dir="${ofbiz.home.dir}"/> - + <patch strip="0" patchfile="patches/@{deployment}.patch" dir="${ofbiz.home.dir}" failonerror="true"/> <delete> <fileset dir="patches" includes="@{deployment}.patch"/> </delete> - </then> + </then> </if> </sequential> </macrodef> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/webcommon/WEB-INF/common-controller.xml Mon Oct 20 09:51:54 2014 @@ -129,7 +129,7 @@ under the License. <!-- Visual theme mapping --> <request-map uri="ListVisualThemes"> <security https="true" auth="true"/> - <response name="success" type="view" value="ListVisualThemes"/> + <response name="success" type="view" value="ListVisualThemes" save-last-view="true"/> </request-map> <request-map uri="main"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/widget/HelpScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/widget/HelpScreens.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/widget/HelpScreens.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/widget/HelpScreens.xml Mon Oct 20 09:51:54 2014 @@ -25,7 +25,6 @@ under the License. <section> <actions> <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> - <property-map resource="CommonExtUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/> <service service-name="getUserPreferenceGroup" result-map="prefResult"> <field-map field-name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/> Propchange: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/widget/HelpScreens.xml ------------------------------------------------------------------------------ Merged /ofbiz/trunk/framework/common/widget/HelpScreens.xml:r1535158-1633085 Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java Mon Oct 20 09:51:54 2014 @@ -319,9 +319,16 @@ public class EntityQuery { * @return this EntityQuery object, to enable chaining */ public EntityQuery filterByDate(Timestamp moment) { - this.filterByDate = true; - this.filterByDateMoment = moment; - this.filterByFieldNames = null; + if (moment != null) { + this.filterByDate = true; + this.filterByDateMoment = moment; + this.filterByFieldNames = null; + } else { + // Maintain existing behavior exhibited by EntityUtil.filterByDate(moment) when moment is null and perform no date filtering + this.filterByDate = false; + this.filterByDateMoment = null; + this.filterByFieldNames = null; + } return this; } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/resources/templates/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/resources/templates/CommonScreens.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/resources/templates/CommonScreens.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/resources/templates/CommonScreens.xml Mon Oct 20 09:51:54 2014 @@ -17,7 +17,7 @@ <set field="applicationTitle" value="${uiLabelMap.@component-resource-name@Application}" global="true"/> </actions> <widgets> - <include-screen name="ApplicationDecorator" location="component://commonext/widget/CommonScreens.xml"/> + <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/> </widgets> </section> </screen> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Mon Oct 20 09:51:54 2014 @@ -70,6 +70,10 @@ public class WidgetWorker { public static void buildHyperlinkUrl(Appendable externalWriter, String target, String targetType, Map<String, String> parameterMap, String prefix, boolean fullPath, boolean secure, boolean encode, HttpServletRequest request, HttpServletResponse response, Map<String, Object> context) throws IOException { String localRequestName = UtilHttp.encodeAmpersands(target); + // We may get an encoded request like: /projectmgr/control/EditTaskContents?workEffortId=10003 + // Try to reducing a possibly encoded string down to its simplest form: /projectmgr/control/EditTaskContents?workEffortId=10003 + // This step make sure the following appending externalLoginKey operation to work correctly + localRequestName = StringUtil.defaultWebEncoder.canonicalize(localRequestName); Appendable localWriter = new StringWriter(); if ("intra-app".equals(targetType)) { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailContactListScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailContactListScreens.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailContactListScreens.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailContactListScreens.xml Mon Oct 20 09:51:54 2014 @@ -26,7 +26,7 @@ under the License. <actions> <set field="titleProperty" value="EcommerceSubscriptionVerifyEmail"/> <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>--> - <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control/"/> + <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control"/> <entity-one entity-name="PartyNameView" value-field="partyName" auto-field-map="false"> <field-map field-name="partyId" from-field="contactListParty.partyId"/> </entity-one> @@ -68,7 +68,7 @@ under the License. <entity-one entity-name="ContactList" value-field="contactList"/> <entity-one entity-name="PartyNameView" value-field="partyName"/> <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>--> - <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control/"/> + <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control"/> </actions> <widgets> <platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListSubscribeEmail.ftl"/></html></platform-specific> @@ -82,7 +82,7 @@ under the License. <entity-one entity-name="ContactList" value-field="contactList"/> <entity-one entity-name="PartyNameView" value-field="partyName"/> <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>--> - <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control/"/> + <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control"/> </actions> <widgets> <platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListUnsubscribeVerifyEmail.ftl"/></html></platform-specific> @@ -96,7 +96,7 @@ under the License. <entity-one entity-name="ContactList" value-field="contactList"/> <entity-one entity-name="PartyNameView" value-field="partyName"/> <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>--> - <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control/"/> + <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control"/> </actions> <widgets> <platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListUnsubscribeEmail.ftl"/></html></platform-specific> @@ -110,7 +110,7 @@ under the License. <entity-one entity-name="ContactList" value-field="contactList"/> <entity-one entity-name="PartyNameView" value-field="partyName"/> <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>--> - <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control/"/> + <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baseLocation}/control"/> </actions> <widgets> <platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListEmailTemplate.ftl"/></html></platform-specific> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailGiftCardScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailGiftCardScreens.xml?rev=1633087&r1=1633086&r2=1633087&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailGiftCardScreens.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/widget/EmailGiftCardScreens.xml Mon Oct 20 09:51:54 2014 @@ -36,7 +36,7 @@ under the License. <screen name="GiftCardReload"> <section> <actions> - <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/> + <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control"/> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/> </actions> <widgets>