Unsubscribe links in automatic emails
Give your customers the option to unsubscribe from automatic follow-up emails after purchases and product reviews - with a simple link in the email.
You can add an unsubscribe link in your automatic emails so that your customers can opt out of receiving them. This applies to two email types:After_purchase_mail andProduct_review.
How it works
When the customer clicks the unsubscribe link, Shoporama registers that they do not want the email type in question. The customer is then redirected to the front page of your online store with a confirmation.
Unsubscribe URL format
The unsubscribe link has the following format:
Post-purchase email:
https://din-shop.dk/unsubscribe?email=kunde@example.com&type=after_purchase_mail
Product reviews:
https://din-shop.dk/unsubscribe?email=kunde@example.com&type=product_review
Redirect after unsubscribing
Once the customer has unsubscribed, they will be redirected to:
https://din-shop.dk/?unsubscribed=after_purchase_mail https://din-shop.dk/?unsubscribed=product_review
You can use the $unsubscribed variable in your theme to display a confirmation message on the front page.
Example of Smarty code in your email template
Insert the following at the bottom of e.g. after_purchase.html:
<p><small><a href="<{$webshop->getUrl()|escape}>/unsubscribe?email=<{$order->getEmail()|escape}>&type=after_purchase_mail"> Unsubscribe from these emails </a></small></p>
And similarly in product_review_mail.html:
<p><small><a href="<{$webshop->getUrl()|escape}>/unsubscribe?email=<{$order->getEmail()|escape}>&type=product_review"> Unsubscribe these mails </a></small></p>
Note: It is only possible to unsubscribe after_purchase_mail and product_review. Other mail types such as order confirmations and shipping messages cannot be unsubscribed.