<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Customize terms based on chosen line items in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/872438#M36523</link>
    <description>&lt;P&gt;Hi Eli,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!--
  templateType: quote
  isAvailableForNewContent: true
  label: Modern
  screenshotPath: ../images/modern.png
--&amp;gt;

{% 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 %}
  &amp;lt;style&amp;gt;
    .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') &amp;amp;&amp;amp;
      module_data|attr('buyer_company')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('buyer_contacts')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('reference')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('quote_created')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('quote_expires')|attr('hidden') &amp;amp;&amp;amp;
      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 &amp;amp;&amp;amp; !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') &amp;amp;&amp;amp;
      module_data|attr('sender_company')|attr('hidden')
    %}
      .hs-quotes .contacts { display: none; }
    {% endif %}

    {% if module_data|attr('download')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('print')|attr('hidden')
    %}
      .hs-quotes .options { display: none; }
    {% endif %}
  &amp;lt;/style&amp;gt;
{% 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" %}
    
      &amp;lt;li style='margin-bottom: 10px;'&amp;gt; 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:
        &amp;lt;ol&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;reproduce, disseminate or publicly display the Limited LCIA, or any portion or derivation thereof, other than granted in this agreement; &amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;grant to any third party any rights regarding the Limited LCIA (e.g. sub-licensing right);&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;prepare extracts of the Limited LCIA, or any portion or derivation thereof;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;use the Limited LCIA, or any portion or derivation thereof, in any other product or service;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;use web crawlers or any other types of software or hardware technology to automatically download or index the Limited LCIA;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;reverse engineer, decompile and disassemble the Tool to derive the Limited LCIA therefrom;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;disclose the login details for access to the Tool to any third party, or to allow third parties to access the Tool;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;assign the sub-licensing rights to any third party.&amp;lt;/li&amp;gt;
         &amp;lt;/ol&amp;gt;
        Section 10, particularly 10.5 of Climatiq’s Terms and Conditions do not apply to the Limited LCIA. 
        &amp;lt;br/&amp;gt;
        The customer acknowledges that EcoInvent has beneficiary rights regarding the enforcement of the restrictions pursuant to the preceding paragraph.
        &amp;lt;br/&amp;gt;
        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.     &amp;lt;br/&amp;gt;
        Only calculated results (no raw emission factor data) is made available.      &amp;lt;br/&amp;gt;
        The Customer agrees that Climatiq Technologies GmbH passes on the following information to ecoinvent: 
        &amp;lt;ol&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;Name and location of the customer&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;Aggregated, anonymised number of API calls for all of Climatiq’s customers that use ecoinvent&amp;lt;/li&amp;gt;
        &amp;lt;/ol&amp;gt;
      &amp;lt;/li&amp;gt;
    {% 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 %}
    
      &amp;lt;li&amp;gt; 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:
        &amp;lt;ol&amp;gt;
             &amp;lt;li&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;reproduce, disseminate or publicly display the Limited LCIA, or any portion or derivation thereof, other than granted in this agreement; &amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;grant to any third party any rights regarding the Limited LCIA (e.g. sub-licensing right);&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;prepare extracts of the Limited LCIA, or any portion or derivation thereof;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;use the Limited LCIA, or any portion or derivation thereof, in any other product or service;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;use web crawlers or any other types of software or hardware technology to automatically download or index the Limited LCIA;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;reverse engineer, decompile and disassemble the Tool to derive the Limited LCIA therefrom;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;disclose the login details for access to the Tool to any third party, or to allow third parties to access the Tool;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;assign the sub-licensing rights to any third party.&amp;lt;/li&amp;gt;
         &amp;lt;/ol&amp;gt;
        Section 10, particularly 10.5 of Climatiq’s Terms and Conditions do not apply to the Limited LCIA. 
        &amp;lt;br/&amp;gt;
        The customer acknowledges that EcoInvent has beneficiary rights regarding the enforcement of the restrictions pursuant to the preceding paragraph.
        &amp;lt;br/&amp;gt;
        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.     &amp;lt;br/&amp;gt;
        Only calculated results (no raw emission factor data) is made available.      &amp;lt;br/&amp;gt;
        The Customer agrees that Climatiq Technologies GmbH passes on the following information to ecoinvent: 
        &amp;lt;ol&amp;gt;
             &amp;lt;li&amp;gt;Name and location of the customer&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;Aggregated, anonymised number of API calls for all of Climatiq’s customers that use ecoinvent&amp;lt;/li&amp;gt;
        &amp;lt;/ol&amp;gt;
      &amp;lt;/li&amp;gt;
    {% endif %}
{% endmacro %}

&amp;lt;body class="hs-quotes hs-quotes--modern"&amp;gt;
  &amp;lt;div class="header"&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      {% module "logo" path="../modules/quote_logo" %}
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="colored-section banner banner--top"&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      {% module "quote_name"
        label="Quote name"
        path="@hubspot/rich_text"
        html="&amp;lt;h1&amp;gt;{{ personalization_token('template_data.quote.hs_title', '') }}&amp;lt;/h1&amp;gt;"
      %}

      &amp;lt;div class="quote-info_wrapper"&amp;gt;
        &amp;lt;div class="recipient-info"&amp;gt;
          {% module "buyer_company" path="../modules/buyer_company" %}
          {% module "buyer_contacts" path="../modules/buyer_contacts" %}
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="quote-info"&amp;gt;
          {% 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 ~ "&amp;lt;br&amp;gt;" ~
              ptoken_sender_title ~ "&amp;lt;br&amp;gt;" ~
              ptoken_sender_email ~ "&amp;lt;br&amp;gt;" ~
              ptoken_sender_phone
            }}
          %}
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;


  &amp;lt;div class="container line-items"&amp;gt;
    {% 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"
        }
      ]
    %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container terms"&amp;gt;
    {% 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.&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;" ~
        "&amp;lt;h2&amp;gt;" ~ template_translations.purchase_terms.message ~ "&amp;lt;/h2&amp;gt;" ~
        "&amp;lt;ol&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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. &amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;Commercial use permitted. This does not apply the usage of Ecoinvent unless explicitly specified.&amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;Discounts applied will not be applicable to any renewal terms.&amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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.&amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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. &amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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 &amp;lt;a href='https://www.climatiq.io/terms'&amp;gt;Climatiq General Terms and Conditions&amp;lt;/a&amp;gt; and, if applicable, the &amp;lt;a href='https://www.climatiq.io/privacy-policy'&amp;gt;Climatiq Privacy Policy&amp;lt;/a&amp;gt;. &amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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. &amp;lt;/li&amp;gt;" 
           ~ get_ecoinvent_term() ~ "
        &amp;lt;/ol&amp;gt;"
      }}
      
    %}
  &amp;lt;/div&amp;gt;

  
  &amp;lt;div class="container esign"&amp;gt;
    {% module "signature" path="@hubspot/quote_signature" %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container payment-schedule"&amp;gt;
    {% module "payment-schedule" path="@hubspot/quote_payment_schedule" %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container payment"&amp;gt;
    {% module "payment" path="@hubspot/quote_payment" heading_tag="h2" %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container contacts"&amp;gt;
    {% module "sender_contact" path="../modules/sender_contact" %}
    &amp;lt;br&amp;gt;
    {% module "sender_company"
      label="Sender company"
      path="@hubspot/rich_text"
      html="
        &amp;lt;div&amp;gt;{{ personalization_token('template_data.quote.hs_sender_company_name', '') }}&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;{{ personalization_token('template_data.quote.hs_sender_company_address', '') }}&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;{{ personalization_token('template_data.quote.hs_sender_company_address2', '') }}&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;
        {{ 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', '') }}
        &amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;{{ personalization_token('template_data.quote.hs_sender_company_country', '') }}&amp;lt;/div&amp;gt;
      "
    %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container options"&amp;gt;
    &amp;lt;div class="option_wrapper"&amp;gt;
      {% module "download" path="@hubspot/quote_download" %}
      {% module "print" path="../modules/print" %}
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

&amp;lt;/body&amp;gt;
{% endblock body %}&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 31 Oct 2023 09:11:56 GMT</pubDate>
    <dc:creator>FButteron</dc:creator>
    <dc:date>2023-10-31T09:11:56Z</dc:date>
    <item>
      <title>Customize terms based on chosen line items</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/870356#M36456</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi all, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm currently building a custom quote template and the goal is to define the terms in a way that a specific subset of terms is only added to a quote, if line items containing a keyword are added. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This works quite well in the preview, but whenever I try to use the quote template in a productive setting, it doesn't seem to be able to access the data on the added line items and the terms don't show even when they should. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I feel like I'm referencing the line items wrong - does anyone have a clue on how to solve this? Thank you for any suggestions&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is the code for the macro:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% macro get_ecoinvent_term() %}
  
  {% set line_items = 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 %}
    
      &amp;lt;li&amp;gt; Special Terms here
      &amp;lt;/li&amp;gt;
    {% endif %}
{% endmacro %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which is called here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% module "terms"
      label="Terms"
      path="@hubspot/rich_text",
      html={{
        "&amp;lt;ol&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt; General Terms that always show &amp;lt;/li&amp;gt;" 
           ~ get_ecoinvent_term() ~ "
        &amp;lt;/ol&amp;gt;"
      }}
      
    %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 09:01:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/870356#M36456</guid>
      <dc:creator>FButteron</dc:creator>
      <dc:date>2023-10-26T09:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Customize terms based on chosen line items</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/870792#M36460</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/465540"&gt;@FButteron&lt;/a&gt;&amp;nbsp;thank you for sharing with us more information about it.&lt;/P&gt;
&lt;P&gt;I want to invite our top experts to this conversation&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/72866"&gt;@Jake_Lett&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/139539"&gt;@amandaulm&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/428335"&gt;@jolle&lt;/a&gt;&amp;nbsp;any recommendations to&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/465540"&gt;@FButteron&lt;/a&gt;&amp;nbsp;matter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Pam&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 21:01:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/870792#M36460</guid>
      <dc:creator>PamCotton</dc:creator>
      <dc:date>2023-10-26T21:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Customize terms based on chosen line items</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/872178#M36512</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/465540"&gt;@FButteron&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is it possible for you to share the full code? Or give me access to a demo environment, so I can take a look?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes, it's the full code that gives the answers, e.g. is the macro as a part of the main quote template or one of the modules, etc. The reason I'm asking is because it's important to have some definitions like the below and then reference them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"{% set ASSOCIATED_OBJECTS = QUOTE.associated_objects %}"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might even might need to change the first line to include template_data, unless that's been defined elsewhere.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  {% set line_items = template_data.QUOTE.associated_objects.line_items %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're happy to give me access to look around, I'll can see if I can troubleshoot it, if not, &lt;A href="https://developers.hubspot.com/docs/cms/hubl/variables/quotes&amp;nbsp;" target="_blank" rel="noopener"&gt;here's a resource&lt;/A&gt; that might give you some indications of how things are referenced and thus, what changes might be needed. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Eli&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 18:47:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/872178#M36512</guid>
      <dc:creator>elizheleva</dc:creator>
      <dc:date>2023-10-30T18:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Customize terms based on chosen line items</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/872438#M36523</link>
      <description>&lt;P&gt;Hi Eli,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!--
  templateType: quote
  isAvailableForNewContent: true
  label: Modern
  screenshotPath: ../images/modern.png
--&amp;gt;

{% 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 %}
  &amp;lt;style&amp;gt;
    .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') &amp;amp;&amp;amp;
      module_data|attr('buyer_company')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('buyer_contacts')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('reference')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('quote_created')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('quote_expires')|attr('hidden') &amp;amp;&amp;amp;
      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 &amp;amp;&amp;amp; !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') &amp;amp;&amp;amp;
      module_data|attr('sender_company')|attr('hidden')
    %}
      .hs-quotes .contacts { display: none; }
    {% endif %}

    {% if module_data|attr('download')|attr('hidden') &amp;amp;&amp;amp;
      module_data|attr('print')|attr('hidden')
    %}
      .hs-quotes .options { display: none; }
    {% endif %}
  &amp;lt;/style&amp;gt;
{% 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" %}
    
      &amp;lt;li style='margin-bottom: 10px;'&amp;gt; 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:
        &amp;lt;ol&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;reproduce, disseminate or publicly display the Limited LCIA, or any portion or derivation thereof, other than granted in this agreement; &amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;grant to any third party any rights regarding the Limited LCIA (e.g. sub-licensing right);&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;prepare extracts of the Limited LCIA, or any portion or derivation thereof;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;use the Limited LCIA, or any portion or derivation thereof, in any other product or service;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;use web crawlers or any other types of software or hardware technology to automatically download or index the Limited LCIA;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;reverse engineer, decompile and disassemble the Tool to derive the Limited LCIA therefrom;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;disclose the login details for access to the Tool to any third party, or to allow third parties to access the Tool;&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;assign the sub-licensing rights to any third party.&amp;lt;/li&amp;gt;
         &amp;lt;/ol&amp;gt;
        Section 10, particularly 10.5 of Climatiq’s Terms and Conditions do not apply to the Limited LCIA. 
        &amp;lt;br/&amp;gt;
        The customer acknowledges that EcoInvent has beneficiary rights regarding the enforcement of the restrictions pursuant to the preceding paragraph.
        &amp;lt;br/&amp;gt;
        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.     &amp;lt;br/&amp;gt;
        Only calculated results (no raw emission factor data) is made available.      &amp;lt;br/&amp;gt;
        The Customer agrees that Climatiq Technologies GmbH passes on the following information to ecoinvent: 
        &amp;lt;ol&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;Name and location of the customer&amp;lt;/li&amp;gt;
             &amp;lt;li style='margin-bottom: 10px;'&amp;gt;Aggregated, anonymised number of API calls for all of Climatiq’s customers that use ecoinvent&amp;lt;/li&amp;gt;
        &amp;lt;/ol&amp;gt;
      &amp;lt;/li&amp;gt;
    {% 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 %}
    
      &amp;lt;li&amp;gt; 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:
        &amp;lt;ol&amp;gt;
             &amp;lt;li&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;reproduce, disseminate or publicly display the Limited LCIA, or any portion or derivation thereof, other than granted in this agreement; &amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;grant to any third party any rights regarding the Limited LCIA (e.g. sub-licensing right);&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;prepare extracts of the Limited LCIA, or any portion or derivation thereof;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;use the Limited LCIA, or any portion or derivation thereof, in any other product or service;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;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;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;use web crawlers or any other types of software or hardware technology to automatically download or index the Limited LCIA;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;reverse engineer, decompile and disassemble the Tool to derive the Limited LCIA therefrom;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;disclose the login details for access to the Tool to any third party, or to allow third parties to access the Tool;&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;assign the sub-licensing rights to any third party.&amp;lt;/li&amp;gt;
         &amp;lt;/ol&amp;gt;
        Section 10, particularly 10.5 of Climatiq’s Terms and Conditions do not apply to the Limited LCIA. 
        &amp;lt;br/&amp;gt;
        The customer acknowledges that EcoInvent has beneficiary rights regarding the enforcement of the restrictions pursuant to the preceding paragraph.
        &amp;lt;br/&amp;gt;
        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.     &amp;lt;br/&amp;gt;
        Only calculated results (no raw emission factor data) is made available.      &amp;lt;br/&amp;gt;
        The Customer agrees that Climatiq Technologies GmbH passes on the following information to ecoinvent: 
        &amp;lt;ol&amp;gt;
             &amp;lt;li&amp;gt;Name and location of the customer&amp;lt;/li&amp;gt;
             &amp;lt;li&amp;gt;Aggregated, anonymised number of API calls for all of Climatiq’s customers that use ecoinvent&amp;lt;/li&amp;gt;
        &amp;lt;/ol&amp;gt;
      &amp;lt;/li&amp;gt;
    {% endif %}
{% endmacro %}

&amp;lt;body class="hs-quotes hs-quotes--modern"&amp;gt;
  &amp;lt;div class="header"&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      {% module "logo" path="../modules/quote_logo" %}
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="colored-section banner banner--top"&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      {% module "quote_name"
        label="Quote name"
        path="@hubspot/rich_text"
        html="&amp;lt;h1&amp;gt;{{ personalization_token('template_data.quote.hs_title', '') }}&amp;lt;/h1&amp;gt;"
      %}

      &amp;lt;div class="quote-info_wrapper"&amp;gt;
        &amp;lt;div class="recipient-info"&amp;gt;
          {% module "buyer_company" path="../modules/buyer_company" %}
          {% module "buyer_contacts" path="../modules/buyer_contacts" %}
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="quote-info"&amp;gt;
          {% 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 ~ "&amp;lt;br&amp;gt;" ~
              ptoken_sender_title ~ "&amp;lt;br&amp;gt;" ~
              ptoken_sender_email ~ "&amp;lt;br&amp;gt;" ~
              ptoken_sender_phone
            }}
          %}
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;


  &amp;lt;div class="container line-items"&amp;gt;
    {% 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"
        }
      ]
    %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container terms"&amp;gt;
    {% 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.&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;" ~
        "&amp;lt;h2&amp;gt;" ~ template_translations.purchase_terms.message ~ "&amp;lt;/h2&amp;gt;" ~
        "&amp;lt;ol&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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. &amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;Commercial use permitted. This does not apply the usage of Ecoinvent unless explicitly specified.&amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;Discounts applied will not be applicable to any renewal terms.&amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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.&amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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. &amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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 &amp;lt;a href='https://www.climatiq.io/terms'&amp;gt;Climatiq General Terms and Conditions&amp;lt;/a&amp;gt; and, if applicable, the &amp;lt;a href='https://www.climatiq.io/privacy-policy'&amp;gt;Climatiq Privacy Policy&amp;lt;/a&amp;gt;. &amp;lt;/li&amp;gt;
           &amp;lt;li style='margin-bottom: 10px;'&amp;gt;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. &amp;lt;/li&amp;gt;" 
           ~ get_ecoinvent_term() ~ "
        &amp;lt;/ol&amp;gt;"
      }}
      
    %}
  &amp;lt;/div&amp;gt;

  
  &amp;lt;div class="container esign"&amp;gt;
    {% module "signature" path="@hubspot/quote_signature" %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container payment-schedule"&amp;gt;
    {% module "payment-schedule" path="@hubspot/quote_payment_schedule" %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container payment"&amp;gt;
    {% module "payment" path="@hubspot/quote_payment" heading_tag="h2" %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container contacts"&amp;gt;
    {% module "sender_contact" path="../modules/sender_contact" %}
    &amp;lt;br&amp;gt;
    {% module "sender_company"
      label="Sender company"
      path="@hubspot/rich_text"
      html="
        &amp;lt;div&amp;gt;{{ personalization_token('template_data.quote.hs_sender_company_name', '') }}&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;{{ personalization_token('template_data.quote.hs_sender_company_address', '') }}&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;{{ personalization_token('template_data.quote.hs_sender_company_address2', '') }}&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;
        {{ 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', '') }}
        &amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;{{ personalization_token('template_data.quote.hs_sender_company_country', '') }}&amp;lt;/div&amp;gt;
      "
    %}
  &amp;lt;/div&amp;gt;

  &amp;lt;div class="container options"&amp;gt;
    &amp;lt;div class="option_wrapper"&amp;gt;
      {% module "download" path="@hubspot/quote_download" %}
      {% module "print" path="../modules/print" %}
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

&amp;lt;/body&amp;gt;
{% endblock body %}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 31 Oct 2023 09:11:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Customize-terms-based-on-chosen-line-items/m-p/872438#M36523</guid>
      <dc:creator>FButteron</dc:creator>
      <dc:date>2023-10-31T09:11:56Z</dc:date>
    </item>
  </channel>
</rss>

