(Enterprise)

Disable guest browsing and shopping for the Aurora starter store

In the Aurora starter store, we can disable guest browsing and shopping for B2B customers. The steps involve removing the related policies in the Organization Administration Console and modifying a store configuration file. We can then verify that guest browsing and shopping are disabled by attempting to browse the store catalog and place an order as a guest customer.


Procedure

  1. Open the Organization Administration Console.

  2. Find the organization that owns the store for which we are enabling guest and browsing and shopping. For an extended site, select the organization that owns the extended site store.

  3. Select the check box beside the organization.

  4. Click Policy Subscription.

  5. Disable guest browsing:

    1. In the Selected policy groups section, select store_name GuestCatalogEnabledPolicyGroup, where store_name is the name of your published store.

    2. Click Remove, and then click OK. For example, if the store name is AuroraB2B, select AuroraB2B GuestCatalogEnabledPolicyGroup.

    3. Do one of the following things:

      • If we are also disabling guest shopping, go to step 6.

      • If we are disabling only guest browsing, complete these steps:

        1. Stop the Transaction Server.

        2. Start the Transaction Server.

        3. Go to step 8.

  6. Disable guest shopping for the local store. Important: By default, guest shopping is disabled for the Aurora starter store. Complete the following substeps only if you previously enabled guest shopping; otherwise, go to step 8.

    1. In the Selected policy groups section, select store_name GuestShoppingEnabledPolicyGroup, where store_name is the name of your published store. For example, if the store name is AuroraB2B, select AuroraB2B GuestShoppingEnabledPolicyGroup.

    2. Click Remove, and then click OK.

    3. Stop the Transaction Server.

    4. Go to the following directory:

    5. Back up the struts-config-ext.xml file.

    6. Open the struts-config-ext.xml file in an editor.

    7. Find the section in the file that contains this line of code:

        path="/QuickOrderView"

    8. For the lines labeled 1 and 2 in the following code snippet, change the authenticate property value for the store from 0 to 1 as shown. In this example, the store ID is 10001.

        <action path="/QuickOrderView" type="com.ibm.commerce.struts.BaseAction">
           <set-property property="credentialsAccepted" value="10001:P"/>
         1 <set-property property="authenticate" value="10001:1"/>
        </action>
        <action path="/AjaxOrderItemDisplayView" type="com.ibm.commerce.struts.BaseAction">
           <set-property property="https" value="10001:1"/>
           <set-property property="credentialsAccepted" value="10001:P"/>
         2 <set-property property="authenticate" value="10001:1"/>
        </action>

    9. Find the section in the file that contains this line of code:

        path="/AjaxRESTOrderItemAdd"

    10. For each of the lines that are labeled 1 to 4 in the following code snippet, change the authenticate property value for the store from 0 to 1 as shown. In this example, the store ID is 10001.

        <action parameter="orderlist.addOrderItem" path="/AjaxRESTOrderItemAdd" type="com.ibm.commerce.struts.AjaxRESTAction">
         1 <set-property property="authenticate" value="10001:1"/>
           <set-property property="https" value=""10001:1"/>
        </action>
        <action parameter="orderlist.addOrderItem" path="/RESTOrderItemAdd" type="com.ibm.commerce.struts.RESTAction">
         2 <set-property property="authenticate" value="10001:1"/>
           <set-property property="https" value="10001:1"/>
        </action>
        ...
        <action parameter="orderlist.calculateOrder" path="/AjaxRESTOrderCalculate" type="com.ibm.commerce.struts.AjaxRESTAction">
         3 <set-property property="authenticate" value="10001:1"/>
           <set-property property="https" value="10001:1"/>
        </action>
        <action parameter="orderlist.calculateOrder" path="/RESTOrderCalculate" type="com.ibm.commerce.struts.RESTAction">
         4 <set-property property="authenticate" value="10001:1"/>
           <set-property property="https" value="10001:1"/>
        </action>
        <action parameter="orderlist.addConfigurationToCart" path="/AjaxRESTOrderAddConfigurationToCart" type="com.ibm.commerce.struts.AjaxRESTAction">
         5 <set-property property="authenticate" value="10001:1"/>
            <set-property property="https" value="10001:1"/
        </action>
        <action parameter="orderlist.addConfigurationToCart" path="/RESTOrderAddConfigurationToCart" type="com.ibm.commerce.struts.RESTAction">
         6 <set-property property="authenticate" value="10001:1"/>
            <set-property property="https" value="10001:1"/>
        </action>
        <action parameter="orderlist.addPreConfigurationToCart" path="/AjaxRESTOrderAddPreConfigurationToCart" type="com.ibm.commerce.struts.AjaxRESTAction">
         7 <set-property property="authenticate" value="10001:1"/>
            <set-property property="https" value="10001:1"/>
        </action>
        <action parameter="orderlist.addPreConfigurationToCart" path="/RESTOrderAddPreConfigurationToCart" type="com.ibm.commerce.struts.RESTAction">
         8 <set-property property="authenticate" value="10001:1"/>
            <set-property property="https" value="10001:1"/>
        </action>

    11. Save the file.

    12. (AIX) (Windows) Deploy the store assets.

    13. Start the Transaction Server.

  7. Disable guest shopping for remote stores.

    1. In the Selected policy groups section, select store_name GuestShoppingEnabledPolicyGroup, where store_name is the name of your published store. For example, if the store name is AuroraB2B, select AuroraB2B GuestShoppingEnabledPolicyGroup.

    2. Click Remove, and then click OK.

    3. Stop the WebSphere Commerce server.

    4. Back up the WCStore_Server_dir/crs-web/WEB-INF/spring/storedir/views-ext.xml configuration file.

    5. Open the views-ext.xml file in an editor.

    6. Find the associated bean definitions for the specific store we want to disable guest browsing and shopping for by finding the associated entries:

        <bean id="QuickOrderView/storedir"
            class="com.ibm.commerce.store.mvc.view.spring.StoreInternalResourceView">

    7. Change the authenticate property value for the store from 0 to 1, as shown in this example:

        <bean id="QuickOrderView/AuroraB2BStorefrontAssetStore"
            class="com.ibm.commerce.store.mvc.view.spring.StoreInternalResourceView">
          <property name="url"
            value="/ShoppingArea/OrderCreationSection/QuickOrderSubsection/QuickOrderForm.jsp"/>  
          <property name="credentialsAccepted" value="P"/>
          <property name="authenticate" value="1"/>
        </bean>
        <bean id="AjaxOrderItemDisplayView/AuroraB2BStorefrontAssetStore"
          class="com.ibm.commerce.store.mvc.view.spring.StoreInternalResourceView">
          <property name="url" value="/ShoppingArea/ShopcartSection/OrderItemDisplay.jsp"/>
          <property name="https" value="1"/>
          <property name="credentialsAccepted" value="P"/>
          <property name="authenticate" value="1"/>
          <property name="generic"value="1"/>
        </bean>

    8. Save the file.

    9. Back up the WCStore_Server_dir/crs-web/WEB-INF/spring/storedir/controllers-ext.xml configuration file.

    10. Open the controllers-ext.xml file in an editor.

    11. Find the associated bean definitions for the specific store we want to disable guest browsing and shopping for by finding the associated entries:

         <bean id="orderCalculate/storedir"
          class="com.ibm.commerce.store.mvc.controller.spring.RESTActionController">

    12. Change the authenticate property value for the store from 0 to 1, as shown in this example:

        <bean id="orderCalculate/AuroraB2BStorefrontAssetStore" 
          class="com.ibm.commerce.store.mvc.controller.spring.RESTActionController">
          <property name="authenticate" value="1"/>
          <property name="https" value="1"/>
          <property name="parameter" value="orderlist.calculateOrder"/>
        </bean>
        <bean id="ajaxRESTOrderCalculate/AuroraB2BStorefrontAssetStore"
          class="com.ibm.commerce.store.mvc.controller.spring.AjaxRESTActionController">
          <property name="authenticate" value="1"/>
          <property name="https" value="1"/>
          <property name="parameter" value="orderlist.calculateOrder"/>
         </bean>
        <bean id="ajaxOrderItemAdd/AuroraB2BStorefrontAssetStore"
          class="com.ibm.commerce.store.mvc.controller.spring.AjaxRESTActionController">
          <property name="authenticate" value="1"/>
          <property name="parameter" value="orderlist.addOrderItem"/>
          <property name="https" value="1"/>
        </bean>

    13. Save the file.

    14. Deploy the store assets.

    15. Start the Store server.

  8. Verify that guest browsing, or guest shopping, or both, are disabled:

    1. Open the Aurora starter store in a browser but do not sign in.

    2. To verify that guest browsing is disabled, ensure that we cannot browse the store catalog and view products and their prices from the store's default contract.

    3. To verify that guest shopping is disabled, ensure that we cannot add items to the current order and check out.


Related tasks
Enable guest browsing and shopping for the Aurora starter store
Accessing sample organizations and user accounts to try out Aurora B2B capabilities


Related reference
Sample workflow for B2B organization administration and approvals