Created
June 24, 2022 13:49
-
-
Save enamhasan/e1acfa404396a0f3e69186184a251837 to your computer and use it in GitHub Desktop.
SHOPIFY RESTRICTING ACCESS TO A PAGE / ARTICLE / PRODUCT / COLLECTION WITHOUT LOGIN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="{{ shop.locale }}"> | |
{% if template contains "wholesale" %} | |
<!-- wholesale Content --> | |
{% unless customer %} | |
{% assign send_to_login = true %} | |
{% endunless %} | |
{% endif %} | |
{% if send_to_login and request.path != "/challenge" %} | |
<!-- Need to login --> | |
<meta content="0; url=/account/login?checkout_url={{ request.path }}" http-equiv="refresh" /> | |
{% else %} | |
<head> </head> | |
<body> </body> | |
{% endif %} | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment