Display line items data within an automated Hubspot e-mail template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="data-container"> | |
<div class="data-title">Details of your order</div> | |
<div class="data"> | |
<table style="width:100%;font-size:.8rem;"> | |
<tr> | |
<th style="width:2%;">Pos</th> | |
<th style="width:2%;">Qty</th> | |
<th style="width:70%;">Name</th> | |
<th style="width:20%;text-align:right;">Price</th> | |
</tr> | |
<!-- Get all line items from the deal sorted like in the deal UI --> | |
{% set items = crm_associations(deal.hs_object_id, "HUBSPOT_DEFINED", 19, "limit=100&orderBy=hs_position_on_quote", "name,price,quantity,hs_position_on_quote", true)%} | |
{% for line_item in items.results %} | |
<tr> | |
<!-- Use loop.index for a 1-based index --> | |
<td style="width:2%;">{{loop.index}}</td> | |
<td style="width:2%;">{{line_item.quantity}}</td> | |
<td style="width:10%;">{{line_item.name}}</td> | |
<td style="width:20%;text-align:right;white-space:nowrap;">{{line_item.price}}</td> | |
</tr> | |
{% endfor %} | |
</table> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment