Last modified by Hypno Harem on 2022/09/30 05:00

Shopify is an ecommerce solution allowing makers to build an independent stand-alone website without the need to create things like a checkout system from the ground up.

Installing an Age Gate with Shopify

Go to Online Store->Themes->Actions->Edit Code


Expand Snippets->Add a new snippet->Name the new snippet "age-check" and hit done.


Copy and past all of the code from HERE into the new snippet and save.

Expand layout->Theme.Liquid-> search for the first use of <Body> and post in - 

{% render 'age-check' %}

The example below shows <Body> with the inclusion of a class so the entire line is <body class="gradient">. Don't worry this is the same thing. Just don't grab anything that doesn't start with "<Body" and definitely not "</Body>"


Hit save and view your site. First time visits will now receive an age gate notice like the below.


Future Topics:

Pros / Cons

Predictable Pitfalls


Need help?

If you need help with XWiki you can contact:

XWiki 14.10.13