Page 1 of 1

logout code?

Posted: Tue Jan 05, 2010 3:06 am
by yegga
hello,

i seem to have deleted any instances of a logout - i have no way of logging out of my shop?

can you tell me where the html for this resides? i can see there are terms related to logout in:

catalog/language/english/account/logout.php

where is this called from? i need to put back a logout button in my shop!

Re: logout code?

Posted: Tue Jan 05, 2010 3:21 am
by Xsecrets
index.php?route=account/logout would be the link you are looking for.

Re: logout code?

Posted: Tue Jan 05, 2010 3:22 am
by yegga
yes, thank you, can you give me an example of somewhere where this code is called?

Re: logout code?

Posted: Sat Aug 28, 2010 12:43 am
by nazimjamil
This is what you really want.
<a href="<?php echo str_replace('&', '&', $logout); ?>"><?php echo $text_logout; ?></a>

Re: logout code?

Posted: Sat Jan 09, 2016 11:14 pm
by yowchuan
This is a weird problem. I have multiple opencart stores under different domain names, but only one of it has this problem of not having a 'logout' button. The codes for

Code: Select all

catalog/view/theme/journal2/template/account
is exactly the same.

However, when I add

Code: Select all

<li><a href="<?php echo $logout; ?>"><?php echo $text_logout; ?></a></li>
I will get the following error message:

Code: Select all

Notice: Undefined variable: text_logout in /catalog/view/theme/mytheme/template/account/account.tpl on line 24

Re: logout code?

Posted: Tue Jun 13, 2017 8:46 am
by sk786
Try this:

Code: Select all

<li><a href="index.php?route=account/logout">Logout of My Account</a></li>