Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clifgriffin/2de8babdb1b87d601ccb1919c36f3aab to your computer and use it in GitHub Desktop.
Save clifgriffin/2de8babdb1b87d601ccb1919c36f3aab to your computer and use it in GitHub Desktop.
Move complete order button to sidebar on desktop and mobile.
<!-- Paste this into Header Scripts in Settings > CheckoutWC > General > Header Scripts -->
<style type="text/css">
.cfw-bottom-controls .place-order {
display: none;
float: right;
}
#cfw-cart-summary-content .place-order {
display: none;
}
.cfw-payment-method-active #cfw-cart-summary-content .place-order {
display: block;
z-index: 2;
position: relative;
margin-bottom: 2em;
text-align: center;
}
@media (max-width: 770px) {
.cfw-payment-method-active #cfw-cart-summary {
order: 3;
}
.cfw-bottom-controls .place-order {
display: none;
}
}
</style>
<!-- Optional: Allows order button to work on order pay page -->
<script type="text/javascript">
jQuery(document).ready( function() {
jQuery('.cfw-order-pay #cfw-cart-summary-content .place-order').click( function() {
jQuery('.cfw-bottom-controls #place_order').click();
} );
} );
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment