cancel
Showing results for 
Search instead for 
Did you mean: 

How to get subscription and unsubscribe link

How to get subscription and unsubscribe link

Hi,

 

I am trying to add the Subscribe and Unsubscribe link in email template. But how do I get the URLs? I tried following code but its blank and doesn't work.

 

<a href="{{var subscriber.getSubscriptionLink()}}">Subscribe</a> | <a href="{{var subscriber.getUnsubscriptionLink()}}">Unsubscribe</a>

 

How do I get the URL?

5 REPLIES 5

Re: How to get subscription and unsubscribe link

Hi @johndoe86cd 


Please try below code, it works for me:

<a href="{{var subscriber.getUnsubscriptionLink()}}">Unsubscribe</a>

 

Problem Solved? Please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: How to get subscription and unsubscribe link

Does not work for me, i have already used that code as mentioned in my question. I also want Subscription link.

Re: How to get subscription and unsubscribe link

Hi @johndoe86cd ,

 

Can you mention on which magento version you are trying this code.

 

Also mention in which email template you are using above code. 

 

Thanks!

Re: How to get subscription and unsubscribe link

New Order template, and version is 2.3.5-p1

Re: How to get subscription and unsubscribe link

Hello,

 

still waiting for a reply. Can anyone please help?