How do I use mini login in header of magento? I'd also like the login form to be disabled after login.
A:
Check in the .phtml files under app/Mage/default/default/templates/page or something like that. Look for where the code is output, and find a hook you can use to determine if the user has signed in. Here is some psuedo PHP
<?php if ( ! $user->signedIn()): ?>
<div id="sign-in-form"></div>
<?php endif; ?>
alex
2009-06-29 09:59:00
<?php if ( ! $user->signedIn()): ?><div id="sign-in-form"></div><?php endif; ?>but when i use this code there is giving an error.
2009-06-29 12:20:38
plz check the code again and help me.
2009-06-29 12:21:14
That code is psuedo code... it describes the logic behind what you need to accomplish.
alex
2009-06-29 13:04:38
A:
layout/costumer.xml
this trick adds login form to left column instead of link in top menu
<customer_logged_out>
<reference name="top.links">
</reference>
<reference name="left">
<block type="customer/form_login" name="mini_login" template="customer/form/mini.login.phtml" />
</reference>
<remove name="wishlist_sidebar"></remove>
<remove name="reorder"></remove>
</customer_logged_out>
so if you've got reference in header than change name attribute, is there another way to do it?
Fivell
2010-02-04 10:31:06