Hessel
Hessel

Reputation: 97

Create second place order button in wordpress checkout page

This may be a strange question, but I want to use 2 of the same buttons on my mobile checkout page in woocommerce. I think this is much better for the user experience because the button to "place order" is pinned to the bottom of the mobile browser so as you can see in the image below.

In my screenshot i made a circle with 2 inside, its on the end of all fields. I think it would be great to create an extra button there.

Is that possible and can that work together? And in what file do I need to edit this?

Really thanks for any help or advise!

enter image description here

Upvotes: 1

Views: 289

Answers (1)

7uc1f3r
7uc1f3r

Reputation: 29624

As you can see the code for the button is in the next template file

https://github.com/woocommerce/woocommerce/blob/163aaa029dc57b1b04f6ca583bc04c4c4e1b6767/templates/checkout/payment.php#L51

How to Edit Files Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named /woocommerce keeping the same file structure but removing the /templates/ subdirectory.

Example: To override the admin order notification, copy: wp-content/plugins/woocommerce/templates/emails/admin-new-order.php to wp-content/themes/yourtheme/woocommerce/emails/admin-new-order.php

The copied file will now override the WooCommerce default template file.

Be aware that when moving, the button must still be between the <form></form> elements

Upvotes: 1

Related Questions