Liquid Variables and showing variant titles in order confirmation email

New Member
6 0 0

Hi, we process our orders by receiving our order confirmation emails. I am setting up some new products with two variants. In this case a box of cinnamon buns, with variants being 4 or 6 buns. However when we receive the order confirmation email, it doesn't show the variant information. Here is the code for the order confirmation email. 


"<ul style="list-style-type:none">{% for line in line_items %}<li> <img src="{{ line | img_url: 'thumb' }}" /> {{ line.quantity }}x {{line.title }} (sku: {{ line.sku }})<br>{% for p in %}{% if p.first == "builder_id" or p.first == "builder_info" or p.first == "master_builder" or p.last == "" or p.first == "_ZapietId" %}{% else %}{{ p.first }}: {% if p.last contains '/uploads/' %}<a class="lightbox" href="{{ p.last }}">{{ p.last | split: '/' | last }}</a><br>{% else %}{{ p.last }}<br>{% endif %}{% endif %}{% endfor %}</li>{% endfor %}</ul>"


Currently the order confirmation email will have a line like this


"1 x Cinnamon bun box"


It should appear like this


"1 x Cinnamon bun box - 6 buns"


According to support page, the {{line.title }} will show the name of the product at the time of sale, followed by a dash and the name of the variant at the time of sale. The variant name isn't included when it's a “Default Title”.


So what is "default title" I can't find anything on this for variants or how to change it. I assume that is why the variant title isn't appearing on the order confirmation email? 


Any help much appreciated. 

Replies 0 (0)