svn commit: r1663202 - /ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml

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

svn commit: r1663202 - /ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml

jleroux@apache.org
Author: jleroux
Date: Mon Mar  2 08:18:39 2015
New Revision: 1663202

URL: http://svn.apache.org/r1663202
Log:
A patch from  Deepak Dixit for "One page checkout broken for registered user" https://issues.apache.org/jira/browse/OFBIZ-6119

Onepage checkout process is broken for registered user.
Error in Service [createPartyRole]: Value found (with ids 10000::CUSTOMER), cannot create a new one


Its due to CheckoutServices.xml#createUpdateCustomerAndShippingAddress service, in this service if system try to create party role at line 54, as this service is used for create/update shipping address so at the time of create its working fine but at the time of update it fails to create same party role again.

Modified:
    ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml

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=1663202&r1=1663201&r2=1663202&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 Mon Mar  2 08:18:39 2015
@@ -51,7 +51,13 @@ under the License.
         <set field="partyRoleCtx.roleTypeId" value="CUSTOMER"/>
         <set field="partyRoleCtx.userLogin" from-field="userLogin"/>
 
-        <call-service service-name="createPartyRole" in-map-name="partyRoleCtx"/>
+        <entity-one entity-name="PartyRole" value-field="partyRole">
+            <field-map field-name="partyId" from-field="partyRoleCtx.partyId"/>
+            <field-map field-name="roleTypeId" from-field="partyRoleCtx.roleTypeId"/>
+        </entity-one>
+        <if-empty field="partyRole">
+            <call-service service-name="createPartyRole" in-map-name="partyRoleCtx"/>
+        </if-empty>
 
         <!-- Create Update Shipping address -->
         <set-service-fields service-name="createUpdateShippingAddress" map="parameters" to-map="shipToAddressCtx"/>