| @@ -3,9 +3,8 @@ | ||
| 3 | 3 | namespace FluentCart\App\Services\Renderer; |
| 4 | 4 | |
| 5 | 5 | use FluentCart\App\App; |
| 6 | 6 | use FluentCart\App\Services\FrontendView; |
| 7 | -use FluentCart\App\Vite; | |
| 8 | 7 | use FluentCart\Api\StoreSettings; |
| 9 | 8 | use FluentCart\Api\ModuleSettings; |
| 10 | 9 | use FluentCart\App\Helpers\Helper; |
| 11 | 10 | use FluentCart\App\Models\Product; |
| @@ -373,15 +372,15 @@ | ||
| 373 | 372 | public function renderGalleryThumb() |
| 374 | 373 | { |
| 375 | 374 | $thumbnails = []; |
| 376 | 375 | |
| 377 | - $featuredMedia = $this->product->thumbnail ?? Vite::getAssetUrl('images/placeholder.svg'); | |
| 376 | + $featuredMedia = $this->product->thumbnail ?? Helper::getProductPlaceholderUrl(); | |
| 378 | 377 | |
| 379 | 378 | // thumbnail can be an empty string (not null), so ?? above doesn't catch |
| 380 | 379 | // it — fall back to the placeholder so $featuredMedia is always a usable |
| 381 | 380 | // image URL for both the main <img> and data-default-image-url. |
| 382 | 381 | if (!$featuredMedia || !\is_string($featuredMedia)) { |
| 383 | - $featuredMedia = Vite::getAssetUrl('images/placeholder.svg'); | |
| 382 | + $featuredMedia = Helper::getProductPlaceholderUrl(); | |
| 384 | 383 | } |
| 385 | 384 | |
| 386 | 385 | $galleryImage = get_post_meta($this->product->ID, 'fluent-products-gallery-image', true); |
| 387 | 386 | |
| @@ -1989,9 +1988,9 @@ | ||
| 1989 | 1988 | public function renderVariantImage($variant) |
| 1990 | 1989 | { |
| 1991 | 1990 | $image = $variant->thumbnail; |
| 1992 | 1991 | if (!$image) { |
| 1993 | - $image = Vite::getAssetUrl('images/placeholder.svg'); | |
| 1992 | + $image = Helper::getProductPlaceholderUrl(); | |
| 1994 | 1993 | } |
| 1995 | 1994 | ?> |
| 1996 | 1995 | <div class="fct-product-variant-image"> |
| 1997 | 1996 | <img role="img" alt="<?php echo esc_attr($variant->variation_title); ?>" |