Author: mor
Date: Wed Jul 30 05:40:16 2008
New Revision: 681000

URL: http://svn.apache.org/viewvc?rev=681000&view=rev
Log:
Changed the name of contactMechId used for shipping on One Page Checkout from 
shippingContactMechId to shipToContactMechId. This name is more consistent with 
the current naming conventions used for shipping and billing form. Patch from 
Rishi Solanki

Modified:
    
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml
    
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
    
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js
    
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl

Modified: 
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml?rev=681000&r1=680999&r2=681000&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml
 (original)
+++ 
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml
 Wed Jul 30 05:40:16 2008
@@ -79,7 +79,7 @@
     </simple-map-processor>
 
     <simple-map-processor name="shipToAddress">
-        <process field="shippingContactMechId">
+        <process field="shipToContactMechId">
             <copy to-field="contactMechId" set-if-null="false"/>
         </process>
         <process field="shipToName">

Modified: 
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=681000&r1=680999&r2=681000&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
 (original)
+++ 
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
 Wed Jul 30 05:40:16 2008
@@ -865,11 +865,11 @@
             <if-empty field="userLogin">
                 <call-object-method obj-field-name="shoppingCart" 
method-name="getUserLogin" ret-field-name="userLogin"/>
             </if-empty>
-            <call-object-method obj-field-name="shoppingCart" 
method-name="getShippingContactMechId" ret-field-name="shippingContactMechId"/>
+            <call-object-method obj-field-name="shoppingCart" 
method-name="getShippingContactMechId" ret-field-name="shipToContactMechId"/>
         </if-not-empty>
 
-        <if-empty field="shippingContactMechId">
-           <set field="shippingContactMechId" 
from-field="parameters.shippingContactMechId"/>
+        <if-empty field="shipToContactMechId">
+           <set field="shipToContactMechId" 
from-field="parameters.shipToContactMechId"/>
         </if-empty>
         <set field="parameters.shipToName"  value="${parameters.firstName} 
${parameters.lastName}"/>
 
@@ -928,22 +928,22 @@
         <set field="shipToAddressContext.roleTypeId" 
from-field="parameters.roleTypeId"/>
         <set field="shipToAddressContext.userLogin" from-field="userLogin"/>
         
-        <if-empty field="shippingContactMechId">
+        <if-empty field="shipToContactMechId">
             <set field="shipToAddressContext.contactMechPurposeTypeId" 
value="SHIPPING_LOCATION"/>
             <call-service service-name="createPartyPostalAddress" 
in-map-name="shipToAddressContext">
                 <result-to-field result-name="contactMechId" 
map-name="shipToAddressPurposeContext"/>
-                <result-to-field result-name="contactMechId" 
field-name="parameters.shippingContactMechId"/>
+                <result-to-field result-name="contactMechId" 
field-name="parameters.shipToContactMechId"/>
             </call-service>
-            <log level="info" message="Shipping Postal Address created 
shippingContactMechId is ${parameters.shippingContactMechId}"></log>
+            <log level="info" message="Shipping Postal Address created 
shipToContactMechId is ${parameters.shipToContactMechId}"></log>
         <else>
-            <set field="shipToAddressContext.contactMechId" 
from-field="shippingContactMechId"/>
+            <set field="shipToAddressContext.contactMechId" 
from-field="shipToContactMechId"/>
             <call-service service-name="updatePartyPostalAddress" 
in-map-name="shipToAddressContext">
-                <result-to-field result-name="contactMechId" 
field-name="parameters.shippingContactMechId"/>
+                <result-to-field result-name="contactMechId" 
field-name="parameters.shipToContactMechId"/>
             </call-service>
-            <log level="info" message="Shipping Postal Address Updated 
shippingContactMechId is ${parameters.shippingContactMechId}"></log>
+            <log level="info" message="Shipping Postal Address Updated 
shipToContactMechId is ${parameters.shipToContactMechId}"></log>
         </else>
         </if-empty>
-        <field-to-request field-name="parameters.shippingContactMechId" 
request-name="shippingContactMechId"/>
+        <field-to-request field-name="parameters.shipToContactMechId" 
request-name="shipToContactMechId"/>
 
         <!-- Create or Update phone -->
         <set field="phoneContext.partyId" from-field="partyId"/>
@@ -993,12 +993,12 @@
         </call-object-method>
         <call-object-method obj-field-name="shoppingCart" 
method-name="addContactMech">
             <string value="SHIPPING_LOCATION"/>
-            <field field-name="parameters.shippingContactMechId"/>
+            <field field-name="parameters.shipToContactMechId"/>
         </call-object-method>
         <call-object-method obj-field-name="shoppingCart" 
method-name="setShippingContactMechId">
-            <field field-name="parameters.shippingContactMechId"/>
+            <field field-name="parameters.shipToContactMechId"/>
         </call-object-method>
-        <log level="info" message="updated shopping cart shippingContactMechId 
${parameters.shippingContactMechId}"/>
+        <log level="info" message="updated shopping cart shipToContactMechId 
${parameters.shipToContactMechId}"/>
         <call-object-method obj-field-name="shoppingCart" 
method-name="setOrderPartyId">
             <field field-name="partyId"/>
         </call-object-method>
@@ -1127,10 +1127,10 @@
         <if-not-empty field="shoppingCart">
             <call-object-method obj-field-name="shoppingCart" 
method-name="getPartyId" ret-field-name="partyId"/>
             <call-object-method obj-field-name="shoppingCart" 
method-name="getUserLogin" ret-field-name="userLogin"/>
-            <call-object-method obj-field-name="shoppingCart" 
method-name="getShippingContactMechId" ret-field-name="shippingContactMechId"/>
+            <call-object-method obj-field-name="shoppingCart" 
method-name="getShippingContactMechId" ret-field-name="shipToContactMechId"/>
         </if-not-empty>
-        <if-empty field="parameters.shippingContactMechId">
-            <set field="parameters.shippingContactMechId" 
from-field="shippingContactMechId"/>
+        <if-empty field="parameters.shipToContactMechId">
+            <set field="parameters.shipToContactMechId" 
from-field="shipToContactMechId"/>
         </if-empty>
         <set-current-user-login value-name="userLogin"/>
 
@@ -1208,7 +1208,7 @@
                 <field-map field-name="contactMechPurposeTypeId" 
value="BILLING_LOCATION"/>
             </entity-and>
             <first-from-list list-name="pcmpList" entry-name="pcmp"/>
-            <if-compare-field field="parameters.shippingContactMechId" 
operator="not-equals" to-field="pcmp.contactMechId">
+            <if-compare-field field="parameters.shipToContactMechId" 
operator="not-equals" to-field="pcmp.contactMechId">
                 <if-not-empty field="pcmp">
                     <set-service-fields 
service-name="deletePartyContactMechPurposeIfExists" map-name="pcmp" 
to-map-name="deletePartyContactMechPurposeCtx"/>
                     <call-service 
service-name="deletePartyContactMechPurposeIfExists" 
in-map-name="deletePartyContactMechPurposeCtx"/>
@@ -1216,13 +1216,13 @@
                     <call-service service-name="deletePartyContactMech" 
in-map-name="serviceInMap"/>
                 </if-not-empty>
                 <set field="createPartyContactMechPurposeCtx.partyId" 
from-field="userLogin.partyId"/>
-                <set field="createPartyContactMechPurposeCtx.contactMechId" 
from-field="parameters.shippingContactMechId"/>
+                <set field="createPartyContactMechPurposeCtx.contactMechId" 
from-field="parameters.shipToContactMechId"/>
                 <set 
field="createPartyContactMechPurposeCtx.contactMechPurposeTypeId" 
value="BILLING_LOCATION"/>
                 <call-service service-name="createPartyContactMechPurpose" 
in-map-name="createPartyContactMechPurposeCtx"/>
             </if-compare-field>
-            <field-to-request field-name="parameters.shippingContactMechId" 
request-name="billToContactMechId"/>
+            <field-to-request field-name="parameters.shipToContactMechId" 
request-name="billToContactMechId"/>
 
-            <set field="creditCardContext.contactMechId" 
from-field="parameters.shippingContactMechId"/>
+            <set field="creditCardContext.contactMechId" 
from-field="parameters.shipToContactMechId"/>
             <if-empty field="parameters.paymentMethodId">
                 <!-- Create Credit Card -->
                 <call-service service-name="createCreditCard" 
in-map-name="creditCardContext">

Modified: 
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=681000&r1=680999&r2=681000&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js 
(original)
+++ 
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js 
Wed Jul 30 05:40:16 2008
@@ -251,7 +251,7 @@
                 isShipStepValidate = true;
                 // Process Shipping data response.
                 $('shippingPartyId').value = data.partyId;
-                $('shippingContactMechId').value = data.shippingContactMechId;
+                $('shipToContactMechId').value = data.shipToContactMechId;
                 $('phoneContactMechId').value = data.phoneContactMechId;
                 $('emailContactMechId').value = data.emailContactMechId;
                 $('completedShippingMethod').update(data.shippingDescription);
@@ -298,8 +298,8 @@
     $('completedShipToAddress2').update($('shipToAddress2').value);
     var shipToGeo = 
$('shipToCity').value+","+$('shipToStateProvinceGeoId').value +" 
"+$('shipToCountryGeoId').value+" "+$('shipToPostalCode').value;
     $('completedShipToGeo').update(shipToGeo);
-    // set shippingContactMechId in Billing form.
-    $('shippingContactMechIdInBillingForm').value = 
$F('shippingContactMechId');
+    // set shipToContactMechId in Billing form.
+    $('shipToContactMechIdInBillingForm').value = $F('shipToContactMechId');
 }
 
 // Shipping option

Modified: 
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=681000&r1=680999&r2=681000&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
 (original)
+++ 
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
 Wed Jul 30 05:40:16 2008
@@ -281,7 +281,7 @@
             </div>
             <div id="editShippingPanel" class="screenlet-body" style="display: 
none;">
               <form name="shippingForm" id="shippingForm" 
action="<@ofbizUrl>createUpdateShippingAddress</@ofbizUrl>" method="post">
-                <input type="hidden" id="shippingContactMechId" 
name="shippingContactMechId" 
value="${parameters.shippingContactMechId?if_exists}"/>
+                <input type="hidden" id="shipToContactMechId" 
name="shipToContactMechId" value="${parameters.shipToContactMechId?if_exists}"/>
                 <input type="hidden" name="contactMechPurposeTypeId" 
value="SHIPPING_LOCATION"/>
                 <input type="hidden" id="shippingPartyId" name="partyId" 
value="${parameters.partyId?if_exists}"/>
                 <input type="hidden" name="userLogin" 
value="${parameters.userLogin?if_exists}"/>
@@ -480,7 +480,7 @@
             <div id="editBillingPanel" class="screenlet-body" style="display: 
none;">
               <form name="billingForm" id="billingForm" class="theform" 
action="<@ofbizUrl></@ofbizUrl>" method="post">
                 <input type="hidden" id ="billToContactMechId" 
name="billToContactMechId" value="${parameters.billToContactMechId?if_exists}"/>
-                <input type="hidden" id="shippingContactMechIdInBillingForm" 
name="shippingContactMechId" 
value="${parameters.shippingContactMechId?if_exists}"/>
+                <input type="hidden" id="shipToContactMechIdInBillingForm" 
name="shipToContactMechId" value="${parameters.shipToContactMechId?if_exists}"/>
                 <input type="hidden" id="paymentMethodId" 
name="paymentMethodId" value="${parameters.paymentMethodId?if_exists}"/>
                 <input type="hidden" id="paymentMethodTypeId" 
name="paymentMethodTypeId" value="CREDIT_CARD"/>
                 <input type="hidden" id="billingPartyId" name="partyId" 
value="${parameters.partyId?if_exists}"/>


Reply via email to