我在Woocommerce中使用店面的子主题。在我的移动版式上,在购物车页面中,我想将“退货”按钮向前移,就在黑色结帐按钮的上方。 你能帮我实现这个目标吗?
我的子主题woocommerce / cart / cart.php中包含以下内容:
<div class="cart-collaterals">
<a class="button wc-backward return-to-shop-cart-wholesale" href="/wholesale-ordering/">
<?php esc_html_e( 'Return to pro shop', 'woocommerce' ); ?>
</a>
<a class="button wc-backward return-to-shop-cart-retail" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
<?php esc_html_e( 'Return to shop', 'woocommerce' ); ?>
</a>
<?php
/**
* Cart collaterals hook.
*
* @hooked woocommerce_cross_sell_display
* @hooked woocommerce_cart_totals - 10
*/
do_action( 'woocommerce_cart_collaterals' );
?>
如果我这样移动与“返回商店按钮”有关的代码
<div class="cart-collaterals">
<?php
/**
* Cart collaterals hook.
*
* @hooked woocommerce_cross_sell_display
* @hooked woocommerce_cart_totals - 10
*/
do_action( 'woocommerce_cart_collaterals' );
?>
<a class="button wc-backward return-to-shop-cart-wholesale" href="/wholesale-ordering/">
<?php esc_html_e( 'Return to pro shop', 'woocommerce' ); ?>
</a>
<a class="button wc-backward return-to-shop-cart-retail" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
<?php esc_html_e( 'Return to shop', 'woocommerce' ); ?>
</a>