Buaha Posted May 19, 2014 Share Posted May 19, 2014 Hi, i have multistore and i want one of this shop to be private shop. I found this code and its force user to login before view shop, and its work but for both shops. How i can do this. classes\controller\FrontController.phpFind the functionpublic function init()Past the below mentioned code afterparent::init();if (!$this->context->customer->isLogged() && $this->php_self != 'authentication' && $this->php_self != 'password')Tools::redirect('index.php?controller=authentication?back=my-account'); Thanks Link to comment Share on other sites More sharing options...
El Patron Posted May 19, 2014 Share Posted May 19, 2014 you would need to add something like this (note: not tested) if (int)$this->context->shop->getContextShopID(); == 'shop number' do this else do that or you could splurge on a module that is multiishop compliant module, here is one but there are others http://www.prestashop.com/forums/topic/149628-module-hide-prices-private-shop-authorized-client-shopping-only/ Link to comment Share on other sites More sharing options...
Buaha Posted June 13, 2014 Author Share Posted June 13, 2014 Hi thanks for your replay. Could you tell me how this code should be? can i just delate else parametr do do nothing? something like this? if (int)$this->context->shop->getContextShopID(); == '2' { if (!$this->context->customer->isLogged() && $this->php_self != 'authentication' && $this->php_self != 'password') Tools::redirect('index.php?controller=authentication?back=my-account'); } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now