<img src="abc.png" />
call to replace anchor tags contains '/admin' in href

Restricted Login

StoreHippo offers the feature of Restricted Login to make login a compulsory function for your store. This functionality is used to ensure the security of your website. You can also use the email ids, thus collected for marketing purposes to promote your business to your customers.

To enable the restricted login in your store, you need to add a startup script to your store.

Follow the below steps to enable restricted login:

  1. Go to Site >  Startup Controllers section in StoreHippo Admin Panel.
  2. Click on Add New button.

  3. Enter Name as "Restricted Login" and provide the following code in the Controller field.
    ms.bind('ms.page_change_start', function(event) {
        //condition if user is not loggedin.
          if(!ms.user || !ms.user.isLoggedIn){
             //specify on which location you want to redirect

  4. Click on Save to save the controller.
  5. Now go to Storefront. To access any page on the store, the user is required to login first.
    When the user is logged in, he/she will be able to access the store.