Added upc in ui

This commit is contained in:
sidharth 2022-01-26 11:02:28 +05:30
parent 79cb86c2e6
commit ee1df7fee0
2 changed files with 10 additions and 2 deletions

View File

@ -310,6 +310,14 @@
Sku {{ product.sku }} Sku {{ product.sku }}
</p> </p>
</v-row> </v-row>
<v-row>
<p
class="fontsize-14 text-uppercase"
v-show="cartProductPage"
>
UPC {{ product.customAttributes.upc }}
</p>
</v-row>
<v-row> <v-row>
<p class="fontsize-14"> <p class="fontsize-14">
${{ priceFormatter(product.price) }} ${{ priceFormatter(product.price) }}

View File

@ -708,7 +708,7 @@ export const priceFormatter = (price, pdp) => {
if (decimals.length == 2 && pdp) //if 2 or 2.1 if (decimals.length == 2 && pdp) //if 2 or 2.1
return price; return price;
else if (decimals.length > 1) // if 2.34 or 2.56565 else if (decimals.length > 1) // if 2.34 or 2.56565
return Number(price.match(/^-?\d+(?:\.\d{0,2})?/)[0]); return Number(price.match(/^-?\d+(?:\.\d{0,4})?/)[0]);
} }
} }