Thank You Page Redirect for Newsletter Subscribers in Kalles Theme

Hello,

I am using Kalles theme, how can I redirect customers who subscribe to newsletter in popup and footer form to a “Thank You Page” after they subscribe?

Thank you

@LitExtension you are the best for this

Hi @atertonien ,

Please send your site and if your site is password protected, please send me the password. I will check it.

1 Like

Hi @LitExtension ,

I have added the following code inside “newsletter.liquid” in snippets.

However I would like to open this page in another tab, not on the same one.

And also the page refreshes at the footer, I would like it at the top of the page in order to see correctly the “Thank you Page”

{%- if request.locale.iso_code == 'en' -%}
        
        {%- else -%}
        
        {%- endif -%}

Hi @atertonien ,

You can use JS to do this:

Code:


then you need to remove the newly added return_to code.

Hope it helps!

1 Like

Hi @LitExtension ,

thanks so much.

I have applied your code.

I changed a little bit the “language” part in order to be sure for in anyway a signup confirm comes up.
I removed “?customer_posted=true#contact_form” from the links because it was opening about 10-15 tabs.

The problem is that now this opens 2 new tabs instead of only one and also most of browsers block this kind of opening (I don’t know if it is because it opens 2 tabs instead of only one for security reasons):

{%- form 'customer', class:'js_mail_agree mc4wp-form pr z_100' -%}
        
        

           

              

              

           

          {%- if checkbox_mail -%}{%- render 'conditions_mail',html:'p',margin:'mt__15',stt_link:settings.link_mail,sid:sid -%}{%- endif -%}
        

         
            {%- if form.posted_successfully? -%}
           
{{ 'general.newsletter_form.confirmation' | t }}

           
           {%- elsif form.errors -%}
           
{{ form.errors | default_errors }}

           {%- endif -%}
         

     {%- endform -%}

Hi @atertonien ,

It opens 2 tabs because you have added in 2 places, 1 in footer and 1 in popup, you need to remove the code in the popup and just leave the code in the footer, it will work for both.

Hope it helps!

1 Like

Hi @LitExtension ,

both PopUp and Footer forms refer to Newsletter.liquid file. They render the same file.

So how could I remove it from popup?

Hi @atertonien ,

First go to sections> footer_top.liquid file, find ‘newsletter’ and add code.

Code:

{%- render 'newsletter',newl_des:bk_stts.newl_des,btn_icon:bk_stts.btn_icon,checkopen:true -%}

Then go to newsletter.liquid file and change code:

Hope it helps!

1 Like

Unfortunately it does not work. It just refreshes the page without even going on the correct page. I think that the if is set to false even if I have written true inside footer-top.liquid. Also I do not understand how this would work if the customers wants to use the popup form because the javascript you gave me would work only for footer form.

I have put back the old code without the javascript. Also because the script you gave me is bad for browsers safety as they are seen as unwanted popups.

It would just be cool to have the function below opening another tab instead of opening the link in the same page.

{%- if request.locale.iso_code == 'fr' -%}
        
             {%- elsif request.locale.iso_code == 'it' -%}
        
             {%- else -%}
        
             {%- endif -%}

Hi @atertonien ,

As far as I know, Shopify doesn’t support this. So I’ve been guiding you through the JS code.

Or you can use app for newsletter, it will help you to open tab in app’s settings.

Hope it helps!

If it helped you solve your issue, please mark it as a solution. Thank you and good luck.

1 Like