I'm using Magento 1.9

I want to activate a new store view for our office IP only because we want to make changes in that views.

How to make that?

  • Are you using nginx? because I've got an idea for you if so Mar 13, 2018 at 15:16

1 Answer 1


You need to find the template of store view switcher (Language switcher template), you can use the Template Path Hints feature of Magento:

Backend > System > Configuration > Advanced section > Developer tab > Debug fieldset > Template Path Hints field

Please pay attention you need switch the Current Configuration Scope to needed website or store view, also I advise to specify your IP address here:

Backend > System > Configuration > Advanced section > Developer tab > Developer Client Restrictions fieldset > Allowed IPs (comma separated) field

to prevent of displaying of path hints to other users.

The Magento uses the following template by default:


The next step - you need to modify this template.
Please add the following line of code:

<?php if (3 == $_lang->getId() && '' != $_SERVER['REMOTE_ADDR']) continue; ?>

3 - ID of your store view; - allowed IP address.

after the following line of code:

<?php foreach ($this->getStores() as $_lang): ?>

You can get a ID of store view here:

Backend > System > Manage Stores

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.