Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #432262

    Hello,

    on the cart page, I would like to move the “checkout” button right next to the “update cart” button.

    so it looks like this <update cart> <checkout>

    I have already tried the solutions in this thread

    https://kriesi.at/support/topic/switching-buttons-in-cart-woocommerce-or-enfold/

    but nothing changes.

    Any help? :)

    • This topic was modified 9 years, 8 months ago by bthoe.
    #432438

    Hi,

    Try adding this at the very end of your theme / child theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	$("[name='update_cart']").after($(".wc-proceed-to-checkout"));
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('woocommerce_after_cart_table', 'add_custom_script');

    And add this to Quick CSS:

    #top .woocommerce-cart .actions .wc-proceed-to-checkout {
        float: right;
    }
    
    #top .woocommerce-cart .actions .button[name="update_cart"] {
        float: none;
    }

    Regards,
    Josue

    #509148

    Would anyone be able to assist in achieving the opposite of the above?
    Moving the “update cart” button down, next to the “checkout” button.

    Thanks.

    #509292

    Hi,

    Can you post the link to your website please? a mockup of what you want to achieve would be helpful too.

    Regards,
    Josue

    #510134

    Hi Josue, thanks for getting back to me,

    for reasons I can’t understand, and despite my suggestions, my ‘client’ would like to move the “Update Cart” button to be alongside the “Proceed To Checkout” button, which led me to this thread. I thought it might be possible with some minor changes to your code above but couldn’t figure it out myself.

    Any assistance appreciated.

    #510289

    Hey!

    use this code to control it’s position:

    #top table.shop_table .actions .button {
    top: 184px;
    right: -10px;
    }
    

    Regards,
    Andy

    #510392

    Thanks Andy,

    I added that code into Quick CSS and tried a few different values for top: and right: but it’s position doesn’t seem to be affected at all.

    #510469

    Hey!

    Try adding this at the very end of your theme / child theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	$(".wc-proceed-to-checkout").after($("[name='update_cart']"));
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('woocommerce_after_cart_table', 'add_custom_script');

    Cheers!
    Josue

    #510766

    Yep, that’s done it.

    Many thanks to you both.

    #510994

    You are welcome, glad to help :)

    Regards,
    Josue

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.