Samples > Sample stores > B2B direct business model > Up and running with the advanced B2B direct starter store > Configure the advanced B2B direct store
Enable guest shopping in an advanced B2B direct store
Procedure
- To enable guest shopping in a B2B direct store, Seller Administrator should perform the following tasks
- Login to Organization Administration Console
- Select Access Management>Find Organizations
- Enter the organization's short name or parent organization name and click Find
If no values are entered in the fields, all the available organizations will be listed.
- Select the check box next to B2B Organization and click Policy Subscription
- Select AdvancedB2BDirectGuestShoppingEnabledPolicyGroup under Available policy groups and click Add to add it under Selected policy groups
- Stop the WebSphere Commerce Server
- Make a backup of the following file:
WC_EAR/Stores.war/WEB-INF/struts-config-ext.xml
- Open following file in an editor:
WC_EAR/Stores.war/WEB-INF/struts-config-ext.xml Search for path="/OrderItemAdd"
- Change the authenticate flag for the store from 1 to 0 for the OrderItemAdd command. For example, if the storeId is 10001.
<action parameter="com.ibm.commerce.orderitems.commands.OrderItemAddCmd" path="/OrderItemAdd" type="com.ibm.commerce.struts.BaseAction"> <set-property property="https" value="10001:1,10104:1,10655:1"/> <set-property property="authenticate" value="10001:0,10104:1,10655:1"/> </action>
- Open
WC_EAR/Stores.war/WEB-INF/struts-config-ext.xmlin an editor. Search for path="/OrderItemDisplay"
- Change the authenticate flag for the store from 1 to 0 for the OrderItemDisplay command. For example, if the storeId is 10001.
<action parameter="com.ibm.commerce.orderitems.commands.OrderItemDisplayCmd" path="/OrderItemDisplay" type="com.ibm.commerce.struts.BaseAction"> <set-property property="https" value="10001:1,10104:1,10655:1"/> <set-property property="authenticate" value="10001:0,10104:1,10655:1"/> </action>
- Change the authenticate flag for the store from 1 to 0 for the OrderItemDisplayView command. For example, if the storeId is 10001.
<action path="/OrderItemDisplayView" type="com.ibm.commerce.struts.BaseAction"> <set-property property="https" value="10001:1,10104:1,10655:1"/> <set-property property="authenticate" value="10001:0,10104:1,10655:1"/> </action>
- Save the file and start the WebSphere Commerce Server.
- Go to the store as a guest, http://host/webapp/wcs/stores/servlet/TopCategoriesDisplay?storeId=xxx&catalogId=yyy
- Complete shopping flow.
- Disable guest shopping in an advanced B2B direct store To disable guest shopping in an advanced B2B direct store, Seller Administrator should perform the following tasks.
- Login to the Organization Administration Console.
- Select Access Management>Find Organizations.
- Enter the organization's short name or parent organization name and click Find Note: If no values are entered in the fields, all the available organizations will be listed.
- Select the check box next to B2B Organization and click Policy Subscription.
- Select AdvancedB2BdirectGuestShoppingEnabledPolicyGroup and click Remove.
- Restore the WC_EAR/Stores.war/WEB-INF/struts-config-ext.xml file that you created a backup file for when you enabled guest shopping in an advanced B2B direct store.
Related concepts