Store products in a basket, display list of products in basket

This commit is contained in:
2024-09-09 14:33:29 +02:00
parent 2d0dc274bf
commit 6ff577ece1
10 changed files with 161 additions and 45 deletions

View File

@@ -0,0 +1,5 @@
import { ProductModel } from "@/data/models/productModel";
export function calcProductPrice(product: ProductModel): number {
return Math.round(product.price * ((100 - product.discount) / 100) * 100) / 100
}