Add custom text to the account/subscribe page

Solved

Add custom text to the account/subscribe page

alyxklem
Excursionist
26 0 10

Hi,

 

For reference my website is thepassprints.com.

 

I'm using Dawn theme. In the footer I'd like to use the Email Signup feature. This feature allows customers to input their email address. Shopify then automatically emails them a, "Confirm you'd like to subscribe," email, which can be customized in customer notifications. In that email there is a button/link which takes them back to your website once they confirm they'd like to subscribe, but I can't find this page within the editor or code.

 

I'd like to add some custom text to this page, https://thepassprints.com/account/subscribe?token=o6NCwM1VZ1IGgs4AgNsiWZv7W7Xtc7obc0tKnQAxEYdmvjGdDc.... Can somebody help me find it so I can add some text. I'd like the page to say, "Thanks for subscribing! For 25% off your first order, please use code SUBSCRIBE25 at checkout, or shop now with the discount automatically applied by clicking here: https://thepassprints.com/discount/SUBSCRIBE25."

 

I tried looking for the file in the code, but couldn't fine it. Help!

 

Thanks

 

Alyx

 

Email signup in the footer:

alyxklem_1-1744847459019.png

The account/subscribe page

alyxklem_0-1744847401006.png

 

Accepted Solution (1)

Abel_Lesle
Shopify Partner
277 5 22

This is an accepted solution.

@alyxklem - love this post. You made me ponder for a bit and I went and checked my own store just to see if this is true. (I had double opt in disabled - had to enable it to recreate the behavior you've shown)

 

  • This page is actually fully rendered in by Shopify and it's not present in the theme's code
  • Shopify does not expose a Liquid template for this URL. "/account/subscribe?..."

So to get around this I added this snippet of code to my theme.liquid (add it anywhere)

<script>
  document.addEventListener("DOMContentLoaded", function () {
    const pathname = window.location.pathname;
    if (pathname === "/account/subscribe") {
      const container = document.createElement("div");
      container.style = "padding: 2rem; text-align: center;";
      container.innerHTML = `
        <h2>Thanks for subscribing!</h2>
        <p>For 25% off your first order, use code <strong>SUBSCRIBE25</strong> at checkout.</p>
        <p><a href="/discount/SUBSCRIBE25" style="background: black; color: white; padding: 0.75rem 1.5rem; text-decoration: none; border-radius: 4px;">Shop now with discount</a></p>
      `;
      document.body.innerHTML = "";
      document.body.appendChild(container);
    }
  });
</script>

 

Here's how that looks like now on my thank you for subscribing page - this script literally overrides the page of sorts. But you can be little less intrusive and prolly inject it with a bit more grace by asking chatGPT nicely and providing it a target class / div under which you need the code to be displayed 🙂

Abel_Lesle_0-1745496176593.png

Hope this helps someone who stumbles into this! Please mark this as a solution so that it can be helpful to others ❤️

 

Founder
Dollarlabs: Ultimate Discounts (5★) – If you can think of a discount, you can build it
Dollarback: Cashback & Loyalty (5★) – Simple cashback. Powerful loyalty.

View solution in original post

Replies 2 (2)

Abel_Lesle
Shopify Partner
277 5 22

This is an accepted solution.

@alyxklem - love this post. You made me ponder for a bit and I went and checked my own store just to see if this is true. (I had double opt in disabled - had to enable it to recreate the behavior you've shown)

 

  • This page is actually fully rendered in by Shopify and it's not present in the theme's code
  • Shopify does not expose a Liquid template for this URL. "/account/subscribe?..."

So to get around this I added this snippet of code to my theme.liquid (add it anywhere)

<script>
  document.addEventListener("DOMContentLoaded", function () {
    const pathname = window.location.pathname;
    if (pathname === "/account/subscribe") {
      const container = document.createElement("div");
      container.style = "padding: 2rem; text-align: center;";
      container.innerHTML = `
        <h2>Thanks for subscribing!</h2>
        <p>For 25% off your first order, use code <strong>SUBSCRIBE25</strong> at checkout.</p>
        <p><a href="/discount/SUBSCRIBE25" style="background: black; color: white; padding: 0.75rem 1.5rem; text-decoration: none; border-radius: 4px;">Shop now with discount</a></p>
      `;
      document.body.innerHTML = "";
      document.body.appendChild(container);
    }
  });
</script>

 

Here's how that looks like now on my thank you for subscribing page - this script literally overrides the page of sorts. But you can be little less intrusive and prolly inject it with a bit more grace by asking chatGPT nicely and providing it a target class / div under which you need the code to be displayed 🙂

Abel_Lesle_0-1745496176593.png

Hope this helps someone who stumbles into this! Please mark this as a solution so that it can be helpful to others ❤️

 

Founder
Dollarlabs: Ultimate Discounts (5★) – If you can think of a discount, you can build it
Dollarback: Cashback & Loyalty (5★) – Simple cashback. Powerful loyalty.

alyxklem
Excursionist
26 0 10

Amazing! Thank you very much.