
Как добавить краткое описание товара в блок таблицы наименования товара в корзине?
В этом файле пытаюсь разобраться:
D:\OpenServer\domains\wpwoo\wp-content\plugins\woocommerce\templates\cart\cart.php
Этот блок отвечает за присвоение классов элементам самой таблицы.
А вот блок:
За вывод самого названия продукта.
Что тут добавить, что бы краткое описание добавилось в ячейку с наименованием продукта?
Доп. инфа:
'woocommerce_short_description' $post->post_excerpt
В этом файле пытаюсь разобраться:
D:\OpenServer\domains\wpwoo\wp-content\plugins\woocommerce\templates\cart\cart.php
Этот блок отвечает за присвоение классов элементам самой таблицы.
Код:
<table class="shop_table shop_table_responsive cart" cellspacing="0">
<thead>
<tr>
<th class="product-remove"> </th>
<th class="product-thumbnail"> </th>
<th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
<th class="product-price"><?php _e( 'Price', 'woocommerce' ); ?></th>
<th class="product-quantity"><?php _e( 'Quantity', 'woocommerce' ); ?></th>
<th class="product-subtotal"><?php _e( 'Total', 'woocommerce' ); ?></th>
</tr>
</thead>
Код:
<td class="product-name" data-title="<?php _e( 'Product', 'woocommerce' ); ?>">
<?php
if ( ! $product_permalink ) {
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ) . ' ';
} else {
echo apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_title() ), $cart_item, $cart_item_key );
}
// Meta data
echo WC()->cart->get_item_data( $cart_item );
// Backorder notification
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
echo '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>';
}
?>
</td>
Что тут добавить, что бы краткое описание добавилось в ячейку с наименованием продукта?
Доп. инфа:
'woocommerce_short_description' $post->post_excerpt
Последнее редактирование: