package templates import ( "fmt" "prestaproxy/internal/viewmodel" ) templ ProductPage(data viewmodel.ProductPageData, cssPath string, jsPath string) { @Layout(data.Product.Name, cssPath, jsPath) {
Prestashop Proxy
if data.Customer != nil {

{ fmt.Sprintf("%s %s", data.Customer.FirstName, data.Customer.LastName) }

} else {

Guest session

} if data.CartSummary != nil {

{ fmt.Sprintf("Cart items: %d", data.CartSummary.TotalItems) }

}

Product

if data.CategoryURL != "" && data.Product.CategoryName != "" { { data.Product.CategoryName } }

{ data.Product.Name }

{ data.Product.ShortDescription }

@templ.Raw(data.Product.Description)
} }