Last active
January 26, 2019 01:25
-
-
Save atikju/4d914bf21dcd38ff6a738fe2cfe787d8 to your computer and use it in GitHub Desktop.
Shopify - Create / Display Account Confirmation POP UP
This file contains hidden or 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
| {% comment %} | |
| Add this snippet to your snippets folder and then include it at the very bottom of your theme.liquid right before </body> | |
| The following script using fancybox app script. If your theme already has it in your theme, you can delete the fancy apps scripts. | |
| {% endcomment %} | |
| {% if template.name == 'index' %} | |
| <!-- Fancy apps Scripts --> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.6/dist/jquery.fancybox.min.css" /> | |
| <script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.6/dist/jquery.fancybox.min.js"></script> | |
| <script> | |
| $(document).ready(function(){ | |
| var ref = document.referrer; | |
| //here challenge and register are the page handles from where the newly created customers comes to the shopify | |
| //homepage. And we are checking if they are coming from there. | |
| if(ref.indexOf('challenge') > 0 || ref.indexOf('register') > 0){ | |
| $.fancybox.open('<div class="message"><h2>Thank You!</h2> <p>We have successfully created your account!</p></div>'); | |
| } | |
| }); | |
| </script> | |
| {% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment