forked from FoxyCart/2.0-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
address.email.inc.twig
62 lines (62 loc) · 2.62 KB
/
address.email.inc.twig
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{% set show_address1 = true %}
{% set show_address2 = true %}
{% set show_city = true %}
{% set show_region = true %}
{% set show_postal_code = true %}
{% set show_country = true %}
{% if address.type == 'billing' %}
{% if config.template_config.custom_checkout_field_requirements['billing_address1'] == 'hidden' %}
{% set show_address1 = false %}
{% endif %}
{% if config.template_config.custom_checkout_field_requirements['billing_address2'] == 'hidden' %}
{% set show_address2 = false %}
{% endif %}
{% if config.template_config.custom_checkout_field_requirements['billing_city'] == 'hidden' %}
{% set show_city = false %}
{% endif %}
{% if config.template_config.custom_checkout_field_requirements['billing_region'] == 'hidden' %}
{% set show_region = false %}
{% endif %}
{% if config.template_config.custom_checkout_field_requirements['billing_postal_code'] == 'hidden' %}
{% set show_postal_code = false %}
{% endif %}
{% if config.template_config.custom_checkout_field_requirements['billing_country'] == 'hidden' %}
{% set show_country = false %}
{% endif %}
{% endif %}
{% if address.first_name or address.last_name %}
{% if address.first_name %}{{ address.first_name }}{% endif %}{% if address.last_name %} {{ address.last_name }}{% endif %}<br />
{% endif %}
{% if address.company %}
{{ address.company }}<br />
{% endif %}
{% if address.tax_id != '' and config.template_config.custom_checkout_field_requirements['billing_tax_id'] != 'hidden' %}
{{ config.lang.checkout_tax_id }}: {{ address.tax_id }}<br />
{% endif %}
{% if address.address1 and show_address1 %}
{{ address.address1 }}<br />
{% endif %}
{% if address.address2 and show_address2 %}
{{ address.address2 }}<br />
{% endif %}
{% if address.country_name == 'United States' %}
{% if address.city and show_city %}{{ address.city }}{% endif %}{% if address.region and show_region %}{% if address.city and show_city %}, {% endif %}{{ address.region }}{% endif %}{% if address.postal_code and show_postal_code %} {{ address.postal_code }}{% endif %}<br />
{% else %}
{% if address.city_and_region and show_city and show_region %}
{{ address.city_and_region }}<br />
{% elseif address.city and show_city %}
{{ address.city }}<br />
{% elseif address.region and show_region %}
{{ address.region }}<br />
{% endif %}
{% if address.postal_code and show_postal_code %}
{{ address.postal_code }}<br />
{% endif %}
{% endif %}
{% if address.country_name and show_country %}
{{ address.country_name }}<br />
{% endif %}
{% if geoip %}
{{ geoip }}<br />
{% endif %}
<br />