]> _ Git - physioassist-wordpress.git/commitdiff
wip #7304 @0:30
authorsoufiane <soufiane@cubedesigners.com>
Wed, 5 Feb 2025 14:12:41 +0000 (15:12 +0100)
committersoufiane <soufiane@cubedesigners.com>
Wed, 5 Feb 2025 14:12:41 +0000 (15:12 +0100)
wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl
wp-content/themes/physioassist/resources/functions.php

index 7ae369dc38f81c591a536e7193fa8e4715046645..9698e55a0399d15cd6eae5a3ee30bc85231acca6 100644 (file)
@@ -2,7 +2,6 @@
 // Disabling some/all default CSS: https://docs.woocommerce.com/document/disable-the-default-stylesheet/
 
 .woocommerce
-
   // Headings
   h2
     color: $colors.headings
@@ -42,7 +41,7 @@
   #respond input#submit,
   a.button,
   a.added_to_cart,
-  button.button, 
+  button.button,
   input.button
     font-smoothing()
     border-radius: 99em
@@ -75,7 +74,7 @@
     &.alt
       background-color: $colors.blue
       padding: 1.2em 2em
-      
+
       &:hover
         background-color: $colors.dark-blue
 
           outline: 1px dotted $colors.blue
 
   // Single Product
+  &.woocommerce-app
+    div.product
+      form.cart
+        display: flex
+        flex-direction: column
+        .frequency
+          text-align: left !important
+          margin-left: 0 !important
+        button[type="submit"]
+          width: max-content
+
   div.product
     form.cart
       div.quantity
index a406ce29f55060bd49584b162179254fda302ad7..fe65a07692414a06f6bf0290f4856b4debcc758d 100644 (file)
@@ -137,10 +137,12 @@ add_filter('wps_sfw_show_sync_interval', function() {
 add_filter('wps_sfw_price_html', function(){
     global $product;
     global $woocommerce;
-    $symbol = get_woocommerce_currency_symbol();
-    $price = apply_filters('wps_rbpfw_price',$product->get_regular_price());
-    $suffix = $product->get_price_suffix();
-    return "<span class='woocommerce-Price-amount amount'><bdi><span class='woocommerce-Price-currencySymbol'>$symbol</span>$price</bdi></span><small class='woocommerce-price-suffix'>$suffix</small>";
+    if($product) {
+        $symbol = get_woocommerce_currency_symbol();
+        $price = apply_filters('wps_rbpfw_price', $product->get_regular_price());
+        $suffix = $product->get_price_suffix();
+        return "<span class='woocommerce-Price-amount amount'><bdi><span class='woocommerce-Price-currencySymbol'>$symbol</span>$price</bdi></span><small class='woocommerce-price-suffix'>$suffix</small>";
+    }
 });
 
 add_filter('wps_rbpfw_price', function($price){
@@ -154,7 +156,7 @@ add_filter('wps_sfw_show_one_time_subscription_price', function($price) {
 add_action('woocommerce_after_add_to_cart_quantity', function() {
     global $product;
     $product_id = $product->get_id();
-    $wps_price_html = "<div class='recurrent'>";
+    $wps_price_html = "<div class='frequency'>";
     $wps_price_html .= "<p>Frequency</p>";
     $wps_price_html  .= '<div class="wps_sfw_subscription_wrapper">';
     $wps_price_html .= '<div class ="wps_wsp_onetimesimple_wrapper">';