Hi Eli,
thank you for your answer! I’ve tried updating the initiate to the line_items variable, but it unfortunately didn’t work. Please find the full code below:
<!--
templateType: quote
isAvailableForNewContent: true
label: Modern
screenshotPath: ../images/modern.png
-->
{% extends '/cms-quotes-theme-climatiq/templates/layouts/base.html' %}
{% from '../imports/mock_data.html' import SAMPLE_TEMPLATE_DATA as mock_data %}
{% set QUOTE = template_data.quote %}
{% block stylesheet %}
{{ require_css(get_asset_url("../css/modern.css")) }}
{% endblock stylesheet %}
{% block body %}
{% require_css %}
<style>
.line-items__table #line-items__table-body {
border-top: 2px solid rgba({{ theme.global_colors.primary_color.color|convert_rgb }}, {{ theme.global_colors.primary_color.opacity / 100 }});
border-bottom: 2px solid rgba({{ theme.global_colors.primary_color.color|convert_rgb }}, {{ theme.global_colors.primary_color.opacity / 100 }});
}
{% if module_data|attr('logo')|attr('hidden') %}
.hs-quotes .header { display: none; }
{% endif %}
{% if module_data|attr('quote_name')|attr('hidden') &&
module_data|attr('buyer_company')|attr('hidden') &&
module_data|attr('buyer_contacts')|attr('hidden') &&
module_data|attr('reference')|attr('hidden') &&
module_data|attr('quote_created')|attr('hidden') &&
module_data|attr('quote_expires')|attr('hidden') &&
module_data|attr('sender_user')|attr('hidden')
%}
.hs-quotes .banner--top { display: none; }
{% endif %}
{% if module_data|attr('line_items_table')|attr('hidden') %}
.hs-quotes .line-items { display: none; }
{% endif %}
{% if module_data|attr('terms')|attr('hidden') %}
.hs-quotes .terms { display: none; }
{% endif %}
{% if !QUOTE.hs_esign_enabled && !QUOTE.hs_show_signature_box %}
.hs-quotes .esign { display: none; }
{% endif %}
{% if module_data|attr('payment-schedule')|attr('hidden') || !ASSOCIATED_OBJECTS.payment_schedule %}
.hs-quotes .payment-schedule { display: none; }
{% endif %}
{% if !QUOTE.hs_payment_enabled %}
.hs-quotes .payment { display: none; }
{% endif %}
{% if module_data|attr('sender_contact')|attr('hidden') &&
module_data|attr('sender_company')|attr('hidden')
%}
.hs-quotes .contacts { display: none; }
{% endif %}
{% if module_data|attr('download')|attr('hidden') &&
module_data|attr('print')|attr('hidden')
%}
.hs-quotes .options { display: none; }
{% endif %}
</style>
{% end_require_css %}
{% macro get_ecoinvent_term(line_items) %}
{% set items = line_items|pprint %}
{% if line_items is string_containing "Ecoinvent" or line_items is string_containing "ecoinvent" %}
<li style='margin-bottom: 10px;'> With regards to ecoinvent Limited Life Cycle Impact Assessment Data (“Limited LCIA”) , the Customer represents and warrants that employees or affiliates of the Customer (Climatiq’s “Tool Users”) do not:
<ol>
<li style='margin-bottom: 10px;'>use, copy, adapt, change, translate, modify, sub-license, sell or distribute all or any portion of the Limited LCIA other than expressly sub-licensed in this agreement or otherwise expressly required by mandatory law;</li>
<li style='margin-bottom: 10px;'>reproduce, disseminate or publicly display the Limited LCIA, or any portion or derivation thereof, other than granted in this agreement; </li>
<li style='margin-bottom: 10px;'>grant to any third party any rights regarding the Limited LCIA (e.g. sub-licensing right);</li>
<li style='margin-bottom: 10px;'>publish or make available to others derivative databases or datasets or database-like products using all or any portion of the Limited LCIA or derivation thereof;</li>
<li style='margin-bottom: 10px;'>prepare extracts of the Limited LCIA, or any portion or derivation thereof;</li>
<li style='margin-bottom: 10px;'>use the Limited LCIA, or any portion or derivation thereof, in any other product or service;</li>
<li style='margin-bottom: 10px;'>use the Limited LCIA, or any portion or derivation thereof, to provide any service for third parties except for the studies and reports as granted in this Agreement;</li>
<li style='margin-bottom: 10px;'>use web crawlers or any other types of software or hardware technology to automatically download or index the Limited LCIA;</li>
<li style='margin-bottom: 10px;'>reverse engineer, decompile and disassemble the Tool to derive the Limited LCIA therefrom;</li>
<li style='margin-bottom: 10px;'>disclose the login details for access to the Tool to any third party, or to allow third parties to access the Tool;</li>
<li style='margin-bottom: 10px;'>assign the sub-licensing rights to any third party.</li>
</ol>
Section 10, particularly 10.5 of Climatiq’s Terms and Conditions do not apply to the Limited LCIA.
<br/>
The customer acknowledges that EcoInvent has beneficiary rights regarding the enforcement of the restrictions pursuant to the preceding paragraph.
<br/>
If the customer becomes aware that its Tool User breaches any of the restrictions according to this section, the customer shall notify Climatiq immediately in writing of the breach. <br/>
Only calculated results (no raw emission factor data) is made available. <br/>
The Customer agrees that Climatiq Technologies GmbH passes on the following information to ecoinvent:
<ol>
<li style='margin-bottom: 10px;'>Name and location of the customer</li>
<li style='margin-bottom: 10px;'>Aggregated, anonymised number of API calls for all of Climatiq’s customers that use ecoinvent</li>
</ol>
</li>
{% endif %}
{% endmacro %}
{% macro get_ecoinvent_term() %}
{% set line_items = template_data.quote.associated_objects.line_items %}
{% set hasEcoinvent = {status : false} %}
{% for unit in line_items %}
{% if unit["name"] is string_containing "Ecoinvent" or unit["name"] is string_containing "ecoinvent" %}
{% do hasEcoinvent.update({status: true}) %}
{% endif %}
{% endfor %}
{% if hasEcoinvent.status %}
<li> With regards to ecoinvent Limited Life Cycle Impact Assessment Data (“Limited LCIA”) , the Customer represents and warrants that employees or affiliates of the Customer (Climatiq’s “Tool Users”) do not:
<ol>
<li>use, copy, adapt, change, translate, modify, sub-license, sell or distribute all or any portion of the Limited LCIA other than expressly sub-licensed in this agreement or otherwise expressly required by mandatory law;</li>
<li>reproduce, disseminate or publicly display the Limited LCIA, or any portion or derivation thereof, other than granted in this agreement; </li>
<li>grant to any third party any rights regarding the Limited LCIA (e.g. sub-licensing right);</li>
<li>publish or make available to others derivative databases or datasets or database-like products using all or any portion of the Limited LCIA or derivation thereof;</li>
<li>prepare extracts of the Limited LCIA, or any portion or derivation thereof;</li>
<li>use the Limited LCIA, or any portion or derivation thereof, in any other product or service;</li>
<li>use the Limited LCIA, or any portion or derivation thereof, to provide any service for third parties except for the studies and reports as granted in this Agreement;</li>
<li>use web crawlers or any other types of software or hardware technology to automatically download or index the Limited LCIA;</li>
<li>reverse engineer, decompile and disassemble the Tool to derive the Limited LCIA therefrom;</li>
<li>disclose the login details for access to the Tool to any third party, or to allow third parties to access the Tool;</li>
<li>assign the sub-licensing rights to any third party.</li>
</ol>
Section 10, particularly 10.5 of Climatiq’s Terms and Conditions do not apply to the Limited LCIA.
<br/>
The customer acknowledges that EcoInvent has beneficiary rights regarding the enforcement of the restrictions pursuant to the preceding paragraph.
<br/>
If the customer becomes aware that its Tool User breaches any of the restrictions according to this section, the customer shall notify Climatiq immediately in writing of the breach. <br/>
Only calculated results (no raw emission factor data) is made available. <br/>
The Customer agrees that Climatiq Technologies GmbH passes on the following information to ecoinvent:
<ol>
<li>Name and location of the customer</li>
<li>Aggregated, anonymised number of API calls for all of Climatiq’s customers that use ecoinvent</li>
</ol>
</li>
{% endif %}
{% endmacro %}
<body class="hs-quotes hs-quotes--modern">
<div class="header">
<div class="container">
{% module "logo" path="../modules/quote_logo" %}
</div>
</div>
<div class="colored-section banner banner--top">
<div class="container">
{% module "quote_name"
label="Quote name"
path="@hubspot/rich_text"
html="<h1>{{ personalization_token('template_data.quote.hs_title', '') }}</h1>"
%}
<div class="quote-info_wrapper">
<div class="recipient-info">
{% module "buyer_company" path="../modules/buyer_company" %}
{% module "buyer_contacts" path="../modules/buyer_contacts" %}
</div>
<div class="quote-info">
{% module "reference" path="../modules/reference" %}
{% module "quote_created" path="../modules/quote_created" %}
{% module "quote_expires" path="../modules/quote_expires" %}
{% module "sender_user"
label="Created by"
path="@hubspot/rich_text",
html={{
template_translations.quote_created_by.message ~ " " ~ ptoken_sender_full_name ~ "<br>" ~
ptoken_sender_title ~ "<br>" ~
ptoken_sender_email ~ "<br>" ~
ptoken_sender_phone
}}
%}
</div>
</div>
</div>
</div>
<div class="container line-items">
{% module "line_items_table"
path="../modules/line_items_table",
line_item_column=[
{
"column_title": template_translations.item_and_description.message,
"column_property": "item_description"
},
{
"column_title": template_translations.quantity.message,
"column_property": "quantity"
},
{
"column_title": template_translations.unit_price.message,
"column_property": "price"
},
{
"column_title": template_translations.total.message,
"column_property": "amount"
}
]
%}
</div>
<div class="container terms">
{% set TIMEZONE = QUOTE.hs_timezone || 'US/Eastern' %}
{% set LOCALE = QUOTE.hs_locale || 'en-US' %}
{% set ecoinvent_terms = 1%}
{% module "terms"
label="Terms"
path="@hubspot/rich_text",
html={{
ptoken_terms ~
"Additional data and integration consulting or other similar professional services to be agreed upon with the customer in advance, and billed at $2,000 per day (8 hours) at the end of the month where such services were rendered. Any additional support or consulting is subject to a follow-up order.</br></br>" ~
"<h2>" ~ template_translations.purchase_terms.message ~ "</h2>" ~
"<ol>
<li style='margin-bottom: 10px;'>This Service Order forms a binding contract upon signature below prior to the expiration date above. In the event of a conflict between this Service Order and Climatiq’s General Terms and Conditions, terms agreed in this Order Form shall prevail. </li>
<li style='margin-bottom: 10px;'>Commercial use permitted. This does not apply the usage of Ecoinvent unless explicitly specified.</li>
<li style='margin-bottom: 10px;'>Discounts applied will not be applicable to any renewal terms.</li>
<li style='margin-bottom: 10px;'>Upon termination in accordance with clause 9 of Climatiq’s General Terms and Conditions, Customer shall cease to use the Data within one month and shall purge and destroy any and all complete or partial copies of the Data in any form or medium that are in Customer’s possession or control, except as may be necessary for legal or regulatory archival purposes. At Climatiq’s request, Customer shall certify to Climatiq in writing that Customer has fully complied with this requirement.</li>
<li style='margin-bottom: 10px;'>Customer is not entitled to undertake, cause, permit or authorize any reverse assembling, reverse compiling, back-calculating, decompiling, disassembling, hacking, or other reverse engineering, and/or translating or extracting of the Products, or any portions thereof. </li>
<li style='margin-bottom: 10px;'>Upon completion of the Service Order and execution by Customer and submission to Climatiq, this Service Order shall become non-cancellable, legally binding and governed by the <a href='https://www.climatiq.io/terms'>Climatiq General Terms and Conditions</a> and, if applicable, the <a href='https://www.climatiq.io/privacy-policy'>Climatiq Privacy Policy</a>. </li>
<li style='margin-bottom: 10px;'>This Service Order will renew for successive 12-month terms unless the Customer gives Climatiq at least one (1) month’s notice of non-renewal to billing@climatiq.io before the end of the applicable term. The monthly charges and rates in effect in the final month prior to renewal will apply to any renewal term. Any annual charges in effect during the final year of the term will apply to any renewal term. </li>"
~ get_ecoinvent_term() ~ "
</ol>"
}}
%}
</div>
<div class="container esign">
{% module "signature" path="@hubspot/quote_signature" %}
</div>
<div class="container payment-schedule">
{% module "payment-schedule" path="@hubspot/quote_payment_schedule" %}
</div>
<div class="container payment">
{% module "payment" path="@hubspot/quote_payment" heading_tag="h2" %}
</div>
<div class="container contacts">
{% module "sender_contact" path="../modules/sender_contact" %}
<br>
{% module "sender_company"
label="Sender company"
path="@hubspot/rich_text"
html="
<div>{{ personalization_token('template_data.quote.hs_sender_company_name', '') }}</div>
<div>{{ personalization_token('template_data.quote.hs_sender_company_address', '') }}</div>
<div>{{ personalization_token('template_data.quote.hs_sender_company_address2', '') }}</div>
<div>
{{ personalization_token('template_data.quote.hs_sender_company_city', '') }},
{{ personalization_token('template_data.quote.hs_sender_company_state', '') }}
{{ personalization_token('template_data.quote.hs_sender_company_zip', '') }}
</div>
<div>{{ personalization_token('template_data.quote.hs_sender_company_country', '') }}</div>
"
%}
</div>
<div class="container options">
<div class="option_wrapper">
{% module "download" path="@hubspot/quote_download" %}
{% module "print" path="../modules/print" %}
</div>
</div>
</body>
{% endblock body %}