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.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / templates / ecommerce / checkout-billing-form-fields.php
tutor / templates / ecommerce Last commit date
billing-form-fields.php 4 days ago billing.php 4 days ago cart.php 10 months ago checkout-billing-form-fields.php 4 days ago checkout-details.php 4 days ago checkout.php 4 days ago order-placement-failed.php 8 months ago order-placement-success.php 4 days ago
checkout-billing-form-fields.php
136 lines
1 <?php
2 /**
3 * Billing form fields child template
4 *
5 * @package Tutor\Templates
6 * @subpackage Dashboard\Settings
7 * @author Themeum <support@themeum.com>
8 * @link https://themeum.com
9 * @since 3.0.0
10 */
11
12 use Tutor\Ecommerce\BillingController;
13
14 $billing_controller = new BillingController( false );
15 $billing_info = $billing_controller->get_billing_info();
16
17 $billing_first_name = $billing_info->billing_first_name ?? tutor_utils()->input_old( 'billing_first_name', '' );
18 $billing_last_name = $billing_info->billing_last_name ?? tutor_utils()->input_old( 'billing_last_name', '' );
19 $billing_email = $billing_info->billing_email ?? tutor_utils()->input_old( 'billing_email', '' );
20 $billing_phone = $billing_info->billing_phone ?? tutor_utils()->input_old( 'billing_phone', '' );
21 $billing_zip_code = $billing_info->billing_zip_code ?? tutor_utils()->input_old( 'billing_zip_code', '' );
22 $billing_address = $billing_info->billing_address ?? tutor_utils()->input_old( 'billing_address', '' );
23 $billing_country = $billing_info->billing_country ?? tutor_utils()->input_old( 'billing_country', '' );
24 $billing_state = $billing_info->billing_state ?? tutor_utils()->input_old( 'billing_state', '' );
25 $billing_city = $billing_info->billing_city ?? tutor_utils()->input_old( 'billing_city', '' );
26
27 $country_info = tutor_get_country_info_by_name( $billing_country );
28 $states = $country_info && isset( $country_info['states'] ) ? $country_info['states'] : array();
29 ?>
30
31 <div class="tutor-row <?php echo isset( $is_checkout_page ) ? 'tutor-g-0' : ''; ?>">
32 <div class="tutor-col-12 tutor-col-sm-6 tutor-col-md-12 tutor-col-lg-6">
33 <div class="tutor-mb-16">
34 <label class="tutor-form-label tutor-color-secondary">
35 <?php esc_html_e( 'First Name', 'tutor' ); ?>
36 </label>
37 <input class="tutor-form-control" type="text" name="billing_first_name" placeholder="<?php esc_attr_e( 'First Name', 'tutor' ); ?>" value="<?php echo esc_attr( $billing_first_name ); ?>" required>
38 </div>
39 </div>
40
41 <div class="tutor-col-12 tutor-col-sm-6 tutor-col-md-12 tutor-col-lg-6">
42 <div class="tutor-mb-16">
43 <label class="tutor-form-label tutor-color-secondary">
44 <?php esc_html_e( 'Last Name', 'tutor' ); ?>
45 </label>
46 <input class="tutor-form-control" type="text" name="billing_last_name" placeholder="<?php esc_attr_e( 'Last Name', 'tutor' ); ?>" value="<?php echo esc_attr( $billing_last_name ); ?>" required>
47 </div>
48 </div>
49
50 <div class="tutor-col-12">
51 <div class="tutor-mb-16">
52 <label class="tutor-form-label tutor-color-secondary">
53 <?php esc_html_e( 'Email Address', 'tutor' ); ?>
54 </label>
55 <input class="tutor-form-control" type="email" name="billing_email" placeholder="<?php esc_attr_e( 'Email Address', 'tutor' ); ?>" value="<?php echo esc_attr( $billing_email ); ?>" required>
56 </div>
57 </div>
58 <div class="tutor-col-12 tutor-position-relative">
59 <div class="tutor-mb-16">
60 <label class="tutor-form-label tutor-color-secondary">
61 <?php esc_html_e( 'Country', 'tutor' ); ?>
62 </label>
63 <select name="billing_country" class="tutor-form-control" required>
64 <option value=""><?php esc_html_e( 'Select Country', 'tutor' ); ?></option>
65 <?php
66 $countries = array_column( tutor_get_country_list(), 'name' );
67 foreach ( $countries as $name ) :
68 ?>
69 <option value="<?php echo esc_attr( $name ); ?>" <?php selected( $billing_country, $name ); ?>>
70 <?php echo esc_html( $name ); ?>
71 </option>
72 <?php endforeach; ?>
73 </select>
74 </div>
75 </div>
76
77 <div class="tutor-col-12 tutor-col-sm-6 tutor-col-md-12 tutor-col-lg-6 tutor-position-relative">
78 <div class="tutor-mb-16">
79 <label class="tutor-form-label tutor-color-secondary">
80 <?php esc_html_e( 'State', 'tutor' ); ?>
81 </label>
82 <select name="billing_state" class="tutor-form-control">
83 <?php if ( empty( $states ) ) : ?>
84 <option value=""><?php esc_html_e( 'N/A', 'tutor' ); ?></option>
85 <?php endif; ?>
86 <?php if ( $billing_country && ( $states ) ) : ?>
87 <option value=""><?php esc_html_e( 'Select State', 'tutor' ); ?></option>
88 <?php endif; ?>
89 <?php
90 foreach ( $states as $state ) :
91 ?>
92 <option value="<?php echo esc_attr( $state['name'] ); ?>" <?php selected( $billing_state, $state['name'] ); ?>>
93 <?php echo esc_html( $state['name'] ); ?>
94 </option>
95 <?php endforeach; ?>
96 </select>
97 </div>
98 </div>
99
100 <div class="tutor-col-12 tutor-col-sm-6 tutor-col-md-12 tutor-col-lg-6">
101 <div class="tutor-mb-16">
102 <label class="tutor-form-label tutor-color-secondary">
103 <?php esc_html_e( 'City', 'tutor' ); ?>
104 </label>
105 <input class="tutor-form-control" type="text" name="billing_city" placeholder="<?php esc_attr_e( 'City', 'tutor' ); ?>" value="<?php echo esc_attr( $billing_city ); ?>" required>
106 </div>
107 </div>
108
109 <div class="tutor-col-12 tutor-col-sm-6 tutor-col-md-12 tutor-col-lg-6">
110 <div class="tutor-mb-16">
111 <label class="tutor-form-label tutor-color-secondary">
112 <?php esc_html_e( 'Postcode / ZIP', 'tutor' ); ?>
113 </label>
114 <input class="tutor-form-control" type="text" name="billing_zip_code" placeholder="<?php esc_attr_e( 'Postcode / ZIP', 'tutor' ); ?>" value="<?php echo esc_attr( $billing_zip_code ); ?>" required>
115 </div>
116 </div>
117
118 <div class="tutor-col-12 tutor-col-sm-6 tutor-col-md-12 tutor-col-lg-6">
119 <div class="tutor-mb-16">
120 <label class="tutor-form-label tutor-color-secondary">
121 <?php esc_html_e( 'Phone', 'tutor' ); ?>
122 </label>
123 <input class="tutor-form-control" type="text" name="billing_phone" placeholder="<?php esc_attr_e( 'Phone', 'tutor' ); ?>" value="<?php echo esc_attr( $billing_phone ); ?>" required>
124 </div>
125 </div>
126
127 <div class="tutor-col-12">
128 <div class="tutor-mb-16">
129 <label class="tutor-form-label tutor-color-secondary">
130 <?php esc_html_e( 'Address', 'tutor' ); ?>
131 </label>
132 <input class="tutor-form-control" type="text" name="billing_address" placeholder="<?php esc_attr_e( 'Address', 'tutor' ); ?>" value="<?php echo esc_attr( $billing_address ); ?>" required>
133 </div>
134 </div>
135 </div>
136