From 076af73a9bba34c8b67d116b306b34af6e47f75c Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 18 Jun 2025 13:24:23 +0300 Subject: [PATCH] =?UTF-8?q?Andrei=20|=20=D1=84=D0=B8=D0=BA=D1=81=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=D0=B0=20(=D0=B2=D1=8B?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=20=D0=B0=D0=BA=D1=86=D0=B8=D0=BE=D0=BD=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9=20=D1=86=D0=B5=D0=BD=D1=8B=20=D0=B8=20=D1=81=D0=BA?= =?UTF-8?q?=D0=B8=D0=B4=D0=BA=D0=B8=20=D0=BF=D1=80=D0=B8=20=D0=B5=D0=B5=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D0=B8=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B5=20=D1=82=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=80=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cosmopet/global-functions/core-functions.php | 1 - .../single-product/assets/css/gp-style-desktop.css | 6 ++++++ .../single-product/component-template.twig | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/cosmopet/global-functions/core-functions.php b/wp-content/themes/cosmopet/global-functions/core-functions.php index d917072..def1230 100644 --- a/wp-content/themes/cosmopet/global-functions/core-functions.php +++ b/wp-content/themes/cosmopet/global-functions/core-functions.php @@ -260,4 +260,3 @@ $zero = '0'; // ]); // } - diff --git a/wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-desktop.css b/wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-desktop.css index 1cac580..296f30f 100644 --- a/wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-desktop.css +++ b/wp-content/themes/cosmopet/modules/shop/components/single-product/assets/css/gp-style-desktop.css @@ -1059,8 +1059,14 @@ main{ display: flex; } .detail__catalot .product__item{ + width: calc(100% - 24px); +} + +@media (max-width: 640px) { + .detail__catalot .product__item{ width: calc(100%); } +} .detail__images-phone{ display: none; } diff --git a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig b/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig index 82c831f..83ce141 100644 --- a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig +++ b/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig @@ -101,6 +101,18 @@ {% else %}

{{ product.get_price }} {{ fn('get_woocommerce_currency_symbol') }} + {% if product.is_on_sale %} + +

+

+ {{ product.get_regular_price }} {{ fn('get_woocommerce_currency_symbol') }} +

+

+ {% set discount = ((product.get_regular_price - product.get_sale_price) / product.get_regular_price * 100)|round(0, 'floor') %} + {{ discount }} +

+
+ {% endif %}

{% endif %}