add per-colour product images and gallery colour filtering

Tag product images with their colour during sync (both Printful and
Printify providers). Printify images are cherry-picked: hero colour
keeps all angles, other colours keep front + back only. Printful
MockupEnricher now generates mockups per colour from the
color_variant_map.

PDP gallery filters by the selected colour, falling back to all
images when the selected colour has none. Fix option name mismatch
(Printify "Colors" vs variant "Color") by singularizing in
Product.option_types.

Generator creates multi-colour apparel products so mock data matches
real sync behaviour.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-15 23:21:22 +00:00
parent 29d8839ac2
commit daa6d3de71
13 changed files with 375 additions and 146 deletions

View File

@@ -0,0 +1,9 @@
defmodule SimpleshopTheme.Repo.Migrations.AddColorToProductImages do
use Ecto.Migration
def change do
alter table(:product_images) do
add :color, :string
end
end
end