Author: apatel
Date: Sun Jul 15 23:16:13 2007 New Revision: 556514 URL: http://svn.apache.org/viewvc?view=rev&rev=556514 Log: Shipment notification email improvements. Modified: ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.properties ofbiz/trunk/applications/ecommerce/templates/email/ShipmentNotificationEmail.ftl ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh ofbiz/trunk/applications/ecommerce/widget/EmailOrderScreens.xml Modified: ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.properties?view=diff&rev=556514&r1=556513&r2=556514 ============================================================================== --- ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.properties (original) +++ ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.properties Sun Jul 15 23:16:13 2007 @@ -455,3 +455,4 @@ ProductYouSearchedFor=you searched for RequestHistory=Request History QuoteHistory=Quote History +ShipmentItems=Shipment Items Modified: ofbiz/trunk/applications/ecommerce/templates/email/ShipmentNotificationEmail.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/templates/email/ShipmentNotificationEmail.ftl?view=diff&rev=556514&r1=556513&r2=556514 ============================================================================== --- ofbiz/trunk/applications/ecommerce/templates/email/ShipmentNotificationEmail.ftl (original) +++ ofbiz/trunk/applications/ecommerce/templates/email/ShipmentNotificationEmail.ftl Sun Jul 15 23:16:13 2007 @@ -18,30 +18,46 @@ --> <#if baseEcommerceSecureUrl?exists><#assign urlPrefix = baseEcommerceSecureUrl/></#if> -<div class="screenlet"> - <div class="screenlet-header"> - <div class="boxhead"> ${uiLabelMap.ShippedItems}</div> - </div> - <div class="screenlet-body"> - <table width="100%" border="0" cellpadding="0"> - <tr align="left" valign="bottom"> - <td width="35%" align="left"><span class="tableheadtext"><b>${uiLabelMap.EcommerceProduct}</b></span></td> - <td width="10%" align="right"><span class="tableheadtext"><b>${uiLabelMap.OrderQuantity}</b></span></td> - </tr> - <tr><td colspan="10"><hr class="sepbar"/></td></tr> - <#list shipmentPackages as shipmentPackage> - <#assign shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent")> - <#list shipmentPackageContents as shipmentPackageContent> - <#assign shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem")> - <#assign productId = shipmentItem.productId> - <#assign product = shipmentItem.getRelatedOne("Product")> +<#if shipment?has_content> + <div class="screenlet"> + <div class="screenlet-header"> + <div class="boxhead">${title?if_exists}<br/><br/></div> + </div> + <table border="0" cellpadding="0" cellspacing="0"> + <tbody> + <tr> + <td><b>${uiLabelMap.OrderTrackingNumber}</b></td> + </tr> + <#list orderShipmentInfoSummaryList as orderShipmentInfoSummary> <tr> - <td colspan="1" valign="top"> ${productId?if_exists} - ${product.internalName?if_exists}</td> - <td align="right" valign="top"> ${shipmentItem.quantity?if_exists}</td> + <td> + Code: ${orderShipmentInfoSummary.trackingCode?default("[Not Yet Known]")} + <#if orderShipmentInfoSummary.carrierPartyId?has_content>(${uiLabelMap.ProductCarrier}: ${orderShipmentInfoSummary.carrierPartyId})</#if> + </td> </tr> - </#list> - <tr><td colspan="10"><hr class="sepbar"/></td></tr> + </#list> + </tbody> + </table> + <br/> + <div class="screenlet-header"> + <div class="boxhead"><b>${uiLabelMap.ShipmentItems}</b></div> + </div> + <div class="screenlet-body"> + <table width="100%" border="0" cellpadding="0"> + <tr align="left" valign="bottom"> + <td width="35%" align="left"><span class="tableheadtext"><b>${uiLabelMap.EcommerceProduct}</b></span></td> + <td width="10%" align="right"><span class="tableheadtext"><b>${uiLabelMap.OrderQuantity}</b></span></td> + </tr> + <tr><td colspan="10"><hr class="sepbar"/></td></tr> + <#list shipmentItems as shipmentItem> + <#assign productId = shipmentItem.productId> + <#assign product = shipmentItem.getRelatedOne("Product")> + <tr> + <td colspan="1" valign="top"> ${productId?if_exists} - ${product.internalName?if_exists}</td> + <td align="right" valign="top"> ${shipmentItem.quantity?if_exists}</td> + </tr> </#list> + <tr><td colspan="10"><hr class="sepbar"/></td></tr> </table> </div> -</div> +</#if> Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh?view=diff&rev=556514&r1=556513&r2=556514 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh Sun Jul 15 23:16:13 2007 @@ -19,12 +19,24 @@ import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.GenericDelegator; +import org.ofbiz.entity.*; +import org.ofbiz.entity.condition.*; +import org.ofbiz.entity.util.*; shipmentId = parameters.get("shipmentId"); if (shipmentId != null) { shipment = delegator.findByPrimaryKey("Shipment", UtilMisc.toMap("shipmentId", shipmentId)); - shipmentPackages = delegator.findByAnd("ShipmentPackage", UtilMisc.toMap("shipmentId", shipmentId)); + shipmentItems = delegator.findByAnd("ShipmentItem", UtilMisc.toMap("shipmentId", shipmentId)); + + // get Shipment tracking info + osisCond = new EntityFieldMap(UtilMisc.toMap("shipmentId", shipmentId), EntityOperator.AND); + osisOrder = UtilMisc.toList("shipmentId", "shipmentRouteSegmentId", "shipmentPackageSeqId"); + osisFields = UtilMisc.toList("shipmentId", "shipmentRouteSegmentId", "shipmentPackageSeqId", "carrierPartyId", "trackingCode"); + osisFindOptions = new EntityFindOptions(); + osisFindOptions.setDistinct(true); + orderShipmentInfoSummaryList = delegator.findByCondition("OrderShipmentInfoSummary", osisCond, null, osisFields, osisOrder, osisFindOptions); context.put("shipment", shipment); - context.put("shipmentPackages", shipmentPackages); + context.put("shipmentItems", shipmentItems); + context.put("orderShipmentInfoSummaryList", orderShipmentInfoSummaryList); } Modified: ofbiz/trunk/applications/ecommerce/widget/EmailOrderScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/EmailOrderScreens.xml?view=diff&rev=556514&r1=556513&r2=556514 ============================================================================== --- ofbiz/trunk/applications/ecommerce/widget/EmailOrderScreens.xml (original) +++ ofbiz/trunk/applications/ecommerce/widget/EmailOrderScreens.xml Sun Jul 15 23:16:13 2007 @@ -149,6 +149,8 @@ <screen name="ShipmentCompleteNotice"> <section> <actions> + <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> <set field="title" value="${uiLabelMap.PageTitleShipmentCompleteNotice}"/> <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh"/> |
Free forum by Nabble | Edit this page |