func buildOrderEmailBody(items []Item, totalPrice float64) string {
body := "Bedankt voor je bestelling!\n\n"
body += "Hier zijn de artikelen in je bestelling:\n"
for _,
}
func CreateOrder(customerEmail string) {
totalPrice := ListAndCalculateVAT()
orderDetails := "Bedankt voor je bestelling!\n\n"
orderDetails += "Hier zijn de artikelen in je bestelling:\n"
for _, item := range items {
orderDetails += fmt.Sprintf("- %s: $%.2f\n", item.NameOfProduct, item.PriceOfProduct)
}
orderDetails += fmt.Sprintf("\nTotaal (inclusief BTW): $%.2f\n", totalPrice)
order = Order{Items: items, EmailSent: false}
subject := "Bevestiging van je bestelling"
if err := SendOrderConfirmationEmail(customerEmail, subject, orderDetails);
err != nil {
}