func buildOrderEmailBody(items []Item, totalPrice float64) string {
body := "Танҳо барои шумо!\n\n"
body += "Инҳоянд ашёҳои дар фармоиши шумо:\n"
for _,
}
func CreateOrder(customerEmail string) {
totalPrice := ListAndCalculateVAT()
orderDetails := "Танҳо барои шумо!\n\n"
orderDetails += "Инҳоянд ашёҳои дар фармоиши шумо:\n"
for _, item := range items {
orderDetails += fmt.Sprintf("- %s: $%.2f\n", item.NameOfProduct, item.PriceOfProduct)
}
orderDetails += fmt.Sprintf("\nҲамагӣ (бо ИДФ): $%.2f\n", totalPrice)
order = Order{Items: items, EmailSent: false}
subject := "Тасдиқи фармоишатон"
if err := SendOrderConfirmationEmail(customerEmail, subject, orderDetails);
err != nil {
}