Hi, can HUBL be used in transactional email templates (via a custom module)? I can't find any information about it, and it's not recognizing my conditionals, e.g.:
custom mod: test-hubl
{% set monto_raw = personalization_token('custom.monto_descuento', '') %}
{% set monto_str = (monto_raw ~ '')|trim %}
{% if monto_str == '' %}
No vino monto_descuento
{% else %}
{% set monto_num = monto_str
|replace(',', '.')
|regex_replace('[^0-9.-]', '')
|float
%}
{% if monto_num > 1 %}
Mayor a 1
{% else %}
No es mayor a 1
{% endif %}
{% endif %}
However, the "programmable email" feature is in beta (it has been in beta for at least a few years now), so there have been issues mentioned with this functionality where HubL is not working 100% like it would be in website modules.
✔️ Did this post help answer your query? Help the community by marking it as a solution.
However, the "programmable email" feature is in beta (it has been in beta for at least a few years now), so there have been issues mentioned with this functionality where HubL is not working 100% like it would be in website modules.
✔️ Did this post help answer your query? Help the community by marking it as a solution.