Add WooCommerce-style featured image and product gallery flow.
Deploy Ladill Woo Manager / deploy (push) Successful in 24s

Sync full image sets through the plugin, with upload/URL support in the product editor and thumbnails in the list.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-07 00:27:11 +00:00
co-authored by Cursor
parent e3ef23218f
commit 085645fd0f
10 changed files with 434 additions and 67 deletions
+4 -2
View File
@@ -20,12 +20,14 @@ class ProductIngestService
$sale = $this->priceMinor($payload['sale_price'] ?? null);
$images = collect((array) ($payload['images'] ?? []))
->map(fn (array $image) => [
->map(fn (array $image, int $index) => [
'id' => (int) ($image['id'] ?? 0),
'src' => (string) ($image['src'] ?? ''),
'alt' => (string) ($image['alt'] ?? ''),
'position' => (int) ($image['position'] ?? $index),
])
->filter(fn (array $image) => $image['src'] !== '')
->filter(fn (array $image) => $image['src'] !== '' || $image['id'] > 0)
->sortBy('position')
->values()
->all();