How to modify the dynamically created Shopify site after Newsletter subscription

Otaro
Excursionist
18 0 5
Dear all,

 

I set up a 10% discount coupon for newsletter subscribers. 

Now I am wondering if somebody could show me how I can modify this page: https://otaro-shop.com/account/subscribe?email=elg72723%40zzrgg.com&token=-4fl89huPoxEiHmCG4wVEC-alL...

 

It seems like this page is generated dynamically for each Subscriber of our Newsletter. I would like to add a nice button to activate a coupon (10% discount after he successfully susbscribed) and some basic HTML.

 

I know that I can add some text via the "Language" option (how already done) but HTML or adding a button is not possible with this adjustment... 

 

Highly appreciate your help!

 

Best,

Adrian

tokant
Excursionist
19 0 1

Did you find a solution? I am also not able to finde the pages for email marketing (/account/subscribe etc.)

0 Likes
phil_CM
Excursionist
76 1 4

Did you find a solution to this?

0 Likes
tokant
Excursionist
19 0 1

I haven’t tried it out but these pages (although dynamically created and controlled by Shopify) use the page template. So you can use a conditional in liquid, test if the visitor is on the capcha page and then show a custom section or other code.

0 Likes
phil_CM
Excursionist
76 1 4
As in the page template for pages?
0 Likes
tokant
Excursionist
19 0 1

Sorry, I had to find the reference post. It is the theme.liquid file - not page.liquid.

{% if request.path == '/challenge' %}
{% render 'challenge' %}
{% else %}
{{ content_for_layout }}
{% endif %}

So in the theme.liquid file you can make a conditional for the request.path and then render a custom section.
However, in the case of the challenge page (the first step after the newsletter signup form has been submitted and captcha is enabled), the whole captcha validation might not be so easy. You'd need to do some research on the pitfalls and know exactly in which scenarios the challenge page is shown.

phil_CM
Excursionist
76 1 4
The page I am on about is the subscription confirmation page. It’s a page displayed after the customer verify a their subscription in the email they are sent when double opt-in is enabled. Sounds like this method might still work?
0 Likes
tokant
Excursionist
19 0 1

Yes, in theme.liquid just check what the request.path is and you can replace {{ content_for_layout }} with anything you like:

request.path

  

0 Likes
phil_CM
Excursionist
76 1 4

So I replaced

{{ content_for_layout }}

 

with

{% if request.path == '/account/subscribe' %}
{% render 'THIS IS A TEST' %}
{% else %}
{{ content_for_layout }}
{% endif %}

 

It replaced the content but with the following:

Liquid error: Could not find asset snippets/THIS IS A TEST.liquid

 

Do I need to create anothe file too?

0 Likes
phil_CM
Excursionist
76 1 4

Or do I just do it like this:

{% if request.path == '/account/subscribe' %}
<h1>This is a test - MY HTML HERE</h1>
{% else %}
{{ content_for_layout }}
{% endif %}

 

0 Likes