You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/10/24 16:28:13 UTC

svn commit: r829376 - in /ofbiz/trunk/specialpurpose/ecommerce: data/DemoProduct.xml script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

Author: jleroux
Date: Sat Oct 24 14:28:13 2009
New Revision: 829376

URL: http://svn.apache.org/viewvc?rev=829376&view=rev
Log:
A patch from Aswath Satrasala "customer registration email problem when using component:// syntax" (https://issues.apache.org/jira/browse/OFBIZ-2631) - OFBIZ-2631
sendGenericNotificationEmail will not work, because the URI has the screen element part also and hence UtilURL or FlexibleLocation will not be able to resolve URI.
I searched other examples and created the patch based on PARTY_REGIS_CONFIRM

Modified:
    ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml
    ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml?rev=829376&r1=829375&r2=829376&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml Sat Oct 24 14:28:13 2009
@@ -118,6 +118,7 @@
     <ProductStoreEmailSetting productStoreId="9000" emailType="PRDS_QUO_CONFIRM" bodyScreenLocation="component://order/widget/ordermgr/QuoteScreens.xml#ViewQuoteSimple" xslfoAttachScreenLocation="component://order/widget/ordermgr/QuoteScreens.xml#QuoteReport" subject="OFBiz Demo - Quote Confirmation #${quoteId}" bccAddress="ofbiztest@yahoo.com" fromAddress="ofbiztest@yahoo.com"/>
 
     <ProductStoreEmailSetting productStoreId="9000" emailType="PARTY_REGIS_CONFIRM" bodyScreenLocation="component://party/widget/partymgr/EmailPartyScreens.xml#CreatePartyNotification" subject="New Account Created" bccAddress="ofbiztest@yahoo.com" fromAddress="ofbiztest@yahoo.com"/>
+    <ProductStoreEmailSetting productStoreId="9000" emailType="PRDS_CUST_REGISTER" bodyScreenLocation="component://party/widget/partymgr/EmailPartyScreens.xml#CreatePartyNotification" subject="New Account Created" bccAddress="ofbiztest@yahoo.com" fromAddress="ofbiztest@yahoo.com"/>
     <ProductStoreEmailSetting productStoreId="9000" emailType="UPD_PRSNL_INF_CNFRM" bodyScreenLocation="component://party/widget/partymgr/EmailPartyScreens.xml#ChangePersonalInfoNotification" subject="Personal Information Updated" bccAddress="ofbiztest@yahoo.com" fromAddress="ofbiztest@yahoo.com"/>
     <ProductStoreEmailSetting productStoreId="9000" emailType="PRDS_EMAIL_VERIFY" bodyScreenLocation="component://party/widget/partymgr/EmailPartyScreens.xml#VerifyEmailAddressNotification" subject="Email Address Verification" bccAddress="ofbiztest@yahoo.com" fromAddress="ofbiztest@yahoo.com"/>
 

Modified: ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=829376&r1=829375&r2=829376&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Sat Oct 24 14:28:13 2009
@@ -411,21 +411,18 @@
             <set value="PRDS_CUST_REGISTER" field="storeEmailLookup.emailType"/>
             <find-by-primary-key map="storeEmailLookup" entity-name="ProductStoreEmailSetting"  value-field="storeEmail"/>
             <if-not-empty field="storeEmail.bodyScreenLocation">
-                <!-- prepare the email context -->
-                <get-related-one value-field="createdUserLogin" relation-name="Person" to-value-field="personObj"/>
-                <set from-field="createdUserLogin" field="emailCtx.userLogin"/>
-                <set from-field="personObj" field="emailCtx.person"/>
-                <!-- prepare the notification service context -->
-                <set from-field="emailContext.emailAddress" field="notifyCtx.sendTo"/>
-                <set from-field="storeEmail.subject" field="notifyCtx.subject"/>
-                <set from-field="storeEmail.fromAddress" field="notifyCtx.sendFrom"/>
-                <set from-field="storeEmail.ccAddress" field="notifyCtx.sendCc"/>
-                <set from-field="storeEmail.bccAddress" field="notifyCtx.sendBcc"/>
-                <set from-field="storeEmail.contentType" field="notifyCtx.contentType"/>
-                <set from-field="storeEmail.bodyScreenLocation" field="notifyCtx.templateName"/>
-                <set from-field="emailCtx" field="notifyCtx.templateData"/>
-                <!-- call the service async -->
-                <call-service-asynch service-name="sendGenericNotificationEmail" in-map-name="notifyCtx" include-user-login="true"/>
+                <get-related-one value-field="createdUserLogin" relation-name="Person" to-value-field="person"/>
+                <set field="bodyParameters.person" from-field="person"/>
+                <set field="emailParams.bodyParameters" from-field="bodyParameters"/>
+                <set field="emailParams.sendTo" from-field="emailContext.emailAddress"/>
+                <set field="emailParams.subject" from-field="storeEmail.subject"/>
+                <set field="emailParams.sendFrom" from-field="storeEmail.fromAddress"/>
+                <set field="emailParams.sendCc" from-field="storeEmail.ccAddress"/>
+                <set field="emailParams.sendBcc" from-field="storeEmail.bccAddress"/>
+                <set field="emailParams.contentType" from-field="storeEmail.contentType"/>
+                <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/>
+                <set field="emailParams.emailType" from-field="storeEmailLookup.emailType"/>
+                <call-service-asynch service-name="sendMailFromScreen" in-map-name="emailParams" include-user-login="true"/>
             </if-not-empty>
         </if-not-empty>