This commit is contained in:
sebseb7
2025-11-17 07:38:16 +01:00
parent 13c63db643
commit 8e43eaaede
2 changed files with 1944 additions and 6 deletions

1940
out

File diff suppressed because it is too large Load Diff

View File

@@ -329,7 +329,9 @@ const generateProductsXml = (allProductsData = [], baseUrl, config) => {
// Skip products with excluded terms in title or description
const productTitle = (product.name || "").toLowerCase();
const productDescription = (product.description || "").toLowerCase();
// Get description early so we can check it for excluded terms
const productDescription = product.kurzBeschreibung || product.description || '';
const excludedTerms = {
title: ['canna', 'hash', 'marijuana', 'marihuana'],
@@ -343,7 +345,7 @@ const generateProductsXml = (allProductsData = [], baseUrl, config) => {
}
// Check description for excluded terms
if (excludedTerms.description.some(term => productDescription.includes(term))) {
if (excludedTerms.description.some(term => productDescription.toLowerCase().includes(term))) {
skippedCount++;
return;
}
@@ -420,10 +422,6 @@ const generateProductsXml = (allProductsData = [], baseUrl, config) => {
return;
}
// Get description from the appropriate field
// TODO: Identify the correct field name used by the product data
const productDescription = product.shortDescription || product.longDescription || product.description || '';
// Check if description is missing or too short (less than 20 characters) - skip if insufficient
const originalDescription = productDescription ? cleanTextContent(productDescription) : '';
if (!originalDescription || originalDescription.length < 20) {