Skip to content

feat: SCO-160 group one-row-per-variant product imports by style number - #395

Merged
scottcarlton merged 1 commit into
devfrom
feat/sco-160-long-format
Oct 28, 2026
Merged

scottcarlton merged 1 commit into
devfrom
feat/sco-160-long-format

Conversation

@scottcarlton

Copy link
Copy Markdown
Owner

Summary

  • The product importer on /products and brand product pages now groups rows by style number. A file with one row per size and color lands as one product with its variants.
  • A SKU column next to a style number column is saved on each variant (product_variants.sku) instead of replacing the style number.
  • Headers map through mapProductHeaders, the scoring mapper the onboarding importer already uses, in place of per-header greedy matching.
  • The /api/products/import endpoint accepts optional variants: [{ size, color, sku }] per product and inserts exactly those. Drafts without it still cross sizes x colors, so the PDF path and the template are unchanged.

Why

SCO-160 asks for long-format files to import as one product per style. Before this, a 3-row file for one tee created 3 products named after their SKUs.

Verification

  • bun run lint passes
  • bun run check passes (0 errors)
  • bun run test:run passes (2,046)
  • Chromium, real upload through the Import modal:
    • long-format .xlsx (Style Number, Size, Color, SKU, 3 rows) created 1 product with 3 variants carrying XV-201-OAT-S/M/L
    • template-shape .xlsx still created 2 products with 6 and 3 variants
  • Not tried with a real JOOR or NuORDER export

Test plan

  • Import a CSV or Excel file with one row per size and a SKU column; check the product page shows one product with each size
  • Import the downloaded template; check nothing changed

Part of SCO-160

🤖 Generated with Claude Code

…mber

Exports that list each size and color on its own row imported as one
product per row, with the SKU column taking over the style number. Rows
now group by style number into one product, and each row's SKU is saved
on its variant. Headers map through the scoring mapper the onboarding
importer already uses.

SCO-160

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadline Ready Ready Preview Oct 28, 2026 1:19am UTC

@scottcarlton
scottcarlton merged commit 26ac49f into dev Oct 28, 2026
8 checks passed
@scottcarlton
scottcarlton deleted the feat/sco-160-long-format branch October 28, 2026 01:20

This branch was successfully deployed

1 active deployment
Preview — 2656f521 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant