Site logo

Archived topic

'Proceed to checkout' button on top of the page

3 replies · Started by Wesley on April 3, 2020

Viewing posts 1–4 of 4

Hi!

Is there a possibility to place the 'proceed to checkout' button on the bottom and op top of the page (in the shoppingcart)?

Research has shown that this provides a higher conversionrate.

Thanks!
Wesley

Hi there,

create a new Hook Element:

https://docs.generatepress.com/article/hooks-element-overview/

in the hook content add:

<div class="proceed-to-checkout-above-cart">
    <?php woocommerce_button_proceed_to_checkout(); ?>
</div>

Select the woocommerce_before_cart hook.
Check execute PHP.
Display Rules set to Page > Cart

Then add this CSS:

.proceed-to-checkout-above-cart {
    text-align: right;
    margin-bottom: 1em;
}

Works perfectly! Thanks David!

One more question: would it be difficult to place it right next to the page title?

Change the Hook to Custom Hook and add this to field provided:

generate_after_page_title

Then remove the above CSS and add this:

.woocommerce-cart .entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
This archived topic is closed to new replies.