From e94b3f9dcab298d0291a8acf601cb19c93b0bb86 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Sun, 23 Nov 2025 06:26:51 +0100 Subject: [PATCH] fix: resolve product detail page data access and add placeholder image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issues fixed: - Product ID was undefined - Alpine.js couldn't access data-product-id from nested div - Missing placeholder image caused 404 errors Changes: - Pass product_id and vendor.id through window globals instead of dataset - Initialize productId and vendorId directly from window variables - Add placeholder.jpg SVG for products without images - Add debug logging to track initialization The product detail page now correctly loads products and handles missing images. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/templates/shop/product.html | 17 +++++++++-------- static/shop/img/placeholder.jpg | 6 ++++++ 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 static/shop/img/placeholder.jpg diff --git a/app/templates/shop/product.html b/app/templates/shop/product.html index 33e46c71..d00c5928 100644 --- a/app/templates/shop/product.html +++ b/app/templates/shop/product.html @@ -7,10 +7,7 @@ {% block alpine_data %}productDetail(){% endblock %} {% block content %} -
+
{# Breadcrumbs #}