Restrict Access to Your Entire Site

This topic applies to

Applies to

SuiteCommerce Advanced | Mont Blanc | Vinson | Elbrus | Kilimanjaro | Commerce Web Stores

 

You can restrict your entire site to logged in users only. If this feature is enabled, only registered and logged in visitors see the contents of your site. You can configure the site to redirect unauthenticated visitors to a Login page with a link to a Registration form. You can also restrict access to only those users that have been granted access by the Site Administrator. This flow is particularly useful in a B2B scenario where the organization wants to provide partners or customers with login credentials.

Note

If your site uses a pre-Vinson version of SuiteCommerce Advanced, use the second of the following setup procedures.


To set up NetSuite:

  1. In NetSuite, go to Setup > SuiteCommerce Advanced > Web Site Setup.

  2. Click Edit next to the website to which you want to restrict access.

  3. Go to the Shopping tab.

  4. Check the Password-protect Entire Site box.

  5. Set the Customer Registration Is field to one of the following:

    • Existing Customers Only - this restricts the site to customers who have login access to complete the checkout process. This option is only available with the Advanced Site Customization feature.

    • Required – this restricts the site to registered customers. New customers must register to be able to access the site. With this option, a record is created in NetSuite with contact information even if the shopper does not complete checkout.

    For more information about customer registration, see Configure Site Registration. Note that the ‘optional’ and ‘disabled’ site registration options are not available if the site is password protected.

To set up NetSuite (pre-Vinson):

  1. In NetSuite, go to Setup > SuiteCommerce Advanced > Web Site Setup.

  2. Click Edit next to the website to which you want to restrict access.

  3. Go to the Shopping tab.

  4. Set the Customer Registration Is field to one of the following:

    • Existing Customers Only - this restricts the site to customers who have login access to complete the checkout process. This option is only available with the Advanced Site Customization feature.

    • Required – this restricts the site to registered customers. New customers must register to be able to access the site. With this option, a record is created in NetSuite with contact information even if the shopper does not complete checkout.

    Important

    If this field is set to Disabled or Optional, this feature will not work.


    For more information about customer registration, see Configure Site Registration.

  5. Create a custom module that includes the backend Configuration object as a dependency. See Configure Properties for details.

    Note

    Do not edit the original Configuration.js source file directly. See Customize and Extend Core SuiteCommerce Advanced Modules for information and best practices on customizing JavaScript.


  6. Redefine the passwordProtectedSite property in the custom module to true.

  7. Save and deploy to your site.

Known Limitations

Before restricting access to your Commerce website, be aware of the following information:

  • When a user clicks on an item’s Quick View link after their session has ended, Commerce web stores redirect the user to the Checkout page instead of a Login page. The user cannot access the site, however, without logging in.

  • If a user changes the language after logging into a password-protected site, the application recognizes the new domain and redirects the user to log in again.