partials
9 months ago
_booking__agents.php
9 months ago
_booking__datepicker.php
9 months ago
_booking__services.php
9 months ago
_confirmation.php
9 months ago
_customer.php
4 months ago
_payment__methods.php
1 year ago
_payment__pay.php
1 year ago
_payment__portions.php
1 year ago
_payment__processors.php
1 year ago
_payment__times.php
1 year ago
_verify.php
1 year ago
load_step.php
1 year ago
preset_slot_not_available.php
1 year ago
start.php
1 year ago
start_instant.php
1 year ago
_payment__times.php
50 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2024 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /** |
| 7 | * @var $current_step_code string |
| 8 | * @var $restrictions array |
| 9 | * @var $presets array |
| 10 | * @var $cart OsCartModel |
| 11 | * @var $enabled_payment_times array |
| 12 | */ |
| 13 | |
| 14 | if ( ! defined( 'ABSPATH' ) ) { |
| 15 | exit; // Exit if accessed directly |
| 16 | } |
| 17 | |
| 18 | |
| 19 | ?> |
| 20 | <div class="step-payment-times-w latepoint-step-content" |
| 21 | data-step-code="<?php echo esc_attr($current_step_code); ?>" |
| 22 | data-next-btn-label="<?php echo esc_attr(OsStepsHelper::get_next_btn_label_for_step($current_step_code)); ?>"> |
| 23 | |
| 24 | <?php |
| 25 | do_action('latepoint_before_step_content', $current_step_code); |
| 26 | echo OsStepsHelper::get_formatted_extra_step_content($current_step_code, 'before'); |
| 27 | ?> |
| 28 | |
| 29 | <div class="lp-payment-times-w"> |
| 30 | <div class="latepoint-step-content-text-centered"> |
| 31 | <h4><?php esc_html_e('When would you like to pay for the service?', 'latepoint'); ?></h4> |
| 32 | <div><?php esc_html_e('You can either pay now or pay locally on arrival. You will be able to select payment method in the next step.', 'latepoint'); ?></div> |
| 33 | </div> |
| 34 | <div class="lp-options lp-options-grid lp-options-grid-three"> |
| 35 | <?php foreach ($enabled_payment_times as $pay_time_name => $pay_time_methods) { |
| 36 | $option = reset($pay_time_methods); |
| 37 | $option['label'] = ($pay_time_name == 'now') ? __('Pay Now', 'latepoint') : __('Pay Later', 'latepoint'); |
| 38 | $option['image_url'] = ($pay_time_name == 'now') ? LATEPOINT_IMAGES_URL . 'payment_now.png' : LATEPOINT_IMAGES_URL . 'payment_later.png'; |
| 39 | $option['css_class'] = 'lp-payment-trigger-payment-time-selector'; |
| 40 | $option['attrs'] = 'data-value="' . esc_attr($pay_time_name) . '" data-holder="cart[payment_time]"'; |
| 41 | echo OsStepsHelper::output_list_option($option); |
| 42 | } ?> |
| 43 | </div> |
| 44 | </div> |
| 45 | <?php |
| 46 | echo OsStepsHelper::get_formatted_extra_step_content($current_step_code, 'after'); |
| 47 | do_action('latepoint_after_step_content', $current_step_code); |
| 48 | ?> |
| 49 | <?php echo OsFormHelper::hidden_field('cart[payment_time]', '', ['class' => 'latepoint_cart_payment_time', 'skip_id' => true]); ?> |
| 50 | </div> |