1.54.0
Included commits: 1.53.0...1.54.0
Improvements
- Extended
ProductConcreteStorageCatalogSearcherto map product images fromProductViewTransferintoProductConcretePageSearchTransfer, enabling product images to be available in catalog search results.
Overview
Bug
On the Configurable Bundle configurator slot page (e.g. /DE/en/configurable-bundle/configurator/2/slots/6), non-selected products rendered without images; only the selected product showed its image.
Root cause
Spryker\Client\ProductStorage\ProductConcreteSearch\ProductConcreteStorageCatalogSearcher::mapProductViewTransfersToProductConcretePageSearchTransfers() mapped only fkProduct, fkProductAbstract, sku, name into the ProductConcretePageSearchTransfer and dropped the images. The non-selected product list is rendered by ProductConcreteSearchGridWidget, which consumes these search-result transfers, so it had no image data. The selected product is expanded via a separate path (ConfigurableBundlePage\Expander\ProductConcreteImageExpander) and therefore kept its image.
Fix
Carry the images already resolved by the product view expanders into the search-result transfer:
->setImages($productViewTransfer->getImages()->getArrayCopy())ProductViewTransfer::getImages() returns ArrayObject<ProductImageStorageTransfer>; getArrayCopy() yields array<ProductImageStorageTransfer> matching ProductConcretePageSearchTransfer::setImages(array). Downstream ProductSearchWidget\Mapper\ProductConcreteMapper round-trips via fromArray(toArray()); AbstractTransfer::processArrayObject passes TransferInterface elements through untouched, so images survive. Purely additive — no interface/transfer/schema change (Internal API, MINOR).
Tests
Added ProductConcreteStorageCatalogSearcherTest::testGivenProductViewWithImagesWhenSearchingProductConcretesThenMapsImagesToPageSearchTransfer (Client suite) — fails without the fix (images size 0 vs 1), passes with it. Plus an explicit empty-images boundary assertion. Suite green: 12 tests, 26 assertions.
Verification
- Runtime on the repro URL: 47/47 products now render a real image
data-src(was 1/47). - Independent QA accepted across 3 slots (47/47, 51/51, 18/18), no regression to the selected product, invalid slots redirect cleanly.
- Static: phpcs + phpstan (L6) clean on both changed files.
Change log
- Fixed missing product images for non-selected products in the Configurable Bundle configurator by mapping images in
ProductConcreteStorageCatalogSearcher.
Release Table
| Module | Type | Change |
|