svn commit: r1148648 - in /ofbiz/trunk: applications/marketing/script/org/ofbiz/marketing/contact/ applications/marketing/servicedef/ applications/marketing/src/org/ofbiz/marketing/marketing/ specialpurpose/ecommerce/templates/email/ specialpurpose/eco...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1148648 - in /ofbiz/trunk: applications/marketing/script/org/ofbiz/marketing/contact/ applications/marketing/servicedef/ applications/marketing/src/org/ofbiz/marketing/marketing/ specialpurpose/ecommerce/templates/email/ specialpurpose/eco...

hansbak-2
Author: hansbak
Date: Wed Jul 20 08:22:07 2011
New Revision: 1148648

URL: http://svn.apache.org/viewvc?rev=1148648&view=rev
Log:
correction on commit 1147733 to have the baseurl available in the contactlist email content

Removed:
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy
Modified:
    ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml
    ofbiz/trunk/applications/marketing/servicedef/services.xml
    ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java
    ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListSubscribeEmail.ftl
    ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListVerifyEmail.ftl
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl
    ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml

Modified: ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml?rev=1148648&r1=1148647&r2=1148648&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml (original)
+++ ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml Wed Jul 20 08:22:07 2011
@@ -131,8 +131,9 @@ under the License.
         <if-empty field="newEntity.fromDate"><now-timestamp field="newEntity.fromDate"/></if-empty>
 
         <create-value value-field="newEntity"/>
-
+        <set field="newEntity.baselocation" from-field="parameters.baselocation"/>
         <set-service-fields service-name="createContactListPartyStatus" map="newEntity" to-map="createContactListPartyStatusMap"/>
+        <set field="createContactListPartyStatusMap.baselocation" from-field="parameters.baselocation"/>
         <call-service service-name="createContactListPartyStatus" in-map-name="createContactListPartyStatusMap"/>
     </simple-method>
     <simple-method method-name="updateContactListParty" short-description="Update Add Party To ContactList">
@@ -196,6 +197,7 @@ under the License.
                 <field-map field-name="userLoginId" value="system"/>
             </entity-one>
             <set field="updateContactListPartyMap.userLogin" from-field="systemUserLogin"/>
+            <set field="updateContactListPartyMap.baselocation" from-field="parameters.baselocation"/>
             <call-service service-name="updateContactListParty" in-map-name="updateContactListPartyMap"/>
             <else>
                 <add-error><fail-message message="Invalid verify code for the ${contactList.contactListName}"/></add-error>
@@ -234,6 +236,7 @@ under the License.
             <set field="updateContactListPartyMap.preferredContactMechId" from-field="partyContactWithPurposes[0].contactMechId"/>
             <set field="updateContactListPartyMap.statusId" value="CLPT_UNSUBS_PENDING"/>
             <set field="updateContactListPartyMap.userLogin" from-field="userLogin"/>
+            <set field="updateContactListPartyMap.baselocation" from-field="parameters.baselocation"/>
             <call-service service-name="updateContactListParty" in-map-name="updateContactListPartyMap"/>
             <else>
                 <add-error><fail-message message="The email address (${parameters.email}) does not have the Other Email Address as contact purpose."/></add-error>
@@ -386,7 +389,8 @@ under the License.
                 <set from-field="contactList" field="sendMailFromScreenMap.bodyParameters.contactList"/>
                 <set from-field="contactListParty" field="sendMailFromScreenMap.bodyParameters.contactListParty"/>
                 <set from-field="contactListPartyStatus" field="sendMailFromScreenMap.bodyParameters.contactListPartyStatus"/>
-
+                <set from-field="parameters.baselocation" field="sendMailFromScreenMap.bodyParameters.baselocation"/>
+                
                 <call-service service-name="sendMailFromScreen" in-map-name="sendMailFromScreenMap"/>
             </then>
             <else>
@@ -491,6 +495,7 @@ under the License.
             <set field="bodyParameters.contactList" from-field="contactList"/>
             <set field="bodyParameters.contactListParty" from-field="contactListParty"/>
             <set field="bodyParameters.contactListPartyStatus" from-field="contactListPartyStatus"/>
+            <set field="bodyParameters.baselocation" from-field="parameters.baselocation"/>
             
             <set field="emailParams.bodyParameters" from-field="bodyParameters"/>
             <set field="emailParams.userLogin" from-field="userLogin"/>
@@ -566,6 +571,7 @@ under the License.
             <set field="bodyParameters.contactList" from-field="contactList"/>
             <set field="bodyParameters.contactListParty" from-field="contactListParty"/>
             <set field="bodyParameters.contactListPartyStatus" from-field="contactListPartyStatus"/>
+            <set field="bodyParameters.baselocation" from-field="parameters.baselocation"/>
             
             <set field="emailParams.webSiteId" from-field="contactList.verifyEmailWebSiteId"/>
             <set field="emailParams.bodyParameters" from-field="bodyParameters"/>

Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=1148648&r1=1148647&r2=1148648&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/marketing/servicedef/services.xml Wed Jul 20 08:22:07 2011
@@ -77,6 +77,7 @@ under the License.
         <attribute name="contactListId" type="String" mode="IN" optional="false"/>
         <attribute name="email" type="String" mode="IN" optional="false"/>
         <attribute name="partyId" type="String" mode="IN" optional="true"/>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
     </service>
     <service name="unsubscribeContactListParty" engine="simple"
             location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="unsubscribeContactListParty" auth="false">
@@ -85,6 +86,7 @@ under the License.
         <attribute name="contactListId" type="String" mode="IN" optional="false"/>
         <attribute name="email" type="String" mode="IN" optional="false"/>
         <attribute name="partyId" type="String" mode="IN" optional="true"/>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
     </service>
 
     <!-- MarketingCampaignRole Services -->
@@ -144,6 +146,7 @@ under the License.
         <description>Add Party to ContactList</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
         <override name="fromDate" optional="true"/>
         <override name="statusId" optional="false"/>
     </service>
@@ -155,6 +158,7 @@ under the License.
         <attribute name="productStoreId" type="String" mode="INOUT" optional="true"/>
         <attribute name="contactListId" type="String" mode="INOUT" optional="true"/>
         <attribute name="optInVerifyCode" type="String" mode="IN" optional="true"/>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
         <override name="fromDate" optional="true"/>
     </service>
     <service name="updateContactListPartyNoUserLogin" default-entity-name="ContactListParty" engine="simple"
@@ -167,6 +171,7 @@ under the License.
         <attribute name="contactListId" type="String" mode="INOUT" optional="true"/>
         <attribute name="optInVerifyCode" type="String" mode="IN" optional="true"/>
         <attribute name="email" type="String" mode="IN" optional="true"/>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
         <override name="partyId" optional="true"/>
         <override name="fromDate" optional="true"/>
     </service>
@@ -190,6 +195,7 @@ under the License.
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="setByUserLoginId"/>
         </auto-attributes>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
         <attribute name="preferredContactMechId" mode="IN" type="String" optional="false"/>
         <override name="statusId" optional="false"/>
         <override name="fromDate" optional="true"/>
@@ -198,10 +204,11 @@ under the License.
         location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="sendContactListPartyVerifyEmail" auth="true">
         <description>Send ContactListParty Verify Email</description>
         <auto-attributes entity-name="ContactListParty" include="pk" mode="IN" optional="false"/>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
     </service>
     <service name="optOutOfListFromCommEvent" engine="simple"
             location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="optOutOfListFromCommEvent" auth="false">
-        <description>Uses the communication event infromation to locate the contact list party information and removes the contact from the list</description>
+        <description>Uses the communication event information to locate the contact list party information and removes the contact from the list</description>
         <attribute name="communicationEventId" type="String" mode="IN" optional="false"/>
         <attribute name="contactListId" type="String" mode="OUT" optional="true"/>
     </service>
@@ -213,6 +220,7 @@ under the License.
         <attribute name="preferredContactMechId" mode="IN" type="String" optional="false"/>
         <attribute name="fromDate" mode="IN" type="Timestamp" optional="true"/>
         <attribute name="statusId" mode="IN" type="String" optional="true"/>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
     </service>
     <service name="sendContactListPartyUnSubscribeVerifyEmail" engine="simple"
         location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="sendContactListPartyUnSubscribeVerifyEmail" auth="false">
@@ -222,6 +230,7 @@ under the License.
         <attribute name="preferredContactMechId" mode="IN" type="String" optional="false"/>
         <attribute name="fromDate" mode="IN" type="Timestamp" optional="true"/>
         <attribute name="statusId" mode="IN" type="String" optional="true"/>
+        <attribute name="baselocation" type="String" mode="IN" optional="true"/>
     </service>
     <service name="sendContactListPartyUnSubscribeEmail" engine="simple"
         location="component://marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml" invoke="sendContactListPartyUnSubscribeEmail" auth="false">

Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java?rev=1148648&r1=1148647&r2=1148648&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java Wed Jul 20 08:22:07 2011
@@ -101,7 +101,7 @@ public class MarketingServices {
             String contactMechId = (String) serviceResults.get("contactMechId");
             // create a new association at this fromDate to the anonymous party with status accepted
             input = UtilMisc.toMap("userLogin", userLogin, "contactListId", contactList.get("contactListId"),
-                    "partyId", partyId, "fromDate", fromDate, "statusId", "CLPT_PENDING", "preferredContactMechId", contactMechId);
+                    "partyId", partyId, "fromDate", fromDate, "statusId", "CLPT_PENDING", "preferredContactMechId", contactMechId, "baselocation", context.get("baselocation"));
             serviceResults = dispatcher.runSync("createContactListParty", input);
             if (ServiceUtil.isError(serviceResults)) {
                 throw new GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));

Modified: ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListSubscribeEmail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListSubscribeEmail.ftl?rev=1148648&r1=1148647&r2=1148648&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListSubscribeEmail.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListSubscribeEmail.ftl Wed Jul 20 08:22:07 2011
@@ -29,6 +29,7 @@ under the License.
         <input type="hidden" name="fromDate" value="${contactListParty.fromDate}" />
         <input type="hidden" name="statusId" value="CLPT_UNSUBS_PENDING" />
         <input type="hidden" name="optInVerifyCode" value="${contactListPartyStatus.optInVerifyCode?if_exists}" />
+        <input type="hidden" name="baselocation" value="${baselocation?if_exists}" />
         <input type="submit" name="submitButton" value="Click here to unsubscribe your newsletter subscription." />
       </fieldset>
     </form>

Modified: ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListVerifyEmail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListVerifyEmail.ftl?rev=1148648&r1=1148647&r2=1148648&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListVerifyEmail.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/templates/email/ContactListVerifyEmail.ftl Wed Jul 20 08:22:07 2011
@@ -44,6 +44,7 @@ under the License.
     <input type="hidden" name="fromDate" value="${contactListParty.fromDate}" />
     <input type="hidden" name="statusId" value="CLPT_ACCEPTED" />
     <input type="hidden" name="optInVerifyCode" value="${contactListPartyStatus.optInVerifyCode?if_exists}" />
+    <input type="hidden" name="baselocation" value="${baselocation?if_exists}" />
     <input type="submit" name="submitButton" value="Please click here to verify your newsletter subscription." />
   </fieldset>
 </form>

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl?rev=1148648&r1=1148647&r2=1148648&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl Wed Jul 20 08:22:07 2011
@@ -50,6 +50,8 @@ under the License.
     <#-- They are logged in so lets present the form to sign up with their email address -->
       <form method="post" action="<@ofbizUrl>createContactListParty</@ofbizUrl>" name="signUpForContactListForm" id="signUpForContactListForm">
         <fieldset>
+          <#assign contextPath = request.getContextPath()>
+          <input type="hidden" name="baselocation" value="${contextPath}"/>
           <input type="hidden" name="partyId" value="${partyId}"/>
           <input type="hidden" id="statusId" name="statusId" value="CLPT_PENDING"/>
           <p>${uiLabelMap.EcommerceSignUpForContactListComments}</p>
@@ -79,6 +81,8 @@ under the License.
   <#-- There is no party info so just offer an anonymous (non-partyId) related newsletter sign up -->
     <form method="post" action="<@ofbizUrl>signUpForContactList</@ofbizUrl>" name="signUpForContactListForm" id="signUpForContactListForm">
       <fieldset>
+        <#assign contextPath = request.getContextPath()>
+        <input type="hidden" name="baselocation" value="${contextPath}"/>
         <input type="hidden" id="statusId" name="statusId"/>
         <div>
           <label>${uiLabelMap.EcommerceSignUpForContactListComments}</label>

Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml?rev=1148648&r1=1148647&r2=1148648&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml Wed Jul 20 08:22:07 2011
@@ -26,8 +26,7 @@ under the License.
             <actions>
                 <set field="titleProperty" value="EcommerceSubscriptionVerifyEmail"/>
                 <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>-->
-                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
-                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
+                <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>
@@ -69,8 +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/"/>-->
-                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
-                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
+                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baselocation}/control/"/>
             </actions>
             <widgets>
                 <platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListSubscribeEmail.ftl"/></html></platform-specific>
@@ -84,8 +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/"/>-->
-                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
-                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
+                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baselocation}/control/"/>
             </actions>
             <widgets>
                 <platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListUnsubscribeVerifyEmail.ftl"/></html></platform-specific>
@@ -99,8 +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/"/>-->
-                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
-                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
+                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baselocation}/control/"/>
             </actions>
             <widgets>
                 <platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListUnsubscribeEmail.ftl"/></html></platform-specific>
@@ -114,8 +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/"/>-->
-                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
-                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
+                <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${baselocation}/control/"/>
             </actions>
             <widgets>
                 <platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListEmailTemplate.ftl"/></html></platform-specific>