]> _ Git - physioassist-wordpress.git/commitdiff
wait #7353 @4:30
authorsoufiane <soufiane@cubedesigners.com>
Mon, 24 Feb 2025 17:38:48 +0000 (18:38 +0100)
committersoufiane <soufiane@cubedesigners.com>
Mon, 24 Feb 2025 17:38:48 +0000 (18:38 +0100)
wp-content/themes/physioassist/resources/assets/styles/common/app.styl
wp-content/themes/physioassist/resources/functions.php
wp-content/themes/physioassist/resources/views/layouts/app.blade.php
wp-content/themes/physioassist/resources/views/woocommerce/cart/cart-totals.blade.php
wp-content/themes/physioassist/resources/views/woocommerce/cart/cart.blade.php
wp-content/themes/physioassist/resources/views/woocommerce/checkout/payment.blade.php
wp-content/themes/physioassist/resources/views/woocommerce/single-product/title.blade.php [new file with mode: 0644]

index 0be6a4fd3c4b8e2c0b36af43afbbd62174d6167e..40fa11d72e38b1e4592a586e67d962f4b2d3bb2e 100644 (file)
         padding-bottom: 24px
         margin-bottom: 24px
         border-bottom: 1px solid #E3E4E7
-      &-form .product-thumbnail
-        width: 60px
-        flex-shrink: 0
-        img
-          border-radius: 5px
+      &-form
+        .product-thumbnail
+          width: 60px
+          flex-shrink: 0
+          img
+            border-radius: 5px
+        &__cart-item
+          width: 100%
 
     .product-name
       line-height: normal
index 68d0d4e42c081fcb224b5c8d012678ed6b52d136..224028dcd42b58e836e263655121226d721790c2 100644 (file)
@@ -187,3 +187,30 @@ add_action( 'woocommerce_update_cart_action_cart_updated', function($cart_update
     }
     return true;
 });
+
+add_filter('wc_get_template', function($template, $template_name, $args, $template_path, $default_path) {
+    if ($template_name === 'checkout/payment.php') {
+        $custom_template = get_stylesheet_directory() . '/woocommerce/checkout/payment.blade.php';
+        if (file_exists($custom_template)) {
+            return $custom_template;
+        }
+    }
+    return $template;
+}, 10, 5);
+
+add_action('woocommerce_before_add_to_cart_quantity', function(){
+    echo "<p class='grey-label label-quantity'>Quantité</p>";
+});
+
+add_filter('woocommerce_add_to_cart_redirect', function() {
+    $app = filter_input(INPUT_GET, 'app', FILTER_SANITIZE_STRING);
+    if ($app == "true") {
+        return wc_get_cart_url()."?app=true";
+    }
+    return wc_get_cart_url();
+});
+
+add_filter('woocommerce_get_return_url', function($return_url, $order) {
+    $app = filter_input(INPUT_POST, '_app', FILTER_SANITIZE_STRING);
+    return add_query_arg('app', $app, $return_url);
+}, 10, 2);
index 1134f81947d6fee2ab10d3dd6733861670bf0320..083a1c4c1992fda2b52909dddfcb6a64e6f153db 100644 (file)
@@ -3,7 +3,7 @@
 <html @php(language_attributes()) class="no-js" data-app="<?php echo $app == 'true' ? esc_attr('on'): '' ?>">
   @include('partials.head')
   {{-- When not using the hero image header template the compact header is set --}}
-  <body @php(body_class( (is_page_template('views/template-transparent-header.blade.php') ? '' : 'header-compact')))>
+  <body @php(body_class((is_page_template('views/template-transparent-header.blade.php') ? '' : 'header-compact')))>
 
     <!-- Google Tag Manager (noscript) -->
     <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M3NHJ8X"
@@ -12,6 +12,9 @@
 
     @php(do_action('get_header'))
     @include('partials.header')
+    @if($app == "true")
+      @include('partials.header-mobileapp')
+    @endif
     <div class="wrap container" role="document">
       <div class="content">
         <main class="main">
index 9c224213940441cdc57d3bdf47bde97aacd8d420..1be0b20dbd8c68f4765e896653af56439cc8e5c6 100644 (file)
@@ -25,11 +25,12 @@ defined( 'ABSPATH' ) || exit;
   <h2 class="woocommerce-cart-summary-card__title"><?php esc_html_e( 'Cart totals', 'woocommerce' ); ?></h2>
   @php($app = filter_input(INPUT_GET, 'app', FILTER_SANITIZE_STRING))
   <?php if($app == "true") { ?>
-
   <div class="woocommerce-cart-summary-card">
     <div class="cart-subtotal">
       <div class="label"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></div>
-      <div data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>"><?php wc_cart_totals_subtotal_html(); ?></div>
+      <div data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>">
+          <?php wc_cart_totals_subtotal_html(); ?>
+      </div>
     </div>
 
     <?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
@@ -100,7 +101,6 @@ defined( 'ABSPATH' ) || exit;
   </div>
 
   <?php }else{ ?>
-
   <table cellspacing="0" class="shop_table shop_table_responsive">
 
     <tr class="cart-subtotal">
index 7c793723309640ca7b3f6c82d2801c5e8bdf41a3..72649d332b11d07ca359a9e16705219aeb3e8166 100644 (file)
@@ -109,7 +109,7 @@ do_action( 'woocommerce_before_cart' ); ?>
             <div class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>">
               <p class="label"><?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?></p>
               <?php
-              echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
+              echo str_replace(')','',str_replace('(','&nbsp;',apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ))); // PHPCS: XSS ok.
               ?>
           </div>
                 <?php do_action( 'woocommerce_cart_contents' ); ?>
index 19e501dcc0b6930ab3afc4bb24bfbce97c3897fc..b70e552c653058a3a1d1aaea4676f0e782db63c6 100644 (file)
@@ -62,5 +62,8 @@ if ( ! wp_doing_ajax() ) {
 </div>
 <?php
 if ( ! wp_doing_ajax() ) {
+  $app = filter_input(INPUT_GET, 'app', FILTER_SANITIZE_STRING); ?>
+  <input type="hidden" name="_app" value="<?php echo esc_attr($app) ?>">
+  <?php
   do_action( 'woocommerce_review_order_after_payment' );
 }
diff --git a/wp-content/themes/physioassist/resources/views/woocommerce/single-product/title.blade.php b/wp-content/themes/physioassist/resources/views/woocommerce/single-product/title.blade.php
new file mode 100644 (file)
index 0000000..4d48d2e
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Single Product title
+ *
+ * This template can be overridden by copying it to yourtheme/woocommerce/single-product/title.php.
+ *
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
+ * (the theme developer) will need to copy the new files to your theme to
+ * maintain compatibility. We try to do this as little as possible, but it does
+ * happen. When this occurs the version of the template file will be bumped and
+ * the readme will list any important changes.
+ *
+ * @see        https://woocommerce.com/document/template-structure/
+ * @package    WooCommerce\Templates
+ * @version    1.6.4
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+  exit; // Exit if accessed directly.
+}
+
+the_title( '<h1 class="product_title entry-title hide-on-mobileapp">', '</h1>' );