Page 1 of 1
Remove Pages
Posted: Sun Jul 13, 2014 1:15 pm
by mreuro666
How can I remove pages such as account/reward, account/return and account/download. I dont have any links to them and removed/ uninstalled them in admin however by going straight to the url I can go to them.
Im not using them on my site and want to prevent users from being able to go to them
Re: Remove Pages
Posted: Sun Jul 13, 2014 3:39 pm
by grgr
Simply add a redirect into the controller files.
ie. ../catalog/controller/account/download.php
at the top, change:
Code: Select all
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/download', '', 'SSL');
$this->redirect($this->url->link('account/login', '', 'SSL'));
}
to just:
Code: Select all
$this->redirect($this->url->link('account/login', '', 'SSL'));
anf they will be redirected back to the account page or the login page (if not logged in).
Re: Remove Pages
Posted: Sun Jul 13, 2014 3:43 pm
by imdevlper18
If you are using default theme.
Go to catalog/view/theme/default/template/common/footer.tpl
You will find the return link there.
<li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
You need to remove this line.
Similarly Go to catalog/view/theme/default/template/account/account.tpl
You will find other 2 links here:
<li><a href="<?php echo $download; ?>"><?php echo $text_download; ?></a></li>
<li><a href="<?php echo $reward; ?>"><?php echo $text_reward; ?></a></li>
Remove them as well. Your work will be done.
Re: Remove Pages
Posted: Tue Jul 15, 2014 7:06 am
by mreuro666
Thanks Guys! I will give this a go.