I want to move the place order button from the payment to sidebar on checkout page.
Anyone can give me a suggestion?
Edit: Is this even possible (with the answer/approach provided)?
From my research every payment method has its own .html template including an own button. This button is not loaded from a knockout.js template. E.g. a part of the "free" payment method:
<div class="checkout-agreements-block">
<!-- ko foreach: $parent.getRegion('before-place-order') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<div class="actions-toolbar">
<div class="primary">
<button class="action primary checkout"
type="submit"
data-bind="
click: placeOrder,
attr: {title: $t('Place Order')},
css: {disabled: !isPlaceOrderActionAllowed()}
">
<span data-bind="i18n: 'Place Order'"></span>
</button>
</div>
</div>
While the "check / money order" payment method looks like this (only differences are enable: (getCode() == isChecked())
but hey, there still are differences and there is no "1 almighty general place order button":
<div class="checkout-agreements-block">
<!-- ko foreach: $parent.getRegion('before-place-order') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<div class="actions-toolbar">
<div class="primary">
<button class="action primary checkout"
type="submit"
data-bind="
click: placeOrder,
attr: {title: $t('Place Order')},
css: {disabled: !isPlaceOrderActionAllowed()},
enable: (getCode() == isChecked())
"
disabled>
<span data-bind="i18n: 'Place Order'"></span>
</button>
</div>
</div>
The answer provided only moves the aggreements which results in something like this: