You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2006/11/04 08:16:16 UTC

svn commit: r471133 - in /incubator/ofbiz/trunk/applications/order: servicedef/services.xml src/org/ofbiz/order/order/OrderServices.java

Author: jonesde
Date: Fri Nov  3 23:16:16 2006
New Revision: 471133

URL: http://svn.apache.org/viewvc?view=rev&rev=471133
Log:
Changed email confirmation service to support new anonymous checkout userlogin request attribute that is used after the session has been cleared

Modified:
    incubator/ofbiz/trunk/applications/order/servicedef/services.xml
    incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: incubator/ofbiz/trunk/applications/order/servicedef/services.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/servicedef/services.xml?view=diff&rev=471133&r1=471132&r2=471133
==============================================================================
--- incubator/ofbiz/trunk/applications/order/servicedef/services.xml (original)
+++ incubator/ofbiz/trunk/applications/order/servicedef/services.xml Fri Nov  3 23:16:16 2006
@@ -43,6 +43,7 @@
             location="org.ofbiz.order.order.OrderServices" invoke="sendOrderConfirmNotification">
         <description>Send a order confirmation</description>
         <implements service="orderNotificationInterface"/>        
+        <attribute name="temporaryAnonymousUserLogin" type="GenericValue" mode="IN" optional="true"/>
     </service>
     <service name="sendOrderChangeNotification" engine="java" require-new-transaction="true" max-retry="3"
             location="org.ofbiz.order.order.OrderServices" invoke="sendOrderChangeNotification">

Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?view=diff&rev=471133&r1=471132&r2=471133
==============================================================================
--- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Fri Nov  3 23:16:16 2006
@@ -2014,6 +2014,13 @@
         String sendCc = (String) context.get("sendCc");
         String note = (String) context.get("note");
         String screenUri = (String) context.get("screenUri");
+        
+        if (userLogin == null) {
+            // this may happen during anonymous checkout, try to the special case user
+            GenericValue temporaryAnonymousUserLogin = (GenericValue) context.get("temporaryAnonymousUserLogin");
+            userLogin = temporaryAnonymousUserLogin;
+        }
+        
 
         // prepare the order information
         Map sendMap = FastMap.newInstance();