fix: accepted values in import with template (#12969)

**What**
Fixed CSV import functionality to properly handle columns that were previously cuasing import errors.

**Why**
Users were encountering "Invalid column name(s)" errors when importing CSV files containing system-generated columns like "Product Created At", "Product Updated At", etc. These columns are automatically added by export templates but should be ignored during import since they're not part of the product creation schema.

Resolves FRMW-2983
This commit is contained in:
juanzgc
2025-07-16 11:45:52 -05:00
committed by GitHub
parent c5d609d09c
commit 7669dbb03e
4 changed files with 273 additions and 7 deletions

View File

@@ -12,13 +12,22 @@ const prodColumnPositions = new Map([
["Product Id", 0],
["Product Handle", 1],
["Product Title", 2],
["Product Status", 3],
["Product Subtitle", 3],
["Product Description", 4],
["Product Subtitle", 5],
["Product External Id", 6],
["Product Thumbnail", 7],
["Product Collection Id", 8],
["Product Type Id", 9],
["Product Status", 5],
["Product Thumbnail", 6],
["Product Weight", 7],
["Product Length", 8],
["Product Width", 9],
["Product Height", 10],
["Product HS Code", 11],
["Product Origin Country", 12],
["Product MID Code", 13],
["Product Material", 14],
["Product Collection Id", 15],
["Product Type Id", 16],
["Product Discountable", 17],
["Product External Id", 18],
])
const variantColumnPositions = new Map([