[Support request] Double checkout button in cart page

Home Forums Support [Support request] Double checkout button in cart page

Home Forums Support Double checkout button in cart page

  • This topic has 9 replies, 3 voices, and was last updated 4 years ago by Tom.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #827920
    Pedro

    Hello! I would like to add another “Checkout” button on the cart page.

    This if possible I would like to be located after the title of the cart page.

    This would help the conversions in the mobile version.

    An example of this is the Shopify Booster theme: https://boostertheme.com

    Thank you!!

    GeneratePress 2.2.2
    GP Premium 1.7.8
    #828222
    David
    Staff
    Customer Support

    Hi there,

    you can create a Hook Element use this function, select the before_cart hook, make sure you check Execute PHP and set display rules to the entire site:

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

    Then this CSS:

    .woocommerce .proceed-to-checkout-above-cart .checkout-button {
        float: right;
        margin: 0 20px 1em 0; /* 20px adjusts the right hand offset */
    }
    
    @media (max-width: 768px) {
        .woocommerce .proceed-to-checkout-above-cart .checkout-button {
            display: block;
            float: none;
            text-align: center;
            margin-right: 0;
            padding-top: 20px; 
            padding-bottom: 20px;
        }
    
    }
    #828546
    Pedro

    Hello david! Thanks for the help.

    I have added the codes and now the button is shown in the mobile version.

    However I would like that:
    – Also shown in the desktop version
    – In the mobile version the button occupies the full width and is displayed after the cart notice.

    Then I leave screenshots for you to have a guide:

    – MOBILE VERSION –
    Generatepress: https://www.dropbox.com/s/blgob3iuzbg4ddh/mobile_generatepress.PNG?dl=0
    Booster theme: https://www.dropbox.com/s/tz6e6l7diss7lse/mobile_boostertheme.PNG?dl=0

    – DESKTOP VERSION –
    Generatepress: https://www.dropbox.com/s/zoymbipf3wybxaq/desktop_generatepress.png?dl=0
    Booster theme: https://www.dropbox.com/s/lywzdhyutphsxnb/desktop_boostertheme.png?dl=0

    Thank you!!

    #828569
    David
    Staff
    Customer Support

    Try refreshing your browsers as the button is visible to me on desktop and looks full width on mobile and below the Notice.
    To make sure the button stays below the notice, edit the hook element you added the cart button to and in the priority set this to 50

    #828582
    Pedro

    Hello david! I have cleared cache and now it is displayed.

    However, the following happens:
    – In the desktop version, I would like this new button to be aligned with the “contiue shopping” button.
    In the following image you can see how the new checkout button is aligned with the cart table: https://www.dropbox.com/s/8lyomchqai6yloo/Captura%20de%20pantalla%20de%202019-03-04%2012- 38-45.png? Dl = 0

    – In the mobile version, the button already appears below the cart notice. However, the width is still less than this. I want the width of the new button to be the same as that of the cart notice.

    Thank you!

    #828621
    David
    Staff
    Customer Support
    #828634
    Pedro

    Hello david! It worked perfect, both for the mobile version and desktop.

    However, seeing it better I would like the top buttons (checkout, update cart and continue shopping) to be all aligned with the checkout button at the bottom.

    Sorry for the inconvenience.

    #828636
    Pedro

    I forgot to say, this last change that is only for the desktop version, thanks.

    #828639
    Pedro

    Hello david!

    Another thing that I would like to do is that the button to delete product from the cart is centered (in the mobile version)

    Not if I have to open another post in the forum or it can be done right here.

    Thank you!

    #828955
    Tom
    Lead Developer
    Lead Developer

    I’m not sure I understand what you mean by the buttons. They all look aligned?

    As for the remove from cart, try this:

    @media (max-width: 768px) {
        .woocommerce a.remove {
            margin-left: auto;
            margin-right: auto;
        }
    }
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.