How can I change the login status of my Prestashop navigation bar? (Login/Logout button) - authentication

I am currently working with Prestashop right now, I have a modified skin but I found out my Login button does not change from "Login" to "Logout" if I'm not signed in. Now I tried to dig through the hierarchy to look up where the name is defined, but could not find it. To view a live preview of my website you can visit
this link.
If anyone could tell me how I can edit the navigation menu, or better yet the login status of my navigation button, that would really help me along. Thanks for the assistance :).
Greetings J.I.N.

It may depends on the Prestashop version and the module you are using, but with the blockuserinfo module it works like this (in Prestashop 1.5):
{if $logged}
{l s='Log out' mod='blockuserinfo'}
{else}
{l s='Login' mod='blockuserinfo'}
{/if}

Related

Hello, can somebody help me making a checkbox to be mandatory in my shopify checkout page? I have dawn them

I have to make a required / mandatory checkbox so when my clients go to the cart page they have to agree with my terms and conditions before proceeding to the checkout page
I was able to put the checkbox right next to the "checkout" button but I cannot make it required
You will have to have shopify-plus package in order to make changes inside checkout page, so when you will have shopify-plus admin access, just go to storefront code editor(shopify's code editor), open "checkout.liquid" named layout and use jQuery to make condition that if($('input[name=thename]:checked')) { $('#id').show(); // show proceeding to the checkout HTML }

woocommerce login/registration button points to wrong page

i have on my theme the Customer login/registration button as bellow.
my issue is that on selection of the button it forward me to a page that does not exist. how can i update this button destination page to point to the correct login/registration page?
thanks
after a lot of search i notice that on woocommerce settings there was the account but the login account page. i have update it and the issue is resolved.
thanks

Prestashop: User information block will not appear

I'm using prestashop 1.6. and I'm trying to hook the "user information block" to the hook called "displayTop (Top of pages)". It is hooked up properly, but when I go to the website it does not appear. What could be the problem?
Thank you for your reply

disable overrided tpl file based on module status in prestashop

I am new to prestashop and using 1.6 version. I am creating a module which will show cart summary in pop up box after adding product into cart. The process of adding product into cart will be triggered, when customer clicks on "Add to cart" button.
So, i want to change the current functionality of "Add to cart button" and put my functionality on this.
I have searched many things on this, but everyone telling me that, this can be achieved by overriding tpl file. Its ok, but i have question on this that, if i override tpl file and after that user disable my module module then in that case, will overrided tpl file work??. Disable means just disable its functionality not uninstall the module.
So, please any one clear my confusion on this and tell me the right solution of how can i change the current functionality of "Add to cart" button and put my funcationality, when my module is enable??
Waiting for solution.
The best approach is to do an override, by copying the default template, and just remove/add code from it based on that if the module is enabled or disabled/uninstalled. These are just simple IFs, like:
{if Module::isInstalled('socialsharing')}
<div>SOCIAL</div>
{else}
<div>NO SICIAL</div>
{/if}
If course instead of isInstalled() method you can use isEnabledForShopContext() & isEnabled()

How to edit prestashop back office product listing page

I want to change the layout of prestashop back office product page.
So can anyone tell me which file to change so that I can modify this existing layout?
I don't know which page you want to edit exactly, but when you go to that page in your backoffice, like:
http://www.example.com/admin123/index.php?tab=AdminAttributesGroups
The admin123 is variable to your installation, but the ?tab=AdminAttributesGroups referes to the backoffice page you are on. These pages are located in /var/www/admin123/tabs in this case it's /var/www/admin123/tabs/AdminAttributesGroups.php
I found the solution.... Here is what I did
Added content.tpl in under adminxxyy/theme/theme_name/template/controller/products
Which showed me content of my content.tpl
Create a new module, register the hook and send that info via hook to content.tpl.
Use hook name in content.tpl like {hook h='displayProductMyWay' mod='blockcustom'}.