fixed price after discount in product page
This commit is contained in:
@@ -117,7 +117,11 @@ watch(
|
||||
{{ selectedVariant!.price }}
|
||||
</span>
|
||||
<span class="typo-p-md sm:typo-p-2xl relative flex-center w-fit font-medium">
|
||||
{{ selectedVariant!.discount > 0 ? selectedVariant!.price : selectedVariant!.price }}
|
||||
{{
|
||||
selectedVariant!.discount > 0
|
||||
? selectedVariant!.price_after_discount
|
||||
: selectedVariant!.price
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
@@ -179,7 +183,11 @@ watch(
|
||||
{{ selectedVariant!.price }}
|
||||
</span>
|
||||
<span class="typo-p-2xl relative flex-center w-fit font-medium">
|
||||
{{ selectedVariant!.discount > 0 ? selectedVariant!.price : selectedVariant!.price }}
|
||||
{{
|
||||
selectedVariant!.discount > 0
|
||||
? selectedVariant!.price_after_discount
|
||||
: selectedVariant!.price
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -25,7 +25,7 @@ defineProps<Props>();
|
||||
<div class="w-full">
|
||||
<div class="w-full flex justify-between items-center gap-2">
|
||||
<span class="text-md sm:text-xl font-medium">
|
||||
{{ variantDetail.price }}
|
||||
{{ variantDetail!.discount > 0 ? variantDetail!.price_after_discount : variantDetail!.price }}
|
||||
</span>
|
||||
<div
|
||||
v-if="variantDetail.in_stock > 0 && variantDetail.discount > 0"
|
||||
|
||||
Reference in New Issue
Block a user