在woocommerce购物车页面上移动“返回商店”按钮

时间:2020-09-17 07:38:36

标签: php woocommerce storefront

我在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' );
?>

enter image description here

如果我这样移动与“返回商店按钮”有关的代码

<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>

然后,“退货”在页面下方太深,如下所示: enter image description here

0 个答案:

没有答案