You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2014/09/20 12:59:51 UTC

svn commit: r1626417 - in /ofbiz/trunk/specialpurpose/ecommerce: script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml webapp/ecommerce/WEB-INF/controller.xml

Author: ashish
Date: Sat Sep 20 10:59:51 2014
New Revision: 1626417

URL: http://svn.apache.org/r1626417
Log:
Applied patch from jira issue OFBIZ-1705 - Merging  of processCustomerSettings and createUpdateUser method. 
Thanks Brajesh Patel for creating the issue, Thanks Arun Patidar for the contribution. 

Modified:
    ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml

Modified: ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml?rev=1626417&r1=1626416&r2=1626417&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml Sat Sep 20 10:59:51 2014
@@ -25,7 +25,16 @@ under the License.
     <!-- ======== Anonymous Checkout Events ======== -->
     <!-- =========================================== -->
 
-    <simple-method method-name="createUpdateUser" short-description="Create or Update User" login-required="false">
+    <simple-method method-name="createUpdateCustomer" short-description="Create update customer and settings" login-required="false">
+        <set field="require_email" value="true"/>
+        <set field="require_phone" value="true"/>
+        <set field="require_login" value="false"/>
+        <set field="shipToPostalAddress" value="true"/>
+        <set field="billToPostalAddress" value="true"/>
+        <!-- this parameter must be set to true or the createUser method below will use a default password instead of the one entered by user -->
+        <set field="create_allow_password" value="true"/>
+
+        <set field="parameters.roleTypeId" value="CUSTOMER"/>
 
         <property-to-field resource="security" property="username.lowercase" default="false" field="username_lowercase"/>
         <property-to-field resource="security" property="password.lowercase" default="false" field="password_lowercase"/>
@@ -481,20 +490,7 @@ under the License.
             </else>
             </if-empty>
         </if-not-empty>
-    </simple-method>
-
-    <simple-method method-name="processCustomerSettings" short-description="Process Customer Settings; to be called as a Request Event" login-required="false">
-        <set field="require_email" value="true"/>
-        <set field="require_phone" value="true"/>
-        <set field="require_login" value="false"/>
-        <set field="shipToPostalAddress" value="true"/>
-        <set field="billToPostalAddress" value="true"/>
-        <!-- this parameter must be set to true or the createUser method below will use a default password instead of the one entered by user -->
-        <set field="create_allow_password" value="true"/>
-
-        <set field="parameters.roleTypeId" value="CUSTOMER"/>
 
-        <call-simple-method method-name="createUpdateUser"/>
         <!-- see if we should continue now... -->
         <session-to-field field="cart" session-name="shoppingCart"/>
         <session-to-field field="userLogin"/>
@@ -517,7 +513,6 @@ under the License.
                     }
                 ]]></call-bsh>
             </if-not-empty>
-            <set from-field="partyId" field="partyId"/>
             <if-not-empty field="partyId">
                 <set field="lookupKeyValue.userLoginId" value="anonymous"/>
                 <find-by-primary-key map="lookupKeyValue" entity-name="UserLogin" value-field="userLogin"/>

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=1626417&r1=1626416&r2=1626417&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Sat Sep 20 10:59:51 2014
@@ -470,7 +470,7 @@ under the License.
 
     <request-map uri="quickAnonProcessCustomerSettings">
         <security https="true" auth="false"/>
-        <event type="simple" path="component://ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml" invoke="processCustomerSettings"/>
+        <event type="simple" path="component://ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml" invoke="createUpdateCustomer"/>
         <response name="success" type="request" value="quickAnonOrderReview"/>
         <response name="error" type="view" value="quickAnonCustSetting"/>
     </request-map>