Skip to content

Feature: Liquid Template Engine Support #402

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

haiphamhoang
Copy link
Contributor

@haiphamhoang haiphamhoang commented Mar 3, 2025

Liquid is a flexible, open-source template engine developed by Shopify. It allows for dynamic content rendering on websites.

I added Liquid template engine support for Hi.Events in the following areas:

  • Event Details Description
  • Offline Payment Instructions
  • Offline Payment Instructions in Email Summary

Example Use Cases

Multi-language

{% if client_language == "vi" %}

  Xin chào!

{% elsif client_language == "de" %}

  Hallo!

{% else %}

  Hi!

{% endif %}   

mutiple-language-2025-03-03 182403
result-lang-en-2025-03-03 183643
result-lang-vi-2025-03-03 183643


Offline Payment Instructions

{% capture payment_ref %}{{ order_first_name }} {{ order_last_name  }} {{ order_public_id | replace: "O-", "" }}{% endcapture %}

Bank Transfer Deftails

Bank Address: 123456789
Total amount EUR: {{ order_total_gross }} EUR
Total amount USD: {{  order_total_gross | times: 1.04 | round }} USD
Reference: {{ payment_ref }}

offline-pay2025-03-03 190739

result-offline-pay2025-03-03 190857

Libraries Used

Checklist

  • I have read the contributing guidelines.
  • My code is of good quality and follows the coding standards of the project.
  • I have tested my changes, and they work as expected.

Thank you for your contribution! 🎉

@haiphamhoang haiphamhoang changed the title Feature: Liquid Template Language Support Feature: Liquid Template Engine Support Mar 3, 2025
@daveearley
Copy link
Contributor

Really nice idea, thank you! I'll test this soon. I could see this being a very powerful feature.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants