| @@ -4,9 +4,8 @@ | ||
| 4 | 4 | |
| 5 | 5 | use FluentCart\App\Helpers\Helper; |
| 6 | 6 | use FluentCart\App\Models\Cart; |
| 7 | 7 | use FluentCart\Framework\Support\Arr; |
| 8 | -use FluentCart\App\Vite; | |
| 9 | 8 | |
| 10 | 9 | class CartItemRenderer |
| 11 | 10 | { |
| 12 | 11 | protected $item = []; |
| @@ -153,11 +152,10 @@ | ||
| 153 | 152 | |
| 154 | 153 | public function renderImage() |
| 155 | 154 | { |
| 156 | 155 | $image = Arr::get($this->item, 'featured_media'); |
| 157 | - if (!$image) { | |
| 158 | - $image = Vite::getAssetUrl('images/placeholder.svg'); | |
| 159 | - } | |
| 156 | + // Also maps the old generic icon a pre-existing cart row may still store. | |
| 157 | + $image = Helper::productImageOrPlaceholder($image); | |
| 160 | 158 | $href = Arr::get($this->item, 'view_url', ''); |
| 161 | 159 | $altText = sprintf( |
| 162 | 160 | /* translators: %s: product title */ |
| 163 | 161 | __('Image of %s', 'fluent-cart'), Arr::get($this->item, 'title', __('product', 'fluent-cart'))); |