package views import ( "fmt" "shop.tonybtw.com/internal/models" ) templ Cart(items []models.Cart_Item_Detail, total int, cart_count int) { @Layout("Cart") {

Your Cart

@Cart_Items(items) if len(items) > 0 {
Continue Shopping Checkout
} } } templ Cart_Items(items []models.Cart_Item_Detail) {
if len(items) == 0 {

Your cart is empty.

} else { for _, item := range items { }
Product Size Price Qty Subtotal
{ item.Name } { item.Size } { Format_Price(item.Price) }
{ Format_Price(item.Subtotal) }
Total { Format_Price(models.Get_Cart_Total(items)) }
}
}