fix cart price calc

This commit is contained in:
2025-03-05 10:41:54 +01:00
parent 1ccfc620d0
commit 56035bb32f

View File

@@ -143,7 +143,7 @@ func (rc *cartItemController) CartItemView(c *gin.Context) {
priceTotal := 0.0
for _, cartItem := range cartItems {
priceTotal += (float64(cartItem.Quantity) * cartItem.ShopItem.BasePrice)
priceTotal += (float64(cartItem.Quantity) * cartItem.ItemVariant.Price)
}
fmt.Println("PRICE TOTAL", priceTotal)