In the Next.js store, you can enable guest shopping for customers. The steps involve
enabling the related policies and guest shopping flex flow in the Management Center for HCL Commerce. You can then verify that guest shopping is enabled by browsing the store catalog and
placing an order as a guest customer.
- 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 enabled for the Ruby starter store.
Procedure
Perform the following steps to enable guest shopping:
-
Apply the following updates to the transaction server database to modify the guest
shopping access control policy.
-
Find the
member_id
that owns your esite:
select member_id from storeent where identifier=*ESITE_IDENTIIFER*
-
Find the guest shopping policy group that owns your esite:
select acpolgrp_id from ACPOLGRP where NAME='*ESITE_IDENTIIFER* GuestShoppingEnabledPolicyGroup'
-
If not found, find the guest shopping policy group for your storefront asset
store:
select acpolgrp_id from ACPOLGRP where NAME='*STOREFRONT_ASSET_STORE_IDENTIFIER* GuestShoppingEnabledPolicyGroup'
Subscribe your store's organization to the policy group using the values from steps
1.a and 1.b:
-
Subscribe your store's organization to the policy group using the values from steps
a and b:
insert into acplgpsubs (orgentity_id, acpolgrp_id) values (*member_id*, *acpolgrp_id*)
-
Enable the guest shopping flex flow for the Next.s store user interface from the
Management Center for HCL Commerce by following the steps given below:
-
Open Management
Center Tools.
-
From the left navigation menu, go to .
-
All the stores are listed on this page. Double-click on the Ruby store. The
Store Properties tab displays.
-
Go to the Configurations window and select optional
integrations and functions to enable the guest for the React Next.js store.
-
Click the check box to Enable guest shopping (when the store is served
by Next.js).
Shopper is enabled for guest shopping from the React Next.js
store.
-
Refresh the registries in Management Center for HCL Commerce or restart
the HCL Commerce server container.
Results
You can browse the store catalog and place an order as a guest
user.