Skip to content

Commit

Permalink
fix: Fix missing product image
Browse files Browse the repository at this point in the history
  • Loading branch information
kpitn committed Feb 27, 2024
1 parent f4389d1 commit a27a8cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/module-elasticsuite-autocomplete/Model/Render/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,16 @@ protected function generateProductUrl(array $productData): string
/**
* Generate image url
*
* @param string $imagePath
* @param null|string $imagePath
*
* @return string
*/
protected function generateImageUrl(string $imagePath): string
protected function generateImageUrl(?string $imagePath): string
{
if ($imagePath === null) {
return '';
}

$product = $this->productFactory->create();

return $this->imageHelper->init($product, 'smile_elasticsuite_autocomplete_product_image')
Expand Down

0 comments on commit a27a8cb

Please sign in to comment.