| 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
/**
* Review order - Matreshka Custom Template
*
* @package Matreshka
* @version 9.4.0
*/
defined( 'ABSPATH' ) || exit;
global $checkout;
if ( ! $checkout ) {
$checkout = WC()->checkout();
}
$billing_phone = $checkout->get_value( 'billing_phone' );
$billing_phone_is_valid = false;
if ( function_exists( 'matreshka_normalize_order_phone' ) ) {
$normalized_phone = matreshka_normalize_order_phone( $billing_phone );
if ( $normalized_phone ) {
$billing_phone = $normalized_phone;
$billing_phone_is_valid = true;
}
}
$is_pickup = WC()->session && 'pickup' === WC()->session->get( 'matreshka_shipping_type', 'delivery' );
?>
<div class="input-group checkout-input mb-3 mt-2">
<span class="input-group-text" id="phone-icon">
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/Phone.svg' ); ?>" alt="phone icon">
</span>
<div class="w-100">
<input
type="tel"
class="input-address montserrat-medium form-control"
name="billing_phone"
id="billing_phone"
placeholder="+7 XXX XXX XX XX"
value="<?php echo esc_attr( $billing_phone ); ?>"
inputmode="tel"
autocomplete="tel"
pattern="\+7 [0-9]{3} [0-9]{3} [0-9]{2} [0-9]{2}"
aria-describedby="billing_phone_hint"
required
>
<span id="billing_phone_hint" class="visually-hidden">Введите номер в формате +7 XXX XXX XX XX</span>
</div>
</div>
<?php if ( ! $is_pickup ) : ?>
<label for="leave_at_door" class="btn btn-white btn-with-checkout montserrat-semibold w-100 mb-3" style="cursor: pointer;">
Оставить у двери
<div class="form-check form-switch ms-auto">
<input class="form-check-input" type="checkbox" role="switch" id="leave_at_door" name="leave_at_door" value="1">
</div>
</label>
<?php endif; ?>
<div class="cart-info-pay">
<h4 class="montserrat-bold mb-3">Что в цене</h4>
<div class="characteristic-item">
<p class="montserrat-regular">Товары в заказе</p>
<span class="hr"></span>
<p class="montserrat-bold">
<?php echo WC()->cart->get_cart_subtotal(); ?>
</p>
</div>
<?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
<?php
$shipping_type = WC()->session ? WC()->session->get( 'matreshka_shipping_type', 'delivery' ) : 'delivery';
$shipping_total = WC()->cart->get_shipping_total();
$shipping_label = $shipping_type === 'pickup' ? 'Самовывоз' : 'Доставка';
?>
<div class="characteristic-item">
<p class="montserrat-regular"><?php echo esc_html( $shipping_label ); ?></p>
<span class="hr"></span>
<p class="montserrat-bold">
<?php
if ( $shipping_total > 0 ) {
echo wc_price( $shipping_total );
} else {
echo __( 'Бесплатно', 'matreshka' );
}
?>
</p>
</div>
<?php endif; ?>
<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
<div class="characteristic-item">
<p class="montserrat-regular"><?php echo esc_html( $fee->name ); ?></p>
<span class="hr"></span>
<p class="montserrat-bold">
<?php echo wc_price( $fee->amount ); ?>
</p>
</div>
<?php endforeach; ?>
<?php if ( wc_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) : ?>
<?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
<div class="characteristic-item">
<p class="montserrat-regular"><?php echo esc_html( $tax->label ); ?></p>
<span class="hr"></span>
<p class="montserrat-bold"><?php echo wp_kses_post( $tax->formatted_amount ); ?></p>
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="characteristic-item">
<p class="montserrat-regular"><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></p>
<span class="hr"></span>
<p class="montserrat-bold"><?php wc_cart_totals_taxes_total_html(); ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
<?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
<?php
$coupon_code = $coupon->get_code();
$coupon_discount = WC()->cart->get_coupon_discount_amount( $coupon_code, WC()->cart->display_cart_ex_tax );
$coupon_remove_url = add_query_arg( 'remove_coupon', rawurlencode( $coupon_code ), wc_get_checkout_url() );
$coupon_remove_label = sprintf( __( 'Remove %s coupon', 'woocommerce' ), $coupon_code );
?>
<div class="characteristic-item checkout-coupon-row">
<p class="montserrat-medium checkout-coupon-row__label">
Промокод <span><?php echo esc_html( wc_format_coupon_code( $coupon_code ) ); ?></span>
</p>
<span class="hr"></span>
<p class="montserrat-bold checkout-coupon-row__value">
-<?php echo wp_kses_post( wc_price($coupon_discount ) ); ?>
</p>
</div>
<?php endforeach; ?>
</div>
<div class="cart-info-total">
<div class="info-total-price">
<p class="montserrat-bold" style="font-size: 20px;">
<span class="montserrat-bold">
<?php echo WC()->cart->get_total(); ?>
</span>
</p>
<button type="submit" class="btn btn-red-primary montserrat-semibold" name="woocommerce_checkout_place_order" id="place_order" value="<?php echo esc_attr( apply_filters( 'woocommerce_order_button_text', __( 'Подтвердить заказ', 'matreshka' ) ) ); ?>" data-value="<?php echo esc_attr( apply_filters( 'woocommerce_order_button_text', __( 'Подтвердить заказ', 'matreshka' ) ) ); ?>" <?php disabled( ! $billing_phone_is_valid ); ?> aria-disabled="<?php echo $billing_phone_is_valid ? 'false' : 'true'; ?>">
<?php echo esc_html( apply_filters( 'woocommerce_order_button_text', __( 'Подтвердить заказ', 'matreshka' ) ) ); ?>
</button>
</div>
</div>
</table>