-
AuthorPosts
-
April 21, 2015 at 6:46 pm #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.
April 21, 2015 at 10:48 pm #432438Hi,
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,
JosueSeptember 25, 2015 at 4:50 pm #509148Would anyone be able to assist in achieving the opposite of the above?
Moving the “update cart” button down, next to the “checkout” button.Thanks.
September 25, 2015 at 10:26 pm #509292Hi,
Can you post the link to your website please? a mockup of what you want to achieve would be helpful too.
Regards,
JosueSeptember 28, 2015 at 3:02 pm #510134Hi 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.
September 28, 2015 at 5:09 pm #510289Hey!
use this code to control it’s position:
#top table.shop_table .actions .button { top: 184px; right: -10px; }
Regards,
AndySeptember 28, 2015 at 8:36 pm #510392Thanks 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.
September 28, 2015 at 11:51 pm #510469Hey!
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!
JosueSeptember 29, 2015 at 2:42 pm #510766Yep, that’s done it.
Many thanks to you both.
September 29, 2015 at 9:13 pm #510994You are welcome, glad to help :)
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.