Home Forums WoodMart support forum Checkout error message not fully scrolling to top

Checkout error message not fully scrolling to top

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #641444

    tegards
    Participant

    Hello,

    when someone wants to order something and is on the checkout page there is a problem with the error messages. They are correctly displayed and also it is scrolled upwards but not enough. Therefore the error message stays hidden behind the header.

    I assume this is caused by the header because the space that isn’t scrolled upwards is the same height as the header.

    You can see this in the video: https://1drv.ms/v/s!AnpjDm99bZAzhYU54AaRWBCUxE0CHQ?e=tK7zXr

    You can test it out in our shop at tegards.com
    Use any product and try it. Just make sure to use XTEMOS as “Vorname” and “Banküberweisung” as the payment method in case the order goes through so that we know which one it is.

    Best regards
    Bernhard

    #641567

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Try to add the below Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:

    .woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout {
        margin-top: 100px !important;
    }

    Best Regards,

    #644636

    tegards
    Participant

    Hello,

    I couldn’t do it with CSS only. I had to write a small js snippet to accomplish scrolling to the top.
    For all other people looking for a solution to this problem here is my code snippet:

    $(document).on("checkout_error", function () {
    
        scrollendListener = $(document).on("scrollend", function() {
            
            setTimeout(() => {
                window.scrollTo({
                    top: 0,
                    behaviour: "smooth",
                });
            }, 1000);
    
            scrollendListener.off();
        });
    }) ;

    Best regards
    Bernhard

    #644777

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Glad you got it sorted! Thanks for sharing the solution—it’ll be helpful for others too. Let me know if you need further assistance.

    Thanks for contacting us.

    Have a great day.
    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Checkout error message not fully scrolling to top’ is closed to new replies.