= e($productCode) ?>
= e((string)($order['postal_code'] ?? '')) ?> = e((string)($order['city'] ?? '')) ?>
= e((string)($order['province'] ?? '')) ?>
$e->getMessage(), ]; } } } } function kapvoe_find_local_product_image_url(string $productCode): string { $productCode = trim($productCode); if ($productCode === '') { return ''; } foreach (['png', 'jpg', 'jpeg', 'webp'] as $ext) { $absolutePath = dirname(__DIR__) . "/assets/products/{$productCode}.{$ext}"; if (is_file($absolutePath)) { return "/assets/products/{$productCode}.{$ext}"; } } return ''; } function e(?string $value): string { return htmlspecialchars((string)$value, ENT_QUOTES, 'UTF-8'); } function fmt_eur($value): string { $n = (float)$value; return number_format($n, 2, ',', '.') . ' €'; } $productCode = (string)($order['product_code'] ?? ''); $imageUrl = trim((string)($order['product_image_url'] ?? '')); if ($imageUrl === '') { $imageUrl = (string)($product['image_url'] ?? ''); } if ($imageUrl === '') { $imageUrl = kapvoe_find_local_product_image_url($productCode); } $shippingMethod = (string)($order['shipping_method'] ?? 'pickup'); $subtotal = (string)($order['subtotal'] ?? $order['unit_price'] ?? '0.00'); $shippingCost = (string)($order['shipping_cost'] ?? '0.00'); $totalAmount = (string)($order['total_amount'] ?? $order['unit_price'] ?? '0.00'); ?>
Hem rebut la teva compra. Aquí tens un resum de la comanda confirmada.