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 @@ KAPVOE Portfolio · Blood Bros Sports + @@ -428,7 +449,7 @@
Explora el catàleg
- + - - - - - - + + + + + + + diff --git a/js/config.js b/js/config.js index be3bc33..4b78062 100644 --- a/js/config.js +++ b/js/config.js @@ -1,4 +1,4 @@ - export const API_URL = 'https://script.googleusercontent.com/macros/echo?user_content_key=AWDtjMVe9JQMYFUTitGGiHSzQsuEyr7VsarNnNpOluFcWHXa-CGnuKhrinmwBYVLw1otHQoBg5rnYNpGlIvCg_I8u1QhCKr-FQwCC2bG9LdttpST6nS_k8TxRcaT5LmmDjeZENcy8A0ujTU1yJwFLoxudMFW-OGjkYtywE5YT_CUJpKQWmqPN8IRV1drNysBtQFfQH1tXUS1JrOODghrxxjAA3T77kqRnz-aaMZJ23YfZntVm4C1KpaBBloFs4OO2wYIcD7Sf1iAYX1OMjIHXsCypvIgFRfIdhMqADWRmluv&lib=MLri0H8XjzrQY2XIy3BzwJ1YbTZr7i_Wa'; + export const API_URL = '/api/products.php'; export const AUTO_REFRESH_MS = 120000; // Si vols el logo real, puja'l a assets i canvia aquesta URL.