Post by mreuro666 » Sun Jul 13, 2014 1:15 pm

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

New member

Posts

Joined
Tue Mar 11, 2014 12:27 pm

Post by grgr » Sun Jul 13, 2014 3:39 pm

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).

Image Image Image Image Image Image Image Image


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by imdevlper18 » Sun Jul 13, 2014 3:43 pm

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.

Opencart Extensions | Professional opencart support | Support Ticket | support@cartbinder.com


User avatar
Active Member

Posts

Joined
Sun May 11, 2014 2:04 pm

Post by mreuro666 » Tue Jul 15, 2014 7:06 am

Thanks Guys! I will give this a go.

New member

Posts

Joined
Tue Mar 11, 2014 12:27 pm
Who is online

Users browsing this forum: Bing [Bot] and 34 guests