You can use the item.all_views variable to show all product views in the Order Template.
Here is an example of how you can modify the default Order Template to show all product views (including blank and decorated views).
Default Code
{% for item in order.main_items %}
<div class="image_row" style="display:block;page-break-inside:avoid;">
<h2>
{% if (item.supplier_product) and (item.is_not_freeform?) %}
{{ item.supplier_product.product_code }} -
{% endif %}
{{ item.product_name }}
</h2>
{% if (item.is_freeform?) or (item.is_asi?) %}
{% if item.has_extra_options? %}
<p>{{ item.extra_options}}</p>
{% endif %}
{% endif %}
<ul class="image">
{% for view in item.views %}
<li>
<label>{{ view.name }}</label>
<img src="{{ view.image_url_300}}" alt="[]" />
</li>
{% endfor %}
{% if (item.is_asi?) %}
<li>
<img src="/manage/asi/image/{{ item.asi_image }}?size=normal" width="300px" alt="[]" />
</li>
{% endif %}
Custom Code
Replace the default code shown above with the code in red as follows:
{% for item in order.main_items %}
<div class="image_row" style="display:block;page-break-inside:avoid;">
<h2>
{% if (item.supplier_product) and (item.is_not_freeform?) %}
{{ item.supplier_product.product_code }} -
{% endif %}
{{ item.product_name }}
</h2>
{% if (item.is_freeform?) or (item.is_asi?) %}
{% if item.has_extra_options? %}
<p>{{ item.extra_options}}</p>
{% endif %}
{% endif %}
<ul class="image">
{% for view in item.all_views %}
<li>
<label>{{ view.name }}</label>
<img src="{{ view.image_url_300}}" alt="[]" />
</li>
{% endfor %}
{% if (item.is_asi?) %}
<li>
<img src="/manage/asi/image/{{ item.asi_image }}?size=normal" width="300px" alt="[]" />
</li>
{% endif %}
Result
Still have questions? In your DecoNetwork Admin, use the Universal Search box in the top bar to find more related help guides. Need more help? Click the icon next to the search box to open the help menu and submit a support ticket. Our Client Services team is ready to assist!
Comments
0 comments
Please sign in to leave a comment.