wpatrykw Posted January 26, 2016 Share Posted January 26, 2016 How can i do force to loggin form? Not logged users see nothing - only login form. The best solution would be redirecte to loggin page. How to do it? Link to comment Share on other sites More sharing options...
coeos.pro Posted January 26, 2016 Share Posted January 26, 2016 It's possible, but only with a module like http://www.coeos.pro/fr/modules-prestashop/104-vente-privee-prestashop-16.html Link to comment Share on other sites More sharing options...
wpatrykw Posted January 26, 2016 Author Share Posted January 26, 2016 Maybe any free solution? Your advice isn't helpful. Link to comment Share on other sites More sharing options...
electriz Posted January 28, 2016 Share Posted January 28, 2016 (edited) I think you need to use {$logged} variable. Go to themes/default-bootstrap/layout.tpl Replace its' content with {if $logged} {assign var='left_column_size' value=0}{assign var='right_column_size' value=0} {if isset($HOOK_LEFT_COLUMN) && $HOOK_LEFT_COLUMN|trim && !$hide_left_column}{$left_column_size=3}{/if} {if isset($HOOK_RIGHT_COLUMN) && $HOOK_RIGHT_COLUMN|trim && !$hide_right_column}{$right_column_size=3}{/if} {if !empty($display_header)}{include file="$tpl_dir./header.tpl" HOOK_HEADER=$HOOK_HEADER}{/if} {if !empty($template)}{$template}{/if} {if !empty($display_footer)}{include file="$tpl_dir./footer.tpl"}{/if} {if !empty($live_edit)}{$live_edit}{/if} {else} {if !empty($display_header)}{include file="$tpl_dir./header.tpl"}{/if} {if !empty($display_footer)}{include file="$tpl_dir./authentication.tpl"}{/if} {if !empty($display_footer)}{include file="$tpl_dir./footer.tpl"}{/if} {/if} If you leave only {if !empty($display_footer)}{include file="$tpl_dir./authentication.tpl"}{/if} in else then there'll be CSS issues (no template). But you can style it as you want. Edited January 28, 2016 by electriz (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 1, 2016 Share Posted February 1, 2016 Here is the more simpler method. Edit /classes/controller/FrontController.php file Search for "parent::init();" without double quotes. and add below code after parent::init(); if((strpos($url,'login')!==false) || (strpos($url,'authentication')!==false)) $page='loginpage'; else $page='otherpage'; if (!$this->context->customer->isLogged() && $page != 'loginpage') Tools::redirect('authentication'); 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