Hi,
I’m relatively new to Shopify liquid and I am trying to add the product name to the “New Gift Card” template under notifications.
I looked through the liquid variables and couldn’t see any product information related to Gift Cards, so I used the following code in the template but it doesn’t appear to be working.
Anyone got any suggestions?
<table align="center" class="row giftcard__topmargin">
{% for line in subtotal_line_items %}
<tr>
<td>
{% if line.product.title %}
{% assign line_title = line.product.title %}
{% else %}
{% assign line_title = line.title %}
{% endif %}
{{ line_title }}
</td>
</tr>
{% endfor %}
</table>
Also, just as a side quest question, in PHP, for example, I can use print_r() to print out an array of items that I can use on the page, is there an equivalent in liquid? For example, could I print_r(subtotal_line_items)?