fix cart price calc
This commit is contained in:
@@ -143,7 +143,7 @@ func (rc *cartItemController) CartItemView(c *gin.Context) {
|
|||||||
|
|
||||||
priceTotal := 0.0
|
priceTotal := 0.0
|
||||||
for _, cartItem := range cartItems {
|
for _, cartItem := range cartItems {
|
||||||
priceTotal += (float64(cartItem.Quantity) * cartItem.ShopItem.BasePrice)
|
priceTotal += (float64(cartItem.Quantity) * cartItem.ItemVariant.Price)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("PRICE TOTAL", priceTotal)
|
fmt.Println("PRICE TOTAL", priceTotal)
|
||||||
|
|||||||
Reference in New Issue
Block a user