svn commit: r612435 - in /ofbiz/trunk/applications/ecommerce: script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml webapp/ecommerce/WEB-INF/actions/order/quickAnonCustSettings.bsh webapp/ecommerce/order/quickAnonCustSettings.ftl

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

svn commit: r612435 - in /ofbiz/trunk/applications/ecommerce: script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml webapp/ecommerce/WEB-INF/actions/order/quickAnonCustSettings.bsh webapp/ecommerce/order/quickAnonCustSettings.ftl

apatel-2
Author: apatel
Date: Wed Jan 16 04:41:04 2008
New Revision: 612435

URL: http://svn.apache.org/viewvc?rev=612435&view=rev
Log:
Improve variable names in checkout process events. Now uses more verbose naming.
Rishi Solanki, Pranay Pandey, Thanks for your help

Modified:
    ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/quickAnonCustSettings.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl

Modified: ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml?rev=612435&r1=612434&r2=612435&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml (original)
+++ ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml Wed Jan 16 04:41:04 2008
@@ -212,66 +212,66 @@
         <set field="partyRoleContext.roleTypeId" from-field="parameters.roleTypeId" />
 
         <!-- Create the Postal Address -->
-        <if-compare field-name="usePostalAddress_0" operator="equals" value="true">
-            <if-empty field-name="toName_0" map-name="parameters">
-                <set field="parameters.toName_0" value="${personContext.firstName} ${personContext.middleName} ${personContext.lastName}"  />
+        <if-compare field-name="shipToPostalAddress" operator="equals" value="true">
+            <if-empty field-name="shipToName" map-name="parameters">
+                <set field="parameters.shipToName" value="${personContext.firstName} ${personContext.middleName} ${personContext.lastName}"  />
             </if-empty>
-            <call-map-processor in-map-name="parameters" out-map-name="postalAddressContext_0">
+            <call-map-processor in-map-name="parameters" out-map-name="shippingAddressContext">
                 <simple-map-processor name="postalAddress">
                     <process field="roleTypeId"><copy/></process>
-                    <process field="toName_0"><copy to-field="toName"/><not-empty><fail-property resource="PartyUiLabels" property="PartyToNameMissing"/></not-empty></process>
-                    <process field="attnName_0"><copy to-field="attnName"/></process>
-                    <process field="address1_0"><copy to-field="address1"/><not-empty><fail-property resource="PartyUiLabels" property="PartyAddressLine1Missing"/></not-empty></process>
-                    <process field="address2_0"><copy to-field="address2"/></process>
-                    <process field="city_0"><copy to-field="city"/><not-empty><fail-property resource="PartyUiLabels" property="PartyCityMissing"/></not-empty></process>
-                    <process field="stateProvinceGeoId_0"><copy to-field="stateProvinceGeoId"/></process>
-                    <process field="postalCode_0"><copy to-field="postalCode"/><not-empty><fail-property resource="PartyUiLabels"  property="PartyPostalCodeMissing"/></not-empty></process>
-                    <process field="countryGeoId_0"><copy to-field="countryGeoId"/><not-empty><fail-property resource="PartyUiLabels" property="PartyCountryMissing"/></not-empty></process>
-                    <process field="postalAddressAllowSol_0"><copy to-field="allowSolicitation"/></process>
+                    <process field="shipToName"><copy to-field="toName"/><not-empty><fail-property resource="PartyUiLabels" property="PartyToNameMissing"/></not-empty></process>
+                    <process field="shipToAttnName"><copy to-field="attnName"/></process>
+                    <process field="shipToAddress1"><copy to-field="address1"/><not-empty><fail-property resource="PartyUiLabels" property="PartyAddressLine1Missing"/></not-empty></process>
+                    <process field="shipToAddress2"><copy to-field="address2"/></process>
+                    <process field="shipToCity"><copy to-field="city"/><not-empty><fail-property resource="PartyUiLabels" property="PartyCityMissing"/></not-empty></process>
+                    <process field="shipToStateProvinceGeoId"><copy to-field="stateProvinceGeoId"/></process>
+                    <process field="shipToPostalCode"><copy to-field="postalCode"/><not-empty><fail-property resource="PartyUiLabels"  property="PartyPostalCodeMissing"/></not-empty></process>
+                    <process field="shipToCountryGeoId"><copy to-field="countryGeoId"/><not-empty><fail-property resource="PartyUiLabels" property="PartyCountryMissing"/></not-empty></process>
+                    <process field="shipToPostalAddressAllowSol"><copy to-field="allowSolicitation"/></process>
                 </simple-map-processor>
             </call-map-processor>
-            <if-compare value="USA" operator="equals" field-name="countryGeoId_0" map-name="parameters">
-                <if-empty field-name="stateProvinceGeoId_0" map-name="parameters">
+            <if-compare value="USA" operator="equals" field-name="shipToCountryGeoId" map-name="parameters">
+                <if-empty field-name="shipToStateProvinceGeoId" map-name="parameters">
                     <set field="tempErrorMessage" value="State is missing, and is required for an address in the United States." />
                     <field-to-list field-name="tempErrorMessage" list-name="error_list"/>
                 </if-empty>
             </if-compare>
-            <if-compare value="CAN" operator="equals" field-name="countryGeoId_0" map-name="parameters">
-                <if-empty field-name="stateProvinceGeoId_0" map-name="parameters">
+            <if-compare value="CAN" operator="equals" field-name="shipToCountryGeoId" map-name="parameters">
+                <if-empty field-name="shipToStateProvinceGeoId" map-name="parameters">
                     <set field="tempErrorMessage" value="State is missing, and is required for an address in Canada." />
                     <field-to-list field-name="tempErrorMessage" list-name="error_list"/>
                 </if-empty>
             </if-compare>
         </if-compare>
         
-        <if-compare value="Y" field-name="parameters.usePostalAddress_0ForContactMechPurpose_1" operator="not-equals">
+        <if-compare value="Y" field-name="parameters.useShippingPostalAddressForBilling" operator="not-equals">
         <!-- Check the flag if Second Postal address is not same as First So create Another Postal Address -->
-            <if-compare field-name="usePostalAddress_1" operator="equals" value="true">
-                <if-empty field-name="toName_1" map-name="parameters">
-                    <set field="parameters.toName_1" value="${personContext.firstName} ${personContext.middleName} ${personContext.lastName}"  />
+            <if-compare field-name="billToPostalAddress" operator="equals" value="true">
+                <if-empty field-name="billToName" map-name="parameters">
+                    <set field="parameters.billToName" value="${personContext.firstName} ${personContext.middleName} ${personContext.lastName}"  />
                 </if-empty>
-                <call-map-processor in-map-name="parameters" out-map-name="postalAddressContext_1">
+                <call-map-processor in-map-name="parameters" out-map-name="billingAddressContext">
                     <simple-map-processor name="postalAddress">
                         <process field="roleTypeId"><copy/></process>
-                        <process field="toName_1"><copy to-field="toName"/><not-empty><fail-property resource="PartyUiLabels" property="PartyToNameMissing"/></not-empty></process>
-                        <process field="attnName_1"><copy to-field="attnName"/></process>
-                        <process field="address1_1"><copy to-field="address1"/><not-empty><fail-property resource="PartyUiLabels" property="PartyAddressLine1Missing"/></not-empty></process>
-                        <process field="address2_1"><copy to-field="address2"/></process>
-                        <process field="city_1"><copy to-field="city"/><not-empty><fail-property resource="PartyUiLabels" property="PartyCityMissing"/></not-empty></process>
-                        <process field="stateProvinceGeoId_1"><copy to-field="stateProvinceGeoId"/></process>
-                        <process field="postalCode_1"><copy to-field="postalCode"/><not-empty><fail-property resource="PartyUiLabels"  property="PartyPostalCodeMissing"/></not-empty></process>
-                        <process field="countryGeoId_1"><copy to-field="countryGeoId"/><not-empty><fail-property resource="PartyUiLabels" property="PartyCountryMissing"/></not-empty></process>
-                        <process field="postalAddressAllowSol_1"><copy to-field="allowSolicitation"/></process>
+                        <process field="billToName"><copy to-field="toName"/><not-empty><fail-property resource="PartyUiLabels" property="PartyToNameMissing"/></not-empty></process>
+                        <process field="billToAttnName"><copy to-field="attnName"/></process>
+                        <process field="billToAddress1"><copy to-field="address1"/><not-empty><fail-property resource="PartyUiLabels" property="PartyAddressLine1Missing"/></not-empty></process>
+                        <process field="billToAddress2"><copy to-field="address2"/></process>
+                        <process field="billToCity"><copy to-field="city"/><not-empty><fail-property resource="PartyUiLabels" property="PartyCityMissing"/></not-empty></process>
+                        <process field="billToStateProvinceGeoId"><copy to-field="stateProvinceGeoId"/></process>
+                        <process field="billToPostalCode"><copy to-field="postalCode"/><not-empty><fail-property resource="PartyUiLabels"  property="PartyPostalCodeMissing"/></not-empty></process>
+                        <process field="billToCountryGeoId"><copy to-field="countryGeoId"/><not-empty><fail-property resource="PartyUiLabels" property="PartyCountryMissing"/></not-empty></process>
+                        <process field="billToPostalAddressAllowSol"><copy to-field="allowSolicitation"/></process>
                     </simple-map-processor>
                 </call-map-processor>
-                <if-compare value="USA" operator="equals" field-name="countryGeoId_1" map-name="parameters">
-                    <if-empty field-name="stateProvinceGeoId_1" map-name="parameters">
+                <if-compare value="USA" operator="equals" field-name="billToCountryGeoId" map-name="parameters">
+                    <if-empty field-name="billToStateProvinceGeoId" map-name="parameters">
                         <set field="tempErrorMessage" value="State is missing, and is required for an address in the United States." />
                         <field-to-list field-name="tempErrorMessage" list-name="error_list"/>
                     </if-empty>
                 </if-compare>
-                <if-compare value="CAN" operator="equals" field-name="countryGeoId_1" map-name="parameters">
-                    <if-empty field-name="stateProvinceGeoId_1" map-name="parameters">
+                <if-compare value="CAN" operator="equals" field-name="billToCountryGeoId" map-name="parameters">
+                    <if-empty field-name="billToStateProvinceGeoId" map-name="parameters">
                         <set field="tempErrorMessage" value="State is missing, and is required for an address in Canada." />
                         <field-to-list field-name="tempErrorMessage" list-name="error_list"/>
                     </if-empty>
@@ -334,8 +334,8 @@
         <set field="partyDataSource.partyId" from-field="partyId" />
         <set field="userLoginContext.partyId" from-field="partyId" />
         <set field="personContext.partyId" from-field="partyId" />
-        <set field="postalAddressContext_0.partyId" from-field="partyId" />
-        <set field="postalAddressContext_1.partyId" from-field="partyId" />
+        <set field="shippingAddressContext.partyId" from-field="partyId" />
+        <set field="billingAddressContext.partyId" from-field="partyId" />
         <set field="homePhoneContext.partyId" from-field="partyId" />
         <set field="workPhoneContext.partyId" from-field="partyId" />
         <set field="faxPhoneContext.partyId" from-field="partyId" />
@@ -356,40 +356,40 @@
         <create-value value-name="partyDataSource"/>
         
         <!-- add contactMechPurposeTypeId for first Postal Address -->
-        <if-compare field-name="usePostalAddress_0" operator="equals" value="true">
-            <if-empty field-name="parameters.postalAddressContactMechId_0">
-                <set field="postalAddressContext_0.contactMechPurposeTypeId" from-field="parameters.contactMechPurposeTypeId_0" default-value="SHIPPING_LOCATION"/>
-                <call-service service-name="createPartyPostalAddress" in-map-name="postalAddressContext_0">
-                    <result-to-field result-name="contactMechId" field-name="parameters.postalAddressContactMechId_0"/>
+        <if-compare field-name="shipToPostalAddress" operator="equals" value="true">
+            <if-empty field-name="parameters.shippingContactMechId">
+                <set field="shippingAddressContext.contactMechPurposeTypeId" from-field="parameters.shippingContactMechPurposeTypeId" default-value="SHIPPING_LOCATION"/>
+                <call-service service-name="createPartyPostalAddress" in-map-name="shippingAddressContext">
+                    <result-to-field result-name="contactMechId" field-name="parameters.shippingContactMechId"/>
                 </call-service>
-                <if-compare value="Y" field-name="parameters.usePostalAddress_0ForContactMechPurpose_1" operator="equals">
+                <if-compare value="Y" field-name="parameters.useShippingPostalAddressForBilling" operator="equals">
                     <set field="addressPurposeContext.partyId" from-field="partyId"/>
-                    <set field="addressPurposeContext.contactMechPurposeTypeId" from-field="parameters.contactMechPurposeTypeId_1" default-value="BILLING_LOCATION"/>
-                    <set field="addressPurposeContext.contactMechId" from-field="parameters.postalAddressContactMechId_0"/>
+                    <set field="addressPurposeContext.contactMechPurposeTypeId" from-field="parameters.billingContactMechPurposeTypeId" default-value="BILLING_LOCATION"/>
+                    <set field="addressPurposeContext.contactMechId" from-field="parameters.shippingContactMechId"/>
                     <call-service service-name="createPartyContactMechPurpose" in-map-name="addressPurposeContext"/>
                 </if-compare>
             <else>
-                <set field="postalAddressContext_0.contactMechId" from-field="parameters.postalAddressContactMechId_0"/>
+                <set field="shippingAddressContext.contactMechId" from-field="parameters.shippingContactMechId"/>
                 <!-- call the update address service -->
-                <call-service service-name="updatePartyPostalAddress" in-map-name="postalAddressContext_0">
-                    <result-to-field result-name="contactMechId" field-name="parameters.postalAddressContactMechId_0"/>
+                <call-service service-name="updatePartyPostalAddress" in-map-name="shippingAddressContext">
+                    <result-to-field result-name="contactMechId" field-name="parameters.shippingContactMechId"/>
                 </call-service>    
             </else>
             </if-empty>
         </if-compare>
         
-        <if-compare value="Y" field-name="parameters.usePostalAddress_0ForContactMechPurpose_1" operator="not-equals">
-            <if-empty field-name="parameters.postalAddressContactMechId_1">
+        <if-compare value="Y" field-name="parameters.useShippingPostalAddressForBilling" operator="not-equals">
+            <if-empty field-name="parameters.billingContactMechId">
                 <!-- create the Billing location -->
-                <set field="postalAddressContext_1.contactMechPurposeTypeId" from-field="parameters.contactMechPurposeTypeId_1" default-value="BILLING_LOCATION"/>
-                <call-service service-name="createPartyPostalAddress" in-map-name="postalAddressContext_1">
-                    <result-to-field result-name="contactMechId" field-name="parameters.postalAddressContactMechId_1"/>
+                <set field="billingAddressContext.contactMechPurposeTypeId" from-field="parameters.billingContactMechPurposeTypeId" default-value="BILLING_LOCATION"/>
+                <call-service service-name="createPartyPostalAddress" in-map-name="billingAddressContext">
+                    <result-to-field result-name="contactMechId" field-name="parameters.billingContactMechId"/>
                 </call-service>
             <else>
-                <set field="postalAddressContext_1.contactMechId" from-field="parameters.postalAddressContactMechId_1"/>
+                <set field="billingAddressContext.contactMechId" from-field="parameters.billingContactMechId"/>
                 <!-- call the update address service -->
-                <call-service service-name="updatePartyPostalAddress" in-map-name="postalAddressContext_1">
-                    <result-to-field result-name="contactMechId" field-name="parameters.postalAddressContactMechId_1"/>    
+                <call-service service-name="updatePartyPostalAddress" in-map-name="billingAddressContext">
+                    <result-to-field result-name="contactMechId" field-name="parameters.billingContactMechId"/>    
                 </call-service>    
             </else>
             </if-empty>
@@ -492,8 +492,8 @@
         <set field="require_email" value="true" />
         <set field="require_phone" value="true" />
         <set field="require_login" value="false" />
-        <set field="usePostalAddress_0" value="true"/>
-        <set field="usePostalAddress_1" value="true"/>
+        <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" />
 
@@ -550,16 +550,16 @@
         <if-not-empty field-name="cart">
             <call-object-method obj-field-name="cart" method-name="addContactMech">
                 <string value="SHIPPING_LOCATION"/>
-                <field field-name="parameters.postalAddressContactMechId_0"/>
+                <field field-name="parameters.shippingContactMechId"/>
             </call-object-method>
             <call-object-method obj-field-name="cart" method-name="setShippingContactMechId">
-                <field field-name="parameters.postalAddressContactMechId_0"/>
+                <field field-name="parameters.shippingContactMechId"/>
             </call-object-method>
         </if-not-empty>
         
         
-        <if-compare value="Y" field-name="parameters.usePostalAddress_0ForContactMechPurpose_1" operator="not-equals">
-           <field-to-session field-name="parameters.postalAddressContactMechId_1" session-name="billingContactMechId"></field-to-session>        
+        <if-compare value="Y" field-name="parameters.useShippingPostalAddressForBilling" operator="not-equals">
+           <field-to-session field-name="parameters.billingContactMechId" session-name="billingContactMechId"></field-to-session>        
         <else>
         <if-not-empty field-name="cart">
             <call-object-method obj-field-name="cart" method-name="getShippingContactMechId" ret-field-name="shippingContactMechId"/>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/quickAnonCustSettings.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/quickAnonCustSettings.bsh?rev=612435&r1=612434&r2=612435&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/quickAnonCustSettings.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/quickAnonCustSettings.bsh Wed Jan 16 04:41:04 2008
@@ -107,38 +107,37 @@
        UtilMisc.toMap("partyId", cartPartyId, "contactMechId", shippingContactMechId)), true));
     parameters.put("shippingContactMechId", shippingPartyContactDetail.get("contactMechId"));
     context.put("callSubmitForm",true);
-    parameters.put("toName_0", shippingPartyContactDetail.get("toName"));
-    parameters.put("attnName_0", shippingPartyContactDetail.get("attnName"));
-    parameters.put("address1_0", shippingPartyContactDetail.get("address1"));
-    parameters.put("address2_0", shippingPartyContactDetail.get("address2"));
-    parameters.put("city_0", shippingPartyContactDetail.get("city"));
-    parameters.put("postalCode_0", shippingPartyContactDetail.get("postalCode"));
-    parameters.put("stateProvinceGeoId_0", shippingPartyContactDetail.get("stateProvinceGeoId"));
-    parameters.put("countryGeoId_0", shippingPartyContactDetail.get("countryGeoId"));
+    parameters.put("shipToName", shippingPartyContactDetail.get("toName"));
+    parameters.put("shipToAttnName", shippingPartyContactDetail.get("attnName"));
+    parameters.put("shipToAddress1", shippingPartyContactDetail.get("address1"));
+    parameters.put("shipToAddress2", shippingPartyContactDetail.get("address2"));
+    parameters.put("shipToCity", shippingPartyContactDetail.get("city"));
+    parameters.put("shipToPostalCode", shippingPartyContactDetail.get("postalCode"));
+    parameters.put("shipToStateProvinceGeoId", shippingPartyContactDetail.get("stateProvinceGeoId"));  
+    parameters.put("shipToCountryGeoId", shippingPartyContactDetail.get("countryGeoId"));
 } else {
     context.put("postalFields", UtilHttp.getParameterMap(request));
 }
 
-
 billingContactMechId = session.getAttribute("billingContactMechId");
 if(billingContactMechId != null){
     billPostalAddress = delegator.findByPrimaryKey("PostalAddress",UtilMisc.toMap("contactMechId",billingContactMechId));
     parameters.put("billingContactMechId", billPostalAddress.get("contactMechId"));
-    parameters.put("toName_1", billPostalAddress.get("toName"));
-    parameters.put("attnName_1", billPostalAddress.get("attnName"));
-    parameters.put("address1_1", billPostalAddress.get("address1"));
-    parameters.put("address2_1", billPostalAddress.get("address2"));
-    parameters.put("city_1", billPostalAddress.get("city"));
-    parameters.put("postalCode_1", billPostalAddress.get("postalCode"));
-    parameters.put("stateProvinceGeoId_1", billPostalAddress.get("stateProvinceGeoId"));
-    parameters.put("countryGeoId_1", billPostalAddress.get("countryGeoId"));
+    parameters.put("billToName", billPostalAddress.get("toName"));  
+    parameters.put("billToAttnName", billPostalAddress.get("attnName"));
+    parameters.put("billToAddress1", billPostalAddress.get("address1"));
+    parameters.put("billToAddress2", billPostalAddress.get("address2"));
+    parameters.put("billToCity", billPostalAddress.get("city"));  
+    parameters.put("billToPostalCode", billPostalAddress.get("postalCode"));  
+    parameters.put("billToStateProvinceGeoId", billPostalAddress.get("stateProvinceGeoId"));  
+    parameters.put("billToCountryGeoId", billPostalAddress.get("countryGeoId"));    
 }
 
 if(cart != null && cart.getShippingContactMechId() != null && shippingPartyContactDetail != null){
     shippingContactMechId = shippingPartyContactDetail.get("contactMechId");
     if(billingContactMechId != null && billingContactMechId.equals(shippingContactMechId)){
-        context.put("usePostalAddress_0ForContactMechPurpose_1","Y");
+        context.put("useShippingPostalAddressForBilling","Y");
     }
 }
-parameters.put("contactMechPurposeTypeId_0", "SHIPPING_LOCATION");
-parameters.put("contactMechPurposeTypeId_1", "BILLING_LOCATION");
+parameters.put("shippingContactMechPurposeTypeId", "SHIPPING_LOCATION");
+parameters.put("billingContactMechPurposeTypeId", "BILLING_LOCATION");
\ No newline at end of file

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl?rev=612435&r1=612434&r2=612435&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl Wed Jan 16 04:41:04 2008
@@ -18,34 +18,34 @@
 -->
 <script language="JavaScript" type="text/javascript">
 function shipBillAddr() {
-    if (document.${parameters.formNameValue}.usePostalAddress_0ForContactMechPurpose_1.checked) {
-       document.${parameters.formNameValue}.toName_1.value = document.${parameters.formNameValue}.toName_0.value ;
-       document.${parameters.formNameValue}.attnName_1.value = document.${parameters.formNameValue}.attnName_0.value ;
-       document.${parameters.formNameValue}.address1_1.value = document.${parameters.formNameValue}.address1_0.value ;
-       document.${parameters.formNameValue}.address2_1.value = document.${parameters.formNameValue}.address2_0.value ;
-       document.${parameters.formNameValue}.city_1.value = document.${parameters.formNameValue}.city_0.value ;
-       document.${parameters.formNameValue}.stateProvinceGeoId_1.value = document.${parameters.formNameValue}.stateProvinceGeoId_0.value ;
-       document.${parameters.formNameValue}.postalCode_1.value = document.${parameters.formNameValue}.postalCode_0.value ;
-       document.${parameters.formNameValue}.countryGeoId_1.value = document.${parameters.formNameValue}.countryGeoId_0.value ;
+    if (document.${parameters.formNameValue}.useShippingPostalAddressForBilling.checked) {
+       document.${parameters.formNameValue}.billToName.value = document.${parameters.formNameValue}.shipToName.value;
+       document.${parameters.formNameValue}.billToAttnName.value = document.${parameters.formNameValue}.shipToAttnName.value;
+       document.${parameters.formNameValue}.billToAddress1.value = document.${parameters.formNameValue}.shipToAddress1.value;
+       document.${parameters.formNameValue}.billToAddress2.value = document.${parameters.formNameValue}.shipToAddress2.value;
+       document.${parameters.formNameValue}.billToCity.value = document.${parameters.formNameValue}.shipToCity.value;
+       document.${parameters.formNameValue}.billToStateProvinceGeoId.value = document.${parameters.formNameValue}.shipToStateProvinceGeoId.value;
+       document.${parameters.formNameValue}.billToPostalCode.value = document.${parameters.formNameValue}.shipToPostalCode.value;
+       document.${parameters.formNameValue}.billToCountryGeoId.value = document.${parameters.formNameValue}.shipToCountryGeoId.value;
       
-       document.${parameters.formNameValue}.toName_1.disabled = true;
-       document.${parameters.formNameValue}.attnName_1.disabled = true;
-       document.${parameters.formNameValue}.address1_1.disabled = true;
-       document.${parameters.formNameValue}.address2_1.disabled = true;
-       document.${parameters.formNameValue}.city_1.disabled = true;
-       document.${parameters.formNameValue}.stateProvinceGeoId_1.disabled = true;                                  
-       document.${parameters.formNameValue}.postalCode_1.disabled = true;
-       document.${parameters.formNameValue}.countryGeoId_1.disabled = true;                                  
+       document.${parameters.formNameValue}.billToName.disabled = true;
+       document.${parameters.formNameValue}.billToAttnName.disabled = true;
+       document.${parameters.formNameValue}.billToAddress1.disabled = true;
+       document.${parameters.formNameValue}.billToAddress2.disabled = true;
+       document.${parameters.formNameValue}.billToCity.disabled = true;
+       document.${parameters.formNameValue}.billToStateProvinceGeoId.disabled = true;                                  
+       document.${parameters.formNameValue}.billToPostalCode.disabled = true;
+       document.${parameters.formNameValue}.billToCountryGeoId.disabled = true;                                  
     } else {
-       document.${parameters.formNameValue}.toName_1.disabled = false;
-       document.${parameters.formNameValue}.attnName_1.disabled = false;
-       document.${parameters.formNameValue}.address1_1.disabled = false;
-       document.${parameters.formNameValue}.address2_1.disabled = false;
-       document.${parameters.formNameValue}.city_1.disabled = false;
-       document.${parameters.formNameValue}.stateProvinceGeoId_1.disabled = false;                                  
-       document.${parameters.formNameValue}.postalCode_1.disabled = false;
-       document.${parameters.formNameValue}.countryGeoId_1.disabled = false;                                  
-       document.${parameters.formNameValue}.postalAddressContactMechId_1.value = "";  
+       document.${parameters.formNameValue}.billToName.disabled = false;
+       document.${parameters.formNameValue}.billToAttnName.disabled = false;
+       document.${parameters.formNameValue}.billToAddress1.disabled = false;
+       document.${parameters.formNameValue}.billToAddress2.disabled = false;
+       document.${parameters.formNameValue}.billToCity.disabled = false;
+       document.${parameters.formNameValue}.billToStateProvinceGeoId.disabled = false;                                  
+       document.${parameters.formNameValue}.billToPostalCode.disabled = false;
+       document.${parameters.formNameValue}.billToCountryGeoId.disabled = false;                                  
+       document.${parameters.formNameValue}.billingContactMechId.value = "";  
     }
 }
 </script>
@@ -78,10 +78,10 @@
   <div class="screenlet-body">
   <form name="${parameters.formNameValue}" method="post" action="<@ofbizUrl>quickAnonProcessCustomerSettings</@ofbizUrl>">
   <input type="hidden" name="partyId" value="${parameters.partyId?if_exists}"/>
-  <input type="hidden" name="postalAddressContactMechId_0" value="${parameters.shippingContactMechId?if_exists}"/>
-  <input type="hidden" name="postalAddressContactMechId_1" value="${parameters.billingContactMechId?if_exists}"/>
-  <input type="hidden" name="contactMechPurposeTypeId_0" value="${parameters.contactMechPurposeTypeId_0?if_exists}"/>
-  <input type="hidden" name="contactMechPurposeTypeId_1" value="${parameters.contactMechPurposeTypeId_1?if_exists}"/>
+  <input type="hidden" name="shippingContactMechId" value="${parameters.shippingContactMechId?if_exists}"/>
+  <input type="hidden" name="billingContactMechId" value="${parameters.billingContactMechId?if_exists}"/>
+  <input type="hidden" name="shippingContactMechPurposeTypeId" value="${parameters.shippingContactMechPurposeTypeId?if_exists}"/>
+  <input type="hidden" name="billingContactMechPurposeTypeId" value="${parameters.billingContactMechPurposeTypeId?if_exists}"/>
   
   <table width="100%" border="0" cellpadding="1" cellspacing="0">
      <tr>
@@ -180,50 +180,50 @@
                 <td width="26%" align="right"><div class="tabletext">${uiLabelMap.PartyToName}</div></td>
                 <td width="2%">&nbsp;</td>
                 <td width="72%">
-                  <@fieldErrors fieldName="toName_0"/>
-                  <input type="text" class="inputBox" name="toName_0" value="${parameters.toName_0?if_exists}" size="30" maxlength="30"/>
+                  <@fieldErrors fieldName="shipToName"/>
+                  <input type="text" class="inputBox" name="shipToName" value="${parameters.shipToName?if_exists}" size="30" maxlength="30"/>
                 </td>
               </tr>
               <tr>
                 <td width="26%" align="right"><div class="tabletext">${uiLabelMap.PartyAttentionName}</div></td>
                 <td width="2%">&nbsp;</td>
                 <td width="72%">
-                  <@fieldErrors fieldName="attnName_0"/>
-                  <input type="text" class="inputBox" name="attnName_0" value="${parameters.attnName_0?if_exists}" size="30" maxlength="30"/>
+                  <@fieldErrors fieldName="shipToAttnName"/>
+                  <input type="text" class="inputBox" name="shipToAttnName" value="${parameters.shipToAttnName?if_exists}" size="30" maxlength="30"/>
                 </td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyAddressLine1}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="address1_0"/>
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="address1_0" value="${parameters.address1_0?if_exists}">
+                    <@fieldErrors fieldName="shipToAddress1"/>
+                    <input type="text" class="inputBox" size="30" maxlength="30" name="shipToAddress1" value="${parameters.shipToAddress1?if_exists}">
                  *</td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyAddressLine2}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="address2_0" value="${parameters.address2_0?if_exists}">
+                    <input type="text" class="inputBox" size="30" maxlength="30" name="shipToAddress2" value="${parameters.shipToAddress2?if_exists}">
                  </td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyCity}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="city_0"/>
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="city_0" value="${parameters.city_0?if_exists}">
+                    <@fieldErrors fieldName="shipToCity"/>
+                    <input type="text" class="inputBox" size="30" maxlength="30" name="shipToCity" value="${parameters.shipToCity?if_exists}">
                  *</td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyState}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="stateProvinceGeoId_0"/>
-                    <select name="stateProvinceGeoId_0" class="selectBox">
-                    <#if (parameters.stateProvinceGeoId_0)?exists>
-                       <option>${parameters.stateProvinceGeoId_0}</option>
-                       <option value="${parameters.stateProvinceGeoId_0}">---</option>
+                    <@fieldErrors fieldName="shipToStateProvinceGeoId"/>
+                    <select name="shipToStateProvinceGeoId" class="selectBox">
+                    <#if (parameters.shipToStateProvinceGeoId)?exists>
+                       <option>${parameters.shipToStateProvinceGeoId}</option>
+                       <option value="${parameters.shipToStateProvinceGeoId}">---</option>
                     <#else>
                        <option value="">${uiLabelMap.PartyNoState}</option>
                     </#if>
@@ -235,19 +235,19 @@
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyZipCode}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="postalCode_0"/>
-                    <input type="text" class="inputBox" size="12" maxlength="10" name="postalCode_0" value="${parameters.postalCode_0?if_exists}">
+                    <@fieldErrors fieldName="shipToPostalCode"/>
+                    <input type="text" class="inputBox" size="12" maxlength="10" name="shipToPostalCode" value="${parameters.shipToPostalCode?if_exists}">
                  *</td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyCountry}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="countryGeoId_0"/>
-                    <select name="countryGeoId_0" class="selectBox">
-                    <#if (parameters.countryGeoId_0)?exists>
-                       <option>${parameters.countryGeoId_0}</option>
-                       <option value="${parameters.countryGeoId_0}">---</option>
+                    <@fieldErrors fieldName="shipToCountryGeoId"/>
+                    <select name="shipToCountryGeoId" class="selectBox">
+                    <#if (parameters.shipToCountryGeoId)?exists>
+                       <option>${parameters.shipToCountryGeoId}</option>
+                       <option value="${parameters.shipToCountryGeoId}">---</option>
                     </#if>
                        ${screens.render("component://common/widget/CommonScreens.xml#countries")}
                     </select>
@@ -261,7 +261,7 @@
               <tr>
                 <td align="center" valign="top" colspan="3">
                   <div class="tabletext">
-                    <input type="checkbox" name="usePostalAddress_0ForContactMechPurpose_1" value="Y" <#if usePostalAddress_0ForContactMechPurpose_1?exists>checked</#if>  onClick="javascript:shipBillAddr()"/>
+                    <input type="checkbox" name="useShippingPostalAddressForBilling" value="Y" <#if useShippingPostalAddressForBilling?exists>checked</#if>  onClick="javascript:shipBillAddr()"/>
                     ${uiLabelMap.FacilityBillingAddressSameShipping}
                   </div>
                 </td>
@@ -275,50 +275,50 @@
                 <td width="26%" align="right"><div class="tabletext">${uiLabelMap.PartyToName}</div></td>
                 <td width="2%">&nbsp;</td>
                 <td width="72%">
-                  <@fieldErrors fieldName="toName_1"/>
-                  <input type="text" class="inputBox" name="toName_1" value="${parameters.toName_1?if_exists}" size="30" maxlength="30"/>
+                  <@fieldErrors fieldName="billToName"/>
+                  <input type="text" class="inputBox" name="billToName" value="${parameters.billToName?if_exists}" size="30" maxlength="30"/>
                 </td>
               </tr>
               <tr>
                 <td width="26%" align="right"><div class="tabletext">${uiLabelMap.PartyAttentionName}</div></td>
                 <td width="2%">&nbsp;</td>
                 <td width="72%">
-                  <@fieldErrors fieldName="attnName_1"/>
-                  <input type="text" class="inputBox" name="attnName_1" value="${parameters.attnName_1?if_exists}" size="30" maxlength="30"/>
+                  <@fieldErrors fieldName="billToAttnName"/>
+                  <input type="text" class="inputBox" name="billToAttnName" value="${parameters.billToAttnName?if_exists}" size="30" maxlength="30"/>
                 </td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyAddressLine1}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="address1_1"/>
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="address1_1" value="${parameters.address1_1?if_exists}">
+                    <@fieldErrors fieldName="billToAddress1"/>
+                    <input type="text" class="inputBox" size="30" maxlength="30" name="billToAddress1" value="${parameters.billToAddress1?if_exists}">
                  *</td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyAddressLine2}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="address2_1" value="${parameters.address2_1?if_exists}">
+                    <input type="text" class="inputBox" size="30" maxlength="30" name="billToAddress2" value="${parameters.billToAddress2?if_exists}">
                  </td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyCity}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="city_1"/>
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="city_1" value="${parameters.city_1?if_exists}">
+                    <@fieldErrors fieldName="billToCity"/>
+                    <input type="text" class="inputBox" size="30" maxlength="30" name="billToCity" value="${parameters.billToCity?if_exists}">
                  *</td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyState}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="stateProvinceGeoId_1"/>
-                    <select name="stateProvinceGeoId_1" class="selectBox">
-                    <#if (parameters.stateProvinceGeoId_1)?exists>
-                       <option>${parameters.stateProvinceGeoId_1}</option>
-                       <option value="${parameters.stateProvinceGeoId_1}">---</option>
+                    <@fieldErrors fieldName="billToStateProvinceGeoId"/>
+                    <select name="billToStateProvinceGeoId" class="selectBox">
+                    <#if (parameters.billToStateProvinceGeoId)?exists>
+                       <option>${parameters.billToStateProvinceGeoId}</option>
+                       <option value="${parameters.billToStateProvinceGeoId}">---</option>
                     <#else>
                        <option value="">${uiLabelMap.PartyNoState}</option>
                     </#if>
@@ -330,19 +330,19 @@
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyZipCode}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="postalCode_1"/>
-                    <input type="text" class="inputBox" size="12" maxlength="10" name="postalCode_1" value="${parameters.postalCode_1?if_exists}">
+                    <@fieldErrors fieldName="billToPostalCode"/>
+                    <input type="text" class="inputBox" size="12" maxlength="10" name="billToPostalCode" value="${parameters.billToPostalCode?if_exists}">
                  *</td>
               </tr>
               <tr>
                  <td width="26%" align="right" valign=middle><div class="tabletext">${uiLabelMap.PartyCountry}</div></td>
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
-                    <@fieldErrors fieldName="countryGeoId_1"/>
-                    <select name="countryGeoId_1" class="selectBox">
-                    <#if (parameters.countryGeoId_1)?exists>
-                       <option>${parameters.countryGeoId_1}</option>
-                       <option value="${parameters.countryGeoId_1}">---</option>
+                    <@fieldErrors fieldName="billToCountryGeoId"/>
+                    <select name="billToCountryGeoId" class="selectBox">
+                    <#if (parameters.billToCountryGeoId)?exists>
+                       <option>${parameters.billToCountryGeoId}</option>
+                       <option value="${parameters.billToCountryGeoId}">---</option>
                     </#if>
                        ${screens.render("component://common/widget/CommonScreens.xml#countries")}
                     </select>