Anton | настройка cart
This commit is contained in:
@@ -641,7 +641,7 @@ function twentytwentyfour_water_delivery_before_cart() {
|
||||
$remaining = max( 0, $threshold - $subtotal );
|
||||
$account_url = function_exists( 'wc_get_account_endpoint_url' ) ? wc_get_account_endpoint_url( 'orders' ) : '';
|
||||
?>
|
||||
<div class="water-commerce-panel water-commerce-panel-cart">
|
||||
<div class="water-commerce-panel water-commerce-panel-cart js-cart-dynamic-region">
|
||||
<div class="water-commerce-panel-head">
|
||||
<h2><?php esc_html_e( 'Проверьте заказ перед оформлением', 'twentytwentyfour' ); ?></h2>
|
||||
<p><?php esc_html_e( 'Измените количество бутылей, удалите лишние позиции и перейдите к оформлению доставки воды по Севастополю.', 'twentytwentyfour' ); ?></p>
|
||||
@@ -667,6 +667,48 @@ function twentytwentyfour_water_delivery_before_cart() {
|
||||
}
|
||||
add_action( 'woocommerce_before_cart', 'twentytwentyfour_water_delivery_before_cart', 5 );
|
||||
|
||||
/**
|
||||
* Rename default cross-sells heading for water delivery cart.
|
||||
*
|
||||
* @param string $heading Default heading.
|
||||
* @return string
|
||||
*/
|
||||
function twentytwentyfour_water_delivery_cross_sells_heading( $heading ) {
|
||||
return __( 'Добавьте к заказу помпы, стаканы и оборудование', 'twentytwentyfour' );
|
||||
}
|
||||
add_filter( 'woocommerce_product_cross_sells_products_heading', 'twentytwentyfour_water_delivery_cross_sells_heading' );
|
||||
|
||||
add_filter( 'woocommerce_cart_totals_order_total_html', 'twentytwentyfour_water_delivery_cart_totals_order_total_html' );
|
||||
|
||||
/**
|
||||
* Preserve Woo total html while allowing custom wrapper styling.
|
||||
*
|
||||
* @param string $value Current total html.
|
||||
* @return string
|
||||
*/
|
||||
function twentytwentyfour_water_delivery_cart_totals_order_total_html( $value ) {
|
||||
return '<span class="water-order-total-value">' . $value . '</span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a sticky summary note before cart totals.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function twentytwentyfour_water_delivery_before_cart_totals() {
|
||||
?>
|
||||
<div class="water-cart-summary-box">
|
||||
<div class="water-cart-summary-usp"><?php esc_html_e( 'Доставка воды по Севастополю за 2-4 часа', 'twentytwentyfour' ); ?></div>
|
||||
<ul class="water-cart-summary-list">
|
||||
<li><?php esc_html_e( 'Стоимость доставки рассчитывается автоматически по зоне', 'twentytwentyfour' ); ?></li>
|
||||
<li><?php esc_html_e( 'Залог за тару показывается отдельной строкой при необходимости', 'twentytwentyfour' ); ?></li>
|
||||
<li><?php esc_html_e( 'После проверки корзины можно сразу перейти к оформлению', 'twentytwentyfour' ); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
add_action( 'woocommerce_before_cart_totals', 'twentytwentyfour_water_delivery_before_cart_totals', 5 );
|
||||
|
||||
/**
|
||||
* Add SEO content after the cart.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user