From: soufiane Date: Tue, 11 Feb 2025 16:30:03 +0000 (+0100) Subject: wait #7310 @9:00 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=57a5b42d37db6b991aa33b7553210459f8cc24c4;p=physioassist-wordpress.git wait #7310 @9:00 --- diff --git a/wp-content/themes/physioassist/resources/assets/scripts/routes/common.js b/wp-content/themes/physioassist/resources/assets/scripts/routes/common.js index aef18863..a2475c22 100644 --- a/wp-content/themes/physioassist/resources/assets/scripts/routes/common.js +++ b/wp-content/themes/physioassist/resources/assets/scripts/routes/common.js @@ -24,7 +24,6 @@ export default { menu.toggle(); }); - // Disable clicks on top level menu links that have sub-menus $(document).on('click', '.navigation .menu-item-has-children > a', function(event) { event.stopPropagation(); @@ -59,6 +58,20 @@ export default { window.addEventListener('scroll', throttle(headerTransition, 100)); // Throttle 100ms for scroll event + // + if ( $('.wps_sfw_check_simple_cart_subscription_purchase').length > 0 ) { + $('.wps_sfw_check_simple_cart_subscription_purchase:not(:checked)').prop('checked', false); + } else { + setTimeout(() => { + $('.wps_sfw_check_simple_cart_subscription_purchase:not(:checked)').prop('checked', false); + }, 100); + } + + // + $(document).on("change", ".woocommerce-cart-form", function(){ + const isApp = window.location.search.substring(1).split("&").includes("app=true") + if(isApp) $("button[name=update_cart]").trigger("click") + }) }, finalize() { // JavaScript to be fired on all pages, after page specific JS is fired diff --git a/wp-content/themes/physioassist/resources/views/woocommerce/cart/cart.php b/wp-content/themes/physioassist/resources/views/woocommerce/cart/cart.php index 43f93d2f..1b9350d9 100644 --- a/wp-content/themes/physioassist/resources/views/woocommerce/cart/cart.php +++ b/wp-content/themes/physioassist/resources/views/woocommerce/cart/cart.php @@ -30,7 +30,7 @@ do_action( 'woocommerce_before_cart' ); ?> - + Fréquence @@ -145,11 +145,11 @@ do_action( 'woocommerce_before_cart' ); ?> + ?> - + - @@ -164,8 +164,7 @@ do_action( 'woocommerce_before_cart' ); ?> ?> - - + > @@ -182,7 +181,8 @@ do_action( 'woocommerce_before_cart' ); ?> - +