Site access - Add age verification to your online store

Hopefully this isn’t too late, but if it is then I hope someone else can benefit from this.

To remove the age verification from your site, undo the step which adds it to the Layout > theme.liquid file:
Somewhere inside the element should be the code: {{ render ‘age-check’ }} – if you remove that entire bit of code from {{ to }} then that will remove it from your site. (it should be on its own line)

The snippet file named age-check.liquid does not need to be deleted since it’s not being called, but it is safe to do so as long as it’s not being rendered anywhere else.

Hope this helps!

This is great! I have a question though, the image works and looks great on the site. However, when I pull up my site on my phone, the image is distorted. Can you help me with this?

I am trying to implement this and I do not have a

tag

i have a tag that is like this

and one at the end of the script that is

I have some that are or but not

PLEASE can someone help me

thanks

I was able to add the age verification popup just fine. However, I seem to be having some difficulty adding a background image to the disclaimer. I can’t seem to find an EDIT HTML/CSS option anywhere. Is there any way you could provide a more detailed explanation of adding a background photo for my age disclaimer popup? It would be greatly appreciated.

1 Like

Hi,

I really appreciate you making this and loved how simple it was to apply. I am having an issue with it effecting my shop’s checkout though. The age verification shows up there off to the side n stacked on top of itself asking the customer to verify their again twice to be able to finally check out. Has anyone else had this issue?

Thanks

This is beautiful, thank you. I have a question tho, What if we want to do the check with a simple checkbox where they just click accept to enter the site?

Could I add a state checker to this as well? Not all states can be shipped to, so a person needs to say they are over 21 and in specific states.

I’ve set up my age-check page and have a background image loaded that looks great on desktop but terrible on mobile. How can I make it appear better on mobile?

I installed this but it’s small. How do I increase the size of this on the desktop?

For everyone asking about the background photo, and how to get the pop up to be more frequent, I found a solution for both.

FOR BACKGROUND PHOTO

  1. Find an large image online, 1024 x 1024 recommended.

  2. Save image as age-check-background.jpg

  3. Assets folder (it is 2 folders down from your snippets folder)

  4. Add new asset.

  5. Upload image you saved.

FOR MORE FREQUENT AGE CHECK

(This version of the age check will last for 2 weeks before asking for another age check. With this new method, the users refresh will go from 2 weeks to roughly 10 mins.)

Line 202

var days = .01; //number of days until they must go through the age checker again.

Hope this helps everyone!!! Have a great New Year and may all of your shops be successful! :heart:

1 Like

Hi All,

We have this implemented on our site and keep getting reports from mostly Firefox browser users advising they cannot select yes or no to enter our site. Anyone else have this issue and have a solution? We hate asking customers to try another browser.

Thanks so much.. It worked… The only thing I was not able to complete was: changing the image of the age verification. I guess need more info. Am I’m not tech savvy at all. So doing the first steps was a big thing for me. Thanks!!!

1 Like

I tried this but the enter button is transparent but still works. Is there any way to fix this?

I applied these changes successfully. Can anyone help me make the YES/NO buttons bigger so that there is more padding around the text on the buttons in all directions? I feel they look oddly small in comparison.

Hi guys,

Is anyone experiencing the same issue where the age verification window blocking the theme customize preview screen

Clicking the enter button does not close the popup… You can still change contents blocks and update but it is annoying not to able to see the preview live.


?

6 Likes

need help in this

after i go to customize theme and then i get this pop up, i press enter and it doesnt go away

yes here… same issue

1 Like

Hello! This is a super tip :slightly_smiling_face: thanks! how did you manage to change the color of the buttons to purple and the title?

Hello! Thanks for the background photo tip you add, however I tried this on my Shopify, but is not working. Only I have to upload as a new asset with that name and thats it? Or do I need to add anything else in any other folder? Thanks!

I have the same issue! I cant find thatEDIT HTML/CSS option, if anyone knows it that would be highly appreciated :slightly_smiling_face: