Sign-in button (Authentication Button)
What it does
Show a sign-in button where the price or Add to Cart would be. A guest clicks it, signs in without leaving the product, and sees the price if their customer group may see it. You choose the button as Authentication Button in Stores → Configuration → MageMe Extensions → HidePrice, under General.
Before you start
- Show For lets signed-in customers see prices: All Logged In Users or Customer Groups. With No One, signing in shows no price. See Choose who sees prices.
- Customers can create an account, or you create their accounts.
Steps
Set these values in the HidePrice settings, then click Save Config:
- In Replace Price With, select Authentication Button (how).
- To replace Add to Cart as well, in Replace Add To Cart With, select Authentication Button (how).
- In Show In, keep the areas where the button should show (how).
The button reads Sign In by default. To change its text and colors, see Button text and colors.
How sign-in works
On Luma and themes based on it, the button opens a Sign In dialog over the product page. The form loads on the first click and is never taken from the page cache. It has Email, Password, a Forgot Your Password? link, a Sign In button and a link to create an account.
- When the email and password are right, the customer is signed in and the same page opens again.
- When they are wrong, or the account is temporarily locked, the page opens again with the message "The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later."
- When the account is not confirmed yet, the message offers a link to send the confirmation email again.
- When a field is empty, the dialog doesn't send and shows "This is a required field." under it.
- A customer who is already signed in returns to the page without a change.
On Hyvä, the button opens the theme's own sign-in form, the same one as in the header, and returns the customer to the product page.
After signing in, the customer's group decides. If the group may see prices, the price and Add to Cart are back.
What you should see
A guest sees the button where the price was:
On Hyvä:

On Luma:

A click opens the sign-in form:
On Hyvä:

On Luma:

Limits
- A signed-in customer whose group may not see prices doesn't get the button. The spot where the price was stays empty. If such customers need to know what to do, use Text or Button With Alert instead.
- Signing in doesn't change the customer's group. To show prices to a customer, assign them to a group that may see prices.
- The button text and colors can differ per store view. See Store views and customer groups.
Troubleshooting
- The customer signed in, but the price is still hidden. Their group is not allowed to see prices. Check Show For and the groups in Choose who sees prices.
- Some customers don't see the button. Signed-in customers never get it. See the first point under Limits.
What's next
- Sign in to see prices: the full setup, with the groups that stay hidden.
- Button text and colors: change the button text and colors.
- Choose who sees prices: decide which groups see prices after sign-in.