diff --git a/api/products.php b/api/products.php index 6c18591..e65b8a6 100644 --- a/api/products.php +++ b/api/products.php @@ -102,13 +102,16 @@ function normalizeProduct(array $p): array $priceText = number_format($priceNumber, 2, ',', '.') . ' €'; } + $image = normalizeText($p['image_url'] ?? $p['IMAGE_URL'] ?? ''); + $filename = basename($image); + return [ 'product_code' => normalizeText($p['product_code'] ?? $p['Product Code'] ?? $p['PRODUCT CODE'] ?? ''), 'model' => normalizeText($p['model'] ?? $p['MODEL'] ?? ''), 'category' => normalizeText($p['category'] ?? $p['CATEGORIA'] ?? $p['CATEGORY'] ?? ''), 'colors' => normalizeText($p['colors'] ?? $p['COLORS'] ?? $p['VIDRE'] ?? ''), 'description' => normalizeText($p['description'] ?? $p['DESCRIPCIO'] ?? $p['DESCRIPTION'] ?? ''), - 'image_url' => normalizeText($p['image_url'] ?? $p['IMAGE_URL'] ?? ''), + 'image_url' => $filename ? "https://kapvoe-portfoli.treblarella.org/assets/products/$filename" : '', 'stock' => normalizeStock($p['stock'] ?? $p['STOCK'] ?? 0), 'top_vendes' => normalizeBool($p['top_vendes'] ?? $p['TOP_VENDES'] ?? false), 'europe_price_number' => $priceNumber, diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..40faad6 Binary files /dev/null and b/favicon.ico differ diff --git a/index.html b/index.html index a422945..2fb3295 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@