Adding an age verification popup without apps to any Shopify theme

If your website contains products that are intended for mature audiences, having an age verification popup can be worthwhile to avoid legal issues down the road.

While there are apps that will certainly achieve this for you, there is a noticeable performance improvement by coding such feature into your theme since there's no external content being loaded.

In Shopify, apps are executed only after the DOM content is loaded, so every app will always take a bit longer to show up when compared to hard-coding it into your theme. In addition, you won't be tied to a monthly fee.

That's why, today, we'll be showing you how to add an age verification popup snippet to your theme that loads at least 3 times faster than apps.

You can check the end result here: live preview. (Password: 123)

Downloading the code files

You can download the code files clicking here. (live preview [Password: 123] )

Complete details about it can be found here.

Making a backup of your theme

Before diving into the tutorial make sure you download the theme, so in case you face any issues you can easily revert back.

Step 1: opening the code editor

  1. In your Shopify admin, go to Online Store > Themes Actions Edit Code.
  2. Inside the .zip you downloaded you'll find two files:
    1. ezfy-age.txt
    2. settings_schema.txt

Step 2: Creating the age popup file

  1. Open the ezfy-age.txt file and copy all the code in there.
  2. Now go back to your Shopify code editor and below Snippets click on “Add a new snippet“. Name it exactly:

    ezfy-age


  3. Paste the code that you copied and click on save, at the top right corner.

Step 3: Enabling the code

  1. Find the file named theme.liquid. You can type it on the search bar to ensure you select the correct one.
  2. Inside this file, press CTRL + F (or CMD + F on Mac) and search for:

    </body>
  3. Paste the following code before the </body> tag you found and save:

    {% include 'ezfy-age' %}

4th and final step: updating the settings_schema.txt file

  1. Open the settings_schema.txt file and copy all the code in there.
  2. In your Shopify code editor, find the settings_schema.json file in your theme.
  3. Within this file, scroll all the way down.
  4. Paste the code before the last line, after the } sign, as indicated the image below.

    So, for example, in this case, the code should be pasted on the line 1638 (the quantity of lines may vary depending of your theme, so don't worry if it shows a different number on yours).



    Paste the code to the right of the } character that the arrow is pointing to.


  5. Save and you're ready to go!

Troubleshooting common issues

Question: It shows me an error after I edit the settings_schema.json file. What do I do?

Answer: You very likely pasted the code at the bottom of the file. Please make sure you paste the code at the penultimate (second last) line as indicated in the step 4.

Your file must end with this character: ]

If you're still facing any issues please reach out to us via ezfycode@gmail.com and we'll be more than happy to help you out!

Customizing the age verification popup

This code snippet comes with a fair share of customizable options: colors, text, font sizes and more. To edit them, please do the following:

  1. In your Shopify admin, navigate to Online Store > Themes >Customize.
    Accessing the customize page on Shopify admin
  2. Scroll all the way down and navigate to Theme settings >Age Verification Popup by EZFY
  3. Inside the Age Verification Popup by EZFY menu you'll find all available customizable options.

Shop

You may also like

Here are some other blog posts you may be interested in.

Customers'Recommendations

Testimonials

Our clients' satisfaction is our main priority.

Danail Ilev's on Facebook.

DanailIlev

Sofia, Bulgaria

10/10!!! Customization and bug repairs that were impossible for a few previous devs of mine were an easy task for Diego! Honestly cannot recommend him enough. If you like testing different tweaks on your site or have an annoying bug - he's the man. Also his response time is of the charts + same day delivery (Amazon of devs 😁)
Review source
Brogan Domaschenz's on Facebook.

BroganDomaschenz

Australia

VERY VERY IMPRESSED! - understood exactly what i was trying to get across and produced something even better then i could of imagined in a shorter time frame then expected and in a very professional manner. Even though its the festive season, and i needed the coding done urgently, you were quick to respond and get in and get the job done, sacrificing your own holiday time, you absolutely went above and beyond all expectations. I cant recommend you enough!!! 🔥🔥🔥 Top Bloke!
Review source
Mackenzie Dodge's on Facebook.

MackenzieDodge

Colorado, USA

Diego was so easy to work with, I literally had the code to fix the announcement banner on our shopify store in less than 15 minutes! From the time I messaged him on FB to the time I had the code with instructions in my email I barely had time to get coffee! Plus payment was affordable and easy! I wish I had the week back I tried to fix it myself. Will definitely message them FIRST in the future!
Review source
Ibraheem Nadeem's on Facebook.

IbraheemNadeem

Michigan, USA

Diego is amazing at what he does. I've been using his web development services for over a year (I have 20+ projects completed with the EZFY team) and he is always super helpful. His CRO tips are incredible and have definitely helped my conversion rates! Super fast turn around time and always willing to help with support after the project is done. HIGHLY Recommend Diego and the EZFY team for all your Shopify web development needs!
Review source
Anna Dineva's on Facebook.

AnnaDineva

Paris, France

Diego is great ! Very responsive and customizes everything to your wish. Very friendly and comprehensive, + the delivery is immediate. I enjoy a lot working with him ! Recommend 100% !
Review source
Matt Reseigh's on Facebook.

MattReseigh

Adelaide, Australia

Diego was extremely accommodating and easy to work with. He has an extensive amount of knowledge and is willing to go above and beyond. I will certainly be using his services again in the future. Highly recommend!
Review source
Ronny Berco's on Facebook.

RonnyBerco

Toronto, Ontario

Incredible work - I got them to help fix some things on my Shopify store and for such a great price! They were extremely fast and went above and beyond in filling my request. On top of that they made even more great suggestions on fixes I can do for the site. Thanks! Will definitely work with you again.
Review source
Mev Omie's on Facebook.

MevOmie

Melbourne, Australia

One of the best website developers out there! Always on time and exceeds expectations!
Review source
Daniel Walker's on Facebook.

DanielWalker

Melton, Australia

Super happy with Diego’s work! He was quick to help out, easy to communicate with, and finished the work I needed at a very high standard! Thank you Diego!
Review source
Wei Tan's on Facebook.

WeiTan

Australia

Diego is a great resource. He's prompt and highly accommodating, which all leads to a great end result. Highly recommended!
Review source
Shawn Pansiri's on Facebook.

ShawnPansiri

Working with Diego was one of the best experiences I have ever had he is a professional and knows his stuff, anything you ask he will get it done he will also go out of his way and help you out if your knowledge is limited in some areas. One of the best hires I have come across and will hire in a heartbeat. Keep up the good work Diego!
Review source
Jeffrey Richardson's on Facebook.

JeffreyRichardson

Toronto, Ontario

This team went FAR beyond my expectations! It felt as if i had another employee, instead of a service. Their recommendations and exceptional work made my project come out perfectly. Their ability to show me examples, modify at no cost and finish everything extremely fast was amazing. will work with these guys for now on.
Review source
Conny Segervall's on Facebook.

ConnySegervall

Nykarleby, Finland

Hands down the best agency I have ever worked with. Always happy with the awesome results :)
Review source
Richard Agyemang's on Facebook.

RichardAgyemang

Philadelphia, USA

He is the best at what he does. I have worked with a couple of developers but he is by far the best. Thanks for such an amazing job on my site. I 100% recommend him
Review source

Contact Us

Let us know what type of customizations you're looking for.

Send us an e-mail and we'll get back to you within 24 hours! Before you click on "send message" please make sure to do the ReCaptcha so your e-mail can be sent safely.

Loading...