Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #803774

    Hi there!
    On the checkout page of Woo Commerce, I would like to move the error notification bar (ul.woocommerce-error) to the top of the page, above the “Returning Customer?” box. Could you please advise me?
    Thanks for your help!

    #804961

    Hey perfectword,

    Can you post a link to your site? so we can take a closer look.

    Best regards,
    Nikko

    #1344115

    Hi – we have a similar problem.

    When the customer forgets to tick the “I accept… ” box, the error message appears on top though the page is not moved there. So I’d prefer that the customer sees much quicker where the problem is. Is there a way to move the error message to a visible part of the checkout page?

    Site and Info below.

    Cheers,
    Ralph

    #1344258

    Hi,
    Thanks for the screenshot and the link to your site, when I test this on your site the page scrolls up to the error for me, using Windows & Chrome.
    But this script will copy the error message to under the checkout button if your page is not scrolling.
    Try adding this code to the end of your functions.php file in Appearance ▸ Editor:

    function woocommerce_NoticeGroup_checkout() { ?>
        <script>
    (function ($) {
    $('#place_order').on('click',function(){
    setTimeout(function(){
    	if ($('.woocommerce-checkout').children().hasClass('woocommerce-NoticeGroup-checkout')) {
    		$( ".woocommerce-NoticeGroup-checkout" ).clone().insertAfter( "#place_order" ).css({'margin-top':'80px'});
    	} else {}
    },1000);		
    });
    })(jQuery);
    </script>
        <?php
    }
    add_action('wp_footer', 'woocommerce_NoticeGroup_checkout');

    Best regards,
    Mike

    #1344274

    Thank you, Mike, This helps a lot. :-) Much appreciated!

    Best regards,
    Ralph

    #1344278

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Move Error Notification (ul.woocommerce-error)’ is closed to new replies.