Skip to content

fix(seeder): seed quote-only products first so front page shows priced products#29

Closed
tkahng wants to merge 1 commit into
mainfrom
fix/seeder-priced-products-first
Closed

fix(seeder): seed quote-only products first so front page shows priced products#29
tkahng wants to merge 1 commit into
mainfrom
fix/seeder-priced-products-first

Conversation

@tkahng

@tkahng tkahng commented May 26, 2026

Copy link
Copy Markdown
Owner

Problem

The storefront home page fetches the 4 newest products (ORDER BY created_at DESC LIMIT 4). Quote-only products (null price) were seeded last in DevDataSeeder, giving them the highest created_at timestamps. As a result, all four front-page product slots showed items with no visible price.

Fix

Reorder the seeding calls in run() so seedQuoteOnlyProducts() runs before seedProducts() and seedVariantProducts(). Quote-only items receive the oldest timestamps; the priced products are the newest and appear on the home page instead.

Tests

Added seeder_frontPageFeaturedProductsAllHavePrices — queries the 4 newest active products (same logic as the storefront) and asserts that none have a null price.

Checklist

  • Seeder reordered
  • New integration test added
  • Existing tests unaffected (product counts, collection counts, null-price variant count all unchanged)

…d products

The home page fetches the 4 newest products (ORDER BY created_at DESC).
Quote-only products (null price) were seeded last, giving them the highest
created_at timestamps and causing all 4 front-page slots to show items with
no price. Seeding them first ensures priced products are the newest and appear
on the home page instead.

Adds a test that asserts none of the 4 newest products have a null price.
@tkahng

tkahng commented May 26, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #30 which contains all commits from this branch plus the expanded seeder work.

@tkahng tkahng closed this May 26, 2026
@tkahng tkahng deleted the fix/seeder-priced-products-first branch May 29, 2026 20:46
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