You can use the item.supplier_product.product_name variable to include the supplier product name of a catalog product in the Worksheet Template.
Here is an example of how you can modify the default Worksheet Template to include the supplier product name for a catalog product ordered:
Default Code
<div class="lineitem_summary_col1">
<h3>Color</h3>
{% if (item.is_freeform?) %}
<span>{{ item.free_form_color }}</span>
{% else %}
{% for color in item.chosen_colors %}
<span class="colorbox">
<span style="background: {{color.color}}; height:50px;">
{% if color.swatch_image_20 %}
<img src="{{ color.swatch_image_20 }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0">
{% else %}
{% endif %}
</span>
</span>
{{ color.color_name }}
{% endfor %}
{% endif %}
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="lineitem_summary_col1">
<span><h3>Supplier Product Name</h3></span>
{{item.supplier_product.product_name}}
<h3>Color</h3>
{% if (item.is_freeform?) %}
<span>{{ item.free_form_color }}</span>
{% else %}
{% for color in item.chosen_colors %}
<span class="colorbox">
<span style="background: {{color.color}}; height:50px;">
{% if color.swatch_image_20 %}
<img src="{{ color.swatch_image_20 }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0">
{% else %}
{% endif %}
</span>
</span>
{{ color.color_name }}
{% endfor %}
{% endif %}
</div>
Comments
0 comments
Please sign in to leave a comment.