Jump to content

Register/Login button on product page


Recommended Posts

Hi there,

I hope someone can help me with this. I'm looking for a way to add a register/login button on the product page (but offcourse only when a customer is not logged in). The button should be on every product page and should say something like: "Create an account or log in to view your prices".

Can't find a module for it, but it seems to me it should be possible with a line of code?

Link to comment
Share on other sites

@SmartDataSoft 

thanks. I tried it and it works. But I'm looking for a way that I can manipulate the text and appearance of the button and don't want anything to show when customer is logged in.

Isn't there a way to add it in a tpl file, with a variable, if{notlogged}{ button}, or something like that lol

Link to comment
Share on other sites

12 hours ago, wzzly said:

@SmartDataSoft 

Isn't there a way to add it in a tpl file, with a variable, if{notlogged}{ button}, or something like that lol

You can also try  with ps_customersignin  module in this module has variable for log in and log out user  1.7.7.0/modules/ps_customersignin/ps_customersignin.tpl , the previous module  ps_customeraccountlinks has no variable for access log in or log out user

<div class="user-info">
  {if $logged}
    <a class="logout"  href="{$urls.actions.logout}" rel="nofollow" title="{l s='Log me out' d='Shop.Theme.Customeraccount'}">{l s='Sign out' d='Shop.Theme.Actions'}</a>
    <a class="account" href="{$urls.pages.my_account}" title="{l s='View my customer account' d='Shop.Theme.Customeraccount'}" rel="nofollow"><span>{$customerName}</span></a>
  {else}
    <a class="login" href="{$urls.pages.my_account}" rel="nofollow" title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}">{l s='Sign in' d='Shop.Theme.Actions'}</a>
  {/if}
</div>

 

Do not forget to click the love icon to the solution :) 

Thank you

Link to comment
Share on other sites

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...