Ad

Shopify Notification: How To Link Product Image & Name To The Product Page In Email Notifications?

- 1 answer

Trying to link product in the email notifications.

I want the customer to be able to click on the ordered item image/name & link it to item's product page.

Is this possible?

Ad

Answer

Sure! Try something like this:

{% for line in line_items %} 
  ...
  <a target="_blank" rel="nofollow noreferrer" href="{{ shop.url | append: line.product.url }}">{{ line.title }}</a>
  ...
{% endfor %}

I appended the product url onto the shop url because product.url returns a relative url. If the customer is accessing the link from an email you need to include the full url.

Ad
source: stackoverflow.com
Ad