Archived topic
GP + WooCommerce: Must click Add to Cart twice on mobile
10 replies · Started by Julian on June 4, 2020
Hello,
I have an online shop built with GeneratePress and WooCommerce: https://kohlburg.de
I noticed a big Problem:
If I visit a product (e.g. https://www.kohlburg.de/produkt/kettenschloss-amsterdam/) with a mobile device (e.g. iPhone XR) I need to click the "Add to Cart" button twice ("In den Warenkorb").
Nothing happens after the first click.
The problem doesn't show up in responsive mode in Chrome - it only happens on real mobile devices.
I already deactivated all the plugins one by one. No success.
Caching is deactivated for now.
Thanks in advance for your help and thanks for the great Theme!
Julian
Ok, I guess I found a solution:
This is the issue and solution for me: https://stackoverflow.com/questions/3038898/ipad-iphone-hover-problem-causes-the-user-to-double-click-a-link#answer-42373190
I used GP Elements and added this to the footer @ Single Product:
<script>
jQuery(document).ready(function( $ ) {
$('.single_add_to_cart_button').on('touchend', function() {
$(this).click();
});
});
</script>
Hi there,
thanks for sharing a solution
This has never come up before - so we'll take a look to see whats going on.
Strange, does the same thing happen to you on one of our WC sites?: https://gpsites.co/merch
I just tried: No problem on merch. I think it’s not an GP specific problem.
Thanks for letting us know - we'll keep an eye out for it.
Hi there
Have you found a solution to this? I have the same issue. On mobile you need to click the add to cart button twice. It happens on both my GP sites.
Thanks
I think we determined that it's not a GP specific problem.
Does the issue occur if you disable all plugins except GP Premium and WooCommerce?
Can you test if you experience the issue in our default Seller install here?
http://gpsites.co/seller/
Let me know :)
Hi Leo
I have tested on your test site and I have the same issue. On the SINGLE product page I have to double click to add to cart when using my mobile phone.
I am on safari
Thanks
Jenny
I was able to replicate this as well and we will take a closer look and report back.
Thanks!
Hi there,
We'll dig into this and get it fixed in the next version.
For now, this solution should help: https://generatepress.com/forums/topic/gp-woocommerce-must-click-add-to-cart-twice-on-mobile/#post-1315093
Let us know :)