My client would like two ‘Place order’ buttons on his checkout page (http://www.jobgrandprix.fr/checkout/?set-cart-qty_2652=1).
By default, the ‘Commander’ (his site is in French) button is at the bottom of the page. I’m trying to add a second one in the right hand column at the top of the page.
I think form-checkout.php is what I need to modify. I think I need to add it where the shipping column usually is (not used here because it is a virtual product).
If anyone has any pointers I’d be really grateful.
Thanks.
Place Order Button can’t go out of the
<form></form>
element. What you can do is you can duplicate the button within the element but at the top. like this:For this:
Withing you child theme make a folder
woocommerce
and inside thatcheckout
.Now go to
wp-contentpluginswoocommercetemplatescheckout
and copyform-checkout.php
file and paste that intoMY_CHILD_THEMEwoocommercecheckout
folder and edit it.WHY ABOVE STEP?
So that you won’t edit the core woocommerce files and the update will be lost when this plugin updates in future. The above structure overrides the core template file.
OK NOW EDIT form-checkout.php
Below
<form name="checkout" method="post" class="checkout" action="<?php echo esc_url( $get_checkout_url ); ?>">
Add the Button Code and it should look like this.
Save it and Bingo. You can do some CSS and align the button to the right side of the form element. But remember it can’t go out of
<form></form>
element.