Diff
checker
文本
文本
圖像
文檔
Excel
文件夾
Legal
Enterprise
桌面版
定價
登入
下載 Diffchecker 桌面版
比較文本
尋找兩個文字檔案之間的差異
工具
歷史
即時編輯器
摺疊未變更行
關閉換行
檢視
拆分
統一
比對精度
智能
單詞
字符
語法突出顯示
選擇語法
忽略
文字轉換
前往第一個差異
編輯輸入
Diffchecker Desktop
執行Diffchecker最安全的方式。取得Diffchecker桌面應用程式:您的差異永遠不會離開您的電腦!
取得桌面版
ShopEngine line item class fix
建立於
去年
差異永不過期
清除
匯出
分享
解釋
1 刪除
行
總計
刪除
字符
總計
刪除
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
201 行
全部複製
0 新增
行
總計
新增
字符
總計
新增
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
201 行
全部複製
<?php
<?php
defined('ABSPATH') || exit;
defined('ABSPATH') || exit;
?>
?>
<div class="shopengine-cart-table">
<div class="shopengine-cart-table">
<?php do_action('woocommerce_before_cart'); ?>
<?php do_action('woocommerce_before_cart'); ?>
<form class="shopengine-cart-form woocommerce-cart-form" action="<?php echo esc_url(wc_get_cart_url()); ?>" method="post">
<form class="shopengine-cart-form woocommerce-cart-form" action="<?php echo esc_url(wc_get_cart_url()); ?>" method="post">
<?php do_action('woocommerce_before_cart_table'); ?>
<?php do_action('woocommerce_before_cart_table'); ?>
<!-- shopengine cart table start -->
<!-- shopengine cart table start -->
<div class="shopengine-table">
<div class="shopengine-table">
<!-- -------------------------------
<!-- -------------------------------
shopengine cart table head start
shopengine cart table head start
------------------------------------->
------------------------------------->
<div class="shopengine-table__head">
<div class="shopengine-table__head">
<div class="shopengine-table__head--th product-name"><?php echo esc_html($settings['shopengine_cart_table_title']) ?></div>
<div class="shopengine-table__head--th product-name"><?php echo esc_html($settings['shopengine_cart_table_title']) ?></div>
<div class="shopengine-table__head--th product-price"><?php echo esc_html($settings['shopengine_cart_table_price']) ?></div>
<div class="shopengine-table__head--th product-price"><?php echo esc_html($settings['shopengine_cart_table_price']) ?></div>
<div class="shopengine-table__head--th product-quantity"><?php echo esc_html($settings['shopengine_cart_table_quantity']) ?></div>
<div class="shopengine-table__head--th product-quantity"><?php echo esc_html($settings['shopengine_cart_table_quantity']) ?></div>
<div class="shopengine-table__head--th product-subtotal"><?php echo esc_html($settings['shopengine_cart_table_subtotal']) ?></div>
<div class="shopengine-table__head--th product-subtotal"><?php echo esc_html($settings['shopengine_cart_table_subtotal']) ?></div>
</div> <!-- shopengine cart table head end -->
</div> <!-- shopengine cart table head end -->
<!---------------------------------------
<!---------------------------------------
shopengine cart table body start
shopengine cart table body start
------------------------------------- -->
------------------------------------- -->
<div class="shopengine-table__body">
<div class="shopengine-table__body">
<?php do_action('woocommerce_before_cart_contents'); ?>
<?php do_action('woocommerce_before_cart_contents'); ?>
<?php
<?php
foreach(WC()->cart->get_cart() as $cart_item_key => $cart_item) {
foreach(WC()->cart->get_cart() as $cart_item_key => $cart_item) {
$_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key);
$_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key);
$product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key);
$product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key);
if($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_cart_item_visible', true, $cart_item, $cart_item_key)) {
if($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_cart_item_visible', true, $cart_item, $cart_item_key)) {
$product_permalink = apply_filters('woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink($cart_item) : '', $cart_item, $cart_item_key);
$product_permalink = apply_filters('woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink($cart_item) : '', $cart_item, $cart_item_key);
?>
?>
<!-- shopengine cart table body item start -->
<!-- shopengine cart table body item start -->
複製
已複製
複製
已複製
<div class="shopengine-table__body-item
"
<?php echo esc_attr(apply_filters('woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key)); ?>">
<div class="shopengine-table__body-item
<?php echo esc_attr(apply_filters('woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key)); ?>">
<!--
<!--
@class : table-first-body-column
@class : table-first-body-column
@content : remove button, thumbnail, product name
@content : remove button, thumbnail, product name
-->
-->
<div class="shopengine-table__body-item--td table-first-body-column">
<div class="shopengine-table__body-item--td table-first-body-column">
<!-- Product Thumbnail and remove button together -->
<!-- Product Thumbnail and remove button together -->
<div class="product-thumbnail" data-title="<?php esc_attr_e('Image', 'shopengine'); ?>"> <?php
<div class="product-thumbnail" data-title="<?php esc_attr_e('Image', 'shopengine'); ?>"> <?php
$thumbnail = apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key);
$thumbnail = apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key);
$product = esc_html__("View Product Full Details","shopengine");
$product = esc_html__("View Product Full Details","shopengine");
if(!$product_permalink) {
if(!$product_permalink) {
shopengine_content_render(\ShopEngine\Utils\Helper::render( $thumbnail ));
shopengine_content_render(\ShopEngine\Utils\Helper::render( $thumbnail ));
} else {
} else {
shopengine_content_render(sprintf('<a title="' . $product . '" href="%s">%s</a>', esc_url($product_permalink), $thumbnail));
shopengine_content_render(sprintf('<a title="' . $product . '" href="%s">%s</a>', esc_url($product_permalink), $thumbnail));
} ?>
} ?>
<!-- remove button -->
<!-- remove button -->
<div class="product-remove">
<div class="product-remove">
<?php
<?php
$cart = esc_html__("Remove Cart Item","shopengine");
$cart = esc_html__("Remove Cart Item","shopengine");
ob_start();
ob_start();
\Elementor\Icons_Manager::render_icon( $settings['shopengine_table_remove_button_icon_change'], [ 'aria-hidden' => 'true' ] );
\Elementor\Icons_Manager::render_icon( $settings['shopengine_table_remove_button_icon_change'], [ 'aria-hidden' => 'true' ] );
$remove_icon = ob_get_clean();
$remove_icon = ob_get_clean();
shopengine_content_render(
shopengine_content_render(
apply_filters(
apply_filters(
'woocommerce_cart_item_remove_link',
'woocommerce_cart_item_remove_link',
sprintf(
sprintf(
'<a title="' . $cart . '" href="%s" class="remove remove_from_cart_button" aria-label="%s" data-product_id="%s" data-cart_item_key="%s" data-product_sku="%s">
'<a title="' . $cart . '" href="%s" class="remove remove_from_cart_button" aria-label="%s" data-product_id="%s" data-cart_item_key="%s" data-product_sku="%s">
%s
%s
</a>',
</a>',
esc_url(wc_get_cart_remove_url($cart_item_key)),
esc_url(wc_get_cart_remove_url($cart_item_key)),
esc_html__('Remove this item', 'shopengine'),
esc_html__('Remove this item', 'shopengine'),
esc_attr($product_id),
esc_attr($product_id),
esc_attr( $cart_item_key ),
esc_attr( $cart_item_key ),
esc_attr($_product->get_sku()),
esc_attr($_product->get_sku()),
$remove_icon,
$remove_icon,
),
),
$cart_item_key
$cart_item_key
)
)
);
);
?>
?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- product name -->
<!-- product name -->
<div class="shopengine-table__body-item--td product-name" data-title="<?php esc_attr_e('Product', 'shopengine'); ?>">
<div class="shopengine-table__body-item--td product-name" data-title="<?php esc_attr_e('Product', 'shopengine'); ?>">
<?php
<?php
if(!$product_permalink) {
if(!$product_permalink) {
echo wp_kses_post(apply_filters('woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key) . ' ');
echo wp_kses_post(apply_filters('woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key) . ' ');
} else {
} else {
echo wp_kses_post(apply_filters('woocommerce_cart_item_name', sprintf('<a href="%s">%s</a>', esc_url($product_permalink), $_product->get_name()), $cart_item, $cart_item_key));
echo wp_kses_post(apply_filters('woocommerce_cart_item_name', sprintf('<a href="%s">%s</a>', esc_url($product_permalink), $_product->get_name()), $cart_item, $cart_item_key));
}
}
do_action('woocommerce_after_cart_item_name', $cart_item, $cart_item_key);
do_action('woocommerce_after_cart_item_name', $cart_item, $cart_item_key);
// Meta data.
// Meta data.
shopengine_content_render(wc_get_formatted_cart_item_data($cart_item));
shopengine_content_render(wc_get_formatted_cart_item_data($cart_item));
// Backorder notification.
// Backorder notification.
if($_product->backorders_require_notification() && $_product->is_on_backorder($cart_item['quantity'])) {
if($_product->backorders_require_notification() && $_product->is_on_backorder($cart_item['quantity'])) {
echo wp_kses_post(apply_filters('woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__('Available on backorder', 'shopengine') . '</p>', $product_id));
echo wp_kses_post(apply_filters('woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__('Available on backorder', 'shopengine') . '</p>', $product_id));
}
}
?>
?>
</div>
</div>
<!-- product price -->
<!-- product price -->
<div class="shopengine-table__body-item--td product-price" data-title="<?php esc_attr_e('Price', 'shopengine'); ?>">
<div class="shopengine-table__body-item--td product-price" data-title="<?php esc_attr_e('Price', 'shopengine'); ?>">
<?php
<?php
shopengine_content_render(apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $cart_item, $cart_item_key));
shopengine_content_render(apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $cart_item, $cart_item_key));
?>
?>
</div>
</div>
<!-- product quantity -->
<!-- product quantity -->
<div class="shopengine-table__body-item--td product-quantity" data-title="<?php esc_attr_e('Quantity', 'shopengine'); ?>">
<div class="shopengine-table__body-item--td product-quantity" data-title="<?php esc_attr_e('Quantity', 'shopengine'); ?>">
<div class="shopengine-cart-quantity">
<div class="shopengine-cart-quantity">
<?php
<?php
if($_product->is_sold_individually()) {
if($_product->is_sold_individually()) {
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
} else {
} else {
echo "<span class='minus-button'>−</span>";
echo "<span class='minus-button'>−</span>";
$product_quantity = woocommerce_quantity_input(
$product_quantity = woocommerce_quantity_input(
array(
array(
'input_name' => "cart[{$cart_item_key}][qty]",
'input_name' => "cart[{$cart_item_key}][qty]",
'input_value' => $cart_item['quantity'],
'input_value' => $cart_item['quantity'],
'max_value' => $_product->get_max_purchase_quantity(),
'max_value' => $_product->get_max_purchase_quantity(),
'min_value' => '0',
'min_value' => '0',
'product_name' => $_product->get_name(),
'product_name' => $_product->get_name(),
),
),
$_product,
$_product,
false
false
);
);
echo "<span data-max=".intval($_product->get_max_purchase_quantity())." class='plus-button'>+</span>";
echo "<span data-max=".intval($_product->get_max_purchase_quantity())." class='plus-button'>+</span>";
}
}
shopengine_content_render(apply_filters('woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item));
shopengine_content_render(apply_filters('woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item));
?>
?>
</div>
</div>
</div>
</div>
<!-- product subtotal -->
<!-- product subtotal -->
<div class="shopengine-table__body-item--td product-subtotal" data-title="<?php esc_attr_e('Subtotal', 'shopengine'); ?>">
<div class="shopengine-table__body-item--td product-subtotal" data-title="<?php esc_attr_e('Subtotal', 'shopengine'); ?>">
<?php
<?php
shopengine_content_render(apply_filters('woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal($_product, $cart_item['quantity']), $cart_item, $cart_item_key));
shopengine_content_render(apply_filters('woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal($_product, $cart_item['quantity']), $cart_item, $cart_item_key));
?>
?>
</div>
</div>
</div> <!-- shopengine cart table body item end -->
</div> <!-- shopengine cart table body item end -->
<?php
<?php
}
}
}
}
?>
?>
<?php do_action('woocommerce_cart_contents'); ?>
<?php do_action('woocommerce_cart_contents'); ?>
<?php do_action('woocommerce_after_cart_contents'); ?>
<?php do_action('woocommerce_after_cart_contents'); ?>
</div> <!-- shopengine cart table body end -->
</div> <!-- shopengine cart table body end -->
<!--------------------------------
<!--------------------------------
shopengine cart table footer start
shopengine cart table footer start
------------------------------- -->
------------------------------- -->
<div class="shopengine-table__footer">
<div class="shopengine-table__footer">
<div class="button-group-left">
<div class="button-group-left">
<button class="return-to-shop shopengine-footer-button">
<button class="return-to-shop shopengine-footer-button">
<i class="eicon-arrow-left"></i>
<i class="eicon-arrow-left"></i>
<a title="<?php esc_html_e('Return To Shop','shopengine')?>" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
<a title="<?php esc_html_e('Return To Shop','shopengine')?>" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
<?php echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', esc_html($settings['shopengine_cart_continue_shopping_btn']) ) ); ?>
<?php echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', esc_html($settings['shopengine_cart_continue_shopping_btn']) ) ); ?>
</a>
</a>
</button>
</button>
</div>
</div>
<div class="button-group-right">
<div class="button-group-right">
<button type="submit" class="button update-cart-btn shopengine-footer-button" name="update_cart">
<button type="submit" class="button update-cart-btn shopengine-footer-button" name="update_cart">
<i class="eicon-redo"></i>
<i class="eicon-redo"></i>
<?php echo esc_html($settings['shopengine_cart_table_update']);?>
<?php echo esc_html($settings['shopengine_cart_table_update']);?>
</button>
</button>
<button class="shopengine-footer-button clear-btn" type="submit" name="empty_cart">
<button class="shopengine-footer-button clear-btn" type="submit" name="empty_cart">
<i class="eicon-trash-o"></i>
<i class="eicon-trash-o"></i>
<?php echo esc_html($settings['shopengine_cart_table_clear_all']);?>
<?php echo esc_html($settings['shopengine_cart_table_clear_all']);?>
</button>
</button>
</div>
</div>
<?php do_action('woocommerce_cart_actions'); ?>
<?php do_action('woocommerce_cart_actions'); ?>
<?php wp_nonce_field('woocommerce-cart', 'woocommerce-cart-nonce'); ?>
<?php wp_nonce_field('woocommerce-cart', 'woocommerce-cart-nonce'); ?>
</div> <!-- shopengine cart table footer end -->
</div> <!-- shopengine cart table footer end -->
</div> <!-- shopengine cart table end -->
</div> <!-- shopengine cart table end -->
<?php do_action('woocommerce_after_cart_table'); ?>
<?php do_action('woocommerce_after_cart_table'); ?>
</form>
</form>
<?php do_action('woocommerce_after_cart'); ?>
<?php do_action('woocommerce_after_cart'); ?>
</div>
</div>
已保存差異
原始文本
開啟檔案
<?php defined('ABSPATH') || exit; ?> <div class="shopengine-cart-table"> <?php do_action('woocommerce_before_cart'); ?> <form class="shopengine-cart-form woocommerce-cart-form" action="<?php echo esc_url(wc_get_cart_url()); ?>" method="post"> <?php do_action('woocommerce_before_cart_table'); ?> <!-- shopengine cart table start --> <div class="shopengine-table"> <!-- ------------------------------- shopengine cart table head start -------------------------------------> <div class="shopengine-table__head"> <div class="shopengine-table__head--th product-name"><?php echo esc_html($settings['shopengine_cart_table_title']) ?></div> <div class="shopengine-table__head--th product-price"><?php echo esc_html($settings['shopengine_cart_table_price']) ?></div> <div class="shopengine-table__head--th product-quantity"><?php echo esc_html($settings['shopengine_cart_table_quantity']) ?></div> <div class="shopengine-table__head--th product-subtotal"><?php echo esc_html($settings['shopengine_cart_table_subtotal']) ?></div> </div> <!-- shopengine cart table head end --> <!--------------------------------------- shopengine cart table body start ------------------------------------- --> <div class="shopengine-table__body"> <?php do_action('woocommerce_before_cart_contents'); ?> <?php foreach(WC()->cart->get_cart() as $cart_item_key => $cart_item) { $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key); $product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key); if($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_cart_item_visible', true, $cart_item, $cart_item_key)) { $product_permalink = apply_filters('woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink($cart_item) : '', $cart_item, $cart_item_key); ?> <!-- shopengine cart table body item start --> <div class="shopengine-table__body-item" <?php echo esc_attr(apply_filters('woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key)); ?>"> <!-- @class : table-first-body-column @content : remove button, thumbnail, product name --> <div class="shopengine-table__body-item--td table-first-body-column"> <!-- Product Thumbnail and remove button together --> <div class="product-thumbnail" data-title="<?php esc_attr_e('Image', 'shopengine'); ?>"> <?php $thumbnail = apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key); $product = esc_html__("View Product Full Details","shopengine"); if(!$product_permalink) { shopengine_content_render(\ShopEngine\Utils\Helper::render( $thumbnail )); } else { shopengine_content_render(sprintf('<a title="' . $product . '" href="%s">%s</a>', esc_url($product_permalink), $thumbnail)); } ?> <!-- remove button --> <div class="product-remove"> <?php $cart = esc_html__("Remove Cart Item","shopengine"); ob_start(); \Elementor\Icons_Manager::render_icon( $settings['shopengine_table_remove_button_icon_change'], [ 'aria-hidden' => 'true' ] ); $remove_icon = ob_get_clean(); shopengine_content_render( apply_filters( 'woocommerce_cart_item_remove_link', sprintf( '<a title="' . $cart . '" href="%s" class="remove remove_from_cart_button" aria-label="%s" data-product_id="%s" data-cart_item_key="%s" data-product_sku="%s"> %s </a>', esc_url(wc_get_cart_remove_url($cart_item_key)), esc_html__('Remove this item', 'shopengine'), esc_attr($product_id), esc_attr( $cart_item_key ), esc_attr($_product->get_sku()), $remove_icon, ), $cart_item_key ) ); ?> </div> </div> </div> <!-- product name --> <div class="shopengine-table__body-item--td product-name" data-title="<?php esc_attr_e('Product', 'shopengine'); ?>"> <?php if(!$product_permalink) { echo wp_kses_post(apply_filters('woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key) . ' '); } else { echo wp_kses_post(apply_filters('woocommerce_cart_item_name', sprintf('<a href="%s">%s</a>', esc_url($product_permalink), $_product->get_name()), $cart_item, $cart_item_key)); } do_action('woocommerce_after_cart_item_name', $cart_item, $cart_item_key); // Meta data. shopengine_content_render(wc_get_formatted_cart_item_data($cart_item)); // Backorder notification. if($_product->backorders_require_notification() && $_product->is_on_backorder($cart_item['quantity'])) { echo wp_kses_post(apply_filters('woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__('Available on backorder', 'shopengine') . '</p>', $product_id)); } ?> </div> <!-- product price --> <div class="shopengine-table__body-item--td product-price" data-title="<?php esc_attr_e('Price', 'shopengine'); ?>"> <?php shopengine_content_render(apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $cart_item, $cart_item_key)); ?> </div> <!-- product quantity --> <div class="shopengine-table__body-item--td product-quantity" data-title="<?php esc_attr_e('Quantity', 'shopengine'); ?>"> <div class="shopengine-cart-quantity"> <?php if($_product->is_sold_individually()) { $product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key ); } else { echo "<span class='minus-button'>−</span>"; $product_quantity = woocommerce_quantity_input( array( 'input_name' => "cart[{$cart_item_key}][qty]", 'input_value' => $cart_item['quantity'], 'max_value' => $_product->get_max_purchase_quantity(), 'min_value' => '0', 'product_name' => $_product->get_name(), ), $_product, false ); echo "<span data-max=".intval($_product->get_max_purchase_quantity())." class='plus-button'>+</span>"; } shopengine_content_render(apply_filters('woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item)); ?> </div> </div> <!-- product subtotal --> <div class="shopengine-table__body-item--td product-subtotal" data-title="<?php esc_attr_e('Subtotal', 'shopengine'); ?>"> <?php shopengine_content_render(apply_filters('woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal($_product, $cart_item['quantity']), $cart_item, $cart_item_key)); ?> </div> </div> <!-- shopengine cart table body item end --> <?php } } ?> <?php do_action('woocommerce_cart_contents'); ?> <?php do_action('woocommerce_after_cart_contents'); ?> </div> <!-- shopengine cart table body end --> <!-------------------------------- shopengine cart table footer start ------------------------------- --> <div class="shopengine-table__footer"> <div class="button-group-left"> <button class="return-to-shop shopengine-footer-button"> <i class="eicon-arrow-left"></i> <a title="<?php esc_html_e('Return To Shop','shopengine')?>" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>"> <?php echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', esc_html($settings['shopengine_cart_continue_shopping_btn']) ) ); ?> </a> </button> </div> <div class="button-group-right"> <button type="submit" class="button update-cart-btn shopengine-footer-button" name="update_cart"> <i class="eicon-redo"></i> <?php echo esc_html($settings['shopengine_cart_table_update']);?> </button> <button class="shopengine-footer-button clear-btn" type="submit" name="empty_cart"> <i class="eicon-trash-o"></i> <?php echo esc_html($settings['shopengine_cart_table_clear_all']);?> </button> </div> <?php do_action('woocommerce_cart_actions'); ?> <?php wp_nonce_field('woocommerce-cart', 'woocommerce-cart-nonce'); ?> </div> <!-- shopengine cart table footer end --> </div> <!-- shopengine cart table end --> <?php do_action('woocommerce_after_cart_table'); ?> </form> <?php do_action('woocommerce_after_cart'); ?> </div>
更改後文本
開啟檔案
<?php defined('ABSPATH') || exit; ?> <div class="shopengine-cart-table"> <?php do_action('woocommerce_before_cart'); ?> <form class="shopengine-cart-form woocommerce-cart-form" action="<?php echo esc_url(wc_get_cart_url()); ?>" method="post"> <?php do_action('woocommerce_before_cart_table'); ?> <!-- shopengine cart table start --> <div class="shopengine-table"> <!-- ------------------------------- shopengine cart table head start -------------------------------------> <div class="shopengine-table__head"> <div class="shopengine-table__head--th product-name"><?php echo esc_html($settings['shopengine_cart_table_title']) ?></div> <div class="shopengine-table__head--th product-price"><?php echo esc_html($settings['shopengine_cart_table_price']) ?></div> <div class="shopengine-table__head--th product-quantity"><?php echo esc_html($settings['shopengine_cart_table_quantity']) ?></div> <div class="shopengine-table__head--th product-subtotal"><?php echo esc_html($settings['shopengine_cart_table_subtotal']) ?></div> </div> <!-- shopengine cart table head end --> <!--------------------------------------- shopengine cart table body start ------------------------------------- --> <div class="shopengine-table__body"> <?php do_action('woocommerce_before_cart_contents'); ?> <?php foreach(WC()->cart->get_cart() as $cart_item_key => $cart_item) { $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key); $product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key); if($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_cart_item_visible', true, $cart_item, $cart_item_key)) { $product_permalink = apply_filters('woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink($cart_item) : '', $cart_item, $cart_item_key); ?> <!-- shopengine cart table body item start --> <div class="shopengine-table__body-item <?php echo esc_attr(apply_filters('woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key)); ?>"> <!-- @class : table-first-body-column @content : remove button, thumbnail, product name --> <div class="shopengine-table__body-item--td table-first-body-column"> <!-- Product Thumbnail and remove button together --> <div class="product-thumbnail" data-title="<?php esc_attr_e('Image', 'shopengine'); ?>"> <?php $thumbnail = apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key); $product = esc_html__("View Product Full Details","shopengine"); if(!$product_permalink) { shopengine_content_render(\ShopEngine\Utils\Helper::render( $thumbnail )); } else { shopengine_content_render(sprintf('<a title="' . $product . '" href="%s">%s</a>', esc_url($product_permalink), $thumbnail)); } ?> <!-- remove button --> <div class="product-remove"> <?php $cart = esc_html__("Remove Cart Item","shopengine"); ob_start(); \Elementor\Icons_Manager::render_icon( $settings['shopengine_table_remove_button_icon_change'], [ 'aria-hidden' => 'true' ] ); $remove_icon = ob_get_clean(); shopengine_content_render( apply_filters( 'woocommerce_cart_item_remove_link', sprintf( '<a title="' . $cart . '" href="%s" class="remove remove_from_cart_button" aria-label="%s" data-product_id="%s" data-cart_item_key="%s" data-product_sku="%s"> %s </a>', esc_url(wc_get_cart_remove_url($cart_item_key)), esc_html__('Remove this item', 'shopengine'), esc_attr($product_id), esc_attr( $cart_item_key ), esc_attr($_product->get_sku()), $remove_icon, ), $cart_item_key ) ); ?> </div> </div> </div> <!-- product name --> <div class="shopengine-table__body-item--td product-name" data-title="<?php esc_attr_e('Product', 'shopengine'); ?>"> <?php if(!$product_permalink) { echo wp_kses_post(apply_filters('woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key) . ' '); } else { echo wp_kses_post(apply_filters('woocommerce_cart_item_name', sprintf('<a href="%s">%s</a>', esc_url($product_permalink), $_product->get_name()), $cart_item, $cart_item_key)); } do_action('woocommerce_after_cart_item_name', $cart_item, $cart_item_key); // Meta data. shopengine_content_render(wc_get_formatted_cart_item_data($cart_item)); // Backorder notification. if($_product->backorders_require_notification() && $_product->is_on_backorder($cart_item['quantity'])) { echo wp_kses_post(apply_filters('woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__('Available on backorder', 'shopengine') . '</p>', $product_id)); } ?> </div> <!-- product price --> <div class="shopengine-table__body-item--td product-price" data-title="<?php esc_attr_e('Price', 'shopengine'); ?>"> <?php shopengine_content_render(apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $cart_item, $cart_item_key)); ?> </div> <!-- product quantity --> <div class="shopengine-table__body-item--td product-quantity" data-title="<?php esc_attr_e('Quantity', 'shopengine'); ?>"> <div class="shopengine-cart-quantity"> <?php if($_product->is_sold_individually()) { $product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key ); } else { echo "<span class='minus-button'>−</span>"; $product_quantity = woocommerce_quantity_input( array( 'input_name' => "cart[{$cart_item_key}][qty]", 'input_value' => $cart_item['quantity'], 'max_value' => $_product->get_max_purchase_quantity(), 'min_value' => '0', 'product_name' => $_product->get_name(), ), $_product, false ); echo "<span data-max=".intval($_product->get_max_purchase_quantity())." class='plus-button'>+</span>"; } shopengine_content_render(apply_filters('woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item)); ?> </div> </div> <!-- product subtotal --> <div class="shopengine-table__body-item--td product-subtotal" data-title="<?php esc_attr_e('Subtotal', 'shopengine'); ?>"> <?php shopengine_content_render(apply_filters('woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal($_product, $cart_item['quantity']), $cart_item, $cart_item_key)); ?> </div> </div> <!-- shopengine cart table body item end --> <?php } } ?> <?php do_action('woocommerce_cart_contents'); ?> <?php do_action('woocommerce_after_cart_contents'); ?> </div> <!-- shopengine cart table body end --> <!-------------------------------- shopengine cart table footer start ------------------------------- --> <div class="shopengine-table__footer"> <div class="button-group-left"> <button class="return-to-shop shopengine-footer-button"> <i class="eicon-arrow-left"></i> <a title="<?php esc_html_e('Return To Shop','shopengine')?>" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>"> <?php echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', esc_html($settings['shopengine_cart_continue_shopping_btn']) ) ); ?> </a> </button> </div> <div class="button-group-right"> <button type="submit" class="button update-cart-btn shopengine-footer-button" name="update_cart"> <i class="eicon-redo"></i> <?php echo esc_html($settings['shopengine_cart_table_update']);?> </button> <button class="shopengine-footer-button clear-btn" type="submit" name="empty_cart"> <i class="eicon-trash-o"></i> <?php echo esc_html($settings['shopengine_cart_table_clear_all']);?> </button> </div> <?php do_action('woocommerce_cart_actions'); ?> <?php wp_nonce_field('woocommerce-cart', 'woocommerce-cart-nonce'); ?> </div> <!-- shopengine cart table footer end --> </div> <!-- shopengine cart table end --> <?php do_action('woocommerce_after_cart_table'); ?> </form> <?php do_action('woocommerce_after_cart'); ?> </div>
尋找差異