Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save unnamedfeeling/a7d23e0363aef3bd98de3fe573e78fc4 to your computer and use it in GitHub Desktop.
Save unnamedfeeling/a7d23e0363aef3bd98de3fe573e78fc4 to your computer and use it in GitHub Desktop.
Testing liquid variables on Teachable
<!--
Email template: student/purchase_notification
Description: This email is sent to a student when they enroll in a course.
-->
<!-- Email Title -->
<div class="header-title">
<h1>{{text.email_receipts.thank_you_for_enrolling_in }} {{sale.course.name }}</h1>
</div>
<!-- Content -->
<p>Welcome, {{ text.user.name }}. try (text.user.name)</p>
<p>Welcome, {{ user.name }}. try (user.name)</p>
<p>We've set up your account.</p>
<p>Your username is: {{ user.email }} try (user.email )</p>
<p>Your username is: {{ text.user.email }} try (text.user.email )<br>
Your temporary password is: Mh9Zw979D2bSHYug</p>
<p>Please change the password as soon as you log in.</p>
<p>To get started, click the button below. Follow the simple steps, and you're in.</p>
<p class="text-center"><a href="https://sso.teachable.com/secure/113985/users/sign_in?clean_login=true&reset_purchase_session=1" class="btn-primary">Click here to log in</a></p>
<br><hr><br>
{% unless sale.free? or sale.payment_method == 'external' %}
<h1 class="price-jumbo">{{ sale.receipt_formatted_charge }}</h1>
<table class="data-table" cellpadding="0" cellspacing="0">
<tr>
<td width="50%">{{text.email_receipts.receipt_number}}</td>
<td class="text-right">{{sale.id}} </td>
</tr>
<tr>
<td width="50%">{{text.email_receipts.product_id}}</td>
<td class="text-right">{{product.id}}</td>
</tr>
<tr>
<td width="50%">{{text.email_receipts.course_name}}</td>
<td class="text-right">{{sale.course.name}}</td>
</tr>
<tr>
<td width="50%">{{text.email_receipts.purchase_date}}</td>
<td class="text-right">{{sale.purchase_date}} {{text.email_receipts.utc}}</td>
</tr>
<tr>
<td width="50%">{{text.email_receipts.purchaser}}</td>
<td class="text-right">{{to.name}}<br><a href="mailto:{{to.email}}">{{to.email}}</a> </td>
</tr>
{% if sale.vat_tax_id %}
<tr>
<td width="50%">{{text.email_receipts.purchaser_vat_id}}</td>
<td class="text-right">{{ sale.vat_tax_id }}</td>
</tr>
{% endif %}
<tr>
<td width="50%">{{ text.email_receipts.vendor }}</td>
<td class="text-right">{{ school.name }}<br><a href="{{school.url}}">{{school.url}}</a> </td>
</tr>
{% if sale.vendor_vat_id %}
<tr>
<td width="50%">{{ text.email_receipts.vendor_vat_id }}</td>
<td class="text-right">{{ sale.vendor_vat_id }}</td>
</tr>
{% endif %}
<tr>
<td width="50%">{{text.email_receipts.list_price}}</td>
<td class="text-right">{{sale.receipt_list_price}}</td>
</tr>
{% if sale.discounted? %}
<tr>
<td width="50%">{{text.email_receipts.discount }} ({{sale.coupon_code}})</td>
<td class="text-right">{{sale.receipt_discount_amount }}</td>
</tr>
{% endif %}
{% if sale.taxed? %}
<tr>
<td width="50%">{{ text.email_receipts.tax }}</td>
<td class="text-right">{{ sale.receipt_tax_amount }}</td>
</tr>
{% endif %}
<tr class="total">
<td width="50%">{{text.email_receipts.total }}</td>
<td class="text-right">{{ sale.receipt_formatted_charge }}</td>
</tr>
</table>
{% endunless %}
<!-- Auto-generated JSON-ld compliant JSON for showing action buttons in emails -->
<script type="application/ld+json">{{ goto_action_json }}</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment