forked from PrestaShop/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddresses.tpl
More file actions
120 lines (108 loc) · 5.43 KB
/
addresses.tpl
File metadata and controls
120 lines (108 loc) · 5.43 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{extends file='checkout/_partials/steps/checkout-step.tpl'}
{block name='step_content'}
<div class="js-address-form">
<form
method="POST"
action="{url entity='order' params=['id_address' => $id_address]}"
data-refresh-url="{url entity='order' params=['ajax' => 1, 'action' => 'addressForm', 'id_address' => $id_address]}"
data-ps-action="form-validation"
>
{if $use_same_address}
<p>
{if $cart.is_virtual}
{l s='The selected address will be used as your personal address (for invoice).' d='Shop.Theme.Checkout'}
{else}
{l s='The selected address will be used both as your personal address (for invoice) and as your delivery address.' d='Shop.Theme.Checkout'}
{/if}
</p>
{else}
<p class="h3">{l s='Shipping Address' d='Shop.Theme.Checkout'}</p>
{/if}
{if $show_delivery_address_form}
<div id="delivery-address">
{render file = 'checkout/_partials/address-form.tpl'
ui = $address_form
use_same_address = $use_same_address
type = "delivery"
form_has_continue_button = $form_has_continue_button
}
</div>
{elseif $customer.addresses|count> 0}
<div id="delivery-addresses" class="address__list js-address-selector">
{include file = 'checkout/_partials/address-selector-block.tpl'
addresses = $customer.addresses
name = "id_address_delivery"
selected = $id_address_delivery
type = "delivery"
interactive = !$show_delivery_address_form and !$show_invoice_address_form
}
</div>
{if isset($delivery_address_error)}
<p class="alert alert-danger js-address-error" name="alert-delivery" id="id-failure-address-{$delivery_address_error.id_address}">{$delivery_address_error.exception}</p>
{else}
<p class="alert alert-danger js-address-error" name="alert-delivery" style="display: none">{l s='Your address is incomplete, please update it.' d='Shop.Notifications.Error'}</p>
{/if}
<div class="buttons-wrapper mb-3">
<a href="{$new_address_delivery_url}" class="btn btn-outline-primary">
<i class="material-icons" aria-hidden="true"></i>
{l s='Add new address' d='Shop.Theme.Actions'}
</a>
</div>
{if $use_same_address && !$cart.is_virtual}
<a data-link-action="different-invoice-address" href="{$use_different_address_url}" class="btn btn-basic">
{l s='Billing address differs from shipping address' d='Shop.Theme.Checkout'}
</a>
{/if}
{/if}
{if !$use_same_address}
<p class="h3 mt-4">{l s='Your Invoice Address' d='Shop.Theme.Checkout'}</p>
{if $show_invoice_address_form}
<div id="invoice-address">
{render file = 'checkout/_partials/address-form.tpl'
ui = $address_form
use_same_address = $use_same_address
type = "invoice"
form_has_continue_button = $form_has_continue_button
}
</div>
{else}
<div id="invoice-addresses" class="address__list js-address-selector">
{include file = 'checkout/_partials/address-selector-block.tpl'
addresses = $customer.addresses
name = "id_address_invoice"
selected = $id_address_invoice
type = "invoice"
interactive = !$show_delivery_address_form and !$show_invoice_address_form
}
</div>
{if isset($invoice_address_error)}
<p class="alert alert-danger js-address-error" name="alert-invoice" id="id-failure-address-{$invoice_address_error.id_address}">{$invoice_address_error.exception}</p>
{else}
<p class="alert alert-danger js-address-error" name="alert-invoice" style="display: none">{l s='Your address is incomplete, please update it.' d='Shop.Notifications.Error'}</p>
{/if}
<a href="{$new_address_invoice_url}" class="btn btn-outline-primary w-100 w-md-auto">
<i class="material-icons" aria-hidden="true"></i>
{l s='Add new address' d='Shop.Theme.Actions'}
</a>
{/if}
{/if}
<div class="buttons-wrapper buttons-wrapper--split buttons-wrapper--invert-mobile mt-3">
<button class="btn btn-outline-primary js-back" type="button" data-step="checkout-personal-information-step">
<i class="material-icons rtl-flip" aria-hidden="true"></i>
{l s='Back to Personal Information' d='Shop.Theme.Actions'}
</button>
{if !$form_has_continue_button}
<button type="submit" class="btn btn-primary" name="confirm-addresses" value="1">
{l s='Continue to Shipping' d='Shop.Theme.Actions'}
<div class="material-icons rtl-flip" aria-hidden="true"></div>
</button>
<input type="hidden" id="not-valid-addresses" class="js-not-valid-addresses" value="{$not_valid_addresses}">
{/if}
</div>
</form>
</div>
{/block}