Jump to content

[SOLVED] Separate the Login/Register link into two


generalexperts

Recommended Posts

At the top of the page there is "Login/Register" in one single link. I'd like to have those split in two. So the user can decide what to click on. I'll give a couple examples of a few sites I like that have the differentiation I am looking to apply...

 

- http://mypresta.eu/promotions.html (directs to different pages, very clear information, great design Vekia!)

 

- www.soundcloud.com (Don't like how it directs to a new window but I like the design and it's clear what you are clicking on).

 

- www.prestashop.com

 

I am not looking for the 100% design, just the correct links and generics on how this works. Thanks!

Edited by generalexperts (see edit history)
Link to comment
Share on other sites

Hi

 

in file theme/your theme/headr.tpl

 

search

<div style="display:block; height: 56px; padding-top:5px;"><div style="display:inline-block; float:left;">

change

<div style="display:block; height: 78px; padding-top:5px;"><div style="display:inline-block; float:left;">

not sure  name of your  login module i think is  loginform   then on file =>modules/loginform/loginform.tpl  or theme/your theme/module/loginform/loginform.tpl  (default module name of Ps is blockuserinfo)

 

search

<a href="http://mypresta.eu/register/" class="register-user"><strong>Register</strong>Create account</a>

change

<p style="padding:7px;"><a href="http://mypresta.eu/register/" class="register-user"><strong>Register</strong>Create account</a></p>

@++

 

Loulou66

Link to comment
Share on other sites

hello

 

On my website i use popup login module with some modifications of login form (login block on my website popups in modal window)

Register form on my website is a simple register form (without address)

 

to achieve it i had to modify a lot of things in core, but if you're interested in design, it's not so hard to achieve.

 

as i said: popup login block + modification of blockuserinfo module (separate buttons to login and register)

  • Like 2
Link to comment
Share on other sites

I purchased the popup login module, great module! So now my "Login/Register" button goes to the popup "Login" screen. For the user to register they have to click "Register" on the popup login screen. How do I edit the blockuserinfo so there is a separate Login and Register button?

 

Login button --> going to the popup login (as it is now), and Register button--> going to the Authentication Page.

Link to comment
Share on other sites


<!-- Block user information module HEADER -->

<div id="header_user">

<ul id="header_nav">

{if !$PS_CATALOG_MODE}

<li id="shopping_cart">

<a href="{$link->getPageLink($order_process, true)}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow">{l s='Cart' mod='blockuserinfo'}

<span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span>

<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span>

<span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span>

<span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}">

{if $cart_qties > 0}

{if $priceDisplay == 1}

{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}

{convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}

{else}

{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}

{convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)}

{/if}

{/if}

</span>

<span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='(empty)' mod='blockuserinfo'}</span>

</a>

</li>

{/if}

<li id="your_account"><a href="{$link->getPageLink('my-account', true)}" title="{l s='View my customer account' mod='blockuserinfo'}" rel="nofollow">{l s='Your Account' mod='blockuserinfo'}</a></li>

</ul>

<p id="header_user_info">

{l s='Welcome' mod='blockuserinfo'}

{if $logged}

<a href="{$link->getPageLink('my-account', true)}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span></a>

<a href="{$link->getPageLink('index', true, NULL, "mylogout")}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a>

{else}

<a href="{$link->getPageLink('my-account', true)}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>

{/if}

</p>

</div>

<!-- /Block user information module HEADER -->

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 2 months later...

Still looking for help on solving this... Can anyone please help? My site is savvymarinadotcom. At the top of my page there is "Login/Register" in one single link. I'd like to have those split in two. So the user can decide what to click on. I also purchased Vekia's popup login module. I need some help making the change. I have been trying to do this for quite some time! 

 

Thank you!

 

Also, side note: in Chrome the link "Login/Register" is above my navigation ribbon. In IE it is centered where I want it. Anyone know how to make that correction as well? Thanks!

Link to comment
Share on other sites

Here it is, thank you!

<!-- Block user information module HEADER -->
<div id="header_user">
	<ul id="header_nav">
		{if !$PS_CATALOG_MODE}
		<li id="shopping_cart">
			<a href="{$link->getPageLink($order_process, true)}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow">{l s='Cart' mod='blockuserinfo'}
			<span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span>
			<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span>
			<span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span>
			<span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}">
				{if $cart_qties > 0}
					{if $priceDisplay == 1}
						{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
						{convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}
					{else}
						{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
						{convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)}
					{/if}
				{/if}
			</span>
			<span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='(empty)' mod='blockuserinfo'}</span>
			</a>
		</li>
		{/if}
		<li id="your_account"><a href="{$link->getPageLink('my-account', true)}" title="{l s='View my customer account' mod='blockuserinfo'}" rel="nofollow">{l s='Your Account' mod='blockuserinfo'}</a></li>
	</ul>
	<p id="header_user_info">
		{l s='Welcome' mod='blockuserinfo'}
		{if $logged}
			<a href="{$link->getPageLink('my-account', true)}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span></a>
			<a href="{$link->getPageLink('index', true, NULL, "mylogout")}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a>
		{else}
			<a href="{$link->getPageLink('my-account', true)}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
		{/if}
	</p>
</div>
<!-- /Block user information module HEADER -->

Link to comment
Share on other sites

hello

 

sorry for late reply

i missed your replies here

 

change code:

{else}
<a href="{$link->getPageLink('my-account', true)}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
{/if}

to:


{else}
<a href="{$link->getPageLink('my-account', true)}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
<a href="{$link->getPageLink('authenticate', true)}" title="{l s='Create account' mod='blockuserinfo'}" class="register" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
{/if}

 

After that you will be able to stylize two buttons with css styles

i remember that you wanted something like:
yKFy9Rj.png

 

still actual?

  • Like 2
Link to comment
Share on other sites

Okay I got the links to work now. They are still off center and I don't know where to change the "Login/Register" to css. Nowhere can I find where to edit the login/register link and now I have two. Also, just a side note the code worked except for it was authentication. 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Still looking for help. When I view these two links they show up differently in Chrome vs IE. I want them to be placed on my horizontal menu bar and look the same across all browsers. Can anyone help me with the CSS that will allow this to work. I've tried everything and have ran out of ideas. Thank you!

 

Site is: http://tinyurl.com/b360

Link to comment
Share on other sites

  • 4 years later...

In PS 16123, this one is working for me:

<!-- Block user information module NAV  -->

<div class="header_user_info">
    <ul>
    {if $is_logged}
        <li class="welcome_text">    
        <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span></a>
        </li>
        <li class="li_logout">
            <a class="logout" href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Log me out' mod='blockuserinfo'}">
                {l s='Sign out' mod='blockuserinfo'}
            </a>
        </li>
    {else}
        <li class="li_login last">
            <a class="login" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Login to your customer account' mod='blockuserinfo'}">
                {l s='Sign in' mod='blockuserinfo'}
            </a>
            <a class="login" href="{$link->getPageLink('authentication', true)}" title="{l s='Create account' mod='blockuserinfo'}" class="register" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
        </li>
    {/if}
    </ul>
</div>
<!-- /Block usmodule NAV -->

 

File: nav.tpl

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...