diff --git a/product-comparison.html b/product-comparison.html index 70fb4a2..b00e7bc 100644 --- a/product-comparison.html +++ b/product-comparison.html @@ -311,12 +311,12 @@
- +
- Sales Package + Materials
- +
- Model Number + Design
- +
- Secondary Material -
-
- - -
-
- - -
-
-
- - -
-
- Configuration -
-
- - -
-
- - -
-
-
- - -
-
- Upholstery Material -
-
- - -
-
- - -
-
-
- - -
-
- Upholstery Color + Use Cases
- -
-

- Product -

-
+ - -
- -
-
- Filling Material -
-
- - -
-
- - -
-
-
- - -
-
- Finish Type -
-
- - -
-
- - -
-
-
- - -
-
- Adjustable Headrest -
-
- - -
-
- - -
-
-
- - -
-
- Maximum Load Capacity -
-
- - -
-
- - -
-
-
- - -
-
- Origin of Manufacture -
-
- - -
-
- - -
-
-
-
- - -
-

- Dimensions -

-
- - -
- -
-
- Width -
-
- - -
-
- - -
-
-
- - -
-
- Height -
-
- - -
-
- - -
-
-
- - -
-
- Depth -
-
- - -
-
- - -
-
-
- - -
-
- Weight -
-
- - -
-
- - -
-
-
- - -
-
- Seat Height -
-
- - -
-
- - -
-
-
- - -
-
- Leg Height -
-
- - -
-
- - -
-
-
-
+
@@ -700,86 +404,6 @@
- - -
-
- Warranty Service Type -
-
- - -
-
- - -
-
-
- - -
-
- Covered in Warranty -
-
- - -
-
- - -
-
-
- - -
-
- Not Covered in Warranty -
-
- - -
-
- - -
-
-
- - -
-
- Domestic Warranty -
-
- - -
-
- - -
-
-
diff --git a/scripts/main.js b/scripts/main.js index 46721ab..e6f3e96 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -923,8 +923,8 @@ function updateComparisonTable(product, slotNumber) { console.log(`=== UPDATING COMPARISON TABLE FOR SLOT ${slotNumber} ===`); console.log("Product:", product); - // Update all sections - const sections = ["general", "product", "dimensions", "warranty"]; + // Update only sections present in the HTML + const sections = ["general", "warranty"]; sections.forEach((section) => { console.log(`Updating ${section} section...`); @@ -1001,41 +1001,14 @@ function getProductSectionData(product, sectionName) { switch (sectionName) { case "general": sectionData = [ - product.salesPackage || "N/A", // Sales Package - product.modelNo || "N/A", // Model Number - product.additionalInformation?.Material || "N/A", // Secondary Material - product.configuration || "N/A", // Configuration - product.additionalInformation?.Upholstery || "N/A", // Upholstery Material - product.colors?.[0]?.name || "N/A", // Upholstery Color - ]; - break; - case "product": - sectionData = [ - product.fillingMaterial || "N/A", // Filling Material - product.finishType || "N/A", // Finish Type - product.adjustableHeadrest || "N/A", // Adjustable Headrest - product.maxLoadCapacity || "N/A", // Maximum Load Capacity - product.originOfManufacture || "N/A", // Origin of Manufacture - ]; - break; - case "dimensions": - const dims = product.dimensions?.split(" x ") || []; - sectionData = [ - dims[0] || "N/A", // Width - dims[1] || "N/A", // Height - dims[2] || "N/A", // Depth - product.weight || "N/A", // Weight - product.seatHeight || "N/A", // Seat Height - product.legHeight || "N/A", // Leg Height + product.additionalInformation?.Material || "N/A", // Materials + product.additionalInformation?.Design || "N/A", // Design + product.additionalInformation?.["Use Cases"] || "N/A", // Use Cases ]; break; case "warranty": sectionData = [ - product.additionalInformation?.Warranty || "N/A", // Warranty Summary - product.warrantyServiceType || "N/A", // Warranty Service Type - product.coveredInWarranty || "N/A", // Covered in Warranty - product.notCoveredInWarranty || "N/A", // Not Covered in Warranty - product.additionalInformation?.Warranty || "N/A", // Domestic Warranty + product.additionalInformation?.Warranty || "N/A", // Warranty Summary only ]; break; default: