From: soufiane Date: Wed, 5 Feb 2025 14:12:41 +0000 (+0100) Subject: wip #7304 @0:30 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7ee5f50ba121722abce4782e55c5445487c65259;p=physioassist-wordpress.git wip #7304 @0:30 --- diff --git a/wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl b/wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl index 7ae369dc..9698e55a 100644 --- a/wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl +++ b/wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl @@ -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 @@ -160,6 +159,17 @@ 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 diff --git a/wp-content/themes/physioassist/resources/functions.php b/wp-content/themes/physioassist/resources/functions.php index a406ce29..fe65a076 100644 --- a/wp-content/themes/physioassist/resources/functions.php +++ b/wp-content/themes/physioassist/resources/functions.php @@ -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 "$symbol$price$suffix"; + if($product) { + $symbol = get_woocommerce_currency_symbol(); + $price = apply_filters('wps_rbpfw_price', $product->get_regular_price()); + $suffix = $product->get_price_suffix(); + return "$symbol$price$suffix"; + } }); 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 = "
"; + $wps_price_html = "
"; $wps_price_html .= "

Frequency

"; $wps_price_html .= '
'; $wps_price_html .= '
';