PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.12.13
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.12.13
3.13.4 3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 All 262 releases
wpfunnels / public / modules / checkout / templates / express-checkout-form.php

express-checkout-form.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.12.13, at public/modules/checkout/templates/express-checkout-form.php

269 lines 8.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Checkout Form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 3.5.0
16 */
17
18
19 if ( ! defined( 'ABSPATH' ) ) {
20 exit;
21 }
22 $hide_section_settings = \WPFunnels\Wpfnl_functions::get_checkout_section_heading_settings( 'order' , get_the_ID() );
23 $billing_active_cls ='';
24 if( is_user_logged_in() ){
25 $billing_active_cls ='current';
26 }else {
27 if( 'no' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ){
28 $billing_active_cls ='current';
29 }else{
30 $billing_active_cls ='';
31 }
32 }
33 $get_checkout_fields = get_post_meta(get_the_ID(),'wpfnl_checkout_additional_fields',true);
34 $is_order_comments_enable = isset($get_checkout_fields['order_comments']['enable']) ? $get_checkout_fields['order_comments']['enable'] : true;
35 ?>
36
37
38 <?php
39
40 $loged_in_cls = '';
41 $create_acc_field = '';
42 if( ! is_user_logged_in() && 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ){
43 $loged_in_cls = ' user-not-logedin ';
44 }
45
46 if( ! is_user_logged_in() && 'no' === get_option( 'woocommerce_enable_checkout_login_reminder' ) && $checkout->is_registration_required() ){
47 $create_acc_field = ' no-create-acc-field ';
48 }
49
50 ?>
51
52
53 <div class="wpfnl-express-checkout-wrapper">
54 <div class="wpfnl-express-checkout-left">
55 <ul class="wpfnl-multistep-wizard">
56 <?php if( ! is_user_logged_in() && 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ){ ?>
57 <li class="login current">
58 <button type="button" data-target="login">
59 <span class="step-icon">
60 <?php include WPFNL_DIR.'public/assets/icons/icon-login.php'; ?>
61 </span>
62 <span class="step-title">
63 <?php esc_html_e( 'Login', 'wpfnl' ); ?>
64 </span>
65 </button>
66 </li>
67 <?php } ?>
68
69 <?php if( is_user_logged_in() ){ ?>
70 <li class="billing <?php echo $billing_active_cls; ?>">
71 <button type="button" data-target="billing">
72 <span class="step-icon">
73 <?php include WPFNL_DIR.'public/assets/icons/icon-billing.php'; ?>
74 </span>
75 <span class="step-title">
76 <?php esc_html_e( 'Billing', 'wpfnl' ); ?>
77 </span>
78 </button>
79 </li>
80 <?php if( $is_order_comments_enable || WC()->cart->needs_shipping_address()) { ?>
81 <li class="shipping">
82 <button type="button" data-target="shipping">
83 <span class="step-icon">
84 <?php include WPFNL_DIR.'public/assets/icons/icon-shipping.php'; ?>
85 </span>
86 <?php if( WC()->cart->needs_shipping_address() ){ ?>
87 <span class="step-title">
88 <?php esc_html_e( 'Shipping', 'wpfnl' ); ?>
89 </span>
90 <?php }else{ ?>
91 <span class="step-title">
92 <?php esc_html_e( 'Additional Information', 'wpfnl' ); ?>
93 </span>
94 <?php } ?>
95 </button>
96 </li>
97 <?php } ?>
98
99 <li class="order-review">
100 <button type="button" data-target="order-review">
101 <span class="step-icon">
102 <?php include WPFNL_DIR.'public/assets/icons/icon-order-review.php'; ?>
103 </span>
104 <span class="step-title">
105 <?php esc_html_e( 'Payment', 'wpfnl' ); ?>
106 </span>
107 </button>
108 </li>
109 <?php }else{
110
111 if( ! $checkout->is_registration_required() || 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' ) || $checkout->is_registration_enabled() ){
112 ?>
113 <li class="billing <?php echo $billing_active_cls; ?>">
114 <button type="button" data-target="billing">
115 <span class="step-icon">
116 <?php include WPFNL_DIR.'public/assets/icons/icon-billing.php'; ?>
117 </span>
118 <span class="step-title">
119 <?php esc_html_e( 'Billing', 'wpfnl' ); ?>
120 </span>
121 </button>
122 </li>
123 <?php if( $is_order_comments_enable || WC()->cart->needs_shipping_address()) { ?>
124 <li class="shipping">
125 <button type="button" data-target="shipping">
126 <span class="step-icon">
127 <?php include WPFNL_DIR.'public/assets/icons/icon-shipping.php'; ?>
128 </span>
129 <?php if( WC()->cart->needs_shipping_address() ){ ?>
130 <span class="step-title">
131 <?php esc_html_e( 'Shipping', 'wpfnl' ); ?>
132 </span>
133 <?php }else{ ?>
134 <span class="step-title">
135 <?php esc_html_e( 'Additional Information', 'wpfnl' ); ?>
136 </span>
137 <?php } ?>
138 </button>
139 </li>
140 <?php } ?>
141
142 <li class="order-review">
143 <button type="button" data-target="order-review">
144 <span class="step-icon">
145 <?php include WPFNL_DIR.'public/assets/icons/icon-order-review.php'; ?>
146 </span>
147 <span class="step-title">
148 <?php esc_html_e( 'Your order', 'wpfnl' ); ?>
149 </span>
150 </button>
151 </li>
152 <?php
153 }
154 }
155 ?>
156 </ul>
157
158 <?php do_action( 'woocommerce_before_checkout_form', $checkout ); ?>
159 <?php
160 if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) {
161 echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'wpfnl' ) ) );
162 echo "</div>";
163 }else{
164 ?>
165 <form name="checkout" method="post" class="checkout woocommerce-checkout <?php echo $loged_in_cls.' '.$create_acc_field; ?>" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
166 <?php if ( $checkout->get_checkout_fields() ) : ?>
167
168 <?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
169
170 <div class="col2-set" id="customer_details">
171 <?php
172 /**
173 * Fires before customer details in checkout page
174 * @since 2.8.21
175 */
176 do_action( 'wpfunnels/before_customer_details' );
177 ?>
178 <div class="col-1" id="wpfnl_checkout_billing">
179 <?php do_action( 'woocommerce_checkout_billing' ); ?>
180 </div>
181
182 <div class="col-2" id="wpfnl_checkout_shipping">
183 <?php do_action( 'woocommerce_checkout_shipping' ); ?>
184
185 <div class="express-shipping-table">
186 <table>
187 <thead>
188 <?php
189 if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) { ?>
190 <?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
191
192 <?php wc_cart_totals_shipping_html(); ?>
193
194 <?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
195
196 <?php
197 }
198 ?>
199 </thead>
200 </table>
201 </div>
202 <!-- /.express-shipping-table -->
203
204 </div>
205 <?php
206 /**
207 * Fires after customer details in checkout page
208 * @since 2.8.21
209 */
210 do_action( 'wpfunnels/after_customer_details' );
211 ?>
212 </div>
213
214 <?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
215
216 <?php endif; ?>
217
218 <?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
219
220 <div id="order_review" class="woocommerce-checkout-review-order">
221 <?php do_action( 'woocommerce_checkout_order_review' ); ?>
222 </div>
223
224 <?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
225
226 <!-- multistep navigation -->
227 <div class="wpfnl-multistep-navigation">
228 <button type="button" class="previous btn-default" data-target="" disabled><?php echo __( 'Previous', 'wpfnl' ); ?></button>
229 <?php if( !is_user_logged_in() && 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ){ ?>
230 <button type="button" class="next btn-default" data-target="billing"><?php echo __( 'Next', 'wpfnl' ); ?></button>
231 <?php }else{ ?>
232 <button type="button" class="next btn-default" data-target="shipping"><?php echo __( 'Next', 'wpfnl' ); ?></button>
233 <?php } ?>
234 </div>
235 </form>
236 </div>
237
238 <div class="wpfnl-express-checkout-right">
239 <form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
240 <?php do_action( 'woocommerce_checkout_before_order_review_heading' ); ?>
241
242 <?php if( !$hide_section_settings || ( isset($hide_section_settings['custom_heading']) && $hide_section_settings['custom_heading'] != '' ) ) { ?>
243 <h3 id="order_review_heading">
244 <?php
245 if( isset($hide_section_settings['custom_heading']) && $hide_section_settings['custom_heading'] != '' ){
246 esc_html( $hide_section_settings['custom_heading'] );
247 }else{
248 esc_html_e( 'Your orders', 'wpfnl' );
249 }
250 ?>
251 </h3>
252 <?php } ?>
253
254 <?php do_action( 'wpfunnels/before_checkout_order_review' ); ?>
255
256 <div class="responsive-table">
257 <?php woocommerce_order_review();?>
258 </div>
259
260 <?php do_action( 'wpfunnels/after_checkout_order_review' ); ?>
261
262 </form>
263 </div>
264
265 <?php } ?>
266 </div>
267
268 <?php do_action( 'woocommerce_after_checkout_form', $checkout ); ?>
269