In the Aurora starter store, you
can enable guest browsing and shopping for B2B direct customers. The
steps involve enabling the related policies in the Organization Administration
Console and modifying a store configuration file. You can then verify
that guest browsing and shopping are enabled by browsing the store
catalog and placing an order as a guest customer.
- When guest browsing is enabled, customers who are
not signed in can view the catalog and the default contract prices
for the store. However, these customers cannot add items to their
current order or place an order. By default, guest browsing is enabled
in the Aurora starter store.
- When guest shopping is enabled, customers who are
not signed in can add items to their current order and place an order.
The customer pays the default contract prices. By default, guest shopping
is not enabled in the Aurora starter store.
Procedure
-
Open the Organization
Administration Console.
-
Click .
-
Find the organization
that owns the store for which you are enabling guest and browsing and shopping. For an extended
site, select the organization that owns the extended site store.
-
Select the check box beside the organization.
-
Click Policy Subscription.
-
Enable guest browsing:
Important: By default, guest browsing is enabled for the Aurora starter store. Complete
the following substeps only if guest browsing is disabled, otherwise, go to step
7.
-
In the Available policy groups section, select
store_name GuestCatalogEnabledPolicyGroup, where
store_name is the name of your published store.
For example, if the store name is AuroraB2B, select
AuroraB2B GuestCatalogEnabledPolicyGroup.
-
Click Add, and then click OK.
-
Do one of the following things:
-
Enable guest shopping:
-
In the Available 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.
-
Click Add, and then click
OK.
-
Stop the WebSphere Commerce server.
-
Go to the following directory:
- WC_eardir/Stores.war/WEB-INF/
- WCDE_installdir/workspace/Stores/WebContent/WEB-INF/
-
Back up the struts-config-ext.xml
file.
-
Open the struts-config-ext.xml file in an
editor.
-
Find the section in the file that contains this line of code:
-
For the lines labeled 1 and
2 in the following code snippet,
change the authenticate property value for
your store from
1
to 0
, as
shown. The store ID is 10001
in this
example:
<action path="/QuickOrderView" type="com.ibm.commerce.struts.BaseAction">
<set-property property="credentialsAccepted" value="10001:P"/>
1<set-property property="authenticate" value="10001:0"/>
</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:0"/>
</action>
-
Find the section in the file that contains this line of code:
path="/AjaxRESTOrderItemAdd"
-
For each of the lines that are labeled
1 to 8
in the following code snippet, change the
authenticate property value for your store
from
1
to 0
, as shown. The store
ID is 10001
in this example:
<action parameter="orderlist.addOrderItem" path="/AjaxRESTOrderItemAdd" type="com.ibm.commerce.struts.AjaxRESTAction">
1<set-property property="authenticate" value="10001:0"/>
<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:0"/>
<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:0"/>
<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:0"/>
<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:0"/>
<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:0"/>
<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:0"/>
<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:0"/>
<set-property property="https" value="10001:1"/>
</action>
-
Save the file.
-
Deploy the store assets.
-
Start the WebSphere Commerce server.
- If you want to enable customer service representatives to browse and shop on behalf of
guests, update your CustomerServiceNavigation_UI.jspf file.
-
Stop the WebSphere Commerce server.
- Open the following file in an editor:
- Comment out the following condition:
<c:if test="${env_b2bStore != 'true'}">
CSR cannot shop as guest user in B2B Store
<li>
<a href="#" onClick = "javascript:registeredCustomersJS.createGuestUser()"
class="link" id="createGuestUser"><wcst:message key="MA_SHOP_AS_GUEST" bundle="${widgetText}"/></a>
</li>
</c:if>
-
Save and close the file.
-
Deploy the store assets.
-
Start the WebSphere Commerce server.
- Verify that a customer service representative
can browse and shop on behalf of a guest.
-
Verify that guest browsing, or guest shopping, or both, are enabled.
-
Open the Aurora starter store in a browser but do not sign in.
-
To verify that guest browsing is enabled, ensure that you can browse the store catalog and view
products and their prices from the store's default contract.
-
To verify that guest shopping is enabled, ensure that you can add items to the current order
and check out.