Im editing a theme named AquaCart, installed in OpenCart 1.5.5.1.
I also integrated twitter bootstrap's fixed top navbar.
I already moded the navbar and had put the Login/Logout menu there and It's doing fine.
This project is for my own online store.
I am have no PHP skills yet, only html/css. I have managed to put the login/logout button on my new navbar menu by copying codes from my current theme's header.tpl file and editing the header.php file (from the catalog\english\common\header.php).
Now, I am polishing the menu and wanted to add some custom menu/link named Sign Up!
I want this Sign Up! Text Link Menu to show as Logout Menu when a user is logged in.
My current edit show the logged in user name in a LI and logout menu in a second LI. This is not what I really want, what I want is to show the LOGOUT menu in place of the Sign Up! menu when a user is logged in.
Here is my current header.tpl edit:
Code: Select all
<ul aria-labelledby="drop3" role="menu" class="dropdown-menu pull-right">
<?php if (!$logged) { ?>
<?php echo $text_welcome; ?>
<?php } else { ?>
<?php echo $text_logged; ?>
<?php } ?>
<li class="divider" role="presentation"></li>
<li role="presentation"><a href="#" tabindex="-1" role="menuitem">Store Front</a></li>
<li role="presentation"><a href="#" tabindex="-1" role="menuitem">Blog Page</a></li>
</ul>
Code: Select all
<?php
// Text
$_['text_home'] = 'Online Shop';
$_['text_wishlist'] = 'Wish List (%s)';
$_['text_shopping_cart'] = 'Shopping Cart';
$_['text_search'] = 'Search';
$_['text_welcome'] = '<li role="presentation"><a href="%s">Login</a></li>';
$_['text_logged'] =
'<li role="presentation"><a href="%s" tabindex="-1" role="menuitem">%s</a></li>
<li role="presentation"><a href="%s" tabindex="-1" role="menuitem">Logout</a></li>';
$_['text_account'] = 'My Account';
$_['text_checkout'] = 'Checkout';
?>

My goal is to turn that Sign Up! Text Link to Logout