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 2010/02/06 08:12:45 UTC

svn commit: r907181 - in /ofbiz/trunk: applications/order/ applications/order/script/org/ofbiz/order/customer/ applications/order/script/org/ofbiz/order/order/ applications/order/servicedef/ specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/...

Author: ashish
Date: Sat Feb  6 07:12:44 2010
New Revision: 907181

URL: http://svn.apache.org/viewvc?rev=907181&view=rev
Log:
Applied patch from jira issue OFBIZ-3437 - Conversion of one page checkout events to services.
Done following:
   1. Converted events createUpdateCustomerAndShippingAddress and createUpdateBillingAndPayment to services.
   2. Written services in order component.
   3. Removed dependency form ecommerce.
   4. Moved checkout map processor to order and corrected its reference at all other places in ecommerce.
   5. Introduced and seca setAnonUserLogin instead of using event from ecommerce.
   6. Small respective changes in OnePageCheckoutProcess.ftl and checkoutProcess.js.
   7. Also fixed some of the issues found during testing in old createUpdateShippingAddress and createUpdateBillingAddress services.

Thanks Pranay for the contribution and Arun for your help in testing the patch for Anonymous & Registered user. 

Added:
    ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml   (props changed)
      - copied unchanged from r907180, ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml
    ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml   (with props)
    ofbiz/trunk/applications/order/servicedef/services_checkout.xml   (with props)
Removed:
    ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml
Modified:
    ofbiz/trunk/applications/order/ofbiz-component.xml
    ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
    ofbiz/trunk/applications/order/servicedef/secas.xml
    ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl

Modified: ofbiz/trunk/applications/order/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/ofbiz-component.xml?rev=907181&r1=907180&r2=907181&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/ofbiz-component.xml (original)
+++ ofbiz/trunk/applications/order/ofbiz-component.xml Sat Feb  6 07:12:44 2010
@@ -48,6 +48,7 @@
     <service-resource type="model" loader="main" location="servicedef/services_requirement.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_return.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_upgrade.xml"/>
+    <service-resource type="model" loader="main" location="servicedef/services_checkout.xml"/>
     <service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
 
     <test-suite loader="main" location="testdef/OrderTest.xml"/>

Propchange: ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sat Feb  6 07:12:44 2010
@@ -0,0 +1 @@
+/ofbiz/branches/addbirt/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml:831210-885099,885686-886087

Propchange: ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 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=907181&view=auto
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml (added)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml Sat Feb  6 07:12:44 2010
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd">
+
+    <simple-method method-name="createUpdateCustomerAndShippingAddress" short-description="Create/Update Customer, Shipping Address and other contact details." login-required="false">
+        <call-map-processor xml-resource="component://order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml"
+                processor-name="phoneNumber" in-map-name="parameters" out-map-name="shipToPhoneCtx"/>
+        <call-map-processor xml-resource="component://party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml"
+                processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressCtx"/>
+        <check-errors/>
+        <set field="shoppingCart" from-field="parameters.shoppingCart"/>
+        <set field="partyId" from-field="parameters.partyId"/>
+        <call-object-method obj-field="shoppingCart" method-name="getUserLogin" ret-field="userLogin"/>
+        <!-- If registered user is coming then take partyId from userLogin -->
+        <if-compare field="userLogin != null @and userLogin.partyId != null @and partyId == null" operator="equals" value="true" type="Boolean">
+            <set field="partyId" from-field="userLogin.partyId"/>
+        </if-compare>
+        <set-service-fields service-name="createUpdatePerson" map="parameters" to-map="createUpdatePersonCtx"/>
+        <set field="createUpdatePersonCtx.userLogin" from-field="userLogin"/>
+        <set field="createUpdatePersonCtx.partyId" from-field="userLogin.partyId"/>
+        <call-service service-name="createUpdatePerson" in-map-name="createUpdatePersonCtx">
+            <result-to-field result-name="partyId"/>
+        </call-service>
+
+        <if-not-empty field="userLogin">
+            <if-compare field="userLogin.userLoginId" operator="equals" value="anonymous">
+                <set field="userLogin.partyId" from-field="partyId"/>
+            </if-compare>
+        </if-not-empty>
+
+        <set field="partyRoleCtx.partyId" from-field="partyId"/>
+        <set field="partyRoleCtx.roleTypeId" value="CUSTOMER"/>
+        <set field="partyRoleCtx.userLogin" from-field="userLogin"/>
+
+        <call-service service-name="createPartyRole" in-map-name="partyRoleCtx"/>
+
+        <!-- Create Update Shipping address -->
+        <set-service-fields service-name="createUpdateShippingAddress" map="parameters" to-map="shipToAddressCtx"/>
+        <set field="shipToAddressCtx.userLogin" from-field="userLogin"/>
+        <call-service service-name="createUpdateShippingAddress" in-map-name="shipToAddressCtx">
+            <result-to-field result-name="contactMechId" field="parameters.shipToContactMechId"/>
+            <result-to-result result-name="contactMechId"/>
+        </call-service>
+
+        <!-- Create Update Shipping Telecom Number -->
+        <set-service-fields service-name="createUpdatePartyTelecomNumber" map="shipToPhoneCtx" to-map="createUpdatePartyTelecomNumberCtx"/>
+        <set field="createUpdatePartyTelecomNumberCtx.userLogin" from-field="userLogin"/>
+        <set field="createUpdatePartyTelecomNumberCtx.partyId" from-field="partyId"/>
+        <set field="createUpdatePartyTelecomNumberCtx.roleTypeId" value="CUSTOMER"/>
+        <set field="createUpdatePartyTelecomNumberCtx.contactMechPurposeTypeId" value="PHONE_SHIPPING"/>
+        <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="phoneContactMechId"/>
+        </call-service>
+
+        <if-not-empty field="shipToPhoneContactMechId">
+            <call-object-method obj-field="shoppingCart" method-name="addContactMech">
+                <string value="PHONE_SHIPPING"/>
+                <field field="shipToPhoneContactMechId"/>
+            </call-object-method>
+        </if-not-empty>
+
+        <!-- Create Update email address -->
+        <set-service-fields service-name="createUpdatePartyEmailAddress" map="emailAddressCtx" to-map="createUpdatePartyEmailCtx"/>
+        <set field="createUpdatePartyEmailCtx.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
+        <set field="createUpdatePartyEmailCtx.userLogin" from-field="userLogin"/>
+        <set field="createUpdatePartyEmailCtx.partyId" from-field="partyId"/>
+        <call-service service-name="createUpdatePartyEmailAddress" in-map-name="createUpdatePartyEmailCtx">
+            <result-to-field result-name="contactMechId" field="parameters.emailContactMechId"/>
+            <result-to-result result-name="contactMechId" service-result-name="emailContactMechId"/>
+        </call-service>
+        <field-to-result field="partyId"/>
+        <if-not-empty field="parameters.emailContactMechId">
+            <call-object-method obj-field="shoppingCart" method-name="addContactMech">
+                <string value="ORDER_EMAIL"/>
+                <field field="parameters.emailContactMechId"/>
+            </call-object-method>
+        </if-not-empty>
+
+        <call-object-method obj-field="shoppingCart" method-name="setUserLogin">
+            <field field="userLogin" type="org.ofbiz.entity.GenericValue"/>
+            <field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/>
+        </call-object-method>
+        <call-object-method obj-field="shoppingCart" method-name="addContactMech">
+            <string value="SHIPPING_LOCATION"/>
+            <field field="parameters.shipToContactMechId"/>
+        </call-object-method>
+        <call-object-method obj-field="shoppingCart" method-name="setShippingContactMechId">
+            <field field="parameters.shipToContactMechId"/>
+        </call-object-method>
+        <call-object-method obj-field="shoppingCart" method-name="setOrderPartyId">
+            <field field="partyId"/>
+        </call-object-method>
+    </simple-method>
+
+    <simple-method method-name="createUpdateBillingAddressAndPaymentMethod" short-description="Create/update billing address and payment information" login-required="false">
+        <call-map-processor xml-resource="component://order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml"
+                processor-name="phoneNumber" in-map-name="parameters" out-map-name="billToPhoneContext"/>
+        <check-errors/>
+        <set field="shoppingCart" from-field="parameters.shoppingCart"/>
+        <call-object-method obj-field="shoppingCart" method-name="getUserLogin" ret-field="userLogin"/>
+        <set field="partyId" from-field="parameters.partyId"/>
+         <!-- If registered user is coming then take partyId from userLogin -->
+        <if-compare field="userLogin != null @and partyId == null" operator="equals" value="true" type="Boolean">
+            <set field="partyId" from-field="userLogin.partyId"/>
+        </if-compare>
+
+        <set field="shipToContactMechId" from-field="parameters.shipToContactMechId"/>
+        <if-not-empty field="shoppingCart">
+            <if-empty field="partyId">
+                <call-object-method obj-field="shoppingCart" method-name="getPartyId" ret-field="partyId"/>
+            </if-empty>
+            <if-empty field="shipToContactMechId">
+                <call-object-method obj-field="shoppingCart" method-name="getShippingContactMechId" ret-field="shipToContactMechId"/>
+            </if-empty>
+        </if-not-empty>
+        <if-not-empty field="partyId">
+            <if-compare field="userLogin.userLoginId" operator="equals" value="anonymous">
+                <set field="userLogin.partyId" from-field="partyId"/>
+            </if-compare>
+        </if-not-empty>
+
+        <!-- Create Update Billing address -->
+        <set-service-fields service-name="createUpdateBillingAddress" map="parameters" to-map="billToAddressCtx"/>
+        <set field="billToAddressCtx.userLogin" from-field="userLogin"/>
+        <call-service service-name="createUpdateBillingAddress" in-map-name="billToAddressCtx">
+            <result-to-field result-name="contactMechId" field="parameters.billToContactMechId"/>
+            <result-to-result result-name="contactMechId"/>
+        </call-service>
+
+        <if-not-empty field="parameters.billToContactMechId">
+            <call-object-method obj-field="shoppingCart" method-name="addContactMech">
+                <string value="BILLING_LOCATION"/>
+                <field field="parameters.billToContactMechId"/>
+            </call-object-method>
+        </if-not-empty>
+
+        <!-- Create Update Billing Telecom Number -->
+        <set-service-fields service-name="createUpdatePartyTelecomNumber" map="billToPhoneContext" to-map="createUpdatePartyTelecomNumberCtx"/>
+        <set field="createUpdatePartyTelecomNumberCtx.userLogin" from-field="userLogin"/>
+        <set field="createUpdatePartyTelecomNumberCtx.partyId" from-field="partyId"/>
+        <set field="createUpdatePartyTelecomNumberCtx.roleTypeId" value="CUSTOMER"/>
+        <set field="createUpdatePartyTelecomNumberCtx.contactMechPurposeTypeId" value="PHONE_BILLING"/>
+        <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="phoneContactMechId"/>
+        </call-service>
+        <if-not-empty field="billToPhoneContactMechId">
+            <call-object-method obj-field="shoppingCart" method-name="addContactMech">
+                <string value="PHONE_BILLING"/>
+                <field field="billToPhoneContactMechId"/>
+            </call-object-method>
+        </if-not-empty>
+
+        <!-- Create Update credit card -->
+        <set-service-fields service-name="createUpdateCreditCard" map="parameters" to-map="creditCardCtx"/>
+        <set field="creditCardCtx.contactMechId" from-field="parameters.billToContactMechId"/>
+        <set field="creditCardCtx.userLogin" from-field="userLogin"/>
+        <call-service service-name="createUpdateCreditCard" in-map-name="creditCardCtx">
+            <result-to-field result-name="paymentMethodId"/>
+            <result-to-result result-name="paymentMethodId"/>
+        </call-service>
+        <!-- Set Payment Method-->
+        <set field="cardSecurityCode" from-field="parameters.cardSecurityCode"/>
+        <create-object class-name="org.ofbiz.order.shoppingcart.CheckOutHelper" field="checkOutHelper">
+            <field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/>
+            <field field="delegator" type="org.ofbiz.entity.Delegator"/>
+            <field field="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart"/>
+        </create-object>
+        <set field="callResult" value="${groovy:checkOutHelper.finalizeOrderEntryPayment(paymentMethodId, null, false, false)}"/>
+        <set field="cartPaymentInfo" value="${groovy: org.ofbiz.order.shoppingcart.ShoppingCart.CartPaymentInfo cpi = shoppingCart.getPaymentInfo(paymentMethodId, null, null, null, true); cpi.securityCode = cardSecurityCode; return cpi;}"/>
+    </simple-method>
+
+    <simple-method method-name="setAnonUserLogin" short-description="Set user login in the session" login-required="false">
+        <set field="shoppingCart" from-field="parameters.shoppingCart"/>
+        <call-object-method obj-field="shoppingCart" method-name="getUserLogin" ret-field="userLogin"/>
+        <if-empty field="userLogin">
+            <entity-one entity-name="UserLogin" value-field="userLogin">
+                <field-map field-name="userLoginId" value="anonymous"/>
+            </entity-one>
+        <else>
+            <!-- If an anonymous user is coming back, update the party id in the userLogin object -->
+            <if-compare field="userLogin.userLoginId" operator="equals" value="anonymous">
+                <set field="userLogin.partyId" from-field="parameters.partyId"/>
+            </if-compare>
+        </else>
+        </if-empty>
+        <call-object-method obj-field="shoppingCart" method-name="setUserLogin">
+            <field field="userLogin" type="org.ofbiz.entity.GenericValue"/>
+            <field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/>
+        </call-object-method>
+    </simple-method>
+</simple-methods>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=907181&r1=907180&r2=907181&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Sat Feb  6 07:12:44 2010
@@ -21,7 +21,8 @@
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
     <simple-method method-name="getOrderedSummaryInformation" short-description="Get Summary Information About Orders for a Customer">
-        <if>
+        <!-- The permission checking is commented out to make this service work also when triggered from ecommerce -->
+        <!--if>
             <condition>
                 <and>
                     <not><if-has-permission permission="ORDERMGR" action="_VIEW"/></not>
@@ -33,7 +34,7 @@
             </then>
         </if>
         <check-errors/>
-
+       -->
         <if-not-empty field="monthsToInclude">
             <now-timestamp field="nowTimestamp"/>
             <!-- TODO: Change this to use the <set-calendar> operation -->
@@ -919,7 +920,7 @@
 
     <simple-method method-name="createUpdateShippingAddress" short-description="create and update Shipping address" login-required="false">
         <set field="keepAddressBook" from-field="parameters.keepAddressBook" default-value="Y"/>
-        <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
+        <call-map-processor xml-resource="component://order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml"
             processor-name="shipToAddress" in-map-name="parameters" out-map-name="shipToAddressCtx"/>
         <check-errors/>
         <set field="shipToAddressCtx.partyId" from-field="parameters.partyId"/>
@@ -937,6 +938,7 @@
                 <find-by-primary-key entity-name="PostalAddress" map="newValue" value-field="oldValue"/>
                 <set-nonpk-fields map="shipToAddressCtx" value-field="newValue"/>
                 <if-compare-field field="oldValue" to-field="newValue" operator="not-equals" type="Object">
+                    <set field="shipToAddressCtx.contactMechId" from-field="nullField"/>
                     <call-service service-name="createPartyPostalAddress" in-map-name="shipToAddressCtx">
                         <result-to-field result-name="contactMechId" field="parameters.shipToContactMechId"/>
                     </call-service>
@@ -994,6 +996,7 @@
                             <call-service service-name="deletePartyContactMechPurposeIfExists" in-map-name="serviceInMap"/>
                         </if-not-empty>
                         <set field="shipToAddressCtx.contactMechPurposeTypeId" value="SHIPPING_LOCATION"/>
+                        <set field="shipToAddressCtx.contactMechId" from-field="nullField"/>
                         <call-service service-name="createPartyPostalAddress" in-map-name="shipToAddressCtx">
                             <result-to-field result-name="contactMechId" field="parameters.shipToContactMechId"/>
                         </call-service>
@@ -1017,7 +1020,7 @@
 
         <set field="keepAddressBook" from-field="parameters.keepAddressBook" default-value="Y"/>
         <if-compare field="parameters.useShippingAddressForBilling" operator="not-equals" value="Y">
-            <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
+            <call-map-processor xml-resource="component://order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml"
                 processor-name="billToAddress" in-map-name="parameters" out-map-name="billToAddressCtx"/>
         </if-compare>
         <check-errors/>
@@ -1075,6 +1078,7 @@
                 <log level="info" message="Billing address created with contactmechId ${parameters.billToContactMechId}"/>
             <else>
                 <if-compare-field field="parameters.shipToContactMechId" operator="equals" to-field="parameters.billToContactMechId">
+                    <set field="billToAddressCtx.contactMechId" from-field="nullField"/>
                     <call-service service-name="createPartyPostalAddress" in-map-name="billToAddressCtx">
                         <result-to-field result-name="contactMechId" field="parameters.billToContactMechId"/>
                     </call-service>
@@ -1093,6 +1097,7 @@
                             <field-map field-name="contactMechId" from-field="billToAddressCtx.contactMechId"/>
                         </entity-one>
                         <if-compare-field field="oldValue" to-field="newValue" operator="not-equals" type="Object">
+                            <set field="billToAddressCtx.contactMechId" from-field="nullField"/>
                             <call-service service-name="createPartyPostalAddress" in-map-name="billToAddressCtx">
                                 <result-to-field result-name="contactMechId" field="parameters.billToContactMechId"/>
                             </call-service>
@@ -1135,7 +1140,6 @@
                     <set field="partyProfileDefaultsCtx.partyId" from-field="userLogin.partyId"/>
                     <call-service service-name="setPartyProfileDefaults" in-map-name="partyProfileDefaultsCtx"/>
                 </if-compare>
-
             </else>
             </if-empty>
         </if-compare>

Modified: ofbiz/trunk/applications/order/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/secas.xml?rev=907181&r1=907180&r2=907181&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/secas.xml Sat Feb  6 07:12:44 2010
@@ -408,4 +408,7 @@
         <condition-field field-name="statusId" operator="not-equals" to-field-name="oldStatusId"/>
         <action service="loadSalesOrderFact" mode="sync" run-as-user="system"/>
     </eca>
+    <eca service="createUpdateCustomerAndShippingAddress" event="invoke">
+        <action service="setAnonUserLogin" mode="sync"/>
+    </eca>
 </service-eca>
\ No newline at end of file

Added: ofbiz/trunk/applications/order/servicedef/services_checkout.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_checkout.xml?rev=907181&view=auto
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services_checkout.xml (added)
+++ ofbiz/trunk/applications/order/servicedef/services_checkout.xml Sat Feb  6 07:12:44 2010
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/services.xsd">
+
+    <service name="createUpdateCustomerAndShippingAddress" engine="simple" location="component://order/script/org/ofbiz/order/order/CheckoutServices.xml" auth="false" invoke="createUpdateCustomerAndShippingAddress">
+        <implements service="createUpdateShippingAddress"/>
+        <attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart" mode="IN" optional="false"/>
+        <attribute name="firstName" type="String" mode="IN" optional="true"/>
+        <attribute name="lastName" type="String" mode="IN" optional="true"/>
+        <attribute name="userLogin" type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
+        <attribute name="emailAddress" type="String" mode="IN" optional="false"/>
+        <attribute name="countryCode" type="String" mode="IN" optional="true"/>
+        <attribute name="areaCode" type="String" mode="IN" optional="true"/>
+        <attribute name="contactNumber" type="String" mode="IN" optional="true"/>
+        <attribute name="extension" type="String" mode="IN" optional="true"/>
+        <attribute name="emailContactMechId" mode="INOUT" type="String" optional="true"/>
+        <attribute name="partyId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="phoneContactMechId" type="String" mode="INOUT" optional="true"/>
+    </service>
+
+    <service name="createUpdateBillingAddressAndPaymentMethod" engine="simple" location="component://order/script/org/ofbiz/order/order/CheckoutServices.xml" auth="false" invoke="createUpdateBillingAddressAndPaymentMethod">
+        <implements service="createUpdateBillingAddress"/>
+        <implements service="createUpdateCreditCard"/>
+        <attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart" mode="IN" optional="false"/>
+        <attribute name="userLogin" type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
+        <attribute name="countryCode" type="String" mode="IN" optional="true"/>
+        <attribute name="areaCode" type="String" mode="IN" optional="true"/>
+        <attribute name="contactNumber" type="String" mode="IN" optional="true"/>
+        <attribute name="extension" type="String" mode="IN" optional="true"/>
+        <attribute name="cardSecurityCode" type="String" mode="IN" optional="true"/>
+        <attribute name="partyId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="phoneContactMechId" mode="INOUT" type="String" optional="true"/>
+    </service>
+
+    <service name="setAnonUserLogin" engine="simple" location="component://order/script/org/ofbiz/order/order/CheckoutServices.xml" auth="false" invoke="setAnonUserLogin">
+         <attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart" mode="IN" optional="false"/>
+         <attribute name="partyId" type="String" mode="IN" optional="true"/>
+    </service>
+
+</services>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/order/servicedef/services_checkout.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/servicedef/services_checkout.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/order/servicedef/services_checkout.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=907181&r1=907180&r2=907181&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Sat Feb  6 07:12:44 2010
@@ -848,115 +848,6 @@
     </simple-method>
 
     <!-- One page checkout process  -->
-    <simple-method method-name="createUpdateCustomerAndShippingAddress"
-            short-description="Create/Update Customer, Shipping Address and other contact details." login-required="false">
-        <set field="shoppingCart" from-field="parameters.shoppingCart"/>
-        <set field="partyId" from-field="parameters.partyId"/>
-        <if-not-empty field="userLogin">
-            <if-empty field="partyId">
-                <set field="partyId" from-field="userLogin.partyId"/>
-            </if-empty>
-        </if-not-empty>
-        <set field="parameters.shipToCountryGeoId" from-field="parameters.countryGeoId"/>
-        <set field="shipToContactMechId" from-field="parameters.shipToContactMechId"/>
-
-        <if-empty field="shoppingCart">
-            <session-to-field field="shoppingCart"/>
-        </if-empty>
-        <if-not-empty field="partyId">
-            <!-- If userLogin is empty set anonymous userLogin or if anonymous user is coming back update userLogin -->
-            <call-simple-method method-name="setAnonUserLogin"/>
-        </if-not-empty>
-
-        <!-- Create Update Person -->
-        <set-service-fields service-name="createUpdatePerson" map="parameters" to-map="createUpdatePersonCtx"/>
-        <set field="createUpdatePersonCtx.userLogin" from-field="userLogin"/>
-        <set field="createUpdatePersonCtx.partyId" from-field="userLogin.partyId"/>
-        <call-service service-name="createUpdatePerson" in-map-name="createUpdatePersonCtx">
-            <result-to-request result-name="partyId"/>
-            <result-to-field result-name="partyId" field="parameters.partyId"/>
-        </call-service>
-        <set field="partyId" from-field="parameters.partyId"/>
-
-        <if-empty field="userLogin">
-            <!-- If new anonymous user set anonymous userLogin -->
-            <call-simple-method method-name="setAnonUserLogin"/>
-        </if-empty>
-
-        <set field="partyRoleContext.partyId" from-field="partyId"/>
-        <set field="partyRoleContext.roleTypeId" from-field="parameters.roleTypeId"/>
-        <set field="partyRoleContext.userLogin" from-field="userLogin"/>
-        <call-service service-name="createPartyRole" in-map-name="partyRoleContext"/>
-
-        <!-- Create Update Shipping address -->
-        <set-service-fields service-name="createUpdateShippingAddress" map="parameters" to-map="shipToAddressCtx"/>
-        <set field="shipToAddressCtx.userLogin" from-field="userLogin"/>
-        <call-service service-name="createUpdateShippingAddress" in-map-name="shipToAddressCtx">
-            <result-to-field result-name="contactMechId" field="parameters.shipToContactMechId"/>
-        </call-service>
-        <field-to-request field="parameters.shipToContactMechId" request-name="shipToContactMechId"/>
-
-        <!-- Create Update Shipping Telecom Number -->
-        <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
-                processor-name="phoneNumber" in-map-name="parameters" out-map-name="shipToPhoneContext"/>
-        <check-errors/>
-
-        <set-service-fields service-name="createUpdatePartyTelecomNumber" map="shipToPhoneContext" to-map="createUpdatePartyTelecomNumberCtx"/>
-        <set field="createUpdatePartyTelecomNumberCtx.contactMechId" from-field="parameters.shipToPhoneContactMechId"/>
-        <set field="createUpdatePartyTelecomNumberCtx.userLogin" from-field="userLogin"/>
-        <set field="createUpdatePartyTelecomNumberCtx.partyId" from-field="parameters.partyId"/>
-        <set field="createUpdatePartyTelecomNumberCtx.roleTypeId" from-field="parameters.roleTypeId"/>
-        <set field="createUpdatePartyTelecomNumberCtx.contactMechPurposeTypeId" from-field="parameters.contactMechPurposeTypeId"/>
-        <call-service service-name="createUpdatePartyTelecomNumber" in-map-name="createUpdatePartyTelecomNumberCtx">
-            <result-to-field result-name="contactMechId" field="parameters.shipToPhoneContactMechId"/>
-        </call-service>
-        <field-to-request field="parameters.shipToPhoneContactMechId" request-name="shipToPhoneContactMechId"/>
-
-        <if-not-empty field="parameters.shipToPhoneContactMechId">
-            <call-object-method obj-field="shoppingCart" method-name="addContactMech">
-                <string value="PHONE_SHIPPING"/>
-                <field field="parameters.shipToPhoneContactMechId"/>
-            </call-object-method>
-       </if-not-empty>
-
-        <!-- Create Update email address -->
-        <call-map-processor xml-resource="component://party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml"
-                processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressContext"/>
-        <check-errors/>
-
-        <set-service-fields service-name="createUpdatePartyEmailAddress" map="emailAddressContext" to-map="createUpdatePartyEmailCtx"/>
-        <set field="createUpdatePartyEmailCtx.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
-        <set field="createUpdatePartyEmailCtx.userLogin" from-field="userLogin"/>
-        <set field="createUpdatePartyEmailCtx.partyId" from-field="parameters.partyId"/>
-        <call-service service-name="createUpdatePartyEmailAddress" in-map-name="createUpdatePartyEmailCtx">
-            <result-to-field result-name="contactMechId" field="parameters.emailContactMechId"/>
-        </call-service>
-        <field-to-request field="parameters.emailContactMechId" request-name="emailContactMechId"/>
-
-        <if-not-empty field="parameters.emailContactMechId">
-            <call-object-method obj-field="shoppingCart" method-name="addContactMech">
-                <string value="ORDER_EMAIL"/>
-                <field field="parameters.emailContactMechId"/>
-            </call-object-method>
-       </if-not-empty>
-        <!-- Set partyId, in shoppingCart -->
-        <call-object-method obj-field="shoppingCart" method-name="setUserLogin">
-            <field field="userLogin" type="org.ofbiz.entity.GenericValue"/>
-            <field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/>
-        </call-object-method>
-        <call-object-method obj-field="shoppingCart" method-name="addContactMech">
-            <string value="SHIPPING_LOCATION"/>
-            <field field="parameters.shipToContactMechId"/>
-        </call-object-method>
-        <call-object-method obj-field="shoppingCart" method-name="setShippingContactMechId">
-            <field field="parameters.shipToContactMechId"/>
-        </call-object-method>
-        <log level="info" message="updated shopping cart shipToContactMechId ${parameters.shipToContactMechId}"/>
-        <call-object-method obj-field="shoppingCart" method-name="setOrderPartyId">
-            <field field="partyId"/>
-        </call-object-method>
-    </simple-method>
-
     <simple-method method-name="createUpdateUserLogin" short-description="Create and update a user login" login-required="false">
         <if-empty field="parameters.partyId">
             <request-to-field request-name="partyId" field="parameters.partyId"/>
@@ -1181,106 +1072,15 @@
         <log level="info" message="Total sale tax is : ${parameters.totalSalesTax}"/>
     </simple-method>
 
-    <simple-method method-name="createUpdateBillingAndPayment" short-description="Create/update billing address and payment information" login-required="false">
-        <set field="partyId" from-field="parameters.partyId"/>
-        <if-not-empty field="userLogin">
-            <if-empty field="partyId">
-                <set field="partyId" from-field="userLogin.partyId"/>
-            </if-empty>
-        </if-not-empty>
-        <set field="shoppingCart" from-field="parameters.shoppingCart"/>
-        <set field="parameters.billToCountryGeoId" from-field="parameters.countryGeoId"/>
-        <set field="shipToContactMechId" from-field="parameters.shipToContactMechId"/>
-        <if-empty field="shoppingCart">
-            <session-to-field field="shoppingCart"/>
-        </if-empty>
-        <if-not-empty field="shoppingCart">
-            <if-empty field="partyId">
-                <call-object-method obj-field="shoppingCart" method-name="getPartyId" ret-field="partyId"/>
-            </if-empty>
-            <if-empty field="userLogin">
-                <call-object-method obj-field="shoppingCart" method-name="getUserLogin" ret-field="userLogin"/>
-                <if-not-empty field="userLogin">
-                    <set-current-user-login value-field="userLogin"/>
-                </if-not-empty>
-            </if-empty>
-            <if-empty field="shipToContactMechId">
-                <call-object-method obj-field="shoppingCart" method-name="getShippingContactMechId" ret-field="shipToContactMechId"/>
-            </if-empty>
-        </if-not-empty>
-        <if-not-empty field="partyId">
-            <!-- If userLogin is empty set anonymous userLogin or if anonymous user is coming back update userLogin -->
-            <call-simple-method method-name="setAnonUserLogin"/>
-        </if-not-empty>
-
-        <!-- Create Update Billing address -->
-        <set-service-fields service-name="createUpdateBillingAddress" map="parameters" to-map="billToAddressCtx"/>
-        <set field="billToAddressCtx.userLogin" from-field="userLogin"/>
-        <call-service service-name="createUpdateBillingAddress" in-map-name="billToAddressCtx">
-            <result-to-field result-name="contactMechId" field="parameters.billToContactMechId"/>
-        </call-service>
-        <field-to-request field="parameters.billToContactMechId" request-name="billToContactMechId"/>
-        <if-not-empty field="parameters.billToContactMechId">
-            <call-object-method obj-field="shoppingCart" method-name="addContactMech">
-                <string value="BILLING_LOCATION"/>
-                <field field="parameters.billToContactMechId"/>
-            </call-object-method>
-        </if-not-empty>
-
-        <!-- Create Update Billing Telecom Number -->
-        <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
-                processor-name="phoneNumber" in-map-name="parameters" out-map-name="billToPhoneContext"/>
-        <check-errors/>
-
-        <set-service-fields service-name="createUpdatePartyTelecomNumber" map="billToPhoneContext" to-map="createUpdatePartyTelecomNumberCtx"/>
-        <set field="createUpdatePartyTelecomNumberCtx.contactMechId" from-field="parameters.billToPhoneContactMechId"/>
-        <set field="createUpdatePartyTelecomNumberCtx.userLogin" from-field="userLogin"/>
-        <set field="createUpdatePartyTelecomNumberCtx.partyId" from-field="parameters.partyId"/>
-        <set field="createUpdatePartyTelecomNumberCtx.roleTypeId" from-field="parameters.roleTypeId"/>
-        <set field="createUpdatePartyTelecomNumberCtx.contactMechPurposeTypeId" from-field="parameters.contactMechPurposeTypeId"/>
-        <call-service service-name="createUpdatePartyTelecomNumber" in-map-name="createUpdatePartyTelecomNumberCtx">
-            <result-to-field result-name="contactMechId" field="parameters.billToPhoneContactMechId"/>
-        </call-service>
-        <field-to-request field="parameters.billToPhoneContactMechId" request-name="billToPhoneContactMechId"/>
-        <if-not-empty field="parameters.billToPhoneContactMechId">
-            <call-object-method obj-field="shoppingCart" method-name="addContactMech">
-                <string value="PHONE_BILLING"/>
-                <field field="parameters.billToPhoneContactMechId"/>
-            </call-object-method>
-        </if-not-empty>
-
-        <!-- Create Update credit card -->
-        <set-service-fields service-name="createUpdateCreditCard" map="parameters" to-map="creditCardContext"/>
-        <set field="creditCardContext.contactMechId" from-field="parameters.billToContactMechId"/>
-        <call-service service-name="createUpdateCreditCard" in-map-name="creditCardContext">
-            <result-to-field result-name="paymentMethodId" field="parameters.paymentMethodId"/>
-        </call-service>
-
-        <!--============== Set Payment Method ================-->
-        <set field="paymentMethodId" from-field="parameters.paymentMethodId"/>
-        <set field="cardSecurityCode" from-field="parameters.cardSecurityCode"/>
-        <field-to-session field="userLogin" session-name="userLogin"/>
-        <field-to-request field="parameters.paymentMethodId" request-name="paymentMethodId"/>
-        <call-bsh>
-            <![CDATA[
-                import org.ofbiz.order.shoppingcart.ShoppingCart;
-                checkOutHelper = new org.ofbiz.order.shoppingcart.CheckOutHelper(dispatcher, delegator, shoppingCart);
-                callResult = checkOutHelper.finalizeOrderEntryPayment(paymentMethodId, null, false, false);
-                ShoppingCart.CartPaymentInfo cpi = shoppingCart.getPaymentInfo(paymentMethodId, null, null, null, true);
-                cpi.securityCode = cardSecurityCode;
-            ]]>
-        </call-bsh>
-    </simple-method>
-
     <simple-method method-name="createCustomerProfile" short-description="create a customer profile" login-required="false">
         <!-- Process all map -->
         <call-map-processor xml-resource="component://party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml"
                 processor-name="person" in-map-name="parameters" out-map-name="personCtx"/>
         <call-map-processor xml-resource="component://party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml"
                 processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressCtx"/>
-        <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
+        <call-map-processor xml-resource="component://order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml"
             processor-name="shipToAddress" in-map-name="parameters" out-map-name="shipToAddressCtx"/>
-        <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
+        <call-map-processor xml-resource="component://order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml"
                 processor-name="shipToPhone" in-map-name="parameters" out-map-name="shipToTelecomNumberCtx"/>
         <check-errors/>
 
@@ -1334,7 +1134,7 @@
 
         <!-- Create billing address -->
         <if-compare field="parameters.useShippingAddressForBilling" operator="not-equals" value="Y">
-            <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
+            <call-map-processor xml-resource="component://order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml"
                     processor-name="billToAddress" in-map-name="parameters" out-map-name="billToAddressCtx"/>
             <set field="billToAddressCtx.partyId" from-field="parameters.partyId"/>
             <set field="billToAddressCtx.userLogin" from-field="parameters.userLogin"/>
@@ -1349,7 +1149,7 @@
         </else>
         </if-compare>
         <!-- create billing telecom number  -->
-        <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
+        <call-map-processor xml-resource="component://order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml"
                 processor-name="billToPhone" in-map-name="parameters" out-map-name="billToTelecomNumberCtx"/>
         <set field="billToTelecomNumberCtx.partyId" from-field="parameters.partyId"/>
         <set field="billToTelecomNumberCtx.userLogin" from-field="parameters.userLogin"/>
@@ -1425,4 +1225,4 @@
             <store-value value-field="loggedInUser"/>
         </if-compare-field>
     </simple-method>
-</simple-methods>
+</simple-methods>
\ No newline at end of file

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=907181&r1=907180&r2=907181&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Sat Feb  6 07:12:44 2010
@@ -1692,7 +1692,7 @@
 
     <request-map uri="createUpdateShippingAddress">
         <security https="true" auth="false"/>
-        <event type="simple" path="component://ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml" invoke="createUpdateCustomerAndShippingAddress"/>
+        <event type="service" invoke="createUpdateCustomerAndShippingAddress"/>
         <response name="success" type="request" value="json"/>
         <response name="error" type="request" value="json"/>
     </request-map>
@@ -1711,7 +1711,7 @@
 
     <request-map uri="createUpdateBillingAndPayment">
         <security https="true" auth="false"/>
-        <event type="simple" path="component://ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml" invoke="createUpdateBillingAndPayment"/>
+        <event type="service" invoke="createUpdateBillingAddressAndPaymentMethod"/>
         <response name="success" type="request" value="json"/>
         <response name="error" type="request" value="json"/>
     </request-map>

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=907181&r1=907180&r2=907181&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js Sat Feb  6 07:12:44 2010
@@ -257,8 +257,8 @@
                 // Process Shipping data response.
                 $('shipToPartyId').value = data.partyId;
                 $('billToPartyId').value = data.partyId;
-                $('shipToContactMechId').value = data.shipToContactMechId;
-                $('shipToPhoneContactMechId').value = data.shipToPhoneContactMechId;
+                $('shipToContactMechId').value = data.contactMechId;
+                $('shipToPhoneContactMechId').value = data.phoneContactMechId;
                 $('emailContactMechId').value = data.emailContactMechId;
                 //$('completedShippingMethod').update(data.shippingDescription);
                 updateShippingSummary();
@@ -367,9 +367,9 @@
             } else {
                 Effect.Fade('billingFormServerError');
                 isBillStepValidate = true;
-                $('billToContactMechId').value = data.billToContactMechId;
+                $('billToContactMechId').value = data.contactMechId;
                 $('paymentMethodId').value = data.paymentMethodId;
-                $('billToPhoneContactMechId').value = data.billToPhoneContactMechId;
+                $('billToPhoneContactMechId').value = data.phoneContactMechId;
                 updateBillingSummary();
                 result = true;
             }

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=907181&r1=907180&r2=907181&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Sat Feb  6 07:12:44 2010
@@ -226,10 +226,8 @@
                   <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="shipToPhoneContactMechId" value="${(shipToTelecomNumber.contactMechId)?if_exists}" />
+                  <input type="hidden" id="shipToPhoneContactMechId" name="phoneContactMechId" value="${(shipToTelecomNumber.contactMechId)?if_exists}" />
                   <input type="hidden" id="emailContactMechId" name="emailContactMechId" value="${emailContactMechId?if_exists}" />
-                  <input type="hidden" name="roleTypeId" value="CUSTOMER" />
-                  <input type="hidden" id="shipToPhoneContactMechPurposeTypeId" name="contactMechPurposeTypeId" value="PHONE_SHIPPING" />
                   <#if userLogin?exists>
                     <input type="hidden" name="keepAddressBook" value="Y" />
                     <input type="hidden" name="setDefaultShipping" value="Y" />
@@ -346,7 +344,7 @@
                             <label for="shipToCountryGeoId">${uiLabelMap.PartyCountry}*
                                 <span id="advice-required-shipToCountryGeo" style="display:none" class="errorMessage"> (required)</span>
                             </label>
-                            <select name="countryGeoId" id="shipToCountryGeoId">
+                            <select name="shipToCountryGeoId" id="shipToCountryGeoId">
                               <#if shipToCountryGeoId?exists>
                                 <option value="${shipToCountryGeoId?if_exists}">${shipToCountryProvinceGeo?default(shipToCountryGeoId?if_exists)}</option>
                               </#if>
@@ -453,9 +451,7 @@
                   <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" name="roleTypeId" value="CUSTOMER" />
-                  <input type="hidden" id="billToPhoneContactMechPurposeTypeId" name="contactMechPurposeTypeId" value="PHONE_BILLING" />
-                  <input type="hidden" id="billToPhoneContactMechId" name="billToPhoneContactMechId" value="${(billToTelecomNumber.contactMechId)?if_exists}" />
+                  <input type="hidden" id="billToPhoneContactMechId" name="phoneContactMechId" value="${(billToTelecomNumber.contactMechId)?if_exists}" />
                   <#if userLogin?exists>
                     <input type="hidden" name="keepAddressBook" value="Y" />
                     <input type="hidden" name="setDefaultBilling" value="Y" />
@@ -607,7 +603,7 @@
                               <label for="billToCountryGeoId">${uiLabelMap.PartyCountry}*
                                 <span id="advice-required-billToCountryGeoId" style="display:none" class="errorMessage"> (required)</span>
                               </label>
-                              <select name="countryGeoId" id="billToCountryGeoId">
+                              <select name="billToCountryGeoId" id="billToCountryGeoId">
                                 <#if billToCountryGeoId?exists>
                                   <option value='${billToCountryGeoId?if_exists}'>${billToCountryProvinceGeo?default(billToCountryGeoId?if_exists)}</option>
                                 </#if>