Author: jleroux
Date: Sun Sep 14 12:20:12 2008
New Revision: 695268
URL: http://svn.apache.org/viewvc?rev=695268&view=rev
Log:
A modified patch from Patrick Antivackis "Create a party relationship between a
new customer and the product store in the eCommerce application"
(https://issues.apache.org/jira/browse/OFBIZ-1955) - OFBIZ-1955
I modified since we need a party to relate not a store, hence admin as SALES_REP
Modified:
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
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=695268&r1=695267&r2=695268&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
Sun Sep 14 12:20:12 2008
@@ -307,6 +307,13 @@
<create-value value-name="partyDataSource"/>
<call-service service-name="createPartyRole"
in-map-name="partyRoleContext" include-user-login="true"/>
+ <!-- Create party relationship between the new customer and the
product store sales representative -->
+ <set field="partyRelationshipCtx.partyIdTo" value="admin"/>
+ <set field="partyRelationshipCtx.roleTypeIdTo" value="SALES_REP"/>
+ <set field="partyRelationshipCtx.roleTypeIdFrom" value="CUSTOMER"/>
+ <set field="partyRelationshipCtx.partyRelationshipTypeId"
value="CUSTOMER_REL"/>
+ <call-service service-name="createPartyRelationship"
in-map-name="partyRelationshipCtx"/>
+
<!-- shipping address -->
<if-compare field="parameters.USE_ADDRESS" operator="equals"
value="false">
<!-- address not used, do nothing -->
@@ -1368,4 +1375,4 @@
<store-value value-name="loggedInUser"/>
</if-compare>
</simple-method>
-</simple-methods>
\ No newline at end of file
+</simple-methods>