-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathscript.liquid
39 lines (35 loc) · 1.16 KB
/
script.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% comment %}
Preferred option order:
{{ options.days_to_wait_before_emailing__number }}
{{ options.email_subject__required }}
{{ options.email_body__multiline_required }}
{{ options.pdf_attachment_filename__required }}
{{ options.pdf_html_template__code_multiline_required }}
{% endcomment %}
{% if event.preview %}
{% capture order_json %}
{
"email": "[email protected]",
"financial_status": "pending"
}
{% endcapture %}
{% assign order = order_json | parse_json %}
{% endif %}
{% if order.email != blank and order.financial_status == "pending" %}
{% action "email" %}
{
"to": {{ order.email | json }},
"subject": {{ options.email_subject__required | strip | json }},
"body": {{ options.email_body__multiline_required | strip | newline_to_br | json }},
"reply_to": {{ shop.customer_email | json }},
"from_display_name": {{ shop.name | json }},
"attachments": {
{{ options.pdf_attachment_filename__required | json }}: {
"pdf": {
"html": {{ options.pdf_html_template__code_multiline_required | json }}
}
}
}
}
{% endaction %}
{% endif %}