Hi Shopify community,
For every product purchased on my store, my order confirmation email provides a link to the respective product page. I’d like to remove that link if the product variant title or line item title contains the word “Details”. I’d greatly appreciate anyone who can show me the html code needed for this, and where to insert it in my order confirmation template.
The screenshot below should illustrate my goal. Currently, customer orders are split into two products: the product itself and the product variants. I use a third-party app for custom variants, hence the product being split into two products. I’d like to keep the first product link, but remove the second product link at the bottom, since it doesn’t actually link to the relevant product.
Current order confirmation html listed as well. Thank you for any assistance you can provide.
Screenshot
Current order confirmation html
{% if line.product.title %}
{% assign line_title = line.product.title %}
{% else %}
{% assign line_title = line.title %}
{% endif %}
{% if line.quantity < line.quantity %}
{% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}
{{ line_title }}
{% if line.variant.title != 'Default Title' %}
{% assign variantOptions = line.variant.title | split: ' / ' %}
{% for option in variantOptions %}
{{ option }}
{% endfor %}
{% endif %}
{% for p in line.properties %}
{% if p.last contains ' | ' %}
{% assign parts = p.last | split: ' | ' %}
{% capture pLast %}
{% for part in parts %}
{% unless part contains '$' %}
{{ part }}
{% endunless %}
{% endfor %}
{% endcapture %}
{% else %}
{% assign pLast = p.last | append:
%}
{% endif %}
{{ p.first }}:
{{ pLast }}
{% endfor %}
**View Tasting Menus**
