Hi,
I added Register and Login button on the menu but it only works in the first install. Dont change after login.
Menu;
Code;
No OC version posted. In your admin - > dashboard page, clear all your OC cache as well from your admin - > extensions - > modifications - > refresh button. Then, refresh your store-front end noticing the changes for the register link.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I'm using the 3.0.2.0 version. I'm making changes on the twig (catalog\view\theme\default\template\common\menu.twig) file.
I see login button but it don't see logout after login.
My menu.twig file:
I see login button but it don't see logout after login.
My menu.twig file:
Code: Select all
...
<ul class="nav navbar-nav" style='float:right'>
{% if logged %}
<li><a href="index.php?route=account/logout">{{ text_logout }}</a></li>
{% else %}
<li><a href="index.php?route=account/login">{{ text_login }}</a></li>
{% endif %}
</ul>
...
The logged variable is not initialized from your catalog/controller/common/menu.php file which is why you cannot use it as such in the menu.twig file. All must be coded from each controller source file before using them back into the TPL / twig files.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 154 guests