From b223fd374ba8c39d0f47e13bf194a52ca69e6cbe Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Thu, 25 Dec 2025 22:24:12 +0330 Subject: [PATCH] Fix product discount problem --- frontend/components/global/ProductsGrid.vue | 3 ++- frontend/components/global/Tag.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/components/global/ProductsGrid.vue b/frontend/components/global/ProductsGrid.vue index 30723e8..774de37 100644 --- a/frontend/components/global/ProductsGrid.vue +++ b/frontend/components/global/ProductsGrid.vue @@ -47,9 +47,10 @@ withDefaults(defineProps(), { :title="product.name" :picture="product.image ?? product.variants[0].images[0].image" :colors="product.colors" - :price="product.variants[0].price" + :price="product.variants[0].price_after_discount ?? product.variants[0].price" :rate="product.rating" :dark-layer="true" + :tag="`${product.variants[0].discount}% تخفیف`" /> diff --git a/frontend/components/global/Tag.vue b/frontend/components/global/Tag.vue index 1bab6c7..9be33ce 100644 --- a/frontend/components/global/Tag.vue +++ b/frontend/components/global/Tag.vue @@ -1,5 +1,5 @@ \ No newline at end of file