Fix: Update products/[slug]/page to use showAsReadyMade

Changed related products query to filter by showAsReadyMade instead of deleted showOnProducts column on the Product model.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-20 18:31:31 +01:00
co-authored by Claude Haiku 4.5
parent aa092f80a0
commit f2aed12fb6
+1 -1
View File
@@ -14,7 +14,7 @@ export default async function StandardProductPage({ params }: { params: { slug:
const product = toProductDTO(row, activePromotions, 'plain');
const relatedRows = await prisma.product.findMany({
where: { category: product.category, showOnProducts: true, NOT: { id: product.id } },
where: { category: product.category, showAsReadyMade: true, NOT: { id: product.id } },
take: 4,
});
const related = relatedRows.map((p) => toProductDTO(p, activePromotions, 'plain'));