You've already forked wc-bootstrap
55 lines
2.0 KiB
Twig
55 lines
2.0 KiB
Twig
|
|
{#
|
||
|
|
# Payment Methods & Place Order (Bootstrap 5 Override)
|
||
|
|
#
|
||
|
|
# Renders payment gateway selection and the place order button.
|
||
|
|
#
|
||
|
|
# Expected context:
|
||
|
|
# available_gateways - Array of WC_Payment_Gateway objects
|
||
|
|
# order_button_text - Place order button label
|
||
|
|
#
|
||
|
|
# WooCommerce PHP equivalent: checkout/payment.php
|
||
|
|
#
|
||
|
|
# @package WcBootstrap
|
||
|
|
# @since 0.1.0
|
||
|
|
#}
|
||
|
|
|
||
|
|
<div id="payment" class="woocommerce-checkout-payment mt-4">
|
||
|
|
{{ do_action('woocommerce_review_order_before_payment') }}
|
||
|
|
|
||
|
|
{% if available_gateways is defined and available_gateways|length > 0 %}
|
||
|
|
<div class="card shadow-sm mb-3">
|
||
|
|
<div class="card-header">
|
||
|
|
<h4 class="h6 mb-0">{{ __('Payment method') }}</h4>
|
||
|
|
</div>
|
||
|
|
<ul class="wc_payment_methods payment_methods list-group list-group-flush">
|
||
|
|
{% for gateway_id, gateway in available_gateways %}
|
||
|
|
{% include 'checkout/payment-method.html.twig' with { gateway: gateway } %}
|
||
|
|
{% endfor %}
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
{% else %}
|
||
|
|
<div class="alert alert-warning mb-3" role="alert">
|
||
|
|
{{ __('Sorry, it seems that there are no available payment methods. Please contact us if you require assistance or wish to make alternate arrangements.') }}
|
||
|
|
</div>
|
||
|
|
{% endif %}
|
||
|
|
|
||
|
|
<div class="place-order">
|
||
|
|
{{ do_action('woocommerce_review_order_before_submit') }}
|
||
|
|
|
||
|
|
{{ wp_nonce_field('woocommerce-process_checkout', 'woocommerce-process-checkout-nonce') }}
|
||
|
|
|
||
|
|
<button type="submit"
|
||
|
|
class="btn btn-primary btn-lg w-100"
|
||
|
|
name="woocommerce_checkout_place_order"
|
||
|
|
id="place_order"
|
||
|
|
value="{{ order_button_text|default(__('Place order')) }}"
|
||
|
|
data-value="{{ order_button_text|default(__('Place order')) }}">
|
||
|
|
{{ order_button_text|default(__('Place order')) }}
|
||
|
|
</button>
|
||
|
|
|
||
|
|
{{ do_action('woocommerce_review_order_after_submit') }}
|
||
|
|
</div>
|
||
|
|
|
||
|
|
{{ do_action('woocommerce_review_order_after_payment') }}
|
||
|
|
</div>
|