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