You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/11/17 10:50:21 UTC

svn commit: r1203129 - in /ofbiz/trunk: applications/order/script/org/ofbiz/order/order/CheckoutServices.xml specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl

Author: sascharodekamp
Date: Thu Nov 17 09:50:21 2011
New Revision: 1203129

URL: http://svn.apache.org/viewvc?rev=1203129&view=rev
Log:
OnePageCheckout creates new billing/shipping phone number even if user selects the default values (https://issues.apache.org/jira/browse/OFBIZ-4446, https://issues.apache.org/jira/browse/OFBIZ-4447) A patch from Kiran Gawd.

Modified:
    ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl

Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml?rev=1203129&r1=1203128&r2=1203129&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml Thu Nov 17 09:50:21 2011
@@ -67,6 +67,7 @@ under the License.
         <set field="createUpdatePartyTelecomNumberCtx.partyId" from-field="partyId"/>
         <set field="createUpdatePartyTelecomNumberCtx.roleTypeId" value="CUSTOMER"/>
         <set field="createUpdatePartyTelecomNumberCtx.contactMechPurposeTypeId" value="PHONE_SHIPPING"/>
+        <set field="createUpdatePartyTelecomNumberCtx.contactMechId" from-field="parameters.shipToPhoneContactMechId" />
         <call-service service-name="createUpdatePartyTelecomNumber" in-map-name="createUpdatePartyTelecomNumberCtx">
             <result-to-field result-name="contactMechId" field="shipToPhoneContactMechId"/>
             <result-to-result result-name="contactMechId" service-result-name="shipToPhoneContactMechId"/>
@@ -160,6 +161,7 @@ under the License.
         <set field="createUpdatePartyTelecomNumberCtx.partyId" from-field="partyId"/>
         <set field="createUpdatePartyTelecomNumberCtx.roleTypeId" value="CUSTOMER"/>
         <set field="createUpdatePartyTelecomNumberCtx.contactMechPurposeTypeId" value="PHONE_BILLING"/>
+        <set field="createUpdatePartyTelecomNumberCtx.contactMechId" from-field="parameters.billToPhoneContactMechId" />
         <call-service service-name="createUpdatePartyTelecomNumber" in-map-name="createUpdatePartyTelecomNumberCtx">
             <result-to-field result-name="contactMechId" field="billToPhoneContactMechId"/>
             <result-to-result result-name="contactMechId" service-result-name="billToPhoneContactMechId"/>

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=1203129&r1=1203128&r2=1203129&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js Thu Nov 17 09:50:21 2011
@@ -263,7 +263,7 @@ function createUpdateCustomerAndShipping
                     jQuery('#shipToPartyId').val(json.partyId);
                     jQuery('#billToPartyId').val(json.partyId);
                     jQuery('#shipToContactMechId').val(json.contactMechId);
-                    jQuery('#shipToPhoneContactMechId').val(json.phoneContactMechId);
+                    jQuery('#shipToPhoneContactMechId').val(json.shipToPhoneContactMechId);
                     jQuery('#emailContactMechId').val(json.emailContactMechId);
                     //jQuery('#completedShippingMethod').html(json.shippingDescription);
                     updateShippingSummary();
@@ -394,7 +394,7 @@ function processBillingAndPayment() {
                     isBillStepValidate = true;
                     jQuery('#billToContactMechId').val(json.contactMechId);
                     jQuery('#paymentMethodId').val(json.paymentMethodId);
-                    jQuery('#billToPhoneContactMechId').val(json.phoneContactMechId);
+                    jQuery('#billToPhoneContactMechId').val(json.billToPhoneContactMechId);
                     updateBillingSummary();
                     result = true;
                 } else {

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=1203129&r1=1203128&r2=1203129&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Thu Nov 17 09:50:21 2011
@@ -62,8 +62,10 @@ under the License.
                   <input type="hidden" id="shipToContactMechId" name="shipToContactMechId" value="${shipToContactMechId?if_exists}" />
                   <input type="hidden" id="billToContactMechIdInShipingForm" name="billToContactMechId" value="${billToContactMechId?if_exists}" />
                   <input type="hidden" id="shipToPartyId" name="partyId" value="${partyId?if_exists}" />
-                  <input type="hidden" id="shipToPhoneContactMechId" name="phoneContactMechId" value="${(shipToTelecomNumber.contactMechId)?if_exists}" />
+                  <input type="hidden" id="shipToPhoneContactMechId" name="shipToPhoneContactMechId" value="${(shipToTelecomNumber.contactMechId)?if_exists}" />
                   <input type="hidden" id="emailContactMechId" name="emailContactMechId" value="${emailContactMechId?if_exists}" />
+                  <input type="hidden" name="shipToName" value="${shipToName?if_exists}" />
+                  <input type="hidden" name="shipToAttnName" value="${shipToAttnName?if_exists}" />
                   <#if userLogin?exists>
                     <input type="hidden" name="keepAddressBook" value="Y" />
                     <input type="hidden" name="setDefaultShipping" value="Y" />
@@ -287,7 +289,9 @@ under the License.
                   <input type="hidden" id="paymentMethodTypeId" name="paymentMethodTypeId" value="${paymentMethodTypeId?default("CREDIT_CARD")}" />
                   <input type="hidden" id="billToPartyId" name="partyId" value="${parameters.partyId?if_exists}" />
                   <input type="hidden" name="expireDate" value="${expireDate?if_exists}" />
-                  <input type="hidden" id="billToPhoneContactMechId" name="phoneContactMechId" value="${(billToTelecomNumber.contactMechId)?if_exists}" />
+                  <input type="hidden" id="billToPhoneContactMechId" name="billToPhoneContactMechId" value="${(billToTelecomNumber.contactMechId)?if_exists}" />
+                  <input type="hidden" name="billToName" value="${billToName?if_exists}" />
+                  <input type="hidden" name="billToAttnName" value="${billToAttnName?if_exists}" />
                   <#if userLogin?exists>
                     <input type="hidden" name="keepAddressBook" value="Y" />
                     <input type="hidden" name="setDefaultBilling" value="Y" />