MarketPress checkout mobile

Marketpress checkout page scrolls to footer when you click next step on a mobile device. Are you familiar with this issue?

Only chrome seems to have the issue .It works okay on Edge and Firefox, both mobile and tablets.

  • Nahid

    Hey goinfancy !
    Hope you are having a great day!

    This issue has been escalated to the Second Level Support team. They'll be back to us with confirmations if this is a bug, clues, workarounds and fixes (if possible) for now in this ticket (or we'll be updating the ticket as soon as we hear back from them internally). Please note that the response time of the Second Level Support team might be a bit delayed than that of the general Support staff. Moreover, as this is a conflict between MarketPress and your theme, we cannot assure a fix from our end just yet without investigation. You might need to contact the theme authors in case if this turns out to be unfixable from our end. We really appreciate your patience and consideration regarding this.

    Kind regards,
    Nahid

  • Panos

    Hi there goinfancy ,

    As a workaround, I have added a mu-plugin (wp-content/mu-plugins/mp-checkout-scroll.php) which will scroll to the section header with jquery.

    The mu-plugin contains the following snippet:

    add_action( 'wp_footer', function(){
    
    	if ( ! function_exists( 'mp_is_shop_page' ) || ! mp_is_shop_page( 'checkout' ) ) {
    		return;
    	}
    
    	?>
    	<script type="text/javascript">
    		(function($){
    			$( document ).on( 'mp_checkout/step_changed', function(){
    
    				if ( $("#mp-checkout-section-order-review-payment .mp_checkout_section_content").is(':visible' ) ) {
    					$('html, body').animate({
    				        scrollTop: ( parseInt( $("#mp-checkout-section-order-review-payment ").offset().top ) - 60 )
    				    }, 1000);
    				}
    
    			} );
    		})(jQuery);
    	</script>
    	<?php
    
    }, 10 );

    Please let us know if this helps :slight_smile:

  • goinfancy

    Hello,

    Thank you for your assistance.

    This seems to have fixed the problem and now it correctly scrolls you to the correct place. It still scrolls you to the footer for 1-2 seconds but it then returns you to the correct place. I guess that's not something that could be avoided.

    We also wanted to remove the hover effect for the checkout button in the cart:
    ???????

    What should we change to remove the hover?
    http://prntscr.com/jeqc5i

  • Dimitris

    Hello goinfancy

    This seems to have fixed the problem and now it correctly scrolls you to the correct place. It still scrolls you to the footer for 1-2 seconds but it then returns you to the correct place. I guess that's not something that could be avoided.

    I've already contacted Panos about it, so he could provide a fix, if possible.

    We also wanted to remove the hover effect for the checkout button in the cart:

    You can do so using a little CSS rule, like this:

    body.mp-cart .mp_tooltip-opened {
      display: none;
    }

    You can insert that in Appearance -> Customize -> Additional CSS.

    Please keep in mind that we're keen on having separate threads per issue, so for more queries, please do create separate threads or find us in live chat support.
    https://premium.wpmudev.org/hub/support/#get-support

    Warm regards,
    Dimitris

  • Panos

    Hi goinfancy ,

    Sorry for delay here!

    I haven't found any valid way for this. I had another look on the theme, and it gets fixed only after using:

    add_action( 'wp_head', function(){
    
    	if ( ! function_exists( 'mp_is_shop_page' ) || ! mp_is_shop_page( 'checkout' ) ) {
    		return;
    	}
    
    	remove_action('presscore_after_main_container', 'presscore_add_footer_widgetarea', 15);
    	remove_action('presscore_after_content', 'presscore_add_sidebar_widgetarea', 15);
    
    }, 20 );

    However presscore_add_sidebar_widgetarea() contains the sidebar, so if this is removed the page will be left without sidebar. I have left this commented in the mu-plugin. If you want to try it out you can remove the comments from it.

    I have also done some further investigation and it seems that it is finally related to the dynamic_sidebar( $sidebar ); call in the sidebar.php file
    I would suggest to ask the theme developer if there is something that can be excluded in this page that would help.

    Kind regards!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.