| Server IP : 104.171.130.249 / Your IP : 216.73.216.146 Web Server : nginx/1.25.5 System : Linux 0dac65491b7e 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/themes/matreshka/woocommerce/checkout/ |
Upload File : |
<?php
/**
* Checkout Form - Matreshka Custom Template
*
* @package Matreshka
* @version 9.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
do_action( 'woocommerce_before_checkout_form', $checkout );
$is_pickup = WC()->session && 'pickup' === WC()->session->get( 'matreshka_shipping_type', 'delivery' );
$comment_label = $is_pickup ? 'Комментарий к заказу' : 'Комментарий курьеру';
$comment_hint = $is_pickup ? 'Напишите, что необходимо учесть при выдаче заказа' : 'Звонок не работает, постучите в дверь';
// If checkout registration is disabled and not logged in, the user cannot checkout.
if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) {
echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) ) );
return;
}
?>
<!-- navigation -->
<section>
<div class="container navigation">
<div class="d-flex w-100 align-items-center">
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="btn">
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/AltArrowLeft.svg' ); ?>" alt="arrow left icon">
</a>
<h2 class="montserrat-bold mt-2 mt-md-0" style="font-size: 30px;">уточняем детали</h2>
</div>
</div>
</section>
<!-- checkout form -->
<section>
<div class="container">
<!-- Checkout notices appear here, above the form -->
<div id="matreshka-checkout-notices"></div>
</div>
<div class="container cart d-md-flex d-block">
<form name="checkout" method="post" class="checkout woocommerce-checkout w-100 d-md-flex d-block" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
<?php if ( $checkout->get_checkout_fields() ) : ?>
<?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
<!-- Left side - Customer Details -->
<div class="cart-products d-block" style="margin-top: 40px;">
<?php do_action( 'woocommerce_checkout_billing' ); ?>
<?php do_action( 'woocommerce_checkout_shipping' ); ?>
<div class="cart-product-checkout">
<div class="input-group">
<label for="order_comments" class="form-label montserrat-medium"><?php echo esc_html( $comment_label ); ?></label>
<textarea
name="order_comments"
class="montserrat-medium"
id="order_comments"
placeholder="<?php echo esc_attr( $comment_hint ); ?>"
rows="2"
><?php echo esc_textarea( $checkout->get_value( 'order_comments' ) ); ?></textarea>
</div>
</div>
</div>
<?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
<?php endif; ?>
<!-- Right side - Order Review -->
<div class="cart-info cart-info-checkout" >
<?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
<div id="order_review" class="woocommerce-checkout-review-order">
<?php do_action( 'woocommerce_checkout_order_review' ); ?>
</div>
<?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
</div>
</form>
</div>
</section>
<?php do_action( 'woocommerce_after_checkout_form' ); ?>
<script>
(function($){
// Move checkout error/success notices above the form
$(document.body).on('checkout_error', function(){
var $notices = $('form.checkout').find('.woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message');
if ($notices.length) {
$('#matreshka-checkout-notices').html('').append($notices);
$('html, body').animate({ scrollTop: $('#matreshka-checkout-notices').offset().top - 100 }, 400);
}
});
})(jQuery);
</script>