/
payment_method.blade.php
87 lines (68 loc) · 3.99 KB
/
payment_method.blade.php
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
@extends('checkout::layout')
@section('logo-right-link')
<div class="ml-auto align-self-center">
<a href="{{ route('checkout.shipping_method') }}" class="btn btn-link text-right">{{ _e('Back') }}</a>
</div>
@endsection
@section('steps_content')
@if (isset($errors))
<div class="alert alert-danger">
<ul>
@foreach ($errors as $fields)
@foreach ($fields as $field)
@if (is_string($field))
<li>{!! $field !!}</li>
@else
<li> {{_e('Error when trying to finish the payment')}}</li>
@endif
@endforeach
@endforeach
</ul>
</div>
@endif
<form method="post" action="{{ route('checkout.payment_method_save') }}">
@csrf
<div class="shop-cart mt-5">
<label class="font-weight-bold control-label mb-0"><?php _e("Personal information"); ?></label>
<small class="text-muted d-block mb-2"> <?php _e("Your information"); ?></small>
@include('checkout::contact_information_card')
<label class="font-weight-bold control-label mb-0 pt-2"><?php _e("Shipping method"); ?></label>
<small class="text-muted d-block mb-2"> <?php _e("Your choice"); ?></small>
<div class="card mb-3">
<div class="card-body d-flex p-3">
<div class="col-8">
<?php
if (!empty($checkout_session['shipping_gw'])) {
$shippingGatewayModuleInfo = module_info($checkout_session['shipping_gw']);
?>
<?php if (isset($shippingGatewayModuleInfo['settings']['icon_class'])): ?>
<i class="<?php echo $shippingGatewayModuleInfo['settings']['icon_class'];?>" style="font-size:38px"></i>
<?php endif; ?>
<?php echo $shippingGatewayModuleInfo['name'];?>
<?php
$instructions = app()->shipping_manager->driver($checkout_session['shipping_gw'])->instructions($checkout_session);
if (!empty($instructions)) {
echo '<br />' . $instructions;
}
?>
<?php } ?>
<?php if(!empty($checkout_session['country'])):?>
<br><br>
<?php if (!empty($checkout_session['country'])) { echo $checkout_session['country']; } ?>
<?php if (!empty($checkout_session['city'])) { echo ', ' . $checkout_session['city']; } ?>
<?php if (!empty($checkout_session['address'])) { echo ', ' . $checkout_session['address']; } ?>
<?php if (!empty($checkout_session['zip'])) { echo ', ' . $checkout_session['zip'] . '<br />'; } ?>
<?php if (!empty($checkout_session['other_info'])) { echo '<div class="mt-2"><i class="mdi mdi-comment"></i> ' . $checkout_session['other_info'] . '<br /></div>'; } ?>
<?php endif; ?>
</div>
<div class="col-4 justify-content-end text-right align-self-top px-0">
<a href="{{ route('checkout.shipping_method') }}" class="btn btn-link px-0">{{ _e('Edit') }}</a>
</div>
</div>
</div>
<module type="shop/payments" @if(isset($checkout_session['payment_gw'])) selected_provider="{{$checkout_session['payment_gw']}}" @endif template="checkout_v2" />
<module type="shop/checkout/terms" template="checkout_v2" class="no-settings" />
</div>
<button type="submit" class="btn btn-primary w-100 js-finish-your-order"> {{ _e('Complete your order') }}</button>
</form>
@endsection